@atlaskit/editor-plugin-alignment 3.2.4 → 3.2.6

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,20 @@
1
1
  # @atlaskit/editor-plugin-alignment
2
2
 
3
+ ## 3.2.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 3.2.5
10
+
11
+ ### Patch Changes
12
+
13
+ - [#152698](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/152698)
14
+ [`b17332d4a6af4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b17332d4a6af4) -
15
+ Clean up platform_editor_add_alignment_tracking
16
+ - Updated dependencies
17
+
3
18
  ## 3.2.4
4
19
 
5
20
  ### Patch Changes
@@ -8,7 +8,6 @@ var _analytics = require("@atlaskit/editor-common/analytics");
8
8
  var _commands = require("@atlaskit/editor-common/commands");
9
9
  var _editorAnalytics = require("@atlaskit/editor-common/editor-analytics");
10
10
  var _state = require("@atlaskit/editor-prosemirror/state");
11
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
11
  /**
13
12
  * Iterates over the commands one after the other,
14
13
  * passes the tr through and dispatches the cumulated transaction
@@ -89,15 +88,6 @@ var changeImageAlignmentWithAnalytics = function changeImageAlignmentWithAnalyti
89
88
  var changeAlignment = exports.changeAlignment = function changeAlignment(align, api, inputMethod) {
90
89
  return function (state, dispatch) {
91
90
  var _api$analytics, _api$analytics2;
92
- var _state$schema3 = state.schema,
93
- _state$schema3$nodes = _state$schema3.nodes,
94
- paragraph = _state$schema3$nodes.paragraph,
95
- heading = _state$schema3$nodes.heading,
96
- alignment = _state$schema3.marks.alignment;
97
- return cascadeCommands((0, _platformFeatureFlags.fg)('platform_editor_add_alignment_tracking') ? [changeImageAlignmentWithAnalytics(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, align, inputMethod), changeBlockAlignmentWithAnalytics(api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions, align, inputMethod)] : [(0, _commands.changeImageAlignment)(align), (0, _commands.toggleBlockMark)(alignment, function () {
98
- return !align ? undefined : align === 'start' ? false : {
99
- align: align
100
- };
101
- }, [paragraph, heading])])(state, dispatch);
91
+ return cascadeCommands([changeImageAlignmentWithAnalytics(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, align, inputMethod), changeBlockAlignmentWithAnalytics(api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions, align, inputMethod)])(state, dispatch);
102
92
  };
103
93
  };
@@ -2,7 +2,6 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit
2
2
  import { changeImageAlignment, toggleBlockMark } from '@atlaskit/editor-common/commands';
3
3
  import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
4
4
  import { Selection } from '@atlaskit/editor-prosemirror/state';
5
- import { fg } from '@atlaskit/platform-feature-flags';
6
5
  /**
7
6
  * Iterates over the commands one after the other,
8
7
  * passes the tr through and dispatches the cumulated transaction
@@ -80,16 +79,5 @@ const changeImageAlignmentWithAnalytics = (editorAnalyticsApi, align, inputMetho
80
79
  };
81
80
  export const changeAlignment = (align, api, inputMethod) => (state, dispatch) => {
82
81
  var _api$analytics, _api$analytics2;
83
- const {
84
- nodes: {
85
- paragraph,
86
- heading
87
- },
88
- marks: {
89
- alignment
90
- }
91
- } = state.schema;
92
- return cascadeCommands(fg('platform_editor_add_alignment_tracking') ? [changeImageAlignmentWithAnalytics(api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, align, inputMethod), changeBlockAlignmentWithAnalytics(api === null || api === void 0 ? void 0 : (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions, align, inputMethod)] : [changeImageAlignment(align), toggleBlockMark(alignment, () => !align ? undefined : align === 'start' ? false : {
93
- align
94
- }, [paragraph, heading])])(state, dispatch);
82
+ return cascadeCommands([changeImageAlignmentWithAnalytics(api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, align, inputMethod), changeBlockAlignmentWithAnalytics(api === null || api === void 0 ? void 0 : (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions, align, inputMethod)])(state, dispatch);
95
83
  };
@@ -2,7 +2,6 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit
2
2
  import { changeImageAlignment, toggleBlockMark } from '@atlaskit/editor-common/commands';
3
3
  import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
4
4
  import { Selection } from '@atlaskit/editor-prosemirror/state';
5
- import { fg } from '@atlaskit/platform-feature-flags';
6
5
  /**
7
6
  * Iterates over the commands one after the other,
8
7
  * passes the tr through and dispatches the cumulated transaction
@@ -83,15 +82,6 @@ var changeImageAlignmentWithAnalytics = function changeImageAlignmentWithAnalyti
83
82
  export var changeAlignment = function changeAlignment(align, api, inputMethod) {
84
83
  return function (state, dispatch) {
85
84
  var _api$analytics, _api$analytics2;
86
- var _state$schema3 = state.schema,
87
- _state$schema3$nodes = _state$schema3.nodes,
88
- paragraph = _state$schema3$nodes.paragraph,
89
- heading = _state$schema3$nodes.heading,
90
- alignment = _state$schema3.marks.alignment;
91
- return cascadeCommands(fg('platform_editor_add_alignment_tracking') ? [changeImageAlignmentWithAnalytics(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, align, inputMethod), changeBlockAlignmentWithAnalytics(api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions, align, inputMethod)] : [changeImageAlignment(align), toggleBlockMark(alignment, function () {
92
- return !align ? undefined : align === 'start' ? false : {
93
- align: align
94
- };
95
- }, [paragraph, heading])])(state, dispatch);
85
+ return cascadeCommands([changeImageAlignmentWithAnalytics(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, align, inputMethod), changeBlockAlignmentWithAnalytics(api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions, align, inputMethod)])(state, dispatch);
96
86
  };
97
87
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-alignment",
3
- "version": "3.2.4",
3
+ "version": "3.2.6",
4
4
  "description": "Alignment plugin for @atlaskit/editor-core",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -26,9 +26,6 @@
26
26
  "type": "boolean",
27
27
  "referenceOnly": true
28
28
  },
29
- "platform_editor_add_alignment_tracking": {
30
- "type": "boolean"
31
- },
32
29
  "platform_editor_controls_patch_6": {
33
30
  "type": "boolean"
34
31
  }
@@ -36,7 +33,7 @@
36
33
  "dependencies": {
37
34
  "@atlaskit/adf-schema": "^47.6.0",
38
35
  "@atlaskit/css": "^0.10.0",
39
- "@atlaskit/editor-common": "^106.5.0",
36
+ "@atlaskit/editor-common": "^106.6.0",
40
37
  "@atlaskit/editor-plugin-analytics": "^2.3.0",
41
38
  "@atlaskit/editor-plugin-primary-toolbar": "^3.2.0",
42
39
  "@atlaskit/editor-plugin-selection-toolbar": "^3.6.0",
@@ -44,7 +41,7 @@
44
41
  "@atlaskit/editor-tables": "^2.9.0",
45
42
  "@atlaskit/icon": "^26.4.0",
46
43
  "@atlaskit/platform-feature-flags": "^1.1.0",
47
- "@atlaskit/tmp-editor-statsig": "^6.0.0",
44
+ "@atlaskit/tmp-editor-statsig": "^7.0.0",
48
45
  "@atlaskit/tokens": "^5.1.0",
49
46
  "@babel/runtime": "^7.0.0",
50
47
  "@compiled/react": "^0.18.3"