@atlaskit/link-datasource 3.10.3 → 3.11.1
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 +23 -0
- package/dist/cjs/ui/assets-modal/modal/index.js +9 -19
- package/dist/cjs/ui/confluence-search-modal/basic-filters/filters/date-range-picker/styled.js +1 -2
- package/dist/cjs/ui/issue-like-table/edit-type/icon/index.js +3 -3
- package/dist/cjs/ui/issue-like-table/shared-components/icon/index.js +4 -5
- package/dist/cjs/ui/issue-like-table/table-cell-content/inline-edit.js +4 -1
- package/dist/cjs/ui/table-footer/index.js +1 -1
- package/dist/es2019/ui/assets-modal/modal/index.js +5 -17
- package/dist/es2019/ui/confluence-search-modal/basic-filters/filters/date-range-picker/styled.js +1 -2
- package/dist/es2019/ui/issue-like-table/edit-type/icon/index.js +3 -3
- package/dist/es2019/ui/issue-like-table/edit-type/index.js +2 -2
- package/dist/es2019/ui/issue-like-table/shared-components/icon/index.js +4 -5
- package/dist/es2019/ui/issue-like-table/table-cell-content/inline-edit.js +4 -1
- package/dist/es2019/ui/table-footer/index.js +1 -1
- package/dist/esm/ui/assets-modal/modal/index.js +9 -19
- package/dist/esm/ui/confluence-search-modal/basic-filters/filters/date-range-picker/styled.js +1 -2
- package/dist/esm/ui/issue-like-table/edit-type/icon/index.js +3 -3
- package/dist/esm/ui/issue-like-table/edit-type/index.js +2 -2
- package/dist/esm/ui/issue-like-table/shared-components/icon/index.js +4 -5
- package/dist/esm/ui/issue-like-table/table-cell-content/inline-edit.js +4 -1
- package/dist/esm/ui/table-footer/index.js +1 -1
- package/dist/types/ui/issue-like-table/edit-type/icon/index.d.ts +2 -2
- package/dist/types/ui/issue-like-table/shared-components/icon/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/issue-like-table/edit-type/icon/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/issue-like-table/shared-components/icon/index.d.ts +2 -2
- package/package.json +4 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @atlaskit/link-datasource
|
|
2
2
|
|
|
3
|
+
## 3.11.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#166969](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/166969)
|
|
8
|
+
[`ba7fe3ec68dad`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ba7fe3ec68dad) -
|
|
9
|
+
Feature flag removed - platform.linking-platform.datasource-assets_add_version_parameter
|
|
10
|
+
|
|
11
|
+
## 3.11.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [#165662](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/165662)
|
|
16
|
+
[`acebc9f752656`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/acebc9f752656) -
|
|
17
|
+
[ux] EDM-10114 Improve priority edit dropdown in datasources behind feature flag
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- [#166125](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/166125)
|
|
22
|
+
[`83c6d7ca56278`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/83c6d7ca56278) -
|
|
23
|
+
Typography uplift for Linking packages.
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
|
|
3
26
|
## 3.10.3
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
|
@@ -15,7 +15,6 @@ var _analyticsNext = require("@atlaskit/analytics-next");
|
|
|
15
15
|
var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
|
|
16
16
|
var _intlMessagesProvider = require("@atlaskit/intl-messages-provider");
|
|
17
17
|
var _modalDialog = require("@atlaskit/modal-dialog");
|
|
18
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
19
18
|
var _analytics = require("../../../analytics");
|
|
20
19
|
var _constants = require("../../../analytics/constants");
|
|
21
20
|
var _types = require("../../../analytics/types");
|
|
@@ -67,9 +66,7 @@ var PlainAssetsConfigModal = function PlainAssetsConfigModal(props) {
|
|
|
67
66
|
schemaId = _useState4[0],
|
|
68
67
|
setSchemaId = _useState4[1];
|
|
69
68
|
var apiVersion = initialParameters === null || initialParameters === void 0 ? void 0 : initialParameters.version;
|
|
70
|
-
var _useState5 = (0, _react.useState)(
|
|
71
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
72
|
-
(0, _platformFeatureFlags.fg)('platform.linking-platform.datasource-assets_add_version_parameter') && apiVersion !== VERSION_TWO ? [] : initialVisibleColumnKeys),
|
|
69
|
+
var _useState5 = (0, _react.useState)(apiVersion !== VERSION_TWO ? [] : initialVisibleColumnKeys),
|
|
73
70
|
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
74
71
|
visibleColumnKeys = _useState6[0],
|
|
75
72
|
setVisibleColumnKeys = _useState6[1];
|
|
@@ -124,13 +121,12 @@ var PlainAssetsConfigModal = function PlainAssetsConfigModal(props) {
|
|
|
124
121
|
/* ------------------------------ END PERMISSIONS ------------------------------ */
|
|
125
122
|
|
|
126
123
|
var parameters = (0, _react.useMemo)(function () {
|
|
127
|
-
return
|
|
124
|
+
return {
|
|
128
125
|
aql: aql || '',
|
|
129
126
|
schemaId: schemaId || '',
|
|
130
|
-
workspaceId: workspaceId || ''
|
|
131
|
-
}, (0, _platformFeatureFlags.fg)('platform.linking-platform.datasource-assets_add_version_parameter') ? {
|
|
127
|
+
workspaceId: workspaceId || '',
|
|
132
128
|
version: VERSION_TWO
|
|
133
|
-
}
|
|
129
|
+
};
|
|
134
130
|
}, [aql, schemaId, workspaceId]);
|
|
135
131
|
var isParametersSet = !!(aql && workspaceId && schemaId);
|
|
136
132
|
var _useDatasourceTableSt = (0, _useDatasourceTableState.useDatasourceTableState)({
|
|
@@ -213,13 +209,8 @@ var PlainAssetsConfigModal = function PlainAssetsConfigModal(props) {
|
|
|
213
209
|
setIsNewSearch(false);
|
|
214
210
|
}, []);
|
|
215
211
|
(0, _react.useEffect)(function () {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
setVisibleColumnKeys(newVisibleColumnKeys);
|
|
219
|
-
} else {
|
|
220
|
-
var _newVisibleColumnKeys = !initialVisibleColumnKeys || (initialVisibleColumnKeys || []).length === 0 ? defaultVisibleColumnKeys : initialVisibleColumnKeys;
|
|
221
|
-
setVisibleColumnKeys(_newVisibleColumnKeys);
|
|
222
|
-
}
|
|
212
|
+
var newVisibleColumnKeys = initialVisibleColumnKeys && initialVisibleColumnKeys.length > 0 && apiVersion === VERSION_TWO ? initialVisibleColumnKeys : defaultVisibleColumnKeys;
|
|
213
|
+
setVisibleColumnKeys(newVisibleColumnKeys);
|
|
223
214
|
}, [initialVisibleColumnKeys, defaultVisibleColumnKeys, apiVersion]);
|
|
224
215
|
(0, _react.useEffect)(function () {
|
|
225
216
|
if (isNewSearch) {
|
|
@@ -268,13 +259,12 @@ var PlainAssetsConfigModal = function PlainAssetsConfigModal(props) {
|
|
|
268
259
|
} else {
|
|
269
260
|
onInsert((0, _adf.buildDatasourceAdf)({
|
|
270
261
|
id: datasourceId,
|
|
271
|
-
parameters:
|
|
262
|
+
parameters: {
|
|
272
263
|
workspaceId: workspaceId,
|
|
273
264
|
aql: aql,
|
|
274
|
-
schemaId: schemaId
|
|
275
|
-
}, (0, _platformFeatureFlags.fg)('platform.linking-platform.datasource-assets_add_version_parameter') ? {
|
|
265
|
+
schemaId: schemaId,
|
|
276
266
|
version: VERSION_TWO
|
|
277
|
-
}
|
|
267
|
+
},
|
|
278
268
|
views: [{
|
|
279
269
|
type: 'table',
|
|
280
270
|
properties: {
|
package/dist/cjs/ui/confluence-search-modal/basic-filters/filters/date-range-picker/styled.js
CHANGED
|
@@ -91,11 +91,10 @@ var SelectDateRangeButton = exports.SelectDateRangeButton = _styled.default.butt
|
|
|
91
91
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
92
92
|
var DateRangeErrorMessage = exports.DateRangeErrorMessage = _styled.default.div({
|
|
93
93
|
display: 'flex',
|
|
94
|
-
lineHeight: 1.3333,
|
|
95
94
|
marginTop: "var(--ds-space-050, 2px)",
|
|
96
95
|
gap: "var(--ds-space-025, 2px)",
|
|
97
96
|
paddingInlineStart: "var(--ds-space-025, 2px)",
|
|
98
|
-
|
|
97
|
+
font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
99
98
|
color: "var(--ds-text-danger, ".concat(_colors.R400, ")"),
|
|
100
99
|
alignItems: 'center'
|
|
101
100
|
});
|
|
@@ -22,7 +22,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
22
22
|
/**
|
|
23
23
|
* Should be gated by FF rollout of platform-datasources-enable-two-way-sync-priority
|
|
24
24
|
*/
|
|
25
|
-
var
|
|
25
|
+
var IconEditType = function IconEditType(props) {
|
|
26
26
|
var _currentValue$values;
|
|
27
27
|
var currentValue = props.currentValue,
|
|
28
28
|
executeFetch = props.executeFetch;
|
|
@@ -35,7 +35,7 @@ var PriorityEditType = function PriorityEditType(props) {
|
|
|
35
35
|
defaultMenuIsOpen: true,
|
|
36
36
|
blurInputOnSelect: true,
|
|
37
37
|
getOptionValue: function getOptionValue(option) {
|
|
38
|
-
return option.
|
|
38
|
+
return option.text || '';
|
|
39
39
|
},
|
|
40
40
|
options: options,
|
|
41
41
|
isLoading: isLoading,
|
|
@@ -131,4 +131,4 @@ var loadOptions = /*#__PURE__*/function () {
|
|
|
131
131
|
return _ref2.apply(this, arguments);
|
|
132
132
|
};
|
|
133
133
|
}();
|
|
134
|
-
var _default = exports.default =
|
|
134
|
+
var _default = exports.default = IconEditType;
|
|
@@ -13,15 +13,14 @@ var labelStyles = (0, _primitives.xcss)({
|
|
|
13
13
|
width: '100%'
|
|
14
14
|
});
|
|
15
15
|
/**
|
|
16
|
-
* Renders a icon and label.
|
|
17
|
-
* If the text is undefined, render the
|
|
16
|
+
* Renders a icon and text label.
|
|
17
|
+
* If the text is undefined, will not render the text label.
|
|
18
18
|
*/
|
|
19
19
|
function SharedIconComponent(_ref) {
|
|
20
20
|
var iconUrl = _ref.iconUrl,
|
|
21
21
|
label = _ref.label,
|
|
22
22
|
text = _ref.text,
|
|
23
23
|
testId = _ref.testId;
|
|
24
|
-
var displayText = text === undefined || text === '' ? label ? label.charAt(0).toUpperCase() + label.slice(1) : undefined : text;
|
|
25
24
|
return /*#__PURE__*/_react.default.createElement(_primitives.Flex, {
|
|
26
25
|
gap: "space.100",
|
|
27
26
|
alignItems: "center",
|
|
@@ -35,8 +34,8 @@ function SharedIconComponent(_ref) {
|
|
|
35
34
|
minWidth: '24px',
|
|
36
35
|
maxWidth: '24px'
|
|
37
36
|
} // having just width: '24px' shrinks it when table width is reduced
|
|
38
|
-
})),
|
|
37
|
+
})), text && /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
39
38
|
xcss: labelStyles,
|
|
40
39
|
testId: "".concat(testId, "-text")
|
|
41
|
-
},
|
|
40
|
+
}, text));
|
|
42
41
|
}
|
|
@@ -29,12 +29,14 @@ var editContainerStyles = (0, _primitives.xcss)({
|
|
|
29
29
|
marginBlockStart: 'space.negative.100'
|
|
30
30
|
});
|
|
31
31
|
var getBackendUpdateValue = function getBackendUpdateValue(typedNewValue) {
|
|
32
|
-
var _typedNewValue$values;
|
|
32
|
+
var _typedNewValue$values, _typedNewValue$values2;
|
|
33
33
|
switch (typedNewValue.type) {
|
|
34
34
|
case 'string':
|
|
35
35
|
return typedNewValue.values[0] || '';
|
|
36
36
|
case 'status':
|
|
37
37
|
return ((_typedNewValue$values = typedNewValue.values[0]) === null || _typedNewValue$values === void 0 ? void 0 : _typedNewValue$values.transitionId) || '';
|
|
38
|
+
case 'icon':
|
|
39
|
+
return ((_typedNewValue$values2 = typedNewValue.values[0]) === null || _typedNewValue$values2 === void 0 ? void 0 : _typedNewValue$values2.id) || '';
|
|
38
40
|
}
|
|
39
41
|
throw new Error("Datasource 2 way sync Backend update value not implemented for type ".concat(typedNewValue.type));
|
|
40
42
|
};
|
|
@@ -45,6 +47,7 @@ var mapUpdatedItem = function mapUpdatedItem(existingItem, columnKey, newValue)
|
|
|
45
47
|
data: newValue.values[0] || ''
|
|
46
48
|
}));
|
|
47
49
|
case 'status':
|
|
50
|
+
case 'icon':
|
|
48
51
|
return newValue.values[0] ? _objectSpread(_objectSpread({}, existingItem), {}, (0, _defineProperty2.default)({}, columnKey, {
|
|
49
52
|
data: newValue.values[0]
|
|
50
53
|
})) : existingItem;
|
|
@@ -60,7 +60,7 @@ var SyncWrapper = _styled.default.div({
|
|
|
60
60
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
61
61
|
var SyncTextWrapper = _styled.default.div({
|
|
62
62
|
marginRight: "var(--ds-space-075, 6px)",
|
|
63
|
-
|
|
63
|
+
font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
64
64
|
});
|
|
65
65
|
var TableFooter = exports.TableFooter = function TableFooter(_ref) {
|
|
66
66
|
var datasourceId = _ref.datasourceId,
|
|
@@ -12,7 +12,6 @@ import { withAnalyticsContext } from '@atlaskit/analytics-next';
|
|
|
12
12
|
import Button from '@atlaskit/button/standard-button';
|
|
13
13
|
import { IntlMessagesProvider } from '@atlaskit/intl-messages-provider';
|
|
14
14
|
import { ModalBody, ModalFooter, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
|
|
15
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
15
|
import { EVENT_CHANNEL, useDatasourceAnalyticsEvents } from '../../../analytics';
|
|
17
16
|
import { componentMetadata } from '../../../analytics/constants';
|
|
18
17
|
import { DatasourceAction, DatasourceDisplay, DatasourceSearchMethod } from '../../../analytics/types';
|
|
@@ -55,9 +54,7 @@ const PlainAssetsConfigModal = props => {
|
|
|
55
54
|
const [aql, setAql] = useState(initialParameters === null || initialParameters === void 0 ? void 0 : initialParameters.aql);
|
|
56
55
|
const [schemaId, setSchemaId] = useState(initialParameters === null || initialParameters === void 0 ? void 0 : initialParameters.schemaId);
|
|
57
56
|
const apiVersion = initialParameters === null || initialParameters === void 0 ? void 0 : initialParameters.version;
|
|
58
|
-
const [visibleColumnKeys, setVisibleColumnKeys] = useState(
|
|
59
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
60
|
-
fg('platform.linking-platform.datasource-assets_add_version_parameter') && apiVersion !== VERSION_TWO ? [] : initialVisibleColumnKeys);
|
|
57
|
+
const [visibleColumnKeys, setVisibleColumnKeys] = useState(apiVersion !== VERSION_TWO ? [] : initialVisibleColumnKeys);
|
|
61
58
|
const [isNewSearch, setIsNewSearch] = useState(false);
|
|
62
59
|
const [errorState, setErrorState] = useState();
|
|
63
60
|
const {
|
|
@@ -108,9 +105,7 @@ const PlainAssetsConfigModal = props => {
|
|
|
108
105
|
aql: aql || '',
|
|
109
106
|
schemaId: schemaId || '',
|
|
110
107
|
workspaceId: workspaceId || '',
|
|
111
|
-
|
|
112
|
-
version: VERSION_TWO
|
|
113
|
-
} : {})
|
|
108
|
+
version: VERSION_TWO
|
|
114
109
|
}), [aql, schemaId, workspaceId]);
|
|
115
110
|
const isParametersSet = !!(aql && workspaceId && schemaId);
|
|
116
111
|
const {
|
|
@@ -194,13 +189,8 @@ const PlainAssetsConfigModal = props => {
|
|
|
194
189
|
setIsNewSearch(false);
|
|
195
190
|
}, []);
|
|
196
191
|
useEffect(() => {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
setVisibleColumnKeys(newVisibleColumnKeys);
|
|
200
|
-
} else {
|
|
201
|
-
const newVisibleColumnKeys = !initialVisibleColumnKeys || (initialVisibleColumnKeys || []).length === 0 ? defaultVisibleColumnKeys : initialVisibleColumnKeys;
|
|
202
|
-
setVisibleColumnKeys(newVisibleColumnKeys);
|
|
203
|
-
}
|
|
192
|
+
const newVisibleColumnKeys = initialVisibleColumnKeys && initialVisibleColumnKeys.length > 0 && apiVersion === VERSION_TWO ? initialVisibleColumnKeys : defaultVisibleColumnKeys;
|
|
193
|
+
setVisibleColumnKeys(newVisibleColumnKeys);
|
|
204
194
|
}, [initialVisibleColumnKeys, defaultVisibleColumnKeys, apiVersion]);
|
|
205
195
|
useEffect(() => {
|
|
206
196
|
if (isNewSearch) {
|
|
@@ -253,9 +243,7 @@ const PlainAssetsConfigModal = props => {
|
|
|
253
243
|
workspaceId,
|
|
254
244
|
aql,
|
|
255
245
|
schemaId,
|
|
256
|
-
|
|
257
|
-
version: VERSION_TWO
|
|
258
|
-
} : {})
|
|
246
|
+
version: VERSION_TWO
|
|
259
247
|
},
|
|
260
248
|
views: [{
|
|
261
249
|
type: 'table',
|
package/dist/es2019/ui/confluence-search-modal/basic-filters/filters/date-range-picker/styled.js
CHANGED
|
@@ -81,11 +81,10 @@ export const SelectDateRangeButton = styled.button({
|
|
|
81
81
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
82
82
|
export const DateRangeErrorMessage = styled.div({
|
|
83
83
|
display: 'flex',
|
|
84
|
-
lineHeight: 1.3333,
|
|
85
84
|
marginTop: "var(--ds-space-050, 2px)",
|
|
86
85
|
gap: "var(--ds-space-025, 2px)",
|
|
87
86
|
paddingInlineStart: "var(--ds-space-025, 2px)",
|
|
88
|
-
|
|
87
|
+
font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
89
88
|
color: `var(--ds-text-danger, ${R400})`,
|
|
90
89
|
alignItems: 'center'
|
|
91
90
|
});
|
|
@@ -9,7 +9,7 @@ import { SharedIconComponent } from '../../shared-components/icon';
|
|
|
9
9
|
/**
|
|
10
10
|
* Should be gated by FF rollout of platform-datasources-enable-two-way-sync-priority
|
|
11
11
|
*/
|
|
12
|
-
const
|
|
12
|
+
const IconEditType = props => {
|
|
13
13
|
var _currentValue$values;
|
|
14
14
|
const {
|
|
15
15
|
currentValue,
|
|
@@ -24,7 +24,7 @@ const PriorityEditType = props => {
|
|
|
24
24
|
autoFocus: true,
|
|
25
25
|
defaultMenuIsOpen: true,
|
|
26
26
|
blurInputOnSelect: true,
|
|
27
|
-
getOptionValue: option => option.
|
|
27
|
+
getOptionValue: option => option.text || '',
|
|
28
28
|
options: options,
|
|
29
29
|
isLoading: isLoading,
|
|
30
30
|
defaultValue: currentValue === null || currentValue === void 0 ? void 0 : (_currentValue$values = currentValue.values) === null || _currentValue$values === void 0 ? void 0 : _currentValue$values[0],
|
|
@@ -91,4 +91,4 @@ const loadOptions = async (_currentValue, executeFetch) => {
|
|
|
91
91
|
}
|
|
92
92
|
return [];
|
|
93
93
|
};
|
|
94
|
-
export default
|
|
94
|
+
export default IconEditType;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
-
import
|
|
4
|
+
import IconEditType from './icon';
|
|
5
5
|
import StatusEditType from './status';
|
|
6
6
|
import TextEditType, { toTextValue } from './text';
|
|
7
7
|
|
|
@@ -31,7 +31,7 @@ export const editType = ({
|
|
|
31
31
|
editView: ({
|
|
32
32
|
value,
|
|
33
33
|
...fieldProps
|
|
34
|
-
}) => /*#__PURE__*/React.createElement(
|
|
34
|
+
}) => /*#__PURE__*/React.createElement(IconEditType, _extends({}, fieldProps, {
|
|
35
35
|
currentValue: currentValue,
|
|
36
36
|
setEditValues: setEditValues,
|
|
37
37
|
id: ACTIVE_INLINE_EDIT_ID,
|
|
@@ -6,8 +6,8 @@ const labelStyles = xcss({
|
|
|
6
6
|
width: '100%'
|
|
7
7
|
});
|
|
8
8
|
/**
|
|
9
|
-
* Renders a icon and label.
|
|
10
|
-
* If the text is undefined, render the
|
|
9
|
+
* Renders a icon and text label.
|
|
10
|
+
* If the text is undefined, will not render the text label.
|
|
11
11
|
*/
|
|
12
12
|
export function SharedIconComponent({
|
|
13
13
|
iconUrl,
|
|
@@ -15,7 +15,6 @@ export function SharedIconComponent({
|
|
|
15
15
|
text,
|
|
16
16
|
testId
|
|
17
17
|
}) {
|
|
18
|
-
const displayText = text === undefined || text === '' ? label ? label.charAt(0).toUpperCase() + label.slice(1) : undefined : text;
|
|
19
18
|
return /*#__PURE__*/React.createElement(Flex, {
|
|
20
19
|
gap: "space.100",
|
|
21
20
|
alignItems: "center",
|
|
@@ -29,8 +28,8 @@ export function SharedIconComponent({
|
|
|
29
28
|
minWidth: '24px',
|
|
30
29
|
maxWidth: '24px'
|
|
31
30
|
} // having just width: '24px' shrinks it when table width is reduced
|
|
32
|
-
})),
|
|
31
|
+
})), text && /*#__PURE__*/React.createElement(Box, {
|
|
33
32
|
xcss: labelStyles,
|
|
34
33
|
testId: `${testId}-text`
|
|
35
|
-
},
|
|
34
|
+
}, text));
|
|
36
35
|
}
|
|
@@ -14,12 +14,14 @@ const editContainerStyles = xcss({
|
|
|
14
14
|
marginBlockStart: 'space.negative.100'
|
|
15
15
|
});
|
|
16
16
|
const getBackendUpdateValue = typedNewValue => {
|
|
17
|
-
var _typedNewValue$values;
|
|
17
|
+
var _typedNewValue$values, _typedNewValue$values2;
|
|
18
18
|
switch (typedNewValue.type) {
|
|
19
19
|
case 'string':
|
|
20
20
|
return typedNewValue.values[0] || '';
|
|
21
21
|
case 'status':
|
|
22
22
|
return ((_typedNewValue$values = typedNewValue.values[0]) === null || _typedNewValue$values === void 0 ? void 0 : _typedNewValue$values.transitionId) || '';
|
|
23
|
+
case 'icon':
|
|
24
|
+
return ((_typedNewValue$values2 = typedNewValue.values[0]) === null || _typedNewValue$values2 === void 0 ? void 0 : _typedNewValue$values2.id) || '';
|
|
23
25
|
}
|
|
24
26
|
throw new Error(`Datasource 2 way sync Backend update value not implemented for type ${typedNewValue.type}`);
|
|
25
27
|
};
|
|
@@ -33,6 +35,7 @@ const mapUpdatedItem = (existingItem, columnKey, newValue) => {
|
|
|
33
35
|
}
|
|
34
36
|
};
|
|
35
37
|
case 'status':
|
|
38
|
+
case 'icon':
|
|
36
39
|
return newValue.values[0] ? {
|
|
37
40
|
...existingItem,
|
|
38
41
|
[columnKey]: {
|
|
@@ -47,7 +47,7 @@ const SyncWrapper = styled.div({
|
|
|
47
47
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
48
48
|
const SyncTextWrapper = styled.div({
|
|
49
49
|
marginRight: "var(--ds-space-075, 6px)",
|
|
50
|
-
|
|
50
|
+
font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
51
51
|
});
|
|
52
52
|
export const TableFooter = ({
|
|
53
53
|
datasourceId,
|
|
@@ -16,7 +16,6 @@ import { withAnalyticsContext } from '@atlaskit/analytics-next';
|
|
|
16
16
|
import Button from '@atlaskit/button/standard-button';
|
|
17
17
|
import { IntlMessagesProvider } from '@atlaskit/intl-messages-provider';
|
|
18
18
|
import { ModalBody, ModalFooter, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
|
|
19
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
20
19
|
import { EVENT_CHANNEL, useDatasourceAnalyticsEvents } from '../../../analytics';
|
|
21
20
|
import { componentMetadata } from '../../../analytics/constants';
|
|
22
21
|
import { DatasourceAction, DatasourceDisplay, DatasourceSearchMethod } from '../../../analytics/types';
|
|
@@ -63,9 +62,7 @@ var PlainAssetsConfigModal = function PlainAssetsConfigModal(props) {
|
|
|
63
62
|
schemaId = _useState4[0],
|
|
64
63
|
setSchemaId = _useState4[1];
|
|
65
64
|
var apiVersion = initialParameters === null || initialParameters === void 0 ? void 0 : initialParameters.version;
|
|
66
|
-
var _useState5 = useState(
|
|
67
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
68
|
-
fg('platform.linking-platform.datasource-assets_add_version_parameter') && apiVersion !== VERSION_TWO ? [] : initialVisibleColumnKeys),
|
|
65
|
+
var _useState5 = useState(apiVersion !== VERSION_TWO ? [] : initialVisibleColumnKeys),
|
|
69
66
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
70
67
|
visibleColumnKeys = _useState6[0],
|
|
71
68
|
setVisibleColumnKeys = _useState6[1];
|
|
@@ -120,13 +117,12 @@ var PlainAssetsConfigModal = function PlainAssetsConfigModal(props) {
|
|
|
120
117
|
/* ------------------------------ END PERMISSIONS ------------------------------ */
|
|
121
118
|
|
|
122
119
|
var parameters = useMemo(function () {
|
|
123
|
-
return
|
|
120
|
+
return {
|
|
124
121
|
aql: aql || '',
|
|
125
122
|
schemaId: schemaId || '',
|
|
126
|
-
workspaceId: workspaceId || ''
|
|
127
|
-
}, fg('platform.linking-platform.datasource-assets_add_version_parameter') ? {
|
|
123
|
+
workspaceId: workspaceId || '',
|
|
128
124
|
version: VERSION_TWO
|
|
129
|
-
}
|
|
125
|
+
};
|
|
130
126
|
}, [aql, schemaId, workspaceId]);
|
|
131
127
|
var isParametersSet = !!(aql && workspaceId && schemaId);
|
|
132
128
|
var _useDatasourceTableSt = useDatasourceTableState({
|
|
@@ -209,13 +205,8 @@ var PlainAssetsConfigModal = function PlainAssetsConfigModal(props) {
|
|
|
209
205
|
setIsNewSearch(false);
|
|
210
206
|
}, []);
|
|
211
207
|
useEffect(function () {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
setVisibleColumnKeys(newVisibleColumnKeys);
|
|
215
|
-
} else {
|
|
216
|
-
var _newVisibleColumnKeys = !initialVisibleColumnKeys || (initialVisibleColumnKeys || []).length === 0 ? defaultVisibleColumnKeys : initialVisibleColumnKeys;
|
|
217
|
-
setVisibleColumnKeys(_newVisibleColumnKeys);
|
|
218
|
-
}
|
|
208
|
+
var newVisibleColumnKeys = initialVisibleColumnKeys && initialVisibleColumnKeys.length > 0 && apiVersion === VERSION_TWO ? initialVisibleColumnKeys : defaultVisibleColumnKeys;
|
|
209
|
+
setVisibleColumnKeys(newVisibleColumnKeys);
|
|
219
210
|
}, [initialVisibleColumnKeys, defaultVisibleColumnKeys, apiVersion]);
|
|
220
211
|
useEffect(function () {
|
|
221
212
|
if (isNewSearch) {
|
|
@@ -264,13 +255,12 @@ var PlainAssetsConfigModal = function PlainAssetsConfigModal(props) {
|
|
|
264
255
|
} else {
|
|
265
256
|
onInsert(buildDatasourceAdf({
|
|
266
257
|
id: datasourceId,
|
|
267
|
-
parameters:
|
|
258
|
+
parameters: {
|
|
268
259
|
workspaceId: workspaceId,
|
|
269
260
|
aql: aql,
|
|
270
|
-
schemaId: schemaId
|
|
271
|
-
}, fg('platform.linking-platform.datasource-assets_add_version_parameter') ? {
|
|
261
|
+
schemaId: schemaId,
|
|
272
262
|
version: VERSION_TWO
|
|
273
|
-
}
|
|
263
|
+
},
|
|
274
264
|
views: [{
|
|
275
265
|
type: 'table',
|
|
276
266
|
properties: {
|
package/dist/esm/ui/confluence-search-modal/basic-filters/filters/date-range-picker/styled.js
CHANGED
|
@@ -83,11 +83,10 @@ export var SelectDateRangeButton = styled.button({
|
|
|
83
83
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
84
84
|
export var DateRangeErrorMessage = styled.div({
|
|
85
85
|
display: 'flex',
|
|
86
|
-
lineHeight: 1.3333,
|
|
87
86
|
marginTop: "var(--ds-space-050, 2px)",
|
|
88
87
|
gap: "var(--ds-space-025, 2px)",
|
|
89
88
|
paddingInlineStart: "var(--ds-space-025, 2px)",
|
|
90
|
-
|
|
89
|
+
font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
91
90
|
color: "var(--ds-text-danger, ".concat(R400, ")"),
|
|
92
91
|
alignItems: 'center'
|
|
93
92
|
});
|
|
@@ -12,7 +12,7 @@ import { SharedIconComponent } from '../../shared-components/icon';
|
|
|
12
12
|
/**
|
|
13
13
|
* Should be gated by FF rollout of platform-datasources-enable-two-way-sync-priority
|
|
14
14
|
*/
|
|
15
|
-
var
|
|
15
|
+
var IconEditType = function IconEditType(props) {
|
|
16
16
|
var _currentValue$values;
|
|
17
17
|
var currentValue = props.currentValue,
|
|
18
18
|
executeFetch = props.executeFetch;
|
|
@@ -25,7 +25,7 @@ var PriorityEditType = function PriorityEditType(props) {
|
|
|
25
25
|
defaultMenuIsOpen: true,
|
|
26
26
|
blurInputOnSelect: true,
|
|
27
27
|
getOptionValue: function getOptionValue(option) {
|
|
28
|
-
return option.
|
|
28
|
+
return option.text || '';
|
|
29
29
|
},
|
|
30
30
|
options: options,
|
|
31
31
|
isLoading: isLoading,
|
|
@@ -121,4 +121,4 @@ var loadOptions = /*#__PURE__*/function () {
|
|
|
121
121
|
return _ref2.apply(this, arguments);
|
|
122
122
|
};
|
|
123
123
|
}();
|
|
124
|
-
export default
|
|
124
|
+
export default IconEditType;
|
|
@@ -5,7 +5,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
5
5
|
var _excluded = ["value"];
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
-
import
|
|
8
|
+
import IconEditType from './icon';
|
|
9
9
|
import StatusEditType from './status';
|
|
10
10
|
import TextEditType, { toTextValue } from './text';
|
|
11
11
|
|
|
@@ -35,7 +35,7 @@ export var editType = function editType(_ref) {
|
|
|
35
35
|
editView: function editView(_ref3) {
|
|
36
36
|
var value = _ref3.value,
|
|
37
37
|
fieldProps = _objectWithoutProperties(_ref3, _excluded);
|
|
38
|
-
return /*#__PURE__*/React.createElement(
|
|
38
|
+
return /*#__PURE__*/React.createElement(IconEditType, _extends({}, fieldProps, {
|
|
39
39
|
currentValue: currentValue,
|
|
40
40
|
setEditValues: setEditValues,
|
|
41
41
|
id: ACTIVE_INLINE_EDIT_ID,
|
|
@@ -6,15 +6,14 @@ var labelStyles = xcss({
|
|
|
6
6
|
width: '100%'
|
|
7
7
|
});
|
|
8
8
|
/**
|
|
9
|
-
* Renders a icon and label.
|
|
10
|
-
* If the text is undefined, render the
|
|
9
|
+
* Renders a icon and text label.
|
|
10
|
+
* If the text is undefined, will not render the text label.
|
|
11
11
|
*/
|
|
12
12
|
export function SharedIconComponent(_ref) {
|
|
13
13
|
var iconUrl = _ref.iconUrl,
|
|
14
14
|
label = _ref.label,
|
|
15
15
|
text = _ref.text,
|
|
16
16
|
testId = _ref.testId;
|
|
17
|
-
var displayText = text === undefined || text === '' ? label ? label.charAt(0).toUpperCase() + label.slice(1) : undefined : text;
|
|
18
17
|
return /*#__PURE__*/React.createElement(Flex, {
|
|
19
18
|
gap: "space.100",
|
|
20
19
|
alignItems: "center",
|
|
@@ -28,8 +27,8 @@ export function SharedIconComponent(_ref) {
|
|
|
28
27
|
minWidth: '24px',
|
|
29
28
|
maxWidth: '24px'
|
|
30
29
|
} // having just width: '24px' shrinks it when table width is reduced
|
|
31
|
-
})),
|
|
30
|
+
})), text && /*#__PURE__*/React.createElement(Box, {
|
|
32
31
|
xcss: labelStyles,
|
|
33
32
|
testId: "".concat(testId, "-text")
|
|
34
|
-
},
|
|
33
|
+
}, text));
|
|
35
34
|
}
|
|
@@ -19,12 +19,14 @@ var editContainerStyles = xcss({
|
|
|
19
19
|
marginBlockStart: 'space.negative.100'
|
|
20
20
|
});
|
|
21
21
|
var getBackendUpdateValue = function getBackendUpdateValue(typedNewValue) {
|
|
22
|
-
var _typedNewValue$values;
|
|
22
|
+
var _typedNewValue$values, _typedNewValue$values2;
|
|
23
23
|
switch (typedNewValue.type) {
|
|
24
24
|
case 'string':
|
|
25
25
|
return typedNewValue.values[0] || '';
|
|
26
26
|
case 'status':
|
|
27
27
|
return ((_typedNewValue$values = typedNewValue.values[0]) === null || _typedNewValue$values === void 0 ? void 0 : _typedNewValue$values.transitionId) || '';
|
|
28
|
+
case 'icon':
|
|
29
|
+
return ((_typedNewValue$values2 = typedNewValue.values[0]) === null || _typedNewValue$values2 === void 0 ? void 0 : _typedNewValue$values2.id) || '';
|
|
28
30
|
}
|
|
29
31
|
throw new Error("Datasource 2 way sync Backend update value not implemented for type ".concat(typedNewValue.type));
|
|
30
32
|
};
|
|
@@ -35,6 +37,7 @@ var mapUpdatedItem = function mapUpdatedItem(existingItem, columnKey, newValue)
|
|
|
35
37
|
data: newValue.values[0] || ''
|
|
36
38
|
}));
|
|
37
39
|
case 'status':
|
|
40
|
+
case 'icon':
|
|
38
41
|
return newValue.values[0] ? _objectSpread(_objectSpread({}, existingItem), {}, _defineProperty({}, columnKey, {
|
|
39
42
|
data: newValue.values[0]
|
|
40
43
|
})) : existingItem;
|
|
@@ -48,7 +48,7 @@ var SyncWrapper = styled.div({
|
|
|
48
48
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
49
49
|
var SyncTextWrapper = styled.div({
|
|
50
50
|
marginRight: "var(--ds-space-075, 6px)",
|
|
51
|
-
|
|
51
|
+
font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
52
52
|
});
|
|
53
53
|
export var TableFooter = function TableFooter(_ref) {
|
|
54
54
|
var datasourceId = _ref.datasourceId,
|
|
@@ -10,5 +10,5 @@ interface Props extends Omit<FieldProps<string>, 'value'> {
|
|
|
10
10
|
/**
|
|
11
11
|
* Should be gated by FF rollout of platform-datasources-enable-two-way-sync-priority
|
|
12
12
|
*/
|
|
13
|
-
declare const
|
|
14
|
-
export default
|
|
13
|
+
declare const IconEditType: (props: Props) => JSX.Element;
|
|
14
|
+
export default IconEditType;
|
|
@@ -16,8 +16,8 @@ interface SharedIconComponentProps {
|
|
|
16
16
|
testId: string;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
|
-
* Renders a icon and label.
|
|
20
|
-
* If the text is undefined, render the
|
|
19
|
+
* Renders a icon and text label.
|
|
20
|
+
* If the text is undefined, will not render the text label.
|
|
21
21
|
*/
|
|
22
22
|
export declare function SharedIconComponent({ iconUrl, label, text, testId }: SharedIconComponentProps): JSX.Element;
|
|
23
23
|
export {};
|
|
@@ -10,5 +10,5 @@ interface Props extends Omit<FieldProps<string>, 'value'> {
|
|
|
10
10
|
/**
|
|
11
11
|
* Should be gated by FF rollout of platform-datasources-enable-two-way-sync-priority
|
|
12
12
|
*/
|
|
13
|
-
declare const
|
|
14
|
-
export default
|
|
13
|
+
declare const IconEditType: (props: Props) => JSX.Element;
|
|
14
|
+
export default IconEditType;
|
|
@@ -16,8 +16,8 @@ interface SharedIconComponentProps {
|
|
|
16
16
|
testId: string;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
|
-
* Renders a icon and label.
|
|
20
|
-
* If the text is undefined, render the
|
|
19
|
+
* Renders a icon and text label.
|
|
20
|
+
* If the text is undefined, will not render the text label.
|
|
21
21
|
*/
|
|
22
22
|
export declare function SharedIconComponent({ iconUrl, label, text, testId }: SharedIconComponentProps): JSX.Element;
|
|
23
23
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-datasource",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.11.1",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@atlaskit/flag": "^15.8.0",
|
|
49
49
|
"@atlaskit/form": "^10.5.0",
|
|
50
50
|
"@atlaskit/heading": "^3.1.0",
|
|
51
|
-
"@atlaskit/icon": "^22.
|
|
51
|
+
"@atlaskit/icon": "^22.25.0",
|
|
52
52
|
"@atlaskit/icon-object": "^6.7.0",
|
|
53
53
|
"@atlaskit/image": "^1.3.0",
|
|
54
54
|
"@atlaskit/inline-edit": "^13.7.0",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll": "^1.2.0",
|
|
72
72
|
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^1.1.0",
|
|
73
73
|
"@atlaskit/primitives": "^13.2.0",
|
|
74
|
-
"@atlaskit/react-select": "^1.
|
|
74
|
+
"@atlaskit/react-select": "^1.4.0",
|
|
75
75
|
"@atlaskit/select": "^18.5.0",
|
|
76
76
|
"@atlaskit/smart-card": "^30.3.0",
|
|
77
77
|
"@atlaskit/smart-user-picker": "6.11.2",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"@atlaskit/tag": "^12.6.0",
|
|
80
80
|
"@atlaskit/textfield": "6.5.5",
|
|
81
81
|
"@atlaskit/theme": "^14.0.0",
|
|
82
|
-
"@atlaskit/tokens": "^2.
|
|
82
|
+
"@atlaskit/tokens": "^2.3.0",
|
|
83
83
|
"@atlaskit/tooltip": "^18.9.0",
|
|
84
84
|
"@atlaskit/ufo": "^0.3.0",
|
|
85
85
|
"@atlaskit/width-detector": "^4.3.0",
|
|
@@ -171,9 +171,6 @@
|
|
|
171
171
|
"platform-datasources-enable-two-way-sync-priority": {
|
|
172
172
|
"type": "boolean"
|
|
173
173
|
},
|
|
174
|
-
"platform.linking-platform.datasource-assets_add_version_parameter": {
|
|
175
|
-
"type": "boolean"
|
|
176
|
-
},
|
|
177
174
|
"platform.linking-platform.datasource-assets_update_refresh_button_dt3qk": {
|
|
178
175
|
"type": "boolean"
|
|
179
176
|
},
|