@atlaskit/collab-provider 9.44.0 → 9.45.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,25 @@
1
1
  # @atlaskit/collab-provider
2
2
 
3
+ ## 9.45.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#163776](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/163776)
8
+ [`45d76610f271d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/45d76610f271d) -
9
+ Add support for optional property, isGuest, on CollabProvider
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 9.44.1
16
+
17
+ ### Patch Changes
18
+
19
+ - [#159176](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/159176)
20
+ [`8f1d77592a9dc`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8f1d77592a9dc) -
21
+ Bump adf-schema to 44.2.0
22
+
3
23
  ## 9.44.0
4
24
 
5
25
  ### Minor Changes
@@ -1,45 +1,45 @@
1
1
  {
2
- "extends": "../../../../tsconfig.entry-points.jira.json",
3
- "compilerOptions": {
4
- "declaration": true,
5
- "target": "es5",
6
- "outDir": "../../../../../tsDist/@atlaskit__collab-provider/app",
7
- "composite": true,
8
- "rootDir": "../"
9
- },
10
- "include": [
11
- "../src/**/*.ts",
12
- "../src/**/*.tsx"
13
- ],
14
- "exclude": [
15
- "../src/**/__tests__/*",
16
- "../src/**/*.test.*",
17
- "../src/**/test.*"
18
- ],
19
- "references": [
20
- {
21
- "path": "../../../analytics/analytics-gas-types/afm-jira/tsconfig.json"
22
- },
23
- {
24
- "path": "../../../analytics/analytics-listeners/afm-jira/tsconfig.json"
25
- },
26
- {
27
- "path": "../../editor-common/afm-jira/tsconfig.json"
28
- },
29
- {
30
- "path": "../../editor-json-transformer/afm-jira/tsconfig.json"
31
- },
32
- {
33
- "path": "../../../platform/feature-flags/afm-jira/tsconfig.json"
34
- },
35
- {
36
- "path": "../../prosemirror-collab/afm-jira/tsconfig.json"
37
- },
38
- {
39
- "path": "../../../data/ufo-external/afm-jira/tsconfig.json"
40
- },
41
- {
42
- "path": "../../../elements/util-service-support/afm-jira/tsconfig.json"
43
- }
44
- ]
45
- }
2
+ "extends": "../../../../tsconfig.entry-points.jira.json",
3
+ "compilerOptions": {
4
+ "declaration": true,
5
+ "target": "es5",
6
+ "outDir": "../../../../../tsDist/@atlaskit__collab-provider/app",
7
+ "rootDir": "../",
8
+ "composite": true
9
+ },
10
+ "include": [
11
+ "../src/**/*.ts",
12
+ "../src/**/*.tsx"
13
+ ],
14
+ "exclude": [
15
+ "../src/**/__tests__/*",
16
+ "../src/**/*.test.*",
17
+ "../src/**/test.*"
18
+ ],
19
+ "references": [
20
+ {
21
+ "path": "../../../analytics/analytics-gas-types/afm-jira/tsconfig.json"
22
+ },
23
+ {
24
+ "path": "../../../analytics/analytics-listeners/afm-jira/tsconfig.json"
25
+ },
26
+ {
27
+ "path": "../../editor-common/afm-jira/tsconfig.json"
28
+ },
29
+ {
30
+ "path": "../../editor-json-transformer/afm-jira/tsconfig.json"
31
+ },
32
+ {
33
+ "path": "../../../platform/feature-flags/afm-jira/tsconfig.json"
34
+ },
35
+ {
36
+ "path": "../../prosemirror-collab/afm-jira/tsconfig.json"
37
+ },
38
+ {
39
+ "path": "../../../data/ufo-external/afm-jira/tsconfig.json"
40
+ },
41
+ {
42
+ "path": "../../../elements/util-service-support/afm-jira/tsconfig.json"
43
+ }
44
+ ]
45
+ }
@@ -8,8 +8,7 @@ exports.getCollabProviderFeatureFlag = getCollabProviderFeatureFlag;
8
8
  exports.getProductSpecificFeatureFlags = void 0;
9
9
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
10
  var defaultNCSFeatureFlags = {
11
- testFF: false,
12
- blockViewOnly: false
11
+ testFF: false
13
12
  };
14
13
 
15
14
  /**
@@ -17,8 +16,7 @@ var defaultNCSFeatureFlags = {
17
16
  */
18
17
  var productKeys = {
19
18
  confluence: {
20
- testFF: 'confluence.frontend.collab.provider.testFF',
21
- blockViewOnly: 'confluence.frontend.ncs.block-view-only'
19
+ testFF: 'confluence.frontend.collab.provider.testFF'
22
20
  }
23
21
  };
24
22
  var filterFeatureFlagNames = function filterFeatureFlagNames(flags) {
@@ -30,7 +30,8 @@ var createParticipantFromPayload = exports.createParticipantFromPayload = /*#__P
30
30
  lastActive: timestamp,
31
31
  userId: userId,
32
32
  clientId: clientId,
33
- permit: permit
33
+ permit: permit,
34
+ isGuest: user === null || user === void 0 ? void 0 : user.isGuest
34
35
  };
35
36
  return _context.abrupt("return", participant);
36
37
  case 6:
@@ -31,7 +31,6 @@ var _participantsService = require("../participants/participants-service");
31
31
  var _errorCodeMapper = require("../errors/error-code-mapper");
32
32
  var _internalErrors = require("../errors/internal-errors");
33
33
  var _const = require("../helpers/const");
34
- var _featureFlags = require("../feature-flags");
35
34
  var _api = require("../api/api");
36
35
  var _performance = require("../analytics/performance");
37
36
  var _nullApi = require("../api/null-api");
@@ -455,7 +454,7 @@ var Provider = exports.Provider = /*#__PURE__*/function (_Emitter) {
455
454
  }, {
456
455
  key: "isViewOnly",
457
456
  value: function isViewOnly() {
458
- return (0, _featureFlags.getCollabProviderFeatureFlag)('blockViewOnly', this.config.featureFlags) && this.permit &&
457
+ return this.permit &&
459
458
  // isPermittedToEdit or isPermittedToView can be undefined, must use `===` here.
460
459
  this.permit.isPermittedToEdit === false && this.permit.isPermittedToView === true;
461
460
  }
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.nextMajorVersion = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/collab-provider";
8
- var version = exports.version = "9.44.0";
8
+ var version = exports.version = "9.45.0";
9
9
  var nextMajorVersion = exports.nextMajorVersion = function nextMajorVersion() {
10
10
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
11
11
  };
@@ -1,6 +1,5 @@
1
1
  const defaultNCSFeatureFlags = {
2
- testFF: false,
3
- blockViewOnly: false
2
+ testFF: false
4
3
  };
5
4
 
6
5
  /**
@@ -8,8 +7,7 @@ const defaultNCSFeatureFlags = {
8
7
  */
9
8
  const productKeys = {
10
9
  confluence: {
11
- testFF: 'confluence.frontend.collab.provider.testFF',
12
- blockViewOnly: 'confluence.frontend.ncs.block-view-only'
10
+ testFF: 'confluence.frontend.collab.provider.testFF'
13
11
  }
14
12
  };
15
13
  const filterFeatureFlagNames = flags => {
@@ -19,7 +19,8 @@ export const createParticipantFromPayload = async (payload, getUser) => {
19
19
  lastActive: timestamp,
20
20
  userId,
21
21
  clientId,
22
- permit
22
+ permit,
23
+ isGuest: user === null || user === void 0 ? void 0 : user.isGuest
23
24
  };
24
25
  return participant;
25
26
  };
@@ -15,7 +15,6 @@ import { ParticipantsService } from '../participants/participants-service';
15
15
  import { errorCodeMapper } from '../errors/error-code-mapper';
16
16
  import { INTERNAL_ERROR_CODE } from '../errors/internal-errors';
17
17
  import { EVENT_ACTION, EVENT_STATUS, CatchupEventReason } from '../helpers/const';
18
- import { getCollabProviderFeatureFlag } from '../feature-flags';
19
18
  import { Api } from '../api/api';
20
19
  import { shouldTelepointerBeSampled } from '../analytics/performance';
21
20
  import { NullApi } from '../api/null-api';
@@ -392,7 +391,7 @@ export class Provider extends Emitter {
392
391
  }
393
392
  }
394
393
  isViewOnly() {
395
- return getCollabProviderFeatureFlag('blockViewOnly', this.config.featureFlags) && this.permit &&
394
+ return this.permit &&
396
395
  // isPermittedToEdit or isPermittedToView can be undefined, must use `===` here.
397
396
  this.permit.isPermittedToEdit === false && this.permit.isPermittedToView === true;
398
397
  }
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/collab-provider";
2
- export const version = "9.44.0";
2
+ export const version = "9.45.0";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1,7 +1,6 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  var defaultNCSFeatureFlags = {
3
- testFF: false,
4
- blockViewOnly: false
3
+ testFF: false
5
4
  };
6
5
 
7
6
  /**
@@ -9,8 +8,7 @@ var defaultNCSFeatureFlags = {
9
8
  */
10
9
  var productKeys = {
11
10
  confluence: {
12
- testFF: 'confluence.frontend.collab.provider.testFF',
13
- blockViewOnly: 'confluence.frontend.ncs.block-view-only'
11
+ testFF: 'confluence.frontend.collab.provider.testFF'
14
12
  }
15
13
  };
16
14
  var filterFeatureFlagNames = function filterFeatureFlagNames(flags) {
@@ -23,7 +23,8 @@ export var createParticipantFromPayload = /*#__PURE__*/function () {
23
23
  lastActive: timestamp,
24
24
  userId: userId,
25
25
  clientId: clientId,
26
- permit: permit
26
+ permit: permit,
27
+ isGuest: user === null || user === void 0 ? void 0 : user.isGuest
27
28
  };
28
29
  return _context.abrupt("return", participant);
29
30
  case 6:
@@ -28,7 +28,6 @@ import { ParticipantsService } from '../participants/participants-service';
28
28
  import { errorCodeMapper } from '../errors/error-code-mapper';
29
29
  import { INTERNAL_ERROR_CODE } from '../errors/internal-errors';
30
30
  import { EVENT_ACTION, EVENT_STATUS, CatchupEventReason } from '../helpers/const';
31
- import { getCollabProviderFeatureFlag } from '../feature-flags';
32
31
  import { Api } from '../api/api';
33
32
  import { shouldTelepointerBeSampled } from '../analytics/performance';
34
33
  import { NullApi } from '../api/null-api';
@@ -448,7 +447,7 @@ export var Provider = /*#__PURE__*/function (_Emitter) {
448
447
  }, {
449
448
  key: "isViewOnly",
450
449
  value: function isViewOnly() {
451
- return getCollabProviderFeatureFlag('blockViewOnly', this.config.featureFlags) && this.permit &&
450
+ return this.permit &&
452
451
  // isPermittedToEdit or isPermittedToView can be undefined, must use `===` here.
453
452
  this.permit.isPermittedToEdit === false && this.permit.isPermittedToView === true;
454
453
  }
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/collab-provider";
2
- export var version = "9.44.0";
2
+ export var version = "9.45.0";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1,6 +1,5 @@
1
1
  export interface NCSFeatureFlags {
2
2
  testFF?: boolean;
3
- blockViewOnly?: boolean;
4
3
  }
5
4
  export interface WithNCSFeatureFlags {
6
5
  featureFlags?: NCSFeatureFlags;
@@ -2,7 +2,7 @@ import type { PresencePayload } from '../types';
2
2
  import type { ProviderParticipant } from '@atlaskit/editor-common/collab';
3
3
  export declare const PARTICIPANT_UPDATE_INTERVAL: number;
4
4
  export type ParticipantsMap = Map<string, ProviderParticipant>;
5
- export type GetUserType = ((userId: string) => Promise<Pick<ProviderParticipant, 'name' | 'avatar' | 'userId' | 'email'>>) | undefined;
5
+ export type GetUserType = ((userId: string) => Promise<Pick<ProviderParticipant, 'name' | 'avatar' | 'userId' | 'email' | 'isGuest'>>) | undefined;
6
6
  export declare const createParticipantFromPayload: (payload: import("../types").PresenceData & {
7
7
  timestamp: number;
8
8
  } & {
@@ -1,6 +1,5 @@
1
1
  export interface NCSFeatureFlags {
2
2
  testFF?: boolean;
3
- blockViewOnly?: boolean;
4
3
  }
5
4
  export interface WithNCSFeatureFlags {
6
5
  featureFlags?: NCSFeatureFlags;
@@ -2,7 +2,7 @@ import type { PresencePayload } from '../types';
2
2
  import type { ProviderParticipant } from '@atlaskit/editor-common/collab';
3
3
  export declare const PARTICIPANT_UPDATE_INTERVAL: number;
4
4
  export type ParticipantsMap = Map<string, ProviderParticipant>;
5
- export type GetUserType = ((userId: string) => Promise<Pick<ProviderParticipant, 'name' | 'avatar' | 'userId' | 'email'>>) | undefined;
5
+ export type GetUserType = ((userId: string) => Promise<Pick<ProviderParticipant, 'name' | 'avatar' | 'userId' | 'email' | 'isGuest'>>) | undefined;
6
6
  export declare const createParticipantFromPayload: (payload: import("../types").PresenceData & {
7
7
  timestamp: number;
8
8
  } & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/collab-provider",
3
- "version": "9.44.0",
3
+ "version": "9.45.0",
4
4
  "description": "A provider for collaborative editing.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -34,8 +34,8 @@
34
34
  "dependencies": {
35
35
  "@atlaskit/analytics-gas-types": "^5.1.0",
36
36
  "@atlaskit/analytics-listeners": "^8.11.0",
37
- "@atlaskit/editor-common": "^94.8.0",
38
- "@atlaskit/editor-json-transformer": "^8.20.0",
37
+ "@atlaskit/editor-common": "^94.20.0",
38
+ "@atlaskit/editor-json-transformer": "^8.21.0",
39
39
  "@atlaskit/editor-prosemirror": "6.0.0",
40
40
  "@atlaskit/platform-feature-flags": "^0.3.0",
41
41
  "@atlaskit/prosemirror-collab": "^0.10.0",
@@ -62,7 +62,7 @@
62
62
  }
63
63
  },
64
64
  "devDependencies": {
65
- "@atlaskit/adf-schema": "^42.3.1",
65
+ "@atlaskit/adf-schema": "^44.2.0",
66
66
  "@atlassian/feature-flags-test-utils": "^0.2.0",
67
67
  "typescript": "~5.4.2"
68
68
  },