@atlaskit/editor-plugin-table 2.6.7 → 2.6.9

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,17 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 2.6.9
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 2.6.8
10
+
11
+ ### Patch Changes
12
+
13
+ - [`d432ad14798`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d432ad14798) - [ux] Added standard page guidelines when custom table width enabled and is resizing table.
14
+
3
15
  ## 2.6.7
4
16
 
5
17
  ### Patch Changes
@@ -1,12 +1,22 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports.defaultGuidelines = exports.defaultGuidelineWidths = void 0;
8
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
7
9
  var _guideline = require("@atlaskit/editor-common/guideline");
8
10
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
9
- var defaultGuidelineWidths = [_editorSharedStyles.akEditorDefaultLayoutWidth, _editorSharedStyles.akEditorWideLayoutWidth, _editorSharedStyles.akEditorFullWidthLayoutWidth];
11
+ var numberOfLanesInDefaultLayoutWidth = 12;
12
+ var calculateGuidelineWidthsInDefaultLayoutWidth = function calculateGuidelineWidthsInDefaultLayoutWidth() {
13
+ var widths = [];
14
+ for (var i = 0; i <= numberOfLanesInDefaultLayoutWidth / 2; i++) {
15
+ widths.push(_editorSharedStyles.akEditorDefaultLayoutWidth / numberOfLanesInDefaultLayoutWidth * i * 2);
16
+ }
17
+ return widths;
18
+ };
19
+ var defaultGuidelineWidths = [].concat((0, _toConsumableArray2.default)(calculateGuidelineWidthsInDefaultLayoutWidth()), [_editorSharedStyles.akEditorDefaultLayoutWidth, _editorSharedStyles.akEditorWideLayoutWidth, _editorSharedStyles.akEditorFullWidthLayoutWidth]);
10
20
  exports.defaultGuidelineWidths = defaultGuidelineWidths;
11
21
  var defaultGuidelines = (0, _guideline.createFixedGuidelinesFromLengths)(defaultGuidelineWidths);
12
22
  exports.defaultGuidelines = defaultGuidelines;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "2.6.7",
3
+ "version": "2.6.9",
4
4
  "sideEffects": false
5
5
  }
@@ -1,4 +1,12 @@
1
1
  import { createFixedGuidelinesFromLengths } from '@atlaskit/editor-common/guideline';
2
2
  import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorWideLayoutWidth } from '@atlaskit/editor-shared-styles';
3
- export const defaultGuidelineWidths = [akEditorDefaultLayoutWidth, akEditorWideLayoutWidth, akEditorFullWidthLayoutWidth];
3
+ const numberOfLanesInDefaultLayoutWidth = 12;
4
+ const calculateGuidelineWidthsInDefaultLayoutWidth = () => {
5
+ let widths = [];
6
+ for (let i = 0; i <= numberOfLanesInDefaultLayoutWidth / 2; i++) {
7
+ widths.push(akEditorDefaultLayoutWidth / numberOfLanesInDefaultLayoutWidth * i * 2);
8
+ }
9
+ return widths;
10
+ };
11
+ export const defaultGuidelineWidths = [...calculateGuidelineWidthsInDefaultLayoutWidth(), akEditorDefaultLayoutWidth, akEditorWideLayoutWidth, akEditorFullWidthLayoutWidth];
4
12
  export const defaultGuidelines = createFixedGuidelinesFromLengths(defaultGuidelineWidths);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "2.6.7",
3
+ "version": "2.6.9",
4
4
  "sideEffects": false
5
5
  }
@@ -1,4 +1,13 @@
1
+ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
1
2
  import { createFixedGuidelinesFromLengths } from '@atlaskit/editor-common/guideline';
2
3
  import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorWideLayoutWidth } from '@atlaskit/editor-shared-styles';
3
- export var defaultGuidelineWidths = [akEditorDefaultLayoutWidth, akEditorWideLayoutWidth, akEditorFullWidthLayoutWidth];
4
+ var numberOfLanesInDefaultLayoutWidth = 12;
5
+ var calculateGuidelineWidthsInDefaultLayoutWidth = function calculateGuidelineWidthsInDefaultLayoutWidth() {
6
+ var widths = [];
7
+ for (var i = 0; i <= numberOfLanesInDefaultLayoutWidth / 2; i++) {
8
+ widths.push(akEditorDefaultLayoutWidth / numberOfLanesInDefaultLayoutWidth * i * 2);
9
+ }
10
+ return widths;
11
+ };
12
+ export var defaultGuidelineWidths = [].concat(_toConsumableArray(calculateGuidelineWidthsInDefaultLayoutWidth()), [akEditorDefaultLayoutWidth, akEditorWideLayoutWidth, akEditorFullWidthLayoutWidth]);
4
13
  export var defaultGuidelines = createFixedGuidelinesFromLengths(defaultGuidelineWidths);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "2.6.7",
3
+ "version": "2.6.9",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "2.6.7",
3
+ "version": "2.6.9",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -27,8 +27,8 @@
27
27
  "releaseModel": "continuous"
28
28
  },
29
29
  "dependencies": {
30
- "@atlaskit/adf-schema": "^26.4.0",
31
- "@atlaskit/editor-common": "^74.34.0",
30
+ "@atlaskit/adf-schema": "^27.0.0",
31
+ "@atlaskit/editor-common": "^74.36.0",
32
32
  "@atlaskit/editor-palette": "1.5.1",
33
33
  "@atlaskit/editor-plugin-analytics": "^0.1.0",
34
34
  "@atlaskit/editor-plugin-content-insertion": "^0.0.7",
@@ -6,7 +6,20 @@ import {
6
6
  akEditorWideLayoutWidth,
7
7
  } from '@atlaskit/editor-shared-styles';
8
8
 
9
+ const numberOfLanesInDefaultLayoutWidth = 12;
10
+
11
+ const calculateGuidelineWidthsInDefaultLayoutWidth = () => {
12
+ let widths: number[] = [];
13
+ for (let i = 0; i <= numberOfLanesInDefaultLayoutWidth / 2; i++) {
14
+ widths.push(
15
+ (akEditorDefaultLayoutWidth / numberOfLanesInDefaultLayoutWidth) * i * 2,
16
+ );
17
+ }
18
+ return widths;
19
+ };
20
+
9
21
  export const defaultGuidelineWidths = [
22
+ ...calculateGuidelineWidthsInDefaultLayoutWidth(),
10
23
  akEditorDefaultLayoutWidth,
11
24
  akEditorWideLayoutWidth,
12
25
  akEditorFullWidthLayoutWidth,