@atlaskit/editor-plugin-list 8.2.6 → 8.2.8

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-list
2
2
 
3
+ ## 8.2.8
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 8.2.7
10
+
11
+ ### Patch Changes
12
+
13
+ - [`0d661119b4293`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0d661119b4293) -
14
+ Clean up platform_editor_insertion experiment by shipping control variant. Remove modern TypeAhead
15
+ components and experiment infrastructure while preserving all existing functionality.
16
+ - Updated dependencies
17
+
3
18
  ## 8.2.6
4
19
 
5
20
  ### Patch Changes
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.listPlugin = void 0;
8
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
8
  var _react = _interopRequireDefault(require("react"));
10
9
  var _adfSchema = require("@atlaskit/adf-schema");
11
10
  var _analytics = require("@atlaskit/editor-common/analytics");
@@ -14,7 +13,6 @@ var _messages = require("@atlaskit/editor-common/messages");
14
13
  var _quickInsert = require("@atlaskit/editor-common/quick-insert");
15
14
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
15
  var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
17
- var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
18
16
  var _commands = require("./pm-plugins/commands");
19
17
  var _indentList = require("./pm-plugins/commands/indent-list");
20
18
  var _outdentList2 = require("./pm-plugins/commands/outdent-list");
@@ -24,9 +22,9 @@ var _main = require("./pm-plugins/main");
24
22
  var _find = require("./pm-plugins/utils/find");
25
23
  var _selection = require("./pm-plugins/utils/selection");
26
24
  var _ui = require("./ui");
27
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
28
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } // Ignored via go/ees005
25
+ // Ignored via go/ees005
29
26
  // eslint-disable-next-line import/no-named-as-default
27
+
30
28
  /*
31
29
  Toolbar buttons to bullet and ordered list can be found in
32
30
  packages/editor/editor-core/src/plugins/toolbar-lists-indentation/ui/Toolbar.tsx
@@ -101,7 +99,7 @@ var listPlugin = exports.listPlugin = function listPlugin(_ref) {
101
99
  }
102
100
  }];
103
101
  },
104
- pluginsOptions: _objectSpread({}, (0, _experiments.editorExperiment)('platform_editor_insertion', 'control') && {
102
+ pluginsOptions: {
105
103
  quickInsert: function quickInsert(_ref4) {
106
104
  var formatMessage = _ref4.formatMessage;
107
105
  return [{
@@ -152,6 +150,6 @@ var listPlugin = exports.listPlugin = function listPlugin(_ref) {
152
150
  }
153
151
  }];
154
152
  }
155
- })
153
+ }
156
154
  };
157
155
  };
@@ -6,7 +6,6 @@ import { listMessages as messages } from '@atlaskit/editor-common/messages';
6
6
  import { IconList, IconListNumber } from '@atlaskit/editor-common/quick-insert';
7
7
  import { fg } from '@atlaskit/platform-feature-flags';
8
8
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
9
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
10
9
  import { toggleBulletList as toggleBulletListCommand, toggleOrderedList as toggleOrderedListCommand } from './pm-plugins/commands';
11
10
  import { indentList } from './pm-plugins/commands/indent-list';
12
11
  import { outdentList } from './pm-plugins/commands/outdent-list';
@@ -93,55 +92,53 @@ export const listPlugin = ({
93
92
  }];
94
93
  },
95
94
  pluginsOptions: {
96
- ...(editorExperiment('platform_editor_insertion', 'control') && {
97
- quickInsert: ({
98
- formatMessage
99
- }) => {
100
- return [{
101
- id: 'unorderedList',
102
- title: formatMessage(messages.unorderedList),
103
- description: formatMessage(messages.unorderedListDescription),
104
- keywords: ['ul', 'unordered'],
105
- priority: 1100,
106
- keyshortcut: tooltip(toggleBulletList),
107
- icon: () => /*#__PURE__*/React.createElement(IconList, null),
108
- action(insert, state) {
109
- const tr = insert(state.schema.nodes.bulletList.createChecked({}, state.schema.nodes.listItem.createChecked({}, state.schema.nodes.paragraph.createChecked())));
110
- editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 ? void 0 : editorAnalyticsAPI.attachAnalyticsEvent({
111
- action: ACTION.INSERTED,
112
- actionSubject: ACTION_SUBJECT.LIST,
113
- actionSubjectId: ACTION_SUBJECT_ID.FORMAT_LIST_BULLET,
114
- eventType: EVENT_TYPE.TRACK,
115
- attributes: {
116
- inputMethod: INPUT_METHOD.QUICK_INSERT
117
- }
118
- })(tr);
119
- return tr;
120
- }
121
- }, {
122
- id: 'orderedList',
123
- title: formatMessage(messages.orderedList),
124
- description: formatMessage(messages.orderedListDescription),
125
- keywords: ['ol', 'ordered'],
126
- priority: 1200,
127
- keyshortcut: tooltip(toggleOrderedList),
128
- icon: () => /*#__PURE__*/React.createElement(IconListNumber, null),
129
- action(insert, state) {
130
- const tr = insert(state.schema.nodes.orderedList.createChecked({}, state.schema.nodes.listItem.createChecked({}, state.schema.nodes.paragraph.createChecked())));
131
- editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 ? void 0 : editorAnalyticsAPI.attachAnalyticsEvent({
132
- action: ACTION.INSERTED,
133
- actionSubject: ACTION_SUBJECT.LIST,
134
- actionSubjectId: ACTION_SUBJECT_ID.FORMAT_LIST_NUMBER,
135
- eventType: EVENT_TYPE.TRACK,
136
- attributes: {
137
- inputMethod: INPUT_METHOD.QUICK_INSERT
138
- }
139
- })(tr);
140
- return tr;
141
- }
142
- }];
143
- }
144
- })
95
+ quickInsert: ({
96
+ formatMessage
97
+ }) => {
98
+ return [{
99
+ id: 'unorderedList',
100
+ title: formatMessage(messages.unorderedList),
101
+ description: formatMessage(messages.unorderedListDescription),
102
+ keywords: ['ul', 'unordered'],
103
+ priority: 1100,
104
+ keyshortcut: tooltip(toggleBulletList),
105
+ icon: () => /*#__PURE__*/React.createElement(IconList, null),
106
+ action(insert, state) {
107
+ const tr = insert(state.schema.nodes.bulletList.createChecked({}, state.schema.nodes.listItem.createChecked({}, state.schema.nodes.paragraph.createChecked())));
108
+ editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 ? void 0 : editorAnalyticsAPI.attachAnalyticsEvent({
109
+ action: ACTION.INSERTED,
110
+ actionSubject: ACTION_SUBJECT.LIST,
111
+ actionSubjectId: ACTION_SUBJECT_ID.FORMAT_LIST_BULLET,
112
+ eventType: EVENT_TYPE.TRACK,
113
+ attributes: {
114
+ inputMethod: INPUT_METHOD.QUICK_INSERT
115
+ }
116
+ })(tr);
117
+ return tr;
118
+ }
119
+ }, {
120
+ id: 'orderedList',
121
+ title: formatMessage(messages.orderedList),
122
+ description: formatMessage(messages.orderedListDescription),
123
+ keywords: ['ol', 'ordered'],
124
+ priority: 1200,
125
+ keyshortcut: tooltip(toggleOrderedList),
126
+ icon: () => /*#__PURE__*/React.createElement(IconListNumber, null),
127
+ action(insert, state) {
128
+ const tr = insert(state.schema.nodes.orderedList.createChecked({}, state.schema.nodes.listItem.createChecked({}, state.schema.nodes.paragraph.createChecked())));
129
+ editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 ? void 0 : editorAnalyticsAPI.attachAnalyticsEvent({
130
+ action: ACTION.INSERTED,
131
+ actionSubject: ACTION_SUBJECT.LIST,
132
+ actionSubjectId: ACTION_SUBJECT_ID.FORMAT_LIST_NUMBER,
133
+ eventType: EVENT_TYPE.TRACK,
134
+ attributes: {
135
+ inputMethod: INPUT_METHOD.QUICK_INSERT
136
+ }
137
+ })(tr);
138
+ return tr;
139
+ }
140
+ }];
141
+ }
145
142
  }
146
143
  };
147
144
  };
@@ -1,6 +1,3 @@
1
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
1
  import React from 'react';
5
2
  import { bulletList, bulletListWithLocalId, listItem, listItemWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId } from '@atlaskit/adf-schema';
6
3
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
@@ -9,7 +6,6 @@ import { listMessages as messages } from '@atlaskit/editor-common/messages';
9
6
  import { IconList, IconListNumber } from '@atlaskit/editor-common/quick-insert';
10
7
  import { fg } from '@atlaskit/platform-feature-flags';
11
8
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
12
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
13
9
  import { toggleBulletList as toggleBulletListCommand, toggleOrderedList as toggleOrderedListCommand } from './pm-plugins/commands';
14
10
  import { indentList } from './pm-plugins/commands/indent-list';
15
11
  import { outdentList as _outdentList } from './pm-plugins/commands/outdent-list';
@@ -96,7 +92,7 @@ export var listPlugin = function listPlugin(_ref) {
96
92
  }
97
93
  }];
98
94
  },
99
- pluginsOptions: _objectSpread({}, editorExperiment('platform_editor_insertion', 'control') && {
95
+ pluginsOptions: {
100
96
  quickInsert: function quickInsert(_ref4) {
101
97
  var formatMessage = _ref4.formatMessage;
102
98
  return [{
@@ -147,6 +143,6 @@ export var listPlugin = function listPlugin(_ref) {
147
143
  }
148
144
  }];
149
145
  }
150
- })
146
+ }
151
147
  };
152
148
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-list",
3
- "version": "8.2.6",
3
+ "version": "8.2.8",
4
4
  "description": "List plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -34,16 +34,16 @@
34
34
  "@atlaskit/editor-plugin-toolbar": "^3.4.0",
35
35
  "@atlaskit/editor-prosemirror": "7.0.0",
36
36
  "@atlaskit/editor-toolbar": "^0.17.0",
37
- "@atlaskit/icon": "^28.5.0",
37
+ "@atlaskit/icon": "^29.0.0",
38
38
  "@atlaskit/insm": "^0.2.0",
39
39
  "@atlaskit/platform-feature-flags": "^1.1.0",
40
40
  "@atlaskit/prosemirror-history": "^0.2.0",
41
- "@atlaskit/prosemirror-input-rules": "^3.5.0",
42
- "@atlaskit/tmp-editor-statsig": "^13.23.0",
41
+ "@atlaskit/prosemirror-input-rules": "^3.6.0",
42
+ "@atlaskit/tmp-editor-statsig": "^13.35.0",
43
43
  "@babel/runtime": "^7.0.0"
44
44
  },
45
45
  "peerDependencies": {
46
- "@atlaskit/editor-common": "^110.20.0",
46
+ "@atlaskit/editor-common": "^110.27.0",
47
47
  "react": "^18.2.0",
48
48
  "react-intl-next": "npm:react-intl@^5.18.1"
49
49
  },