@atlaskit/editor-plugin-table 5.8.4 → 5.8.5
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 +6 -0
- package/dist/cjs/plugin.js +2 -2
- package/dist/es2019/plugin.js +2 -2
- package/dist/esm/plugin.js +2 -2
- package/package.json +1 -1
- package/src/plugin.tsx +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 5.8.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#67238](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/67238) [`40533849b2ec`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/40533849b2ec) - [ED-21835] Change EditorAPI type to always union with undefined
|
|
8
|
+
|
|
3
9
|
## 5.8.4
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -57,11 +57,11 @@ var tablesPlugin = function tablesPlugin(_ref) {
|
|
|
57
57
|
current: null
|
|
58
58
|
};
|
|
59
59
|
var defaultGetEditorContainerWidth = function defaultGetEditorContainerWidth() {
|
|
60
|
-
var _document$body$offset, _document, _api$width$sharedStat;
|
|
60
|
+
var _document$body$offset, _document, _api$width$sharedStat, _api$width;
|
|
61
61
|
var defaultState = {
|
|
62
62
|
width: (_document$body$offset = (_document = document) === null || _document === void 0 || (_document = _document.body) === null || _document === void 0 ? void 0 : _document.offsetWidth) !== null && _document$body$offset !== void 0 ? _document$body$offset : 500
|
|
63
63
|
};
|
|
64
|
-
return (_api$width$sharedStat = api === null || api === void 0 ? void 0 :
|
|
64
|
+
return (_api$width$sharedStat = api === null || api === void 0 || (_api$width = api.width) === null || _api$width === void 0 ? void 0 : _api$width.sharedState.currentState()) !== null && _api$width$sharedStat !== void 0 ? _api$width$sharedStat : defaultState;
|
|
65
65
|
};
|
|
66
66
|
var editorAnalyticsAPI = api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions;
|
|
67
67
|
return {
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -49,11 +49,11 @@ const tablesPlugin = ({
|
|
|
49
49
|
current: null
|
|
50
50
|
};
|
|
51
51
|
const defaultGetEditorContainerWidth = () => {
|
|
52
|
-
var _document$body$offset, _document, _document$body, _api$width$sharedStat;
|
|
52
|
+
var _document$body$offset, _document, _document$body, _api$width$sharedStat, _api$width;
|
|
53
53
|
const defaultState = {
|
|
54
54
|
width: (_document$body$offset = (_document = document) === null || _document === void 0 ? void 0 : (_document$body = _document.body) === null || _document$body === void 0 ? void 0 : _document$body.offsetWidth) !== null && _document$body$offset !== void 0 ? _document$body$offset : 500
|
|
55
55
|
};
|
|
56
|
-
return (_api$width$sharedStat = api === null || api === void 0 ? void 0 : api.width.sharedState.currentState()) !== null && _api$width$sharedStat !== void 0 ? _api$width$sharedStat : defaultState;
|
|
56
|
+
return (_api$width$sharedStat = api === null || api === void 0 ? void 0 : (_api$width = api.width) === null || _api$width === void 0 ? void 0 : _api$width.sharedState.currentState()) !== null && _api$width$sharedStat !== void 0 ? _api$width$sharedStat : defaultState;
|
|
57
57
|
};
|
|
58
58
|
const editorAnalyticsAPI = api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions;
|
|
59
59
|
return {
|
package/dist/esm/plugin.js
CHANGED
|
@@ -50,11 +50,11 @@ var tablesPlugin = function tablesPlugin(_ref) {
|
|
|
50
50
|
current: null
|
|
51
51
|
};
|
|
52
52
|
var defaultGetEditorContainerWidth = function defaultGetEditorContainerWidth() {
|
|
53
|
-
var _document$body$offset, _document, _api$width$sharedStat;
|
|
53
|
+
var _document$body$offset, _document, _api$width$sharedStat, _api$width;
|
|
54
54
|
var defaultState = {
|
|
55
55
|
width: (_document$body$offset = (_document = document) === null || _document === void 0 || (_document = _document.body) === null || _document === void 0 ? void 0 : _document.offsetWidth) !== null && _document$body$offset !== void 0 ? _document$body$offset : 500
|
|
56
56
|
};
|
|
57
|
-
return (_api$width$sharedStat = api === null || api === void 0 ? void 0 :
|
|
57
|
+
return (_api$width$sharedStat = api === null || api === void 0 || (_api$width = api.width) === null || _api$width === void 0 ? void 0 : _api$width.sharedState.currentState()) !== null && _api$width$sharedStat !== void 0 ? _api$width$sharedStat : defaultState;
|
|
58
58
|
};
|
|
59
59
|
var editorAnalyticsAPI = api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions;
|
|
60
60
|
return {
|
package/package.json
CHANGED
package/src/plugin.tsx
CHANGED
|
@@ -136,7 +136,7 @@ const tablesPlugin: TablePlugin = ({ config: options, api }) => {
|
|
|
136
136
|
const defaultState = {
|
|
137
137
|
width: document?.body?.offsetWidth ?? 500,
|
|
138
138
|
};
|
|
139
|
-
return api?.width
|
|
139
|
+
return api?.width?.sharedState.currentState() ?? defaultState;
|
|
140
140
|
};
|
|
141
141
|
const editorAnalyticsAPI = api?.analytics?.actions;
|
|
142
142
|
|