@atlaskit/editor-plugin-table 2.12.2 → 2.12.3
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/plugins/table/pm-plugins/table-width.js +2 -1
- package/dist/es2019/plugins/table/pm-plugins/table-width.js +3 -2
- package/dist/esm/plugins/table/pm-plugins/table-width.js +3 -2
- package/dist/types/plugins/table/pm-plugins/table-width.d.ts +1 -1
- package/dist/types-ts4.5/plugins/table/pm-plugins/table-width.d.ts +1 -1
- package/package.json +1 -1
- package/src/__tests__/integration/__snapshots__/change-date-inside-table.ts.snap +1 -1
- package/src/plugins/table/pm-plugins/table-width.ts +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 2.12.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`35242fb367a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/35242fb367a) - Add custom-table-width feature flag and add width to table node when inserted
|
|
8
|
+
|
|
3
9
|
## 2.12.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -86,9 +86,10 @@ var createPlugin = function createPlugin(dispatch, fullWidthEnabled) {
|
|
|
86
86
|
case 'full-width':
|
|
87
87
|
tableWidthCal = _editorSharedStyles.akEditorFullWidthLayoutWidth;
|
|
88
88
|
break;
|
|
89
|
-
// when in fix-width
|
|
89
|
+
// when in fix-width appearance, no need to assign value to table width attr
|
|
90
90
|
// as when table is created, width attr is null by default, table rendered using layout attr
|
|
91
91
|
default:
|
|
92
|
+
tableWidthCal = _editorSharedStyles.akEditorDefaultLayoutWidth;
|
|
92
93
|
break;
|
|
93
94
|
}
|
|
94
95
|
}
|
|
@@ -8,7 +8,7 @@ import { SetAttrsStep } from '@atlaskit/adf-schema/steps';
|
|
|
8
8
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
9
9
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
10
10
|
import { ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
|
|
11
|
-
import { akEditorFullWidthLayoutWidth, akEditorWideLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
11
|
+
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorWideLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
12
12
|
export const pluginKey = new PluginKey('tableWidthPlugin');
|
|
13
13
|
const createPlugin = (dispatch, fullWidthEnabled) => new SafePlugin({
|
|
14
14
|
key: pluginKey,
|
|
@@ -75,9 +75,10 @@ const createPlugin = (dispatch, fullWidthEnabled) => new SafePlugin({
|
|
|
75
75
|
case 'full-width':
|
|
76
76
|
tableWidthCal = akEditorFullWidthLayoutWidth;
|
|
77
77
|
break;
|
|
78
|
-
// when in fix-width
|
|
78
|
+
// when in fix-width appearance, no need to assign value to table width attr
|
|
79
79
|
// as when table is created, width attr is null by default, table rendered using layout attr
|
|
80
80
|
default:
|
|
81
|
+
tableWidthCal = akEditorDefaultLayoutWidth;
|
|
81
82
|
break;
|
|
82
83
|
}
|
|
83
84
|
}
|
|
@@ -13,7 +13,7 @@ import { SetAttrsStep } from '@atlaskit/adf-schema/steps';
|
|
|
13
13
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
14
14
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
15
15
|
import { ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
|
|
16
|
-
import { akEditorFullWidthLayoutWidth, akEditorWideLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
16
|
+
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorWideLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
17
17
|
export var pluginKey = new PluginKey('tableWidthPlugin');
|
|
18
18
|
var createPlugin = function createPlugin(dispatch, fullWidthEnabled) {
|
|
19
19
|
return new SafePlugin({
|
|
@@ -79,9 +79,10 @@ var createPlugin = function createPlugin(dispatch, fullWidthEnabled) {
|
|
|
79
79
|
case 'full-width':
|
|
80
80
|
tableWidthCal = akEditorFullWidthLayoutWidth;
|
|
81
81
|
break;
|
|
82
|
-
// when in fix-width
|
|
82
|
+
// when in fix-width appearance, no need to assign value to table width attr
|
|
83
83
|
// as when table is created, width attr is null by default, table rendered using layout attr
|
|
84
84
|
default:
|
|
85
|
+
tableWidthCal = akEditorDefaultLayoutWidth;
|
|
85
86
|
break;
|
|
86
87
|
}
|
|
87
88
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Has login to scan the document, add width value to table's width attribute when necessary
|
|
4
4
|
* Also holds resizing state to hide / show table controls
|
|
5
5
|
*/
|
|
6
|
-
import { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
6
|
+
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
7
7
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
8
8
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
9
9
|
type TableWidthPluginState = {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Has login to scan the document, add width value to table's width attribute when necessary
|
|
4
4
|
* Also holds resizing state to hide / show table controls
|
|
5
5
|
*/
|
|
6
|
-
import { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
6
|
+
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
7
7
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
8
8
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
9
9
|
type TableWidthPluginState = {
|
package/package.json
CHANGED
|
@@ -5,11 +5,12 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { SetAttrsStep } from '@atlaskit/adf-schema/steps';
|
|
8
|
-
import { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
8
|
+
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
9
9
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
10
10
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
11
11
|
import { ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
|
|
12
12
|
import {
|
|
13
|
+
akEditorDefaultLayoutWidth,
|
|
13
14
|
akEditorFullWidthLayoutWidth,
|
|
14
15
|
akEditorWideLayoutWidth,
|
|
15
16
|
} from '@atlaskit/editor-shared-styles';
|
|
@@ -106,9 +107,10 @@ const createPlugin = (dispatch: Dispatch, fullWidthEnabled: boolean) =>
|
|
|
106
107
|
case 'full-width':
|
|
107
108
|
tableWidthCal = akEditorFullWidthLayoutWidth;
|
|
108
109
|
break;
|
|
109
|
-
// when in fix-width
|
|
110
|
+
// when in fix-width appearance, no need to assign value to table width attr
|
|
110
111
|
// as when table is created, width attr is null by default, table rendered using layout attr
|
|
111
112
|
default:
|
|
113
|
+
tableWidthCal = akEditorDefaultLayoutWidth;
|
|
112
114
|
break;
|
|
113
115
|
}
|
|
114
116
|
}
|