@atlaskit/link-datasource 3.11.1 → 3.12.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 CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/link-datasource
2
2
 
3
+ ## 3.12.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#167582](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/167582)
8
+ [`668b477adfc03`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/668b477adfc03) -
9
+ Prevent problem with VR Test FF permutations by enforcing depency of `react_sweet_state` for
10
+ `enable-two-way-sync`
11
+
12
+ ## 3.12.0
13
+
14
+ ### Minor Changes
15
+
16
+ - [#166988](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/166988)
17
+ [`0950f1f3c353f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0950f1f3c353f) -
18
+ [ux] EDM-11263 Add UFO metrics to inline-edit icon field
19
+
3
20
  ## 3.11.1
4
21
 
5
22
  ### Patch Changes
@@ -13,7 +13,11 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
13
13
  var _react = _interopRequireWildcard(require("react"));
14
14
  var _linkingTypes = require("@atlaskit/linking-types");
15
15
  var _select = _interopRequireDefault(require("@atlaskit/select"));
16
+ var _ufoExperiences = require("../../../../analytics/ufoExperiences");
17
+ var _datasourceExperienceId = require("../../../../contexts/datasource-experience-id");
18
+ var _useDatasourceTableFlag = require("../../../../hooks/useDatasourceTableFlag");
16
19
  var _icon = require("../../shared-components/icon");
20
+ var _inlineEdit = require("../../table-cell-content/inline-edit");
17
21
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
18
22
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
19
23
  // FilterOptionOption is used in the filterOption function which is part of the public API, but the type itself is not exported
@@ -28,7 +32,23 @@ var IconEditType = function IconEditType(props) {
28
32
  executeFetch = props.executeFetch;
29
33
  var _usePriorityOptions = usePriorityOptions(currentValue, executeFetch),
30
34
  options = _usePriorityOptions.options,
31
- isLoading = _usePriorityOptions.isLoading;
35
+ isLoading = _usePriorityOptions.isLoading,
36
+ hasFailed = _usePriorityOptions.hasFailed;
37
+ var experienceId = (0, _datasourceExperienceId.useDatasourceExperienceId)();
38
+ (0, _react.useEffect)(function () {
39
+ if (!experienceId) {
40
+ return;
41
+ }
42
+ if (hasFailed) {
43
+ (0, _ufoExperiences.failUfoExperience)({
44
+ name: _inlineEdit.InlineEditUFOExperience
45
+ }, experienceId);
46
+ } else if (!isLoading) {
47
+ (0, _ufoExperiences.succeedUfoExperience)({
48
+ name: _inlineEdit.InlineEditUFOExperience
49
+ }, experienceId);
50
+ }
51
+ }, [experienceId, isLoading, hasFailed]);
32
52
  return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_select.default, (0, _extends2.default)({}, props, {
33
53
  testId: "inline-edit-priority",
34
54
  autoFocus: true,
@@ -66,30 +86,45 @@ var filterOption = function filterOption(option, inputValue) {
66
86
  var usePriorityOptions = function usePriorityOptions(currentValue, executeFetch) {
67
87
  var _useState = (0, _react.useState)({
68
88
  isLoading: true,
69
- options: []
89
+ options: [],
90
+ hasFailed: false
70
91
  }),
71
92
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
72
93
  _useState2$ = _useState2[0],
73
94
  options = _useState2$.options,
74
95
  isLoading = _useState2$.isLoading,
96
+ hasFailed = _useState2$.hasFailed,
75
97
  setOptions = _useState2[1];
98
+ var _useDatasourceTableFl = (0, _useDatasourceTableFlag.useDatasourceTableFlag)({
99
+ isFetchAction: true
100
+ }),
101
+ showErrorFlag = _useDatasourceTableFl.showErrorFlag;
76
102
  (0, _react.useEffect)(function () {
77
103
  var isMounted = true;
78
104
  loadOptions(currentValue, executeFetch).then(function (options) {
79
105
  if (isMounted) {
80
106
  setOptions({
81
107
  isLoading: false,
82
- options: options
108
+ options: options,
109
+ hasFailed: false
83
110
  });
84
111
  }
112
+ }).catch(function (err) {
113
+ showErrorFlag();
114
+ setOptions({
115
+ isLoading: false,
116
+ options: [],
117
+ hasFailed: true
118
+ });
85
119
  });
86
120
  return function () {
87
121
  isMounted = false;
88
122
  };
89
- }, [currentValue, executeFetch]);
123
+ }, [currentValue, executeFetch, showErrorFlag]);
90
124
  return {
91
125
  options: options,
92
- isLoading: isLoading
126
+ isLoading: isLoading,
127
+ hasFailed: hasFailed
93
128
  };
94
129
  };
95
130
 
@@ -114,14 +149,20 @@ var loadOptions = /*#__PURE__*/function () {
114
149
  _yield$executeFetch = _context.sent;
115
150
  operationStatus = _yield$executeFetch.operationStatus;
116
151
  entities = _yield$executeFetch.entities;
117
- if (!(operationStatus === _linkingTypes.ActionOperationStatus.SUCCESS && entities)) {
152
+ if (!(operationStatus === _linkingTypes.ActionOperationStatus.FAILURE)) {
118
153
  _context.next = 9;
119
154
  break;
120
155
  }
121
- return _context.abrupt("return", entities);
156
+ throw new Error('Failed to fetch icon options');
122
157
  case 9:
158
+ if (!(operationStatus === _linkingTypes.ActionOperationStatus.SUCCESS && entities)) {
159
+ _context.next = 11;
160
+ break;
161
+ }
162
+ return _context.abrupt("return", entities);
163
+ case 11:
123
164
  return _context.abrupt("return", []);
124
- case 10:
165
+ case 12:
125
166
  case "end":
126
167
  return _context.stop();
127
168
  }
@@ -719,35 +719,37 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
719
719
  shouldUseWidth: shouldUseWidth,
720
720
  width: width
721
721
  });
722
-
723
722
  // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
724
- if ((0, _platformFeatureFlags.fg)('platform-datasources-enable-two-way-sync')) {
725
- return (0, _react2.jsx)(_styled2.InlineEditableTableCell, {
726
- key: cellKey,
727
- "data-testid": testId && "".concat(testId, "--cell-").concat(cellIndex),
728
- colSpan: isEditable && isLastCell ? 2 : undefined
729
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
730
- ,
731
- style: loadingRowStyle,
732
- css: [wrappedColumnKeys !== null && wrappedColumnKeys !== void 0 && wrappedColumnKeys.includes(cellKey) ? null : truncateStyles]
733
- }, content);
734
- } else {
735
- // extra padding is required around skeleton loader to avoid vertical jumps when data loads
736
- if (key !== null && key !== void 0 && key.includes('loading')) {
737
- loadingRowStyle = _objectSpread(_objectSpread({}, loadingRowStyle), {}, {
738
- paddingBlock: "var(--ds-space-100, 8px)"
739
- });
723
+ if ((0, _platformFeatureFlags.fg)('enable_datasource_react_sweet_state')) {
724
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
725
+ if ((0, _platformFeatureFlags.fg)('platform-datasources-enable-two-way-sync')) {
726
+ return (0, _react2.jsx)(_styled2.InlineEditableTableCell, {
727
+ key: cellKey,
728
+ "data-testid": testId && "".concat(testId, "--cell-").concat(cellIndex),
729
+ colSpan: isEditable && isLastCell ? 2 : undefined
730
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
731
+ ,
732
+ style: loadingRowStyle,
733
+ css: [wrappedColumnKeys !== null && wrappedColumnKeys !== void 0 && wrappedColumnKeys.includes(cellKey) ? null : truncateStyles]
734
+ }, content);
740
735
  }
741
- return (0, _react2.jsx)(_styled2.TableCell, {
742
- key: cellKey,
743
- "data-testid": testId && "".concat(testId, "--cell-").concat(cellIndex),
744
- colSpan: isEditable && isLastCell ? 2 : undefined
745
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
746
- ,
747
- style: loadingRowStyle,
748
- css: [wrappedColumnKeys !== null && wrappedColumnKeys !== void 0 && wrappedColumnKeys.includes(cellKey) ? null : truncateStyles]
749
- }, content);
750
736
  }
737
+
738
+ // extra padding is required around skeleton loader to avoid vertical jumps when data loads
739
+ if (key !== null && key !== void 0 && key.includes('loading')) {
740
+ loadingRowStyle = _objectSpread(_objectSpread({}, loadingRowStyle), {}, {
741
+ paddingBlock: "var(--ds-space-100, 8px)"
742
+ });
743
+ }
744
+ return (0, _react2.jsx)(_styled2.TableCell, {
745
+ key: cellKey,
746
+ "data-testid": testId && "".concat(testId, "--cell-").concat(cellIndex),
747
+ colSpan: isEditable && isLastCell ? 2 : undefined
748
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
749
+ ,
750
+ style: loadingRowStyle,
751
+ css: [wrappedColumnKeys !== null && wrappedColumnKeys !== void 0 && wrappedColumnKeys.includes(cellKey) ? null : truncateStyles]
752
+ }, content);
751
753
  }));
752
754
  }))));
753
755
  return (0, _platformFeatureFlags.fg)('platform-datasources-enable-two-way-sync') ? (0, _react2.jsx)(_flag.FlagsProvider, null, view) : view;
@@ -5,7 +5,11 @@ import { ActionOperationStatus } from '@atlaskit/linking-types';
5
5
  // eslint-disable-next-line import/no-extraneous-dependencies,no-restricted-imports
6
6
 
7
7
  import Select from '@atlaskit/select';
8
+ import { failUfoExperience, succeedUfoExperience } from '../../../../analytics/ufoExperiences';
9
+ import { useDatasourceExperienceId } from '../../../../contexts/datasource-experience-id';
10
+ import { useDatasourceTableFlag } from '../../../../hooks/useDatasourceTableFlag';
8
11
  import { SharedIconComponent } from '../../shared-components/icon';
12
+ import { InlineEditUFOExperience } from '../../table-cell-content/inline-edit';
9
13
  /**
10
14
  * Should be gated by FF rollout of platform-datasources-enable-two-way-sync-priority
11
15
  */
@@ -17,8 +21,24 @@ const IconEditType = props => {
17
21
  } = props;
18
22
  const {
19
23
  options,
20
- isLoading
24
+ isLoading,
25
+ hasFailed
21
26
  } = usePriorityOptions(currentValue, executeFetch);
27
+ const experienceId = useDatasourceExperienceId();
28
+ useEffect(() => {
29
+ if (!experienceId) {
30
+ return;
31
+ }
32
+ if (hasFailed) {
33
+ failUfoExperience({
34
+ name: InlineEditUFOExperience
35
+ }, experienceId);
36
+ } else if (!isLoading) {
37
+ succeedUfoExperience({
38
+ name: InlineEditUFOExperience
39
+ }, experienceId);
40
+ }
41
+ }, [experienceId, isLoading, hasFailed]);
22
42
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Select, _extends({}, props, {
23
43
  testId: "inline-edit-priority",
24
44
  autoFocus: true,
@@ -49,10 +69,17 @@ const filterOption = (option, inputValue) => option.label.toLowerCase().includes
49
69
  const usePriorityOptions = (currentValue, executeFetch) => {
50
70
  const [{
51
71
  options,
52
- isLoading
72
+ isLoading,
73
+ hasFailed
53
74
  }, setOptions] = useState({
54
75
  isLoading: true,
55
- options: []
76
+ options: [],
77
+ hasFailed: false
78
+ });
79
+ const {
80
+ showErrorFlag
81
+ } = useDatasourceTableFlag({
82
+ isFetchAction: true
56
83
  });
57
84
  useEffect(() => {
58
85
  let isMounted = true;
@@ -60,17 +87,26 @@ const usePriorityOptions = (currentValue, executeFetch) => {
60
87
  if (isMounted) {
61
88
  setOptions({
62
89
  isLoading: false,
63
- options
90
+ options,
91
+ hasFailed: false
64
92
  });
65
93
  }
94
+ }).catch(err => {
95
+ showErrorFlag();
96
+ setOptions({
97
+ isLoading: false,
98
+ options: [],
99
+ hasFailed: true
100
+ });
66
101
  });
67
102
  return () => {
68
103
  isMounted = false;
69
104
  };
70
- }, [currentValue, executeFetch]);
105
+ }, [currentValue, executeFetch, showErrorFlag]);
71
106
  return {
72
107
  options,
73
- isLoading
108
+ isLoading,
109
+ hasFailed
74
110
  };
75
111
  };
76
112
 
@@ -85,6 +121,9 @@ const loadOptions = async (_currentValue, executeFetch) => {
85
121
  operationStatus,
86
122
  entities
87
123
  } = await executeFetch({});
124
+ if (operationStatus === ActionOperationStatus.FAILURE) {
125
+ throw new Error('Failed to fetch icon options');
126
+ }
88
127
  if (operationStatus === ActionOperationStatus.SUCCESS && entities) {
89
128
  // Map entities here if the backend type is different from the type required by the select
90
129
  return entities;
@@ -692,36 +692,38 @@ export const IssueLikeDataTableView = ({
692
692
  shouldUseWidth,
693
693
  width
694
694
  });
695
-
696
695
  // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
697
- if (fg('platform-datasources-enable-two-way-sync')) {
698
- return jsx(InlineEditableTableCell, {
699
- key: cellKey,
700
- "data-testid": testId && `${testId}--cell-${cellIndex}`,
701
- colSpan: isEditable && isLastCell ? 2 : undefined
702
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
703
- ,
704
- style: loadingRowStyle,
705
- css: [wrappedColumnKeys !== null && wrappedColumnKeys !== void 0 && wrappedColumnKeys.includes(cellKey) ? null : truncateStyles]
706
- }, content);
707
- } else {
708
- // extra padding is required around skeleton loader to avoid vertical jumps when data loads
709
- if (key !== null && key !== void 0 && key.includes('loading')) {
710
- loadingRowStyle = {
711
- ...loadingRowStyle,
712
- paddingBlock: "var(--ds-space-100, 8px)"
713
- };
696
+ if (fg('enable_datasource_react_sweet_state')) {
697
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
698
+ if (fg('platform-datasources-enable-two-way-sync')) {
699
+ return jsx(InlineEditableTableCell, {
700
+ key: cellKey,
701
+ "data-testid": testId && `${testId}--cell-${cellIndex}`,
702
+ colSpan: isEditable && isLastCell ? 2 : undefined
703
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
704
+ ,
705
+ style: loadingRowStyle,
706
+ css: [wrappedColumnKeys !== null && wrappedColumnKeys !== void 0 && wrappedColumnKeys.includes(cellKey) ? null : truncateStyles]
707
+ }, content);
714
708
  }
715
- return jsx(TableCell, {
716
- key: cellKey,
717
- "data-testid": testId && `${testId}--cell-${cellIndex}`,
718
- colSpan: isEditable && isLastCell ? 2 : undefined
719
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
720
- ,
721
- style: loadingRowStyle,
722
- css: [wrappedColumnKeys !== null && wrappedColumnKeys !== void 0 && wrappedColumnKeys.includes(cellKey) ? null : truncateStyles]
723
- }, content);
724
709
  }
710
+
711
+ // extra padding is required around skeleton loader to avoid vertical jumps when data loads
712
+ if (key !== null && key !== void 0 && key.includes('loading')) {
713
+ loadingRowStyle = {
714
+ ...loadingRowStyle,
715
+ paddingBlock: "var(--ds-space-100, 8px)"
716
+ };
717
+ }
718
+ return jsx(TableCell, {
719
+ key: cellKey,
720
+ "data-testid": testId && `${testId}--cell-${cellIndex}`,
721
+ colSpan: isEditable && isLastCell ? 2 : undefined
722
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
723
+ ,
724
+ style: loadingRowStyle,
725
+ css: [wrappedColumnKeys !== null && wrappedColumnKeys !== void 0 && wrappedColumnKeys.includes(cellKey) ? null : truncateStyles]
726
+ }, content);
725
727
  }))))));
726
728
  return fg('platform-datasources-enable-two-way-sync') ? jsx(FlagsProvider, null, view) : view;
727
729
  };
@@ -8,7 +8,11 @@ import { ActionOperationStatus } from '@atlaskit/linking-types';
8
8
  // eslint-disable-next-line import/no-extraneous-dependencies,no-restricted-imports
9
9
 
10
10
  import Select from '@atlaskit/select';
11
+ import { failUfoExperience, succeedUfoExperience } from '../../../../analytics/ufoExperiences';
12
+ import { useDatasourceExperienceId } from '../../../../contexts/datasource-experience-id';
13
+ import { useDatasourceTableFlag } from '../../../../hooks/useDatasourceTableFlag';
11
14
  import { SharedIconComponent } from '../../shared-components/icon';
15
+ import { InlineEditUFOExperience } from '../../table-cell-content/inline-edit';
12
16
  /**
13
17
  * Should be gated by FF rollout of platform-datasources-enable-two-way-sync-priority
14
18
  */
@@ -18,7 +22,23 @@ var IconEditType = function IconEditType(props) {
18
22
  executeFetch = props.executeFetch;
19
23
  var _usePriorityOptions = usePriorityOptions(currentValue, executeFetch),
20
24
  options = _usePriorityOptions.options,
21
- isLoading = _usePriorityOptions.isLoading;
25
+ isLoading = _usePriorityOptions.isLoading,
26
+ hasFailed = _usePriorityOptions.hasFailed;
27
+ var experienceId = useDatasourceExperienceId();
28
+ useEffect(function () {
29
+ if (!experienceId) {
30
+ return;
31
+ }
32
+ if (hasFailed) {
33
+ failUfoExperience({
34
+ name: InlineEditUFOExperience
35
+ }, experienceId);
36
+ } else if (!isLoading) {
37
+ succeedUfoExperience({
38
+ name: InlineEditUFOExperience
39
+ }, experienceId);
40
+ }
41
+ }, [experienceId, isLoading, hasFailed]);
22
42
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Select, _extends({}, props, {
23
43
  testId: "inline-edit-priority",
24
44
  autoFocus: true,
@@ -56,30 +76,45 @@ var filterOption = function filterOption(option, inputValue) {
56
76
  var usePriorityOptions = function usePriorityOptions(currentValue, executeFetch) {
57
77
  var _useState = useState({
58
78
  isLoading: true,
59
- options: []
79
+ options: [],
80
+ hasFailed: false
60
81
  }),
61
82
  _useState2 = _slicedToArray(_useState, 2),
62
83
  _useState2$ = _useState2[0],
63
84
  options = _useState2$.options,
64
85
  isLoading = _useState2$.isLoading,
86
+ hasFailed = _useState2$.hasFailed,
65
87
  setOptions = _useState2[1];
88
+ var _useDatasourceTableFl = useDatasourceTableFlag({
89
+ isFetchAction: true
90
+ }),
91
+ showErrorFlag = _useDatasourceTableFl.showErrorFlag;
66
92
  useEffect(function () {
67
93
  var isMounted = true;
68
94
  loadOptions(currentValue, executeFetch).then(function (options) {
69
95
  if (isMounted) {
70
96
  setOptions({
71
97
  isLoading: false,
72
- options: options
98
+ options: options,
99
+ hasFailed: false
73
100
  });
74
101
  }
102
+ }).catch(function (err) {
103
+ showErrorFlag();
104
+ setOptions({
105
+ isLoading: false,
106
+ options: [],
107
+ hasFailed: true
108
+ });
75
109
  });
76
110
  return function () {
77
111
  isMounted = false;
78
112
  };
79
- }, [currentValue, executeFetch]);
113
+ }, [currentValue, executeFetch, showErrorFlag]);
80
114
  return {
81
115
  options: options,
82
- isLoading: isLoading
116
+ isLoading: isLoading,
117
+ hasFailed: hasFailed
83
118
  };
84
119
  };
85
120
 
@@ -104,14 +139,20 @@ var loadOptions = /*#__PURE__*/function () {
104
139
  _yield$executeFetch = _context.sent;
105
140
  operationStatus = _yield$executeFetch.operationStatus;
106
141
  entities = _yield$executeFetch.entities;
107
- if (!(operationStatus === ActionOperationStatus.SUCCESS && entities)) {
142
+ if (!(operationStatus === ActionOperationStatus.FAILURE)) {
108
143
  _context.next = 9;
109
144
  break;
110
145
  }
111
- return _context.abrupt("return", entities);
146
+ throw new Error('Failed to fetch icon options');
112
147
  case 9:
148
+ if (!(operationStatus === ActionOperationStatus.SUCCESS && entities)) {
149
+ _context.next = 11;
150
+ break;
151
+ }
152
+ return _context.abrupt("return", entities);
153
+ case 11:
113
154
  return _context.abrupt("return", []);
114
- case 10:
155
+ case 12:
115
156
  case "end":
116
157
  return _context.stop();
117
158
  }
@@ -715,35 +715,37 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref5) {
715
715
  shouldUseWidth: shouldUseWidth,
716
716
  width: width
717
717
  });
718
-
719
718
  // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
720
- if (fg('platform-datasources-enable-two-way-sync')) {
721
- return jsx(InlineEditableTableCell, {
722
- key: cellKey,
723
- "data-testid": testId && "".concat(testId, "--cell-").concat(cellIndex),
724
- colSpan: isEditable && isLastCell ? 2 : undefined
725
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
726
- ,
727
- style: loadingRowStyle,
728
- css: [wrappedColumnKeys !== null && wrappedColumnKeys !== void 0 && wrappedColumnKeys.includes(cellKey) ? null : truncateStyles]
729
- }, content);
730
- } else {
731
- // extra padding is required around skeleton loader to avoid vertical jumps when data loads
732
- if (key !== null && key !== void 0 && key.includes('loading')) {
733
- loadingRowStyle = _objectSpread(_objectSpread({}, loadingRowStyle), {}, {
734
- paddingBlock: "var(--ds-space-100, 8px)"
735
- });
719
+ if (fg('enable_datasource_react_sweet_state')) {
720
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
721
+ if (fg('platform-datasources-enable-two-way-sync')) {
722
+ return jsx(InlineEditableTableCell, {
723
+ key: cellKey,
724
+ "data-testid": testId && "".concat(testId, "--cell-").concat(cellIndex),
725
+ colSpan: isEditable && isLastCell ? 2 : undefined
726
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
727
+ ,
728
+ style: loadingRowStyle,
729
+ css: [wrappedColumnKeys !== null && wrappedColumnKeys !== void 0 && wrappedColumnKeys.includes(cellKey) ? null : truncateStyles]
730
+ }, content);
736
731
  }
737
- return jsx(TableCell, {
738
- key: cellKey,
739
- "data-testid": testId && "".concat(testId, "--cell-").concat(cellIndex),
740
- colSpan: isEditable && isLastCell ? 2 : undefined
741
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
742
- ,
743
- style: loadingRowStyle,
744
- css: [wrappedColumnKeys !== null && wrappedColumnKeys !== void 0 && wrappedColumnKeys.includes(cellKey) ? null : truncateStyles]
745
- }, content);
746
732
  }
733
+
734
+ // extra padding is required around skeleton loader to avoid vertical jumps when data loads
735
+ if (key !== null && key !== void 0 && key.includes('loading')) {
736
+ loadingRowStyle = _objectSpread(_objectSpread({}, loadingRowStyle), {}, {
737
+ paddingBlock: "var(--ds-space-100, 8px)"
738
+ });
739
+ }
740
+ return jsx(TableCell, {
741
+ key: cellKey,
742
+ "data-testid": testId && "".concat(testId, "--cell-").concat(cellIndex),
743
+ colSpan: isEditable && isLastCell ? 2 : undefined
744
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
745
+ ,
746
+ style: loadingRowStyle,
747
+ css: [wrappedColumnKeys !== null && wrappedColumnKeys !== void 0 && wrappedColumnKeys.includes(cellKey) ? null : truncateStyles]
748
+ }, content);
747
749
  }));
748
750
  }))));
749
751
  return fg('platform-datasources-enable-two-way-sync') ? jsx(FlagsProvider, null, view) : view;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-datasource",
3
- "version": "3.11.1",
3
+ "version": "3.12.1",
4
4
  "description": "UI Components to support linking platform dataset feature",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -101,7 +101,7 @@
101
101
  "devDependencies": {
102
102
  "@af/integration-testing": "*",
103
103
  "@af/visual-regression": "*",
104
- "@atlaskit/link-provider": "^1.16.0",
104
+ "@atlaskit/link-provider": "^1.17.0",
105
105
  "@atlaskit/link-test-helpers": "^7.5.0",
106
106
  "@atlaskit/ssr": "*",
107
107
  "@atlaskit/visual-regression": "*",