@atlaskit/editor-plugin-date 1.4.1 → 2.0.1

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,25 @@
1
1
  # @atlaskit/editor-plugin-date
2
2
 
3
+ ## 2.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 2.0.0
10
+
11
+ ### Major Changes
12
+
13
+ - [`d9b562bd66f8e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d9b562bd66f8e) -
14
+ [ux] [ED-23947] restoring the original order of the typeahead menu so that actions, media,
15
+ mentions and emojis are above the fold (in the top 5 results). this change is a major because it
16
+ removes the `getEditorFeatureFlags prop` for plugins. if any consumers who have adopted these
17
+ changes to the public API, they should remove them on their side too.
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies
22
+
3
23
  ## 1.4.1
4
24
 
5
25
  ### Patch Changes
@@ -171,13 +171,12 @@ var datePlugin = function datePlugin(_ref3) {
171
171
  },
172
172
  pluginsOptions: {
173
173
  quickInsert: function quickInsert(_ref6) {
174
- var _options$getEditorFea;
175
174
  var formatMessage = _ref6.formatMessage;
176
175
  return [{
177
176
  id: 'date',
178
177
  title: formatMessage(_messages.toolbarInsertBlockMessages.date),
179
178
  description: formatMessage(_messages.toolbarInsertBlockMessages.dateDescription),
180
- priority: (_options$getEditorFea = options.getEditorFeatureFlags) !== null && _options$getEditorFea !== void 0 && _options$getEditorFea.call(options).platformEditorTypeaheadImprovedRelevancy ? 100 : 800,
179
+ priority: 800,
181
180
  keywords: ['calendar', 'day', 'time', 'today', '/'],
182
181
  keyshortcut: '//',
183
182
  icon: function icon() {
@@ -162,32 +162,29 @@ const datePlugin = ({
162
162
  pluginsOptions: {
163
163
  quickInsert: ({
164
164
  formatMessage
165
- }) => {
166
- var _options$getEditorFea;
167
- return [{
168
- id: 'date',
169
- title: formatMessage(messages.date),
170
- description: formatMessage(messages.dateDescription),
171
- priority: (_options$getEditorFea = options.getEditorFeatureFlags) !== null && _options$getEditorFea !== void 0 && _options$getEditorFea.call(options).platformEditorTypeaheadImprovedRelevancy ? 100 : 800,
172
- keywords: ['calendar', 'day', 'time', 'today', '/'],
173
- keyshortcut: '//',
174
- icon: () => /*#__PURE__*/React.createElement(IconDate, null),
175
- action(insert, state) {
176
- var _api$analytics, _api$analytics$action, _api$analytics$action2;
177
- const tr = createDate(true)(state);
178
- api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : (_api$analytics$action = _api$analytics.actions) === null || _api$analytics$action === void 0 ? void 0 : (_api$analytics$action2 = _api$analytics$action.attachAnalyticsEvent) === null || _api$analytics$action2 === void 0 ? void 0 : _api$analytics$action2.call(_api$analytics$action, {
179
- action: ACTION.INSERTED,
180
- actionSubject: ACTION_SUBJECT.DOCUMENT,
181
- actionSubjectId: ACTION_SUBJECT_ID.DATE,
182
- eventType: EVENT_TYPE.TRACK,
183
- attributes: {
184
- inputMethod: INPUT_METHOD.QUICK_INSERT
185
- }
186
- })(tr);
187
- return tr;
188
- }
189
- }];
190
- }
165
+ }) => [{
166
+ id: 'date',
167
+ title: formatMessage(messages.date),
168
+ description: formatMessage(messages.dateDescription),
169
+ priority: 800,
170
+ keywords: ['calendar', 'day', 'time', 'today', '/'],
171
+ keyshortcut: '//',
172
+ icon: () => /*#__PURE__*/React.createElement(IconDate, null),
173
+ action(insert, state) {
174
+ var _api$analytics, _api$analytics$action, _api$analytics$action2;
175
+ const tr = createDate(true)(state);
176
+ api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : (_api$analytics$action = _api$analytics.actions) === null || _api$analytics$action === void 0 ? void 0 : (_api$analytics$action2 = _api$analytics$action.attachAnalyticsEvent) === null || _api$analytics$action2 === void 0 ? void 0 : _api$analytics$action2.call(_api$analytics$action, {
177
+ action: ACTION.INSERTED,
178
+ actionSubject: ACTION_SUBJECT.DOCUMENT,
179
+ actionSubjectId: ACTION_SUBJECT_ID.DATE,
180
+ eventType: EVENT_TYPE.TRACK,
181
+ attributes: {
182
+ inputMethod: INPUT_METHOD.QUICK_INSERT
183
+ }
184
+ })(tr);
185
+ return tr;
186
+ }
187
+ }]
191
188
  }
192
189
  });
193
190
  export default datePlugin;
@@ -159,13 +159,12 @@ var datePlugin = function datePlugin(_ref3) {
159
159
  },
160
160
  pluginsOptions: {
161
161
  quickInsert: function quickInsert(_ref6) {
162
- var _options$getEditorFea;
163
162
  var formatMessage = _ref6.formatMessage;
164
163
  return [{
165
164
  id: 'date',
166
165
  title: formatMessage(messages.date),
167
166
  description: formatMessage(messages.dateDescription),
168
- priority: (_options$getEditorFea = options.getEditorFeatureFlags) !== null && _options$getEditorFea !== void 0 && _options$getEditorFea.call(options).platformEditorTypeaheadImprovedRelevancy ? 100 : 800,
167
+ priority: 800,
169
168
  keywords: ['calendar', 'day', 'time', 'today', '/'],
170
169
  keyshortcut: '//',
171
170
  icon: function icon() {
@@ -1,6 +1,6 @@
1
1
  import type { WeekDay } from '@atlaskit/calendar/types';
2
2
  import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
- import type { EditorCommand, GetEditorFeatureFlags, NextEditorPlugin, TOOLBAR_MENU_TYPE } from '@atlaskit/editor-common/types';
3
+ import type { EditorCommand, NextEditorPlugin, TOOLBAR_MENU_TYPE } from '@atlaskit/editor-common/types';
4
4
  import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
5
5
  import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
6
6
  export type DateSegment = 'day' | 'month' | 'year';
@@ -11,7 +11,6 @@ export type DateType = {
11
11
  };
12
12
  export interface DatePluginConfig {
13
13
  weekStartDay?: WeekDay;
14
- getEditorFeatureFlags?: GetEditorFeatureFlags;
15
14
  }
16
15
  export type DatePluginSharedState = {
17
16
  showDatePickerAt?: number | null;
@@ -1,6 +1,6 @@
1
1
  import type { WeekDay } from '@atlaskit/calendar/types';
2
2
  import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
- import type { EditorCommand, GetEditorFeatureFlags, NextEditorPlugin, TOOLBAR_MENU_TYPE } from '@atlaskit/editor-common/types';
3
+ import type { EditorCommand, NextEditorPlugin, TOOLBAR_MENU_TYPE } from '@atlaskit/editor-common/types';
4
4
  import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
5
5
  import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
6
6
  export type DateSegment = 'day' | 'month' | 'year';
@@ -11,7 +11,6 @@ export type DateType = {
11
11
  };
12
12
  export interface DatePluginConfig {
13
13
  weekStartDay?: WeekDay;
14
- getEditorFeatureFlags?: GetEditorFeatureFlags;
15
14
  }
16
15
  export type DatePluginSharedState = {
17
16
  showDatePickerAt?: number | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-date",
3
- "version": "1.4.1",
3
+ "version": "2.0.1",
4
4
  "description": "Date plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -35,14 +35,14 @@
35
35
  "@atlaskit/adf-schema": "^39.0.3",
36
36
  "@atlaskit/calendar": "^14.3.0",
37
37
  "@atlaskit/date": "^0.10.0",
38
- "@atlaskit/editor-common": "^83.5.0",
38
+ "@atlaskit/editor-common": "^84.4.0",
39
39
  "@atlaskit/editor-plugin-analytics": "^1.4.0",
40
40
  "@atlaskit/editor-plugin-editor-disabled": "^1.1.0",
41
41
  "@atlaskit/editor-prosemirror": "4.0.1",
42
- "@atlaskit/editor-shared-styles": "^2.12.0",
42
+ "@atlaskit/editor-shared-styles": "^2.13.0",
43
43
  "@atlaskit/form": "^10.4.0",
44
44
  "@atlaskit/locale": "^2.7.0",
45
- "@atlaskit/textfield": "6.4.1",
45
+ "@atlaskit/textfield": "6.4.2",
46
46
  "@atlaskit/theme": "^12.11.0",
47
47
  "@atlaskit/tokens": "^1.53.0",
48
48
  "@babel/runtime": "^7.0.0",
@@ -61,7 +61,7 @@
61
61
  "@atlaskit/editor-plugin-quick-insert": "^1.1.0",
62
62
  "@atlaskit/editor-plugin-selection": "^1.2.0",
63
63
  "@atlaskit/editor-plugin-table": "^7.19.0",
64
- "@atlaskit/editor-plugin-tasks-and-decisions": "^1.5.0",
64
+ "@atlaskit/editor-plugin-tasks-and-decisions": "^2.0.0",
65
65
  "@atlaskit/editor-plugin-type-ahead": "^1.4.0",
66
66
  "@atlaskit/editor-plugin-width": "^1.1.0",
67
67
  "@testing-library/react": "^12.1.5"