@atlaskit/link-datasource 4.15.0 → 4.16.0

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,13 @@
1
1
  # @atlaskit/link-datasource
2
2
 
3
+ ## 4.16.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#191067](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/191067)
8
+ [`ede531b6a7c94`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ede531b6a7c94) -
9
+ Clean up platform-datasources-inline-edit-id-checks ff
10
+
3
11
  ## 4.15.0
4
12
 
5
13
  ### Minor Changes
@@ -9,7 +9,6 @@ exports.default = void 0;
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
  var _layering = require("@atlaskit/layering");
12
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
12
  var _select = _interopRequireDefault(require("@atlaskit/select"));
14
13
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
15
14
  var _ufoExperiences = require("../../../../analytics/ufoExperiences");
@@ -54,9 +53,9 @@ var IconEditType = function IconEditType(props) {
54
53
  // We can't update this field if we don't have an ID - however the ID
55
54
  // is typed optional.
56
55
  ,
57
- options: (0, _platformFeatureFlags.fg)('platform-datasources-inline-edit-id-checks') ? options.filter(function (option) {
56
+ options: options.filter(function (option) {
58
57
  return option.id;
59
- }) : options,
58
+ }),
60
59
  menuPlacement: "auto",
61
60
  isLoading: isLoading,
62
61
  filterOption: filterOption,
@@ -16,7 +16,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
16
16
  var _react = _interopRequireWildcard(require("react"));
17
17
  var _reactIntlNext = require("react-intl-next");
18
18
  var _inlineEdit = _interopRequireDefault(require("@atlaskit/inline-edit"));
19
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
20
19
  var _compiled = require("@atlaskit/primitives/compiled");
21
20
  var _hooks = require("@atlaskit/smart-card/hooks");
22
21
  var _analytics = require("../../../analytics");
@@ -174,25 +173,20 @@ var InlineEdit = exports.InlineEdit = function InlineEdit(_ref) {
174
173
  onUpdateItem(ari, newItem);
175
174
  fireEvent('ui.form.submitted.inlineEdit', {});
176
175
  var updateValue;
177
- if ((0, _platformFeatureFlags.fg)('platform-datasources-inline-edit-id-checks')) {
178
- try {
179
- // TODO: Refactor types so that valid update values are guaranteed for
180
- // all object types. Invalid options should be filtered out of options -
181
- // this frontend error flag is a last resort.
182
- updateValue = newGetBackendUpdateValue(newValue);
183
- } catch (_unused) {
184
- // Show an error as the new value that was going to be sent to the
185
- // backend is invalid (and would have failed anyway, silently to the user)
186
- showErrorFlag({});
187
- onUpdateItem(ari, existingData);
188
- setIsEditing(false);
189
- return;
190
- }
176
+ try {
177
+ // TODO: Refactor types so that valid update values are guaranteed for
178
+ // all object types. Invalid options should be filtered out of options -
179
+ // this frontend error flag is a last resort.
180
+ updateValue = newGetBackendUpdateValue(newValue);
181
+ } catch (_unused) {
182
+ // Show an error as the new value that was going to be sent to the
183
+ // backend is invalid (and would have failed anyway, silently to the user)
184
+ showErrorFlag({});
185
+ onUpdateItem(ari, existingData);
186
+ setIsEditing(false);
187
+ return;
191
188
  }
192
- execute(updateValue !== undefined && (0, _platformFeatureFlags.fg)('platform-datasources-inline-edit-id-checks') ? updateValue :
193
- // Old behaviour is preserved in non-FFed path: errors thrown by getBackendUpdateValue are caught by
194
- // the error boundary, _not_ by the catch block & frontend flag here.
195
- getBackendUpdateValue(newValue)).then(refreshDatasourceItem).catch(function (error) {
189
+ execute(updateValue !== undefined ? updateValue : getBackendUpdateValue(newValue)).then(refreshDatasourceItem).catch(function (error) {
196
190
  var status = error && (0, _typeof2.default)(error) === 'object' ? error.status : undefined;
197
191
  showErrorFlag({
198
192
  status: status
@@ -1,7 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { useEffect } from 'react';
3
3
  import { Layering } from '@atlaskit/layering';
4
- import { fg } from '@atlaskit/platform-feature-flags';
5
4
  import Select from '@atlaskit/select';
6
5
  import Tooltip from '@atlaskit/tooltip';
7
6
  import { failUfoExperience, succeedUfoExperience } from '../../../../analytics/ufoExperiences';
@@ -48,7 +47,7 @@ const IconEditType = props => {
48
47
  // We can't update this field if we don't have an ID - however the ID
49
48
  // is typed optional.
50
49
  ,
51
- options: fg('platform-datasources-inline-edit-id-checks') ? options.filter(option => option.id) : options,
50
+ options: options.filter(option => option.id),
52
51
  menuPlacement: "auto",
53
52
  isLoading: isLoading,
54
53
  filterOption: filterOption,
@@ -5,7 +5,6 @@ import { ax, ix } from "@compiled/react/runtime";
5
5
  import React, { useCallback, useMemo, useState } from 'react';
6
6
  import { useIntl } from 'react-intl-next';
7
7
  import AKInlineEdit from '@atlaskit/inline-edit';
8
- import { fg } from '@atlaskit/platform-feature-flags';
9
8
  import { Box } from '@atlaskit/primitives/compiled';
10
9
  import { useSmartLinkReload } from '@atlaskit/smart-card/hooks';
11
10
  import { useDatasourceAnalyticsEvents } from '../../../analytics';
@@ -171,25 +170,20 @@ export const InlineEdit = ({
171
170
  onUpdateItem(ari, newItem);
172
171
  fireEvent('ui.form.submitted.inlineEdit', {});
173
172
  let updateValue;
174
- if (fg('platform-datasources-inline-edit-id-checks')) {
175
- try {
176
- // TODO: Refactor types so that valid update values are guaranteed for
177
- // all object types. Invalid options should be filtered out of options -
178
- // this frontend error flag is a last resort.
179
- updateValue = newGetBackendUpdateValue(newValue);
180
- } catch {
181
- // Show an error as the new value that was going to be sent to the
182
- // backend is invalid (and would have failed anyway, silently to the user)
183
- showErrorFlag({});
184
- onUpdateItem(ari, existingData);
185
- setIsEditing(false);
186
- return;
187
- }
173
+ try {
174
+ // TODO: Refactor types so that valid update values are guaranteed for
175
+ // all object types. Invalid options should be filtered out of options -
176
+ // this frontend error flag is a last resort.
177
+ updateValue = newGetBackendUpdateValue(newValue);
178
+ } catch {
179
+ // Show an error as the new value that was going to be sent to the
180
+ // backend is invalid (and would have failed anyway, silently to the user)
181
+ showErrorFlag({});
182
+ onUpdateItem(ari, existingData);
183
+ setIsEditing(false);
184
+ return;
188
185
  }
189
- execute(updateValue !== undefined && fg('platform-datasources-inline-edit-id-checks') ? updateValue :
190
- // Old behaviour is preserved in non-FFed path: errors thrown by getBackendUpdateValue are caught by
191
- // the error boundary, _not_ by the catch block & frontend flag here.
192
- getBackendUpdateValue(newValue)).then(refreshDatasourceItem).catch(error => {
186
+ execute(updateValue !== undefined ? updateValue : getBackendUpdateValue(newValue)).then(refreshDatasourceItem).catch(error => {
193
187
  const status = error && typeof error === 'object' ? error.status : undefined;
194
188
  showErrorFlag({
195
189
  status
@@ -1,7 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { useEffect } from 'react';
3
3
  import { Layering } from '@atlaskit/layering';
4
- import { fg } from '@atlaskit/platform-feature-flags';
5
4
  import Select from '@atlaskit/select';
6
5
  import Tooltip from '@atlaskit/tooltip';
7
6
  import { failUfoExperience, succeedUfoExperience } from '../../../../analytics/ufoExperiences';
@@ -45,9 +44,9 @@ var IconEditType = function IconEditType(props) {
45
44
  // We can't update this field if we don't have an ID - however the ID
46
45
  // is typed optional.
47
46
  ,
48
- options: fg('platform-datasources-inline-edit-id-checks') ? options.filter(function (option) {
47
+ options: options.filter(function (option) {
49
48
  return option.id;
50
- }) : options,
49
+ }),
51
50
  menuPlacement: "auto",
52
51
  isLoading: isLoading,
53
52
  filterOption: filterOption,
@@ -10,7 +10,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
10
10
  import React, { useCallback, useMemo, useState } from 'react';
11
11
  import { useIntl } from 'react-intl-next';
12
12
  import AKInlineEdit from '@atlaskit/inline-edit';
13
- import { fg } from '@atlaskit/platform-feature-flags';
14
13
  import { Box } from '@atlaskit/primitives/compiled';
15
14
  import { useSmartLinkReload } from '@atlaskit/smart-card/hooks';
16
15
  import { useDatasourceAnalyticsEvents } from '../../../analytics';
@@ -165,25 +164,20 @@ export var InlineEdit = function InlineEdit(_ref) {
165
164
  onUpdateItem(ari, newItem);
166
165
  fireEvent('ui.form.submitted.inlineEdit', {});
167
166
  var updateValue;
168
- if (fg('platform-datasources-inline-edit-id-checks')) {
169
- try {
170
- // TODO: Refactor types so that valid update values are guaranteed for
171
- // all object types. Invalid options should be filtered out of options -
172
- // this frontend error flag is a last resort.
173
- updateValue = newGetBackendUpdateValue(newValue);
174
- } catch (_unused) {
175
- // Show an error as the new value that was going to be sent to the
176
- // backend is invalid (and would have failed anyway, silently to the user)
177
- showErrorFlag({});
178
- onUpdateItem(ari, existingData);
179
- setIsEditing(false);
180
- return;
181
- }
167
+ try {
168
+ // TODO: Refactor types so that valid update values are guaranteed for
169
+ // all object types. Invalid options should be filtered out of options -
170
+ // this frontend error flag is a last resort.
171
+ updateValue = newGetBackendUpdateValue(newValue);
172
+ } catch (_unused) {
173
+ // Show an error as the new value that was going to be sent to the
174
+ // backend is invalid (and would have failed anyway, silently to the user)
175
+ showErrorFlag({});
176
+ onUpdateItem(ari, existingData);
177
+ setIsEditing(false);
178
+ return;
182
179
  }
183
- execute(updateValue !== undefined && fg('platform-datasources-inline-edit-id-checks') ? updateValue :
184
- // Old behaviour is preserved in non-FFed path: errors thrown by getBackendUpdateValue are caught by
185
- // the error boundary, _not_ by the catch block & frontend flag here.
186
- getBackendUpdateValue(newValue)).then(refreshDatasourceItem).catch(function (error) {
180
+ execute(updateValue !== undefined ? updateValue : getBackendUpdateValue(newValue)).then(refreshDatasourceItem).catch(function (error) {
187
181
  var status = error && _typeof(error) === 'object' ? error.status : undefined;
188
182
  showErrorFlag({
189
183
  status: status
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-datasource",
3
- "version": "4.15.0",
3
+ "version": "4.16.0",
4
4
  "description": "UI Components to support linking platform dataset feature",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -42,7 +42,7 @@
42
42
  "@atlaskit/avatar": "^25.1.0",
43
43
  "@atlaskit/avatar-group": "^12.1.0",
44
44
  "@atlaskit/badge": "^18.1.0",
45
- "@atlaskit/button": "^23.2.0",
45
+ "@atlaskit/button": "^23.3.0",
46
46
  "@atlaskit/css": "^0.12.0",
47
47
  "@atlaskit/datetime-picker": "^17.0.0",
48
48
  "@atlaskit/dropdown-menu": "^16.3.0",
@@ -80,7 +80,7 @@
80
80
  "@atlaskit/smart-card": "^40.5.0",
81
81
  "@atlaskit/smart-user-picker": "^8.0.0",
82
82
  "@atlaskit/spinner": "^18.0.0",
83
- "@atlaskit/tag": "^14.0.0",
83
+ "@atlaskit/tag": "^14.1.0",
84
84
  "@atlaskit/temp-nav-app-icons": "^0.9.0",
85
85
  "@atlaskit/textfield": "^8.0.0",
86
86
  "@atlaskit/theme": "^19.0.0",
@@ -107,7 +107,7 @@
107
107
  "@af/visual-regression": "workspace:^",
108
108
  "@atlaskit/json-ld-types": "^1.4.0",
109
109
  "@atlaskit/link-provider": "^3.4.0",
110
- "@atlaskit/link-test-helpers": "^8.2.0",
110
+ "@atlaskit/link-test-helpers": "^8.3.0",
111
111
  "@atlaskit/ssr": "workspace:^",
112
112
  "@atlaskit/visual-regression": "workspace:^",
113
113
  "@atlassian/feature-flags-test-utils": "^0.3.0",
@@ -160,9 +160,6 @@
160
160
  "./elements": "./src/elements.ts"
161
161
  },
162
162
  "platform-feature-flags": {
163
- "platform-datasources-inline-edit-id-checks": {
164
- "type": "boolean"
165
- },
166
163
  "platform-datasources-enable-two-way-sync-assignee": {
167
164
  "type": "boolean"
168
165
  },