@atlaskit/link-datasource 3.15.3 → 3.15.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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/link-datasource
2
2
 
3
+ ## 3.15.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#175841](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/175841)
8
+ [`f21aa44e58c1b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f21aa44e58c1b) -
9
+ removing platform-datasources-enable-two-way-sync FF
10
+
3
11
  ## 3.15.3
4
12
 
5
13
  ### Patch Changes
@@ -325,21 +325,19 @@ var useDatasourceTableState = exports.useDatasourceTableState = function useData
325
325
  setResponseItemIds(function (currentIds) {
326
326
  return [].concat((0, _toConsumableArray2.default)(currentIds), (0, _toConsumableArray2.default)(newIds));
327
327
  });
328
- if ((0, _platformFeatureFlags.fg)('platform-datasources-enable-two-way-sync')) {
329
- if (!(0, _atlassianContext.isFedRamp)()) {
330
- if (typeof integrationKey === 'string') {
331
- aris = items.reduce(function (acc, item) {
332
- var _item$ari;
333
- return typeof ((_item$ari = item.ari) === null || _item$ari === void 0 ? void 0 : _item$ari.data) === 'string' ? [].concat((0, _toConsumableArray2.default)(acc), [item.ari.data]) : acc;
334
- }, []);
335
- if (aris.length && entityType) {
336
- discoverActions({
337
- aris: aris,
338
- integrationKey: integrationKey,
339
- fieldKeys: fieldKeys,
340
- entityType: entityType
341
- });
342
- }
328
+ if (!(0, _atlassianContext.isFedRamp)()) {
329
+ if (typeof integrationKey === 'string') {
330
+ aris = items.reduce(function (acc, item) {
331
+ var _item$ari;
332
+ return typeof ((_item$ari = item.ari) === null || _item$ari === void 0 ? void 0 : _item$ari.data) === 'string' ? [].concat((0, _toConsumableArray2.default)(acc), [item.ari.data]) : acc;
333
+ }, []);
334
+ if (aris.length && entityType) {
335
+ discoverActions({
336
+ aris: aris,
337
+ integrationKey: integrationKey,
338
+ fieldKeys: fieldKeys,
339
+ entityType: entityType
340
+ });
343
341
  }
344
342
  }
345
343
  }
@@ -369,19 +369,14 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
369
369
  key: 'loading',
370
370
  cells: headerColumns.map(function (column) {
371
371
  return {
372
- content: (0, _platformFeatureFlags.fg)('platform-datasources-enable-two-way-sync') ? (0, _react2.jsx)(_primitives.Box, {
372
+ content: (0, _react2.jsx)(_primitives.Box, {
373
373
  paddingInline: "space.100"
374
374
  }, (0, _react2.jsx)(_linkingCommon.Skeleton, {
375
375
  borderRadius: 8,
376
376
  width: "100%",
377
377
  height: 14,
378
378
  testId: "issues-table-row-loading"
379
- })) : (0, _react2.jsx)(_linkingCommon.Skeleton, {
380
- borderRadius: 8,
381
- width: "100%",
382
- height: 14,
383
- testId: "issues-table-row-loading"
384
- }),
379
+ })),
385
380
  key: column.key
386
381
  };
387
382
  })
@@ -482,20 +477,13 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
482
477
  key: key,
483
478
  columnKey: key,
484
479
  // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
485
- content: (0, _platformFeatureFlags.fg)('platform-datasources-enable-two-way-sync') ? (0, _react2.jsx)(_tableCellContent.TableCellContent, {
480
+ content: (0, _react2.jsx)(_tableCellContent.TableCellContent, {
486
481
  id: id,
487
482
  columnKey: key,
488
483
  columnType: type,
489
484
  columnTitle: title,
490
485
  wrappedColumnKeys: wrappedColumnKeys,
491
486
  renderItem: renderItem
492
- }) : (0, _react2.jsx)(_tableCellContent.ReadOnlyCell, {
493
- id: id,
494
- columnKey: key,
495
- columnTitle: title,
496
- columnType: type,
497
- wrappedColumnKeys: wrappedColumnKeys,
498
- renderItem: renderItem
499
487
  }),
500
488
  width: getColumnWidth(key, type, cellIndex === visibleSortedColumns.length - 1)
501
489
  };
@@ -724,18 +712,15 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
724
712
  });
725
713
  // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
726
714
  if ((0, _platformFeatureFlags.fg)('enable_datasource_react_sweet_state')) {
727
- // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
728
- if ((0, _platformFeatureFlags.fg)('platform-datasources-enable-two-way-sync')) {
729
- return (0, _react2.jsx)(_styled2.InlineEditableTableCell, {
730
- key: cellKey,
731
- "data-testid": testId && "".concat(testId, "--cell-").concat(cellIndex),
732
- colSpan: isEditable && isLastCell ? 2 : undefined
733
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
734
- ,
735
- style: loadingRowStyle,
736
- css: [wrappedColumnKeys !== null && wrappedColumnKeys !== void 0 && wrappedColumnKeys.includes(cellKey) ? null : truncateStyles]
737
- }, content);
738
- }
715
+ return (0, _react2.jsx)(_styled2.InlineEditableTableCell, {
716
+ key: cellKey,
717
+ "data-testid": testId && "".concat(testId, "--cell-").concat(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);
739
724
  }
740
725
 
741
726
  // extra padding is required around skeleton loader to avoid vertical jumps when data loads
@@ -755,6 +740,6 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
755
740
  }, content);
756
741
  }));
757
742
  }))));
758
- return (0, _platformFeatureFlags.fg)('platform-datasources-enable-two-way-sync') ? (0, _react2.jsx)(_flag.FlagsProvider, null, view) : view;
743
+ return (0, _react2.jsx)(_flag.FlagsProvider, null, view);
759
744
  };
760
745
  var EmptyState = exports.EmptyState = _emptyState.default;
@@ -208,21 +208,19 @@ export const useDatasourceTableState = ({
208
208
  const entityType = objectTypesEntity;
209
209
  const newIds = onAddItems(items, typeof integrationKey === 'string' ? integrationKey : undefined, entityType);
210
210
  setResponseItemIds(currentIds => [...currentIds, ...newIds]);
211
- if (fg('platform-datasources-enable-two-way-sync')) {
212
- if (!isFedRamp()) {
213
- if (typeof integrationKey === 'string') {
214
- const aris = items.reduce((acc, item) => {
215
- var _item$ari;
216
- return typeof ((_item$ari = item.ari) === null || _item$ari === void 0 ? void 0 : _item$ari.data) === 'string' ? [...acc, item.ari.data] : acc;
217
- }, []);
218
- if (aris.length && entityType) {
219
- discoverActions({
220
- aris,
221
- integrationKey,
222
- fieldKeys,
223
- entityType
224
- });
225
- }
211
+ if (!isFedRamp()) {
212
+ if (typeof integrationKey === 'string') {
213
+ const aris = items.reduce((acc, item) => {
214
+ var _item$ari;
215
+ return typeof ((_item$ari = item.ari) === null || _item$ari === void 0 ? void 0 : _item$ari.data) === 'string' ? [...acc, item.ari.data] : acc;
216
+ }, []);
217
+ if (aris.length && entityType) {
218
+ discoverActions({
219
+ aris,
220
+ integrationKey,
221
+ fieldKeys,
222
+ entityType
223
+ });
226
224
  }
227
225
  }
228
226
  }
@@ -33,7 +33,7 @@ import { DraggableTableHeading } from './draggable-table-heading';
33
33
  import TableEmptyState from './empty-state';
34
34
  import { renderType, stringifyType } from './render-type';
35
35
  import { InlineEditableTableCell, Table, TableCell, TableHeading, withTablePluginHeaderPrefix } from './styled';
36
- import { ReadOnlyCell, TableCellContent } from './table-cell-content';
36
+ import { TableCellContent } from './table-cell-content';
37
37
  import { TruncateTextTag } from './truncate-text-tag';
38
38
  import { useIsOnScreen } from './useIsOnScreen';
39
39
  import { COLUMN_BASE_WIDTH, getFieldLabelById, getWidthCss } from './utils';
@@ -366,19 +366,14 @@ export const IssueLikeDataTableView = ({
366
366
  const loadingRow = useMemo(() => ({
367
367
  key: 'loading',
368
368
  cells: headerColumns.map(column => ({
369
- content: fg('platform-datasources-enable-two-way-sync') ? jsx(Box, {
369
+ content: jsx(Box, {
370
370
  paddingInline: "space.100"
371
371
  }, jsx(Skeleton, {
372
372
  borderRadius: 8,
373
373
  width: "100%",
374
374
  height: 14,
375
375
  testId: "issues-table-row-loading"
376
- })) : jsx(Skeleton, {
377
- borderRadius: 8,
378
- width: "100%",
379
- height: 14,
380
- testId: "issues-table-row-loading"
381
- }),
376
+ })),
382
377
  key: column.key
383
378
  }))
384
379
  }), [headerColumns]);
@@ -480,20 +475,13 @@ export const IssueLikeDataTableView = ({
480
475
  key,
481
476
  columnKey: key,
482
477
  // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
483
- content: fg('platform-datasources-enable-two-way-sync') ? jsx(TableCellContent, {
478
+ content: jsx(TableCellContent, {
484
479
  id: id,
485
480
  columnKey: key,
486
481
  columnType: type,
487
482
  columnTitle: title,
488
483
  wrappedColumnKeys: wrappedColumnKeys,
489
484
  renderItem: renderItem
490
- }) : jsx(ReadOnlyCell, {
491
- id: id,
492
- columnKey: key,
493
- columnTitle: title,
494
- columnType: type,
495
- wrappedColumnKeys: wrappedColumnKeys,
496
- renderItem: renderItem
497
485
  }),
498
486
  width: getColumnWidth(key, type, cellIndex === visibleSortedColumns.length - 1)
499
487
  };
@@ -697,18 +685,15 @@ export const IssueLikeDataTableView = ({
697
685
  });
698
686
  // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
699
687
  if (fg('enable_datasource_react_sweet_state')) {
700
- // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
701
- if (fg('platform-datasources-enable-two-way-sync')) {
702
- return jsx(InlineEditableTableCell, {
703
- key: cellKey,
704
- "data-testid": testId && `${testId}--cell-${cellIndex}`,
705
- colSpan: isEditable && isLastCell ? 2 : undefined
706
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
707
- ,
708
- style: loadingRowStyle,
709
- css: [wrappedColumnKeys !== null && wrappedColumnKeys !== void 0 && wrappedColumnKeys.includes(cellKey) ? null : truncateStyles]
710
- }, content);
711
- }
688
+ return jsx(InlineEditableTableCell, {
689
+ key: cellKey,
690
+ "data-testid": testId && `${testId}--cell-${cellIndex}`,
691
+ colSpan: isEditable && isLastCell ? 2 : undefined
692
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
693
+ ,
694
+ style: loadingRowStyle,
695
+ css: [wrappedColumnKeys !== null && wrappedColumnKeys !== void 0 && wrappedColumnKeys.includes(cellKey) ? null : truncateStyles]
696
+ }, content);
712
697
  }
713
698
 
714
699
  // extra padding is required around skeleton loader to avoid vertical jumps when data loads
@@ -728,6 +713,6 @@ export const IssueLikeDataTableView = ({
728
713
  css: [wrappedColumnKeys !== null && wrappedColumnKeys !== void 0 && wrappedColumnKeys.includes(cellKey) ? null : truncateStyles]
729
714
  }, content);
730
715
  }))))));
731
- return fg('platform-datasources-enable-two-way-sync') ? jsx(FlagsProvider, null, view) : view;
716
+ return jsx(FlagsProvider, null, view);
732
717
  };
733
718
  export const EmptyState = TableEmptyState;
@@ -318,21 +318,19 @@ export var useDatasourceTableState = function useDatasourceTableState(_ref) {
318
318
  setResponseItemIds(function (currentIds) {
319
319
  return [].concat(_toConsumableArray(currentIds), _toConsumableArray(newIds));
320
320
  });
321
- if (fg('platform-datasources-enable-two-way-sync')) {
322
- if (!isFedRamp()) {
323
- if (typeof integrationKey === 'string') {
324
- aris = items.reduce(function (acc, item) {
325
- var _item$ari;
326
- return typeof ((_item$ari = item.ari) === null || _item$ari === void 0 ? void 0 : _item$ari.data) === 'string' ? [].concat(_toConsumableArray(acc), [item.ari.data]) : acc;
327
- }, []);
328
- if (aris.length && entityType) {
329
- discoverActions({
330
- aris: aris,
331
- integrationKey: integrationKey,
332
- fieldKeys: fieldKeys,
333
- entityType: entityType
334
- });
335
- }
321
+ if (!isFedRamp()) {
322
+ if (typeof integrationKey === 'string') {
323
+ aris = items.reduce(function (acc, item) {
324
+ var _item$ari;
325
+ return typeof ((_item$ari = item.ari) === null || _item$ari === void 0 ? void 0 : _item$ari.data) === 'string' ? [].concat(_toConsumableArray(acc), [item.ari.data]) : acc;
326
+ }, []);
327
+ if (aris.length && entityType) {
328
+ discoverActions({
329
+ aris: aris,
330
+ integrationKey: integrationKey,
331
+ fieldKeys: fieldKeys,
332
+ entityType: entityType
333
+ });
336
334
  }
337
335
  }
338
336
  }
@@ -40,7 +40,7 @@ import { DraggableTableHeading } from './draggable-table-heading';
40
40
  import TableEmptyState from './empty-state';
41
41
  import { renderType, stringifyType } from './render-type';
42
42
  import { InlineEditableTableCell, Table, TableCell, TableHeading, withTablePluginHeaderPrefix } from './styled';
43
- import { ReadOnlyCell, TableCellContent } from './table-cell-content';
43
+ import { TableCellContent } from './table-cell-content';
44
44
  import { TruncateTextTag } from './truncate-text-tag';
45
45
  import { useIsOnScreen } from './useIsOnScreen';
46
46
  import { COLUMN_BASE_WIDTH, getFieldLabelById, getWidthCss } from './utils';
@@ -365,19 +365,14 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref5) {
365
365
  key: 'loading',
366
366
  cells: headerColumns.map(function (column) {
367
367
  return {
368
- content: fg('platform-datasources-enable-two-way-sync') ? jsx(Box, {
368
+ content: jsx(Box, {
369
369
  paddingInline: "space.100"
370
370
  }, jsx(Skeleton, {
371
371
  borderRadius: 8,
372
372
  width: "100%",
373
373
  height: 14,
374
374
  testId: "issues-table-row-loading"
375
- })) : jsx(Skeleton, {
376
- borderRadius: 8,
377
- width: "100%",
378
- height: 14,
379
- testId: "issues-table-row-loading"
380
- }),
375
+ })),
381
376
  key: column.key
382
377
  };
383
378
  })
@@ -478,20 +473,13 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref5) {
478
473
  key: key,
479
474
  columnKey: key,
480
475
  // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
481
- content: fg('platform-datasources-enable-two-way-sync') ? jsx(TableCellContent, {
476
+ content: jsx(TableCellContent, {
482
477
  id: id,
483
478
  columnKey: key,
484
479
  columnType: type,
485
480
  columnTitle: title,
486
481
  wrappedColumnKeys: wrappedColumnKeys,
487
482
  renderItem: renderItem
488
- }) : jsx(ReadOnlyCell, {
489
- id: id,
490
- columnKey: key,
491
- columnTitle: title,
492
- columnType: type,
493
- wrappedColumnKeys: wrappedColumnKeys,
494
- renderItem: renderItem
495
483
  }),
496
484
  width: getColumnWidth(key, type, cellIndex === visibleSortedColumns.length - 1)
497
485
  };
@@ -720,18 +708,15 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref5) {
720
708
  });
721
709
  // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
722
710
  if (fg('enable_datasource_react_sweet_state')) {
723
- // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
724
- if (fg('platform-datasources-enable-two-way-sync')) {
725
- return jsx(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
- }
711
+ return jsx(InlineEditableTableCell, {
712
+ key: cellKey,
713
+ "data-testid": testId && "".concat(testId, "--cell-").concat(cellIndex),
714
+ colSpan: isEditable && isLastCell ? 2 : undefined
715
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
716
+ ,
717
+ style: loadingRowStyle,
718
+ css: [wrappedColumnKeys !== null && wrappedColumnKeys !== void 0 && wrappedColumnKeys.includes(cellKey) ? null : truncateStyles]
719
+ }, content);
735
720
  }
736
721
 
737
722
  // extra padding is required around skeleton loader to avoid vertical jumps when data loads
@@ -751,6 +736,6 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref5) {
751
736
  }, content);
752
737
  }));
753
738
  }))));
754
- return fg('platform-datasources-enable-two-way-sync') ? jsx(FlagsProvider, null, view) : view;
739
+ return jsx(FlagsProvider, null, view);
755
740
  };
756
741
  export var EmptyState = TableEmptyState;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-datasource",
3
- "version": "3.15.3",
3
+ "version": "3.15.4",
4
4
  "description": "UI Components to support linking platform dataset feature",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -159,9 +159,6 @@
159
159
  "enable_datasource_react_sweet_state": {
160
160
  "type": "boolean"
161
161
  },
162
- "platform-datasources-enable-two-way-sync": {
163
- "type": "boolean"
164
- },
165
162
  "enable_datasource_supporting_actions": {
166
163
  "type": "boolean"
167
164
  },