@atlaskit/link-datasource 7.12.1 → 7.12.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/link-datasource
2
2
 
3
+ ## 7.12.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`8ec7e4654ec86`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8ec7e4654ec86) -
8
+ Update the Assets modal loading skeleton header alignment to match the new UI behind the
9
+ `astral_assets_macro_table_ui_uplift` feature gate
10
+ - Updated dependencies
11
+
12
+ ## 7.12.2
13
+
14
+ ### Patch Changes
15
+
16
+ - [`6c40bad082f67`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6c40bad082f67) -
17
+ Clean up feature gate `platform_sllv_duplicated_row`: datasource rows that share an ARI are now
18
+ always deduplicated.
19
+ - Updated dependencies
20
+
3
21
  ## 7.12.1
4
22
 
5
23
  ### Patch Changes
@@ -238,7 +238,6 @@ var useDatasourceTableState = exports.useDatasourceTableState = function useData
238
238
  nextPageCursor,
239
239
  _totalCount,
240
240
  schema,
241
- isDuplicateRowDeduplicationEnabled,
242
241
  itemsToAdd,
243
242
  integrationKey,
244
243
  entityType,
@@ -324,11 +323,10 @@ var useDatasourceTableState = exports.useDatasourceTableState = function useData
324
323
  setDestinationObjectTypes(_destinationObjectTypes);
325
324
  setTotalCount(_totalCount);
326
325
  setNextCursor(nextPageCursor);
327
- isDuplicateRowDeduplicationEnabled = (0, _fg.fg)('platform_sllv_duplicated_row');
328
- if (shouldRequestFirstPage && isDuplicateRowDeduplicationEnabled) {
326
+ if (shouldRequestFirstPage) {
329
327
  responseItemAris.current.clear();
330
328
  }
331
- itemsToAdd = isDuplicateRowDeduplicationEnabled ? items.filter(function (item) {
329
+ itemsToAdd = items.filter(function (item) {
332
330
  var _item$ari;
333
331
  var ari = (_item$ari = item.ari) === null || _item$ari === void 0 ? void 0 : _item$ari.data;
334
332
  if (typeof ari !== 'string') {
@@ -339,7 +337,7 @@ var useDatasourceTableState = exports.useDatasourceTableState = function useData
339
337
  }
340
338
  responseItemAris.current.add(ari);
341
339
  return true;
342
- }) : items;
340
+ });
343
341
  setResponseItems(function (currentResponseItems) {
344
342
  if (shouldRequestFirstPage) {
345
343
  return itemsToAdd;
@@ -357,7 +355,7 @@ var useDatasourceTableState = exports.useDatasourceTableState = function useData
357
355
  entityType = objectTypesEntity;
358
356
  newIds = onAddItems(itemsToAdd, typeof integrationKey === 'string' ? integrationKey : undefined, entityType);
359
357
  setResponseItemIds(function (currentIds) {
360
- return isDuplicateRowDeduplicationEnabled && shouldRequestFirstPage ? newIds : [].concat((0, _toConsumableArray2.default)(currentIds), (0, _toConsumableArray2.default)(newIds));
358
+ return shouldRequestFirstPage ? newIds : [].concat((0, _toConsumableArray2.default)(currentIds), (0, _toConsumableArray2.default)(newIds));
361
359
  });
362
360
  if (!(0, _isFedramp.isFedRamp)()) {
363
361
  if (typeof integrationKey === 'string') {
@@ -13,12 +13,18 @@ var React = _react;
13
13
  var _runtime = require("@compiled/react/runtime");
14
14
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
15
15
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
16
+ var _fg = require("@atlaskit/platform-feature-flags/fg");
17
+ var _flex = require("@atlaskit/primitives/compiled/flex");
16
18
  var _loadingState = require("./aql-search-input/loading-state");
17
19
  var _loadingState2 = require("./object-schema-select/loading-state");
18
20
  var _styled = require("./styled");
19
21
  var _excluded = ["as", "style"],
20
22
  _excluded2 = ["as", "style"];
21
23
  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); }
24
+ var styles = {
25
+ flexStyles: "_1bsb1osq"
26
+ };
27
+
22
28
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled
23
29
  var SchemaSelectContainer = (0, _react.forwardRef)(function (_ref, __cmplr) {
24
30
  var _ref$as = _ref.as,
@@ -53,7 +59,12 @@ var AssetsSearchContainerLoading = exports.AssetsSearchContainerLoading = functi
53
59
  var modalTitle = _ref3.modalTitle;
54
60
  return /*#__PURE__*/React.createElement(FormContainer, {
55
61
  "data-testid": "assets-datasource-modal--search-container-skeleton"
56
- }, /*#__PURE__*/React.createElement(_styled.FormRowContainer, {
62
+ }, (0, _fg.fg)('astral_assets_macro_table_ui_uplift') ? /*#__PURE__*/React.createElement(_flex.Flex, {
63
+ gap: "space.100",
64
+ alignItems: "center",
65
+ justifyContent: "space-between",
66
+ xcss: styles.flexStyles
67
+ }, modalTitle, /*#__PURE__*/React.createElement(SchemaSelectContainer, null, /*#__PURE__*/React.createElement(_loadingState2.AssetsObjectSchemaSelectSkeleton, null))) : /*#__PURE__*/React.createElement(_styled.FormRowContainer, {
57
68
  isNarrowGap: true
58
69
  }, modalTitle, /*#__PURE__*/React.createElement(SchemaSelectContainer, null, /*#__PURE__*/React.createElement(_loadingState2.AssetsObjectSchemaSelectSkeleton, null))), /*#__PURE__*/React.createElement(_styled.FormRowContainer, null, /*#__PURE__*/React.createElement(_loadingState.AssetsAqlSearchInputSkeleton, null)));
59
70
  };
@@ -205,11 +205,10 @@ export const useDatasourceTableState = ({
205
205
  setDestinationObjectTypes(destinationObjectTypes);
206
206
  setTotalCount(totalCount);
207
207
  setNextCursor(nextPageCursor);
208
- const isDuplicateRowDeduplicationEnabled = fg('platform_sllv_duplicated_row');
209
- if (shouldRequestFirstPage && isDuplicateRowDeduplicationEnabled) {
208
+ if (shouldRequestFirstPage) {
210
209
  responseItemAris.current.clear();
211
210
  }
212
- const itemsToAdd = isDuplicateRowDeduplicationEnabled ? items.filter(item => {
211
+ const itemsToAdd = items.filter(item => {
213
212
  var _item$ari;
214
213
  const ari = (_item$ari = item.ari) === null || _item$ari === void 0 ? void 0 : _item$ari.data;
215
214
  if (typeof ari !== 'string') {
@@ -220,7 +219,7 @@ export const useDatasourceTableState = ({
220
219
  }
221
220
  responseItemAris.current.add(ari);
222
221
  return true;
223
- }) : items;
222
+ });
224
223
  setResponseItems(currentResponseItems => {
225
224
  if (shouldRequestFirstPage) {
226
225
  return itemsToAdd;
@@ -238,7 +237,7 @@ export const useDatasourceTableState = ({
238
237
  */
239
238
  const entityType = objectTypesEntity;
240
239
  const newIds = onAddItems(itemsToAdd, typeof integrationKey === 'string' ? integrationKey : undefined, entityType);
241
- setResponseItemIds(currentIds => isDuplicateRowDeduplicationEnabled && shouldRequestFirstPage ? newIds : [...currentIds, ...newIds]);
240
+ setResponseItemIds(currentIds => shouldRequestFirstPage ? newIds : [...currentIds, ...newIds]);
242
241
  if (!isFedRamp()) {
243
242
  if (typeof integrationKey === 'string') {
244
243
  const aris = itemsToAdd.reduce((acc, item) => {
@@ -4,9 +4,15 @@ import "./loading-state.compiled.css";
4
4
  import { forwardRef } from 'react';
5
5
  import * as React from 'react';
6
6
  import { ax, ix } from "@compiled/react/runtime";
7
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
8
+ import { Flex } from '@atlaskit/primitives/compiled/flex';
7
9
  import { AssetsAqlSearchInputSkeleton } from './aql-search-input/loading-state';
8
10
  import { AssetsObjectSchemaSelectSkeleton } from './object-schema-select/loading-state';
9
11
  import { FormRowContainer } from './styled';
12
+ const styles = {
13
+ flexStyles: "_1bsb1osq"
14
+ };
15
+
10
16
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled
11
17
  const SchemaSelectContainer = forwardRef(({
12
18
  as: C = "div",
@@ -42,7 +48,12 @@ export const AssetsSearchContainerLoading = ({
42
48
  }) => {
43
49
  return /*#__PURE__*/React.createElement(FormContainer, {
44
50
  "data-testid": "assets-datasource-modal--search-container-skeleton"
45
- }, /*#__PURE__*/React.createElement(FormRowContainer, {
51
+ }, fg('astral_assets_macro_table_ui_uplift') ? /*#__PURE__*/React.createElement(Flex, {
52
+ gap: "space.100",
53
+ alignItems: "center",
54
+ justifyContent: "space-between",
55
+ xcss: styles.flexStyles
56
+ }, modalTitle, /*#__PURE__*/React.createElement(SchemaSelectContainer, null, /*#__PURE__*/React.createElement(AssetsObjectSchemaSelectSkeleton, null))) : /*#__PURE__*/React.createElement(FormRowContainer, {
46
57
  isNarrowGap: true
47
58
  }, modalTitle, /*#__PURE__*/React.createElement(SchemaSelectContainer, null, /*#__PURE__*/React.createElement(AssetsObjectSchemaSelectSkeleton, null))), /*#__PURE__*/React.createElement(FormRowContainer, null, /*#__PURE__*/React.createElement(AssetsAqlSearchInputSkeleton, null)));
48
59
  };
@@ -231,7 +231,6 @@ export var useDatasourceTableState = function useDatasourceTableState(_ref) {
231
231
  nextPageCursor,
232
232
  _totalCount,
233
233
  schema,
234
- isDuplicateRowDeduplicationEnabled,
235
234
  itemsToAdd,
236
235
  integrationKey,
237
236
  entityType,
@@ -317,11 +316,10 @@ export var useDatasourceTableState = function useDatasourceTableState(_ref) {
317
316
  setDestinationObjectTypes(_destinationObjectTypes);
318
317
  setTotalCount(_totalCount);
319
318
  setNextCursor(nextPageCursor);
320
- isDuplicateRowDeduplicationEnabled = fg('platform_sllv_duplicated_row');
321
- if (shouldRequestFirstPage && isDuplicateRowDeduplicationEnabled) {
319
+ if (shouldRequestFirstPage) {
322
320
  responseItemAris.current.clear();
323
321
  }
324
- itemsToAdd = isDuplicateRowDeduplicationEnabled ? items.filter(function (item) {
322
+ itemsToAdd = items.filter(function (item) {
325
323
  var _item$ari;
326
324
  var ari = (_item$ari = item.ari) === null || _item$ari === void 0 ? void 0 : _item$ari.data;
327
325
  if (typeof ari !== 'string') {
@@ -332,7 +330,7 @@ export var useDatasourceTableState = function useDatasourceTableState(_ref) {
332
330
  }
333
331
  responseItemAris.current.add(ari);
334
332
  return true;
335
- }) : items;
333
+ });
336
334
  setResponseItems(function (currentResponseItems) {
337
335
  if (shouldRequestFirstPage) {
338
336
  return itemsToAdd;
@@ -350,7 +348,7 @@ export var useDatasourceTableState = function useDatasourceTableState(_ref) {
350
348
  entityType = objectTypesEntity;
351
349
  newIds = onAddItems(itemsToAdd, typeof integrationKey === 'string' ? integrationKey : undefined, entityType);
352
350
  setResponseItemIds(function (currentIds) {
353
- return isDuplicateRowDeduplicationEnabled && shouldRequestFirstPage ? newIds : [].concat(_toConsumableArray(currentIds), _toConsumableArray(newIds));
351
+ return shouldRequestFirstPage ? newIds : [].concat(_toConsumableArray(currentIds), _toConsumableArray(newIds));
354
352
  });
355
353
  if (!isFedRamp()) {
356
354
  if (typeof integrationKey === 'string') {
@@ -7,9 +7,15 @@ import "./loading-state.compiled.css";
7
7
  import { forwardRef } from 'react';
8
8
  import * as React from 'react';
9
9
  import { ax, ix } from "@compiled/react/runtime";
10
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
11
+ import { Flex } from '@atlaskit/primitives/compiled/flex';
10
12
  import { AssetsAqlSearchInputSkeleton } from './aql-search-input/loading-state';
11
13
  import { AssetsObjectSchemaSelectSkeleton } from './object-schema-select/loading-state';
12
14
  import { FormRowContainer } from './styled';
15
+ var styles = {
16
+ flexStyles: "_1bsb1osq"
17
+ };
18
+
13
19
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled
14
20
  var SchemaSelectContainer = forwardRef(function (_ref, __cmplr) {
15
21
  var _ref$as = _ref.as,
@@ -44,7 +50,12 @@ export var AssetsSearchContainerLoading = function AssetsSearchContainerLoading(
44
50
  var modalTitle = _ref3.modalTitle;
45
51
  return /*#__PURE__*/React.createElement(FormContainer, {
46
52
  "data-testid": "assets-datasource-modal--search-container-skeleton"
47
- }, /*#__PURE__*/React.createElement(FormRowContainer, {
53
+ }, fg('astral_assets_macro_table_ui_uplift') ? /*#__PURE__*/React.createElement(Flex, {
54
+ gap: "space.100",
55
+ alignItems: "center",
56
+ justifyContent: "space-between",
57
+ xcss: styles.flexStyles
58
+ }, modalTitle, /*#__PURE__*/React.createElement(SchemaSelectContainer, null, /*#__PURE__*/React.createElement(AssetsObjectSchemaSelectSkeleton, null))) : /*#__PURE__*/React.createElement(FormRowContainer, {
48
59
  isNarrowGap: true
49
60
  }, modalTitle, /*#__PURE__*/React.createElement(SchemaSelectContainer, null, /*#__PURE__*/React.createElement(AssetsObjectSchemaSelectSkeleton, null))), /*#__PURE__*/React.createElement(FormRowContainer, null, /*#__PURE__*/React.createElement(AssetsAqlSearchInputSkeleton, null)));
50
61
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-datasource",
3
- "version": "7.12.1",
3
+ "version": "7.12.3",
4
4
  "description": "UI Components to support linking platform dataset feature",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -90,7 +90,7 @@
90
90
  "@atlaskit/smart-card": "^46.13.0",
91
91
  "@atlaskit/smart-user-picker": "^12.11.0",
92
92
  "@atlaskit/spinner": "^20.4.0",
93
- "@atlaskit/tag": "^17.0.0",
93
+ "@atlaskit/tag": "^17.1.0",
94
94
  "@atlaskit/teams-avatar": "^4.2.0",
95
95
  "@atlaskit/textfield": "^10.3.0",
96
96
  "@atlaskit/theme": "^28.2.0",
@@ -170,9 +170,6 @@
170
170
  "platform_lp_sllv_on_request_settled": {
171
171
  "type": "boolean"
172
172
  },
173
- "platform_sllv_duplicated_row": {
174
- "type": "boolean"
175
- },
176
173
  "astral_units_workspace_host_resolver": {
177
174
  "type": "boolean"
178
175
  },