@atlaskit/editor-synced-block-provider 22.0.4 → 22.0.6
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 +14 -0
- package/dist/cjs/clients/block-service/blockSubscription.js +2 -2
- package/dist/cjs/clients/confluence/fetchMediaToken.js +2 -2
- package/dist/cjs/clients/jira/fetchMediaToken.js +2 -2
- package/dist/cjs/hooks/useFetchSyncBlockData.js +5 -5
- package/dist/cjs/providers/syncBlockProvider.js +5 -0
- package/dist/cjs/providers/types.js +1 -1
- package/dist/cjs/store-manager/referenceSyncBlockStoreManager.js +19 -18
- package/dist/cjs/store-manager/sourceSyncBlockStoreManager.js +8 -8
- package/dist/cjs/store-manager/syncBlockBatchFetcher.js +2 -2
- package/dist/cjs/store-manager/syncBlockProviderFactoryManager.js +8 -8
- package/dist/cjs/store-manager/syncBlockStoreManager.js +2 -2
- package/dist/cjs/store-manager/syncBlockSubscriptionManager.js +4 -4
- package/dist/cjs/utils/errorHandling.js +44 -44
- package/dist/cjs/utils/experienceTracking.js +26 -24
- package/dist/cjs/utils/migrateSyncBlockIds.js +2 -2
- package/dist/es2019/clients/block-service/blockSubscription.js +1 -1
- package/dist/es2019/clients/confluence/fetchMediaToken.js +1 -1
- package/dist/es2019/clients/jira/fetchMediaToken.js +1 -1
- package/dist/es2019/hooks/useFetchSyncBlockData.js +2 -2
- package/dist/es2019/providers/syncBlockProvider.js +3 -0
- package/dist/es2019/providers/types.js +1 -1
- package/dist/es2019/store-manager/referenceSyncBlockStoreManager.js +11 -10
- package/dist/es2019/store-manager/sourceSyncBlockStoreManager.js +1 -1
- package/dist/es2019/store-manager/syncBlockBatchFetcher.js +1 -1
- package/dist/es2019/store-manager/syncBlockProviderFactoryManager.js +3 -3
- package/dist/es2019/store-manager/syncBlockStoreManager.js +1 -1
- package/dist/es2019/store-manager/syncBlockSubscriptionManager.js +1 -1
- package/dist/es2019/utils/errorHandling.js +1 -1
- package/dist/es2019/utils/experienceTracking.js +4 -2
- package/dist/es2019/utils/migrateSyncBlockIds.js +1 -1
- package/dist/esm/clients/block-service/blockSubscription.js +1 -1
- package/dist/esm/clients/confluence/fetchMediaToken.js +1 -1
- package/dist/esm/clients/jira/fetchMediaToken.js +1 -1
- package/dist/esm/hooks/useFetchSyncBlockData.js +2 -2
- package/dist/esm/providers/syncBlockProvider.js +5 -0
- package/dist/esm/providers/types.js +1 -1
- package/dist/esm/store-manager/referenceSyncBlockStoreManager.js +11 -10
- package/dist/esm/store-manager/sourceSyncBlockStoreManager.js +1 -1
- package/dist/esm/store-manager/syncBlockBatchFetcher.js +1 -1
- package/dist/esm/store-manager/syncBlockProviderFactoryManager.js +3 -3
- package/dist/esm/store-manager/syncBlockStoreManager.js +1 -1
- package/dist/esm/store-manager/syncBlockSubscriptionManager.js +1 -1
- package/dist/esm/utils/errorHandling.js +1 -1
- package/dist/esm/utils/experienceTracking.js +4 -2
- package/dist/esm/utils/migrateSyncBlockIds.js +1 -1
- package/dist/types/hooks/useFetchSyncBlockData.d.ts +3 -2
- package/dist/types/providers/syncBlockProvider.d.ts +1 -0
- package/dist/types/providers/types.d.ts +5 -2
- package/dist/types/store-manager/referenceSyncBlockStoreManager.d.ts +5 -4
- package/dist/types/store-manager/sourceSyncBlockStoreManager.d.ts +2 -2
- package/dist/types/store-manager/syncBlockBatchFetcher.d.ts +1 -1
- package/dist/types/store-manager/syncBlockProviderFactoryManager.d.ts +3 -3
- package/dist/types/store-manager/syncBlockStoreManager.d.ts +2 -2
- package/dist/types/store-manager/syncBlockSubscriptionManager.d.ts +1 -1
- package/dist/types/utils/errorHandling.d.ts +4 -2
- package/dist/types/utils/experienceTracking.d.ts +3 -2
- package/package.json +3 -3
|
@@ -11,7 +11,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
11
11
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
12
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
13
|
import isEqual from 'lodash/isEqual';
|
|
14
|
-
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
14
|
+
import { logException } from '@atlaskit/editor-common/monitoring/error';
|
|
15
15
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
16
16
|
import { isProviderNotReadyError, ProviderNotReadyError, SyncBlockError } from '../common/types';
|
|
17
17
|
import { buildErrorAttribution, buildFetchErrorAttribution, cacheDeletionForcedPayload, fetchErrorPayload, fetchSuccessPayload, getSourceInfoErrorPayload, sourceInfoOrphanedPayload, updateReferenceErrorPayload } from '../utils/errorHandling';
|
|
@@ -259,8 +259,9 @@ export var ReferenceSyncBlockStoreManager = /*#__PURE__*/function () {
|
|
|
259
259
|
}, {
|
|
260
260
|
key: "getSameDocumentReferenceParts",
|
|
261
261
|
value: function getSameDocumentReferenceParts(resourceId) {
|
|
262
|
+
var _this$dataProvider$ca, _this$dataProvider3;
|
|
262
263
|
var parsed = parseResourceId(resourceId);
|
|
263
|
-
if (!parsed || !this.dataProvider || this.dataProvider.generateResourceIdForReference(parsed.uuid) !== resourceId) {
|
|
264
|
+
if (!parsed || !this.dataProvider || isExperimentEnabled('platform_editor_blocks_patch_12') && ((_this$dataProvider$ca = (_this$dataProvider3 = this.dataProvider).canGenerateResourceIdForReference) === null || _this$dataProvider$ca === void 0 ? void 0 : _this$dataProvider$ca.call(_this$dataProvider3)) === false || this.dataProvider.generateResourceIdForReference(parsed.uuid) !== resourceId) {
|
|
264
265
|
return undefined;
|
|
265
266
|
}
|
|
266
267
|
return parsed;
|
|
@@ -754,8 +755,8 @@ export var ReferenceSyncBlockStoreManager = /*#__PURE__*/function () {
|
|
|
754
755
|
var sanitizedSyncBlock = this.normalizeReferenceData(syncBlock);
|
|
755
756
|
var resourceId = sanitizedSyncBlock.resourceId;
|
|
756
757
|
if (resourceId) {
|
|
757
|
-
var _this$
|
|
758
|
-
(_this$
|
|
758
|
+
var _this$dataProvider4;
|
|
759
|
+
(_this$dataProvider4 = this.dataProvider) === null || _this$dataProvider4 === void 0 || _this$dataProvider4.updateCache(_defineProperty({}, resourceId, sanitizedSyncBlock), {
|
|
759
760
|
strategy: 'merge',
|
|
760
761
|
source: 'network'
|
|
761
762
|
});
|
|
@@ -766,15 +767,15 @@ export var ReferenceSyncBlockStoreManager = /*#__PURE__*/function () {
|
|
|
766
767
|
}, {
|
|
767
768
|
key: "getFromCache",
|
|
768
769
|
value: function getFromCache(resourceId) {
|
|
769
|
-
var _this$
|
|
770
|
+
var _this$dataProvider5;
|
|
770
771
|
var syncBlockNode = createSyncBlockNode('', resourceId);
|
|
771
|
-
return (_this$
|
|
772
|
+
return (_this$dataProvider5 = this.dataProvider) === null || _this$dataProvider5 === void 0 || (_this$dataProvider5 = _this$dataProvider5.getNodeDataFromCache(syncBlockNode)) === null || _this$dataProvider5 === void 0 ? void 0 : _this$dataProvider5.data;
|
|
772
773
|
}
|
|
773
774
|
}, {
|
|
774
775
|
key: "deleteFromCache",
|
|
775
776
|
value: function deleteFromCache(resourceId) {
|
|
776
|
-
var _this$
|
|
777
|
-
(_this$
|
|
777
|
+
var _this$dataProvider6;
|
|
778
|
+
(_this$dataProvider6 = this.dataProvider) === null || _this$dataProvider6 === void 0 || _this$dataProvider6.removeFromCache([resourceId]);
|
|
778
779
|
this._providerFactoryManager.deleteFactory(resourceId);
|
|
779
780
|
// Evict in-flight source-info promise and reset reschedule counter
|
|
780
781
|
// so a stale resolution can't silently merge into a re-fetched entry.
|
|
@@ -1258,7 +1259,7 @@ export var ReferenceSyncBlockStoreManager = /*#__PURE__*/function () {
|
|
|
1258
1259
|
}, {
|
|
1259
1260
|
key: "destroy",
|
|
1260
1261
|
value: function destroy() {
|
|
1261
|
-
var _this$
|
|
1262
|
+
var _this$dataProvider7, _this$saveExperience5, _this$fetchExperience0, _this$fetchSourceInfo2;
|
|
1262
1263
|
// Mark destroyed first so in-flight timer callbacks can early-return.
|
|
1263
1264
|
this.isDestroyed = true;
|
|
1264
1265
|
|
|
@@ -1284,7 +1285,7 @@ export var ReferenceSyncBlockStoreManager = /*#__PURE__*/function () {
|
|
|
1284
1285
|
this._subscriptionManager.destroy();
|
|
1285
1286
|
this._providerFactoryManager.destroy();
|
|
1286
1287
|
this._batchFetcher.destroy();
|
|
1287
|
-
(_this$
|
|
1288
|
+
(_this$dataProvider7 = this.dataProvider) === null || _this$dataProvider7 === void 0 || _this$dataProvider7.resetCache();
|
|
1288
1289
|
this.dataProvider = undefined;
|
|
1289
1290
|
this.syncBlockFetchDataRequests.clear();
|
|
1290
1291
|
this.syncBlockSourceInfoRequests.clear();
|
|
@@ -12,7 +12,7 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
|
|
|
12
12
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
13
13
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
14
14
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
15
|
-
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
15
|
+
import { logException } from '@atlaskit/editor-common/monitoring/error';
|
|
16
16
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
17
17
|
import { SyncBlockError } from '../common/types';
|
|
18
18
|
import { updateErrorPayload, createErrorPayload, deleteErrorPayload, updateCacheErrorPayload, getSourceInfoErrorPayload, updateSuccessPayload, createSuccessPayload, createSuccessOperationalPayload, addContentSuccessPayload, deleteSuccessPayload, fetchReferencesErrorPayload, buildErrorAttribution } from '../utils/errorHandling';
|
|
@@ -2,7 +2,7 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
4
|
import rafSchedule from 'raf-schd';
|
|
5
|
-
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
5
|
+
import { logException } from '@atlaskit/editor-common/monitoring/error';
|
|
6
6
|
import { isProviderNotReadyError } from '../common/types';
|
|
7
7
|
import { buildFetchErrorAttribution, fetchErrorPayload } from '../utils/errorHandling';
|
|
8
8
|
import { createSyncBlockNode, getSourceProductFromResourceIdSafe } from '../utils/utils';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
-
import { isSSR } from '@atlaskit/editor-common/
|
|
5
|
-
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
6
|
-
import
|
|
4
|
+
import { isSSR } from '@atlaskit/editor-common/is-ssr';
|
|
5
|
+
import { logException } from '@atlaskit/editor-common/monitoring/error';
|
|
6
|
+
import ProviderFactory from '@atlaskit/editor-common/provider-factory/provider-factory';
|
|
7
7
|
import { buildFetchErrorAttribution, fetchErrorPayload } from '../utils/errorHandling';
|
|
8
8
|
import { parseResourceId } from '../utils/resourceId';
|
|
9
9
|
import { getSourceProductFromResourceIdSafe } from '../utils/utils';
|
|
@@ -6,7 +6,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
6
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
8
|
import { useEffect, useMemo, useRef } from 'react';
|
|
9
|
-
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
9
|
+
import { logException } from '@atlaskit/editor-common/monitoring/error';
|
|
10
10
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
11
11
|
import { getProductFromSourceAri } from '../clients/block-service/ari';
|
|
12
12
|
import { SyncBlockError } from '../common/types';
|
|
@@ -8,7 +8,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
8
8
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9
9
|
import { bind } from 'bind-event-listener';
|
|
10
10
|
import { getDocument } from '@atlaskit/browser-apis';
|
|
11
|
-
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
11
|
+
import { logException } from '@atlaskit/editor-common/monitoring/error';
|
|
12
12
|
import { buildFetchErrorAttribution, fetchErrorPayload, fetchSuccessPayload } from '../utils/errorHandling';
|
|
13
13
|
import { resolveSyncBlockInstance } from '../utils/resolveSyncBlockInstance';
|
|
14
14
|
import { getSourceProductFromResourceIdSafe } from '../utils/utils';
|
|
@@ -2,7 +2,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
5
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics/types/enums';
|
|
6
6
|
import { SyncBlockError } from '../common/types';
|
|
7
7
|
export var stringifyError = function stringifyError(error) {
|
|
8
8
|
try {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { ACTION } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import {
|
|
1
|
+
import { ACTION } from '@atlaskit/editor-common/analytics/types/enums';
|
|
2
|
+
import { EXPERIENCE_ID } from '@atlaskit/editor-common/experiences/consts';
|
|
3
|
+
import { Experience } from '@atlaskit/editor-common/experiences/Experience';
|
|
4
|
+
import { ExperienceCheckTimeout } from '@atlaskit/editor-common/experiences/ExperienceCheckTimeout';
|
|
3
5
|
var TIMEOUT_DURATION = 30000;
|
|
4
6
|
export var createExperienceDispatcher = function createExperienceDispatcher(fireAnalyticsEvent) {
|
|
5
7
|
return function (payload) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
import { traverse } from '@atlaskit/adf-utils/traverse';
|
|
4
|
+
import { traverse } from '@atlaskit/adf-utils/traverse/main';
|
|
5
5
|
import { createResourceIdForReference, parseResourceId } from './resourceId';
|
|
6
6
|
|
|
7
7
|
/*
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { RendererSyncBlockEventPayload } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type {
|
|
1
|
+
import type { RendererSyncBlockEventPayload } from '@atlaskit/editor-common/analytics/types/sync-block-events';
|
|
2
|
+
import type { MediaProvider } from '@atlaskit/editor-common/provider-factory/media-provider';
|
|
3
|
+
import type ProviderFactory from '@atlaskit/editor-common/provider-factory/provider-factory';
|
|
3
4
|
import type { SyncBlockInstance } from '../providers/types';
|
|
4
5
|
import type { SyncBlockStoreManager } from '../store-manager/syncBlockStoreManager';
|
|
5
6
|
type SSRProviders = {
|
|
@@ -73,6 +73,7 @@ export declare class SyncedBlockProvider extends SyncBlockDataProviderInterface
|
|
|
73
73
|
localId: BlockInstanceId;
|
|
74
74
|
resourceId: ResourceId;
|
|
75
75
|
};
|
|
76
|
+
canGenerateResourceIdForReference(): boolean;
|
|
76
77
|
generateResourceIdForReference(sourceId: ResourceId): ResourceId;
|
|
77
78
|
/**
|
|
78
79
|
* Get the synced block renderer provider options
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import type { CardProvider
|
|
1
|
+
import type { CardProvider } from '@atlaskit/editor-common/provider-factory/card-provider';
|
|
2
|
+
import type { MediaProvider } from '@atlaskit/editor-common/provider-factory/media-provider';
|
|
3
|
+
import type { ProfilecardProvider } from '@atlaskit/editor-common/provider-factory/profile-card-provider';
|
|
2
4
|
import type { EmojiProvider } from '@atlaskit/emoji';
|
|
3
5
|
import type { MentionProvider } from '@atlaskit/mention/types';
|
|
4
|
-
import { NodeDataProvider } from '@atlaskit/node-data-provider';
|
|
6
|
+
import { NodeDataProvider } from '@atlaskit/node-data-provider/node-data-provider';
|
|
5
7
|
import type { TaskDecisionProvider } from '@atlaskit/task-decision/types';
|
|
6
8
|
import type { SyncBlockData, SyncBlockStatus, ResourceId, SyncBlockError, SyncBlockNode, SyncBlockProduct, BlockInstanceId, SyncBlockAttrs, ReferenceSyncBlockData, DeletionReason, SyncBlockLocationScope } from '../common/types';
|
|
7
9
|
type SyncBlockErrorInfo = {
|
|
@@ -218,6 +220,7 @@ export declare abstract class SyncBlockDataProviderInterface extends NodeDataPro
|
|
|
218
220
|
* @returns The generated resource ID
|
|
219
221
|
*/
|
|
220
222
|
abstract generateResourceIdForReference(sourceId: ResourceId): ResourceId;
|
|
223
|
+
canGenerateResourceIdForReference?(): boolean;
|
|
221
224
|
abstract updateReferenceData(blocks: SyncBlockAttrs[], noContent?: boolean): Promise<UpdateReferenceSyncBlockResult>;
|
|
222
225
|
abstract fetchReferences(resourceId: string, isSource: boolean): Promise<ReferenceSyncBlockData>;
|
|
223
226
|
/**
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { RendererSyncBlockEventPayload } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { Experience } from '@atlaskit/editor-common/experiences';
|
|
3
|
-
import type {
|
|
4
|
-
import type
|
|
1
|
+
import type { RendererSyncBlockEventPayload } from '@atlaskit/editor-common/analytics/types/sync-block-events';
|
|
2
|
+
import type { Experience } from '@atlaskit/editor-common/experiences/Experience';
|
|
3
|
+
import type { MediaProvider } from '@atlaskit/editor-common/provider-factory/media-provider';
|
|
4
|
+
import type ProviderFactory from '@atlaskit/editor-common/provider-factory/provider-factory';
|
|
5
|
+
import type { ViewMode } from '@atlaskit/editor-plugin-editor-viewmode/editorViewmodePluginType';
|
|
5
6
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
6
7
|
import type { BlockInstanceId, ResourceId, SyncBlockNode, SyncBlockPrefetchData } from '../common/types';
|
|
7
8
|
import type { SyncBlockInstance, SubscriptionCallback, SyncBlockDataProviderInterface, TitleSubscriptionCallback, SyncBlockSourceInfo, SyncedBlockRendererProviderOptions } from '../providers/types';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
2
|
-
import type { SyncBlockEventPayload } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import type { ViewMode } from '@atlaskit/editor-plugin-editor-viewmode';
|
|
2
|
+
import type { SyncBlockEventPayload } from '@atlaskit/editor-common/analytics/types/sync-block-events';
|
|
3
|
+
import type { ViewMode } from '@atlaskit/editor-plugin-editor-viewmode/editorViewmodePluginType';
|
|
4
4
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
import type { ResourceId, SyncBlockAttrs, SyncBlockData as Data, BlockInstanceId, DeletionReason, DeletionMechanism, ReferenceSyncBlockData, SyncBlockStatus } from '../common/types';
|
|
6
6
|
import type { SyncBlockDataProviderInterface, SyncBlockSourceInfo } from '../providers/types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RendererSyncBlockEventPayload } from '@atlaskit/editor-common/analytics';
|
|
1
|
+
import type { RendererSyncBlockEventPayload } from '@atlaskit/editor-common/analytics/types/sync-block-events';
|
|
2
2
|
import type { ResourceId, BlockInstanceId, SyncBlockNode } from '../common/types';
|
|
3
3
|
import type { SubscriptionCallback } from '../providers/types';
|
|
4
4
|
export interface SyncBlockBatchFetcherDeps {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { RendererSyncBlockEventPayload } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import type { RendererSyncBlockEventPayload } from '@atlaskit/editor-common/analytics/types/sync-block-events';
|
|
2
|
+
import type { MediaProvider } from '@atlaskit/editor-common/provider-factory/media-provider';
|
|
3
|
+
import ProviderFactory from '@atlaskit/editor-common/provider-factory/provider-factory';
|
|
4
4
|
import type { ResourceId } from '../common/types';
|
|
5
5
|
import type { SyncBlockInstance, SyncBlockDataProviderInterface, SyncedBlockRendererProviderOptions } from '../providers/types';
|
|
6
6
|
export interface SyncBlockProviderFactoryManagerDeps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { SyncBlockEventPayload } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { ViewMode } from '@atlaskit/editor-plugin-editor-viewmode';
|
|
1
|
+
import type { SyncBlockEventPayload } from '@atlaskit/editor-common/analytics/types/sync-block-events';
|
|
2
|
+
import type { ViewMode } from '@atlaskit/editor-plugin-editor-viewmode/editorViewmodePluginType';
|
|
3
3
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import type { BlockInstanceId, ReferencesSourceInfo, ResourceId } from '../common/types';
|
|
5
5
|
import type { SyncBlockDataProviderInterface } from '../providers/types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RendererSyncBlockEventPayload } from '@atlaskit/editor-common/analytics';
|
|
1
|
+
import type { RendererSyncBlockEventPayload } from '@atlaskit/editor-common/analytics/types/sync-block-events';
|
|
2
2
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import type { ResourceId, BlockInstanceId } from '../common/types';
|
|
4
4
|
import type { SyncBlockInstance, SubscriptionCallback, SyncBlockDataProviderInterface, SyncBlockSourceInfo, TitleSubscriptionCallback } from '../providers/types';
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { INPUT_METHOD
|
|
1
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics/types/enums';
|
|
2
|
+
import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
3
|
+
import type { RendererSyncBlockEventPayload, SyncBlockEventPayload } from '@atlaskit/editor-common/analytics/types/sync-block-events';
|
|
4
|
+
import type { OperationalAEP } from '@atlaskit/editor-common/analytics/types/utils';
|
|
3
5
|
import { SyncBlockError } from '../common/types';
|
|
4
6
|
import type { DeletionMechanism, DeletionReason } from '../common/types';
|
|
5
7
|
export declare const stringifyError: (error: unknown) => string | undefined;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { DispatchAnalyticsEvent
|
|
2
|
-
import {
|
|
1
|
+
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics/types/dispatch-analytics-event';
|
|
2
|
+
import type { SyncBlockEventPayload, RendererSyncBlockEventPayload } from '@atlaskit/editor-common/analytics/types/sync-block-events';
|
|
3
|
+
import { Experience } from '@atlaskit/editor-common/experiences/Experience';
|
|
3
4
|
export declare const createExperienceDispatcher: (fireAnalyticsEvent?: ((payload: SyncBlockEventPayload) => void) | ((payload: RendererSyncBlockEventPayload) => void)) => DispatchAnalyticsEvent;
|
|
4
5
|
/**
|
|
5
6
|
* This experience tracks when a source sync block is saved to the BE.
|
package/package.json
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@atlaskit/node-data-provider": "^27.0.0",
|
|
24
24
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
25
25
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
26
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
26
|
+
"@atlaskit/tmp-editor-statsig": "^232.0.0",
|
|
27
27
|
"@babel/runtime": "^7.0.0",
|
|
28
28
|
"@compiled/react": "^1.0.2",
|
|
29
29
|
"bind-event-listener": "^3.0.0",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"uuid": "^11.1.1"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@atlaskit/editor-common": "^130.
|
|
36
|
+
"@atlaskit/editor-common": "^130.4.0",
|
|
37
37
|
"react": "^18.2.0 || ^19.2.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"react-dom": "^19.2.0"
|
|
43
43
|
},
|
|
44
44
|
"name": "@atlaskit/editor-synced-block-provider",
|
|
45
|
-
"version": "22.0.
|
|
45
|
+
"version": "22.0.6",
|
|
46
46
|
"description": "Synced Block Provider for @atlaskit/editor-plugin-synced-block",
|
|
47
47
|
"author": "Atlassian Pty Ltd",
|
|
48
48
|
"license": "Apache-2.0",
|