@atlaskit/editor-plugin-loom 3.0.0 → 3.0.2
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 +15 -0
- package/dist/cjs/commands.js +15 -19
- package/dist/es2019/commands.js +14 -19
- package/dist/esm/commands.js +15 -19
- package/dist/types/commands.d.ts +1 -1
- package/dist/types-ts4.5/commands.d.ts +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-loom
|
|
2
2
|
|
|
3
|
+
## 3.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#145206](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/145206)
|
|
8
|
+
[`cca8cc490ec20`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/cca8cc490ec20) -
|
|
9
|
+
[ED-25135] Fix: loom is not initialised correctly if `initLoom` is called when collab-edit plugin
|
|
10
|
+
is not ready
|
|
11
|
+
|
|
12
|
+
## 3.0.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 3.0.0
|
|
4
19
|
|
|
5
20
|
### Major Changes
|
package/dist/cjs/commands.js
CHANGED
|
@@ -130,9 +130,9 @@ var executeRecordVideo = exports.executeRecordVideo = function executeRecordVide
|
|
|
130
130
|
}));
|
|
131
131
|
};
|
|
132
132
|
var setupLoom = exports.setupLoom = /*#__PURE__*/function () {
|
|
133
|
-
var _ref11 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(loomProvider, api, editorView,
|
|
134
|
-
var _api$core4;
|
|
135
|
-
var clientResult, _api$core2, _api$analytics2, attachToButton, loomButton
|
|
133
|
+
var _ref11 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(loomProvider, api, editorView, initViaCommand) {
|
|
134
|
+
var _api$core4, _api$analytics5;
|
|
135
|
+
var clientResult, _api$core2, _api$analytics2, attachToButton, loomButton;
|
|
136
136
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
137
137
|
while (1) switch (_context.prev = _context.next) {
|
|
138
138
|
case 0:
|
|
@@ -191,28 +191,24 @@ var setupLoom = exports.setupLoom = /*#__PURE__*/function () {
|
|
|
191
191
|
})({
|
|
192
192
|
tr: tr
|
|
193
193
|
});
|
|
194
|
-
if (
|
|
195
|
-
var _api$quickInsert, _api$analytics4
|
|
194
|
+
if (initViaCommand) {
|
|
195
|
+
var _api$quickInsert, _api$analytics4;
|
|
196
196
|
api === null || api === void 0 || (_api$quickInsert = api.quickInsert) === null || _api$quickInsert === void 0 || _api$quickInsert.commands.addQuickInsertItem((0, _quickInsert.getQuickInsertItem)(api === null || api === void 0 || (_api$analytics4 = api.analytics) === null || _api$analytics4 === void 0 ? void 0 : _api$analytics4.actions))({
|
|
197
197
|
tr: tr
|
|
198
198
|
});
|
|
199
|
-
api === null || api === void 0 || (_api$analytics5 = api.analytics) === null || _api$analytics5 === void 0 || _api$analytics5.actions.attachAnalyticsEvent({
|
|
200
|
-
action: _analytics.ACTION.INITIALISED,
|
|
201
|
-
actionSubject: _analytics.ACTION_SUBJECT.LOOM,
|
|
202
|
-
eventType: _analytics.EVENT_TYPE.OPERATIONAL
|
|
203
|
-
})(tr);
|
|
204
199
|
}
|
|
205
200
|
return tr;
|
|
206
201
|
});
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
202
|
+
|
|
203
|
+
// We're not combining the analytics steps into the enable / disable commands because the collab-edit plugin
|
|
204
|
+
// filters out any transactions with steps (even analytics) when it's initialising.
|
|
205
|
+
// Even if `initViaCommand` is true, collab-edit might not be ready depending on when `initLoom` is called,
|
|
206
|
+
// hence the analytics step is added separately in both cases
|
|
207
|
+
api === null || api === void 0 || (_api$analytics5 = api.analytics) === null || _api$analytics5 === void 0 || _api$analytics5.actions.fireAnalyticsEvent({
|
|
208
|
+
action: _analytics.ACTION.INITIALISED,
|
|
209
|
+
actionSubject: _analytics.ACTION_SUBJECT.LOOM,
|
|
210
|
+
eventType: _analytics.EVENT_TYPE.OPERATIONAL
|
|
211
|
+
});
|
|
216
212
|
return _context.abrupt("return", {});
|
|
217
213
|
case 14:
|
|
218
214
|
case "end":
|
package/dist/es2019/commands.js
CHANGED
|
@@ -123,8 +123,8 @@ export const executeRecordVideo = api => {
|
|
|
123
123
|
editorAnalyticsAPI: api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions
|
|
124
124
|
}));
|
|
125
125
|
};
|
|
126
|
-
export const setupLoom = async (loomProvider, api, editorView,
|
|
127
|
-
var _api$core4;
|
|
126
|
+
export const setupLoom = async (loomProvider, api, editorView, initViaCommand) => {
|
|
127
|
+
var _api$core4, _api$analytics5;
|
|
128
128
|
const clientResult = await loomProvider.getClient();
|
|
129
129
|
if (clientResult.status === 'error') {
|
|
130
130
|
var _api$core2, _api$analytics2;
|
|
@@ -182,28 +182,23 @@ export const setupLoom = async (loomProvider, api, editorView, isAfterEditorLoad
|
|
|
182
182
|
})({
|
|
183
183
|
tr
|
|
184
184
|
});
|
|
185
|
-
if (
|
|
186
|
-
var _api$quickInsert, _api$analytics4
|
|
185
|
+
if (initViaCommand) {
|
|
186
|
+
var _api$quickInsert, _api$analytics4;
|
|
187
187
|
api === null || api === void 0 ? void 0 : (_api$quickInsert = api.quickInsert) === null || _api$quickInsert === void 0 ? void 0 : _api$quickInsert.commands.addQuickInsertItem(getQuickInsertItem(api === null || api === void 0 ? void 0 : (_api$analytics4 = api.analytics) === null || _api$analytics4 === void 0 ? void 0 : _api$analytics4.actions))({
|
|
188
188
|
tr
|
|
189
189
|
});
|
|
190
|
-
api === null || api === void 0 ? void 0 : (_api$analytics5 = api.analytics) === null || _api$analytics5 === void 0 ? void 0 : _api$analytics5.actions.attachAnalyticsEvent({
|
|
191
|
-
action: ACTION.INITIALISED,
|
|
192
|
-
actionSubject: ACTION_SUBJECT.LOOM,
|
|
193
|
-
eventType: EVENT_TYPE.OPERATIONAL
|
|
194
|
-
})(tr);
|
|
195
190
|
}
|
|
196
191
|
return tr;
|
|
197
192
|
});
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
}
|
|
193
|
+
|
|
194
|
+
// We're not combining the analytics steps into the enable / disable commands because the collab-edit plugin
|
|
195
|
+
// filters out any transactions with steps (even analytics) when it's initialising.
|
|
196
|
+
// Even if `initViaCommand` is true, collab-edit might not be ready depending on when `initLoom` is called,
|
|
197
|
+
// hence the analytics step is added separately in both cases
|
|
198
|
+
api === null || api === void 0 ? void 0 : (_api$analytics5 = api.analytics) === null || _api$analytics5 === void 0 ? void 0 : _api$analytics5.actions.fireAnalyticsEvent({
|
|
199
|
+
action: ACTION.INITIALISED,
|
|
200
|
+
actionSubject: ACTION_SUBJECT.LOOM,
|
|
201
|
+
eventType: EVENT_TYPE.OPERATIONAL
|
|
202
|
+
});
|
|
208
203
|
return {};
|
|
209
204
|
};
|
package/dist/esm/commands.js
CHANGED
|
@@ -123,9 +123,9 @@ export var executeRecordVideo = function executeRecordVideo(api) {
|
|
|
123
123
|
}));
|
|
124
124
|
};
|
|
125
125
|
export var setupLoom = /*#__PURE__*/function () {
|
|
126
|
-
var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(loomProvider, api, editorView,
|
|
127
|
-
var _api$core4;
|
|
128
|
-
var clientResult, _api$core2, _api$analytics2, attachToButton, loomButton
|
|
126
|
+
var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(loomProvider, api, editorView, initViaCommand) {
|
|
127
|
+
var _api$core4, _api$analytics5;
|
|
128
|
+
var clientResult, _api$core2, _api$analytics2, attachToButton, loomButton;
|
|
129
129
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
130
130
|
while (1) switch (_context.prev = _context.next) {
|
|
131
131
|
case 0:
|
|
@@ -184,28 +184,24 @@ export var setupLoom = /*#__PURE__*/function () {
|
|
|
184
184
|
})({
|
|
185
185
|
tr: tr
|
|
186
186
|
});
|
|
187
|
-
if (
|
|
188
|
-
var _api$quickInsert, _api$analytics4
|
|
187
|
+
if (initViaCommand) {
|
|
188
|
+
var _api$quickInsert, _api$analytics4;
|
|
189
189
|
api === null || api === void 0 || (_api$quickInsert = api.quickInsert) === null || _api$quickInsert === void 0 || _api$quickInsert.commands.addQuickInsertItem(getQuickInsertItem(api === null || api === void 0 || (_api$analytics4 = api.analytics) === null || _api$analytics4 === void 0 ? void 0 : _api$analytics4.actions))({
|
|
190
190
|
tr: tr
|
|
191
191
|
});
|
|
192
|
-
api === null || api === void 0 || (_api$analytics5 = api.analytics) === null || _api$analytics5 === void 0 || _api$analytics5.actions.attachAnalyticsEvent({
|
|
193
|
-
action: ACTION.INITIALISED,
|
|
194
|
-
actionSubject: ACTION_SUBJECT.LOOM,
|
|
195
|
-
eventType: EVENT_TYPE.OPERATIONAL
|
|
196
|
-
})(tr);
|
|
197
192
|
}
|
|
198
193
|
return tr;
|
|
199
194
|
});
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
195
|
+
|
|
196
|
+
// We're not combining the analytics steps into the enable / disable commands because the collab-edit plugin
|
|
197
|
+
// filters out any transactions with steps (even analytics) when it's initialising.
|
|
198
|
+
// Even if `initViaCommand` is true, collab-edit might not be ready depending on when `initLoom` is called,
|
|
199
|
+
// hence the analytics step is added separately in both cases
|
|
200
|
+
api === null || api === void 0 || (_api$analytics5 = api.analytics) === null || _api$analytics5 === void 0 || _api$analytics5.actions.fireAnalyticsEvent({
|
|
201
|
+
action: ACTION.INITIALISED,
|
|
202
|
+
actionSubject: ACTION_SUBJECT.LOOM,
|
|
203
|
+
eventType: EVENT_TYPE.OPERATIONAL
|
|
204
|
+
});
|
|
209
205
|
return _context.abrupt("return", {});
|
|
210
206
|
case 14:
|
|
211
207
|
case "end":
|
package/dist/types/commands.d.ts
CHANGED
|
@@ -26,6 +26,6 @@ export declare const insertVideo: ({ editorAnalyticsAPI, video, }: {
|
|
|
26
26
|
}) => EditorCommand;
|
|
27
27
|
export declare const insertLoom: (editorView: EditorView | null, api: ExtractInjectionAPI<LoomPlugin> | undefined, video: VideoMeta, positionType: PositionType) => boolean;
|
|
28
28
|
export declare const executeRecordVideo: (api: ExtractInjectionAPI<LoomPlugin> | undefined) => void;
|
|
29
|
-
export declare const setupLoom: (loomProvider: LoomProviderOptions, api: ExtractInjectionAPI<LoomPlugin> | undefined, editorView: EditorView | null,
|
|
29
|
+
export declare const setupLoom: (loomProvider: LoomProviderOptions, api: ExtractInjectionAPI<LoomPlugin> | undefined, editorView: EditorView | null, initViaCommand?: boolean) => Promise<{
|
|
30
30
|
error?: string;
|
|
31
31
|
}>;
|
|
@@ -26,6 +26,6 @@ export declare const insertVideo: ({ editorAnalyticsAPI, video, }: {
|
|
|
26
26
|
}) => EditorCommand;
|
|
27
27
|
export declare const insertLoom: (editorView: EditorView | null, api: ExtractInjectionAPI<LoomPlugin> | undefined, video: VideoMeta, positionType: PositionType) => boolean;
|
|
28
28
|
export declare const executeRecordVideo: (api: ExtractInjectionAPI<LoomPlugin> | undefined) => void;
|
|
29
|
-
export declare const setupLoom: (loomProvider: LoomProviderOptions, api: ExtractInjectionAPI<LoomPlugin> | undefined, editorView: EditorView | null,
|
|
29
|
+
export declare const setupLoom: (loomProvider: LoomProviderOptions, api: ExtractInjectionAPI<LoomPlugin> | undefined, editorView: EditorView | null, initViaCommand?: boolean) => Promise<{
|
|
30
30
|
error?: string;
|
|
31
31
|
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-loom",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"description": "Loom plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,15 +34,15 @@
|
|
|
34
34
|
".": "./src/index.ts"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@atlaskit/button": "^20.
|
|
38
|
-
"@atlaskit/editor-common": "^
|
|
37
|
+
"@atlaskit/button": "^20.2.0",
|
|
38
|
+
"@atlaskit/editor-common": "^91.1.0",
|
|
39
39
|
"@atlaskit/editor-plugin-analytics": "^1.8.0",
|
|
40
40
|
"@atlaskit/editor-plugin-hyperlink": "^2.9.0",
|
|
41
41
|
"@atlaskit/editor-plugin-primary-toolbar": "^2.0.0",
|
|
42
42
|
"@atlaskit/editor-plugin-quick-insert": "^1.4.0",
|
|
43
43
|
"@atlaskit/editor-plugin-width": "^1.3.0",
|
|
44
44
|
"@atlaskit/editor-prosemirror": "6.0.0",
|
|
45
|
-
"@atlaskit/logo": "^14.
|
|
45
|
+
"@atlaskit/logo": "^14.3.0",
|
|
46
46
|
"@atlaskit/platform-feature-flags": "0.3.0",
|
|
47
47
|
"@babel/runtime": "^7.0.0",
|
|
48
48
|
"@emotion/react": "^11.7.1",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@atlaskit/editor-plugin-base": "^1.11.0",
|
|
62
|
-
"@atlaskit/editor-plugin-card": "^3.
|
|
62
|
+
"@atlaskit/editor-plugin-card": "^3.2.0",
|
|
63
63
|
"@atlaskit/editor-plugin-copy-button": "^1.3.0",
|
|
64
64
|
"@atlaskit/editor-plugin-decorations": "^1.3.0",
|
|
65
65
|
"@atlaskit/editor-plugin-editor-disabled": "^1.3.0",
|