@atlaskit/editor-common 94.14.2 → 94.16.0

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.
Files changed (43) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/element-browser/ElementBrowser.js +4 -2
  3. package/dist/cjs/element-browser/components/ElementList/ElementList.js +366 -21
  4. package/dist/cjs/element-browser/components/StatelessElementBrowser.js +14 -7
  5. package/dist/cjs/element-browser/constants.js +1 -1
  6. package/dist/cjs/monitoring/error.js +1 -1
  7. package/dist/cjs/quick-insert/utils.js +10 -5
  8. package/dist/cjs/ui/DropList/index.js +1 -1
  9. package/dist/es2019/element-browser/ElementBrowser.js +4 -2
  10. package/dist/es2019/element-browser/components/ElementList/ElementList.js +351 -5
  11. package/dist/es2019/element-browser/components/StatelessElementBrowser.js +14 -7
  12. package/dist/es2019/element-browser/constants.js +1 -1
  13. package/dist/es2019/monitoring/error.js +1 -1
  14. package/dist/es2019/quick-insert/utils.js +10 -5
  15. package/dist/es2019/ui/DropList/index.js +1 -1
  16. package/dist/esm/element-browser/ElementBrowser.js +4 -2
  17. package/dist/esm/element-browser/components/ElementList/ElementList.js +365 -20
  18. package/dist/esm/element-browser/components/StatelessElementBrowser.js +14 -7
  19. package/dist/esm/element-browser/constants.js +1 -1
  20. package/dist/esm/monitoring/error.js +1 -1
  21. package/dist/esm/quick-insert/utils.js +10 -5
  22. package/dist/esm/ui/DropList/index.js +1 -1
  23. package/dist/types/analytics/index.d.ts +1 -0
  24. package/dist/types/element-browser/ElementBrowser.d.ts +2 -0
  25. package/dist/types/element-browser/components/ElementList/ElementList.d.ts +2 -0
  26. package/dist/types/element-browser/components/StatelessElementBrowser.d.ts +4 -1
  27. package/dist/types/element-browser/constants.d.ts +1 -1
  28. package/dist/types/extensibility/index.d.ts +1 -0
  29. package/dist/types/provider-factory.d.ts +1 -0
  30. package/dist/types/quick-insert/utils.d.ts +1 -1
  31. package/dist/types/types/index.d.ts +1 -1
  32. package/dist/types/types/quick-insert.d.ts +3 -3
  33. package/dist/types-ts4.5/analytics/index.d.ts +1 -0
  34. package/dist/types-ts4.5/element-browser/ElementBrowser.d.ts +2 -0
  35. package/dist/types-ts4.5/element-browser/components/ElementList/ElementList.d.ts +2 -0
  36. package/dist/types-ts4.5/element-browser/components/StatelessElementBrowser.d.ts +4 -1
  37. package/dist/types-ts4.5/element-browser/constants.d.ts +1 -1
  38. package/dist/types-ts4.5/extensibility/index.d.ts +1 -0
  39. package/dist/types-ts4.5/provider-factory.d.ts +1 -0
  40. package/dist/types-ts4.5/quick-insert/utils.d.ts +1 -1
  41. package/dist/types-ts4.5/types/index.d.ts +1 -1
  42. package/dist/types-ts4.5/types/quick-insert.d.ts +3 -3
  43. package/package.json +10 -7
@@ -12,7 +12,7 @@ export type { FeatureFlags, FeatureFlagKey, GetEditorFeatureFlags } from './feat
12
12
  export type { Browsers, Range, DisableSpellcheckByBrowser } from './supported-browsers';
13
13
  export type { EditorContainerWidth, GetEditorContainerWidth } from './editor-container-width';
14
14
  export type { EmptyStateHandler, EmptyStateHandlerParams } from './empty-state-handler';
15
- export type { RenderOptionsPropsT, DropdownOptionT, DropdownOptions, SelectOption, ButtonAppearance, Icon, RenderOptionsProps, AlignType, ConfirmDialogChildInfo, ConfirmDialogOptions, ConfirmationDialogProps, FloatingToolbarButton, FloatingToolbarCopyButton, FloatingToolbarInput, FloatingToolbarCustom, FloatingToolbarListPicker, FloatingToolbarColorPicker, FloatingToolbarEmojiPicker, FloatingToolbarDatePicker, FloatingToolbarSelect, FloatingToolbarSeparator, FloatingToolbarDropdown, FloatingToolbarFallbackItem, FloatingToolbarItem, FloatingToolbarConfig, FloatingToolbarHandler, FloatingToolbarButtonSpotlightConfig, } from './floating-toolbar';
15
+ export type { RenderOptionsPropsT, DropdownOptionT, DropdownOptions, SelectOption, ButtonAppearance, Icon, RenderOptionsProps, AlignType, ConfirmDialogChildInfo, ConfirmDialogOptions, ConfirmationDialogProps, FloatingToolbarButton, FloatingToolbarCopyButton, FloatingToolbarInput, FloatingToolbarCustom, FloatingToolbarListPicker, FloatingToolbarColorPicker, FloatingToolbarEmojiPicker, FloatingToolbarDatePicker, FloatingToolbarSelect, FloatingToolbarSeparator, FloatingToolbarDropdown, FloatingToolbarFallbackItem, FloatingToolbarItem, FloatingToolbarConfig, FloatingToolbarHandler, FloatingToolbarButtonSpotlightConfig, typeOption, } from './floating-toolbar';
16
16
  export type { MarkOptions, NodeOptions } from './copy-button';
17
17
  export type { ContextPanelHandler } from './context-panel';
18
18
  export type { EditorAppearance } from './editor-appearance';
@@ -4,7 +4,7 @@ import type { QuickInsertItem, QuickInsertProvider } from '../provider-factory';
4
4
  import type { EmptyStateHandler } from './empty-state-handler';
5
5
  export type QuickInsertOptions = boolean | {
6
6
  provider?: Promise<QuickInsertProvider>;
7
- prioritySortingFn?: (items: QuickInsertItem[]) => Fuse.FuseSortFunction;
7
+ prioritySortingFn?: (items: QuickInsertItem[]) => Fuse.FuseSortFunction | undefined;
8
8
  onInsert?: (item: QuickInsertItem) => void;
9
9
  };
10
10
  export type QuickInsertHandlerFn = ((intl: IntlShape) => Array<QuickInsertItem>) & {
@@ -19,7 +19,7 @@ export type QuickInsertSearchOptions = {
19
19
  category?: string;
20
20
  disableDefaultItems?: boolean;
21
21
  featuredItems?: boolean;
22
- prioritySortingFn?: (items: QuickInsertItem[]) => Fuse.FuseSortFunction;
22
+ prioritySortingFn?: (items: QuickInsertItem[]) => Fuse.FuseSortFunction | undefined;
23
23
  };
24
24
  export type QuickInsertPluginState = {
25
25
  isElementBrowserModalOpen: boolean;
@@ -36,7 +36,7 @@ export interface QuickInsertPluginOptions {
36
36
  enableElementBrowser?: boolean;
37
37
  elementBrowserHelpUrl?: string;
38
38
  emptyStateHandler?: EmptyStateHandler;
39
- prioritySortingFn?: (items: QuickInsertItem[]) => Fuse.FuseSortFunction;
39
+ prioritySortingFn?: (items: QuickInsertItem[]) => Fuse.FuseSortFunction | undefined;
40
40
  onInsert?: (item: QuickInsertItem) => void;
41
41
  }
42
42
  export type QuickInsertSharedState = {
@@ -5,3 +5,4 @@ export { editorAnalyticsChannel, fireAnalyticsEvent } from './fire-analytics-eve
5
5
  export { getAnalyticsEventsFromTransaction } from './utils';
6
6
  export { buildEditLinkPayload, buildVisitedLinkPayload, buildOpenedSettingsPayload, unlinkPayload, } from './linking-utils';
7
7
  export type { LinkType } from './linking-utils';
8
+ export type { RequestToEditAEP } from './types/general-events';
@@ -1,4 +1,5 @@
1
1
  import { PureComponent } from 'react';
2
+ import type { CellMeasurerCache } from 'react-virtualized/dist/commonjs/CellMeasurer';
2
3
  import type { QuickInsertItem } from '../provider-factory';
3
4
  import type { EmptyStateHandler } from '../types';
4
5
  import type { Category, Modes } from './types';
@@ -13,6 +14,7 @@ export interface Props {
13
14
  defaultCategory?: string;
14
15
  emptyStateHandler?: EmptyStateHandler;
15
16
  viewMoreItem?: QuickInsertItem;
17
+ cache?: CellMeasurerCache;
16
18
  }
17
19
  export interface State {
18
20
  items: QuickInsertItem[];
@@ -4,6 +4,7 @@
4
4
  */
5
5
  import React from 'react';
6
6
  import { jsx } from '@emotion/react';
7
+ import { CellMeasurerCache } from 'react-virtualized/dist/commonjs/CellMeasurer';
7
8
  import type { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
8
9
  import type { QuickInsertItem } from '../../../provider-factory';
9
10
  import type { EmptyStateHandler } from '../../../types';
@@ -24,6 +25,7 @@ export interface Props {
24
25
  selectedCategory?: string;
25
26
  selectedCategoryIndex?: number;
26
27
  searchTerm?: string;
28
+ cache?: CellMeasurerCache;
27
29
  }
28
30
  type ElementItemType = {
29
31
  inlineMode: boolean;
@@ -3,6 +3,7 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import React from 'react';
6
+ import type { CellMeasurerCache } from 'react-virtualized/dist/commonjs/CellMeasurer';
6
7
  import type { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
7
8
  import type { QuickInsertItem } from '../../provider-factory';
8
9
  import type { EmptyStateHandler } from '../../types';
@@ -21,6 +22,7 @@ export type StatelessElementBrowserProps = {
21
22
  searchTerm?: string;
22
23
  emptyStateHandler?: EmptyStateHandler;
23
24
  viewMoreItem?: QuickInsertItem;
25
+ cache?: CellMeasurerCache;
24
26
  } & WithAnalyticsEventsProps;
25
27
  declare const MemoizedElementBrowser: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<Omit<{
26
28
  categories?: Category[] | undefined;
@@ -36,5 +38,6 @@ declare const MemoizedElementBrowser: React.MemoExoticComponent<React.ForwardRef
36
38
  searchTerm?: string | undefined;
37
39
  emptyStateHandler?: EmptyStateHandler | undefined;
38
40
  viewMoreItem?: QuickInsertItem | undefined;
39
- }, keyof WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "key" | "mode" | "analyticsContext" | "categories" | "onSelectCategory" | "selectedCategory" | "items" | "emptyStateHandler" | "searchTerm" | "onInsertItem" | "onSearch" | "onSelectItem" | "viewMoreItem" | "showCategories" | "showSearch"> & React.RefAttributes<any>>>;
41
+ cache?: CellMeasurerCache | undefined;
42
+ }, keyof WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "key" | "mode" | "analyticsContext" | "cache" | "categories" | "onSelectCategory" | "selectedCategory" | "items" | "emptyStateHandler" | "searchTerm" | "onInsertItem" | "onSearch" | "onSelectItem" | "viewMoreItem" | "showCategories" | "showSearch"> & React.RefAttributes<any>>>;
40
43
  export default MemoizedElementBrowser;
@@ -16,6 +16,6 @@ export declare const INLINE_SIDEBAR_HEIGHT = "54px";
16
16
  export declare const SEARCH_ITEM_HEIGHT_WIDTH = "20px";
17
17
  export declare const SCROLLBAR_WIDTH = 15;
18
18
  export declare const ELEMENT_LIST_PADDING = 2;
19
- export declare const ELEMENT_ITEM_HEIGHT = 75;
19
+ export declare const ELEMENT_ITEM_HEIGHT = 60;
20
20
  export declare const ELEMENT_ITEM_PADDING = 10;
21
21
  export declare const ELEMENT_BROWSER_ID = "editor-element-browser";
@@ -2,3 +2,4 @@ export { ExtensionNodeWrapper } from './ExtensionNodeWrapper';
2
2
  export { Extension } from './Extension';
3
3
  export { default as ExtensionNodeView, ExtensionNode } from './extensionNodeView';
4
4
  export { ExtensionComponent } from './ExtensionComponent';
5
+ export type { MacroInteractionDesignFeatureFlags } from './types';
@@ -11,3 +11,4 @@ export type { QuickInsertItem, QuickInsertItemId, QuickInsertActionInsert, Quick
11
11
  export type { TypeAheadItem, TypeAheadItemRenderProps } from './types/type-ahead';
12
12
  export type { AutoformatReplacement, AutoformattingProvider, AutoformatHandler, AutoformatRuleset, } from './provider-factory/autoformatting-provider';
13
13
  export type { ContextIdentifierProvider } from './provider-factory/context-identifier-provider';
14
+ export type { ProfilecardProvider } from './provider-factory/profile-card-provider';
@@ -11,4 +11,4 @@ export declare const memoProcessQuickInsertItems: (items: Array<QuickInsertHandl
11
11
  * @param {QuickInsertItem[]} items - An array of QuickInsertItems to be searched.
12
12
  * @returns {QuickInsertItem[]} - Returns a sorted array of QuickInsertItems based on the priority. If the query string is empty, it will return the array sorted by priority. If a query string is provided, it will return an array of QuickInsertItems that match the query string, sorted by relevance to the query.
13
13
  */
14
- export declare function find(query: string, items: QuickInsertItem[], prioritySortingFn?: (items: QuickInsertItem[]) => Fuse.FuseSortFunction): QuickInsertItem[];
14
+ export declare function find(query: string, items: QuickInsertItem[], prioritySortingFn?: (items: QuickInsertItem[]) => Fuse.FuseSortFunction | undefined): QuickInsertItem[];
@@ -12,7 +12,7 @@ export type { FeatureFlags, FeatureFlagKey, GetEditorFeatureFlags } from './feat
12
12
  export type { Browsers, Range, DisableSpellcheckByBrowser } from './supported-browsers';
13
13
  export type { EditorContainerWidth, GetEditorContainerWidth } from './editor-container-width';
14
14
  export type { EmptyStateHandler, EmptyStateHandlerParams } from './empty-state-handler';
15
- export type { RenderOptionsPropsT, DropdownOptionT, DropdownOptions, SelectOption, ButtonAppearance, Icon, RenderOptionsProps, AlignType, ConfirmDialogChildInfo, ConfirmDialogOptions, ConfirmationDialogProps, FloatingToolbarButton, FloatingToolbarCopyButton, FloatingToolbarInput, FloatingToolbarCustom, FloatingToolbarListPicker, FloatingToolbarColorPicker, FloatingToolbarEmojiPicker, FloatingToolbarDatePicker, FloatingToolbarSelect, FloatingToolbarSeparator, FloatingToolbarDropdown, FloatingToolbarFallbackItem, FloatingToolbarItem, FloatingToolbarConfig, FloatingToolbarHandler, FloatingToolbarButtonSpotlightConfig, } from './floating-toolbar';
15
+ export type { RenderOptionsPropsT, DropdownOptionT, DropdownOptions, SelectOption, ButtonAppearance, Icon, RenderOptionsProps, AlignType, ConfirmDialogChildInfo, ConfirmDialogOptions, ConfirmationDialogProps, FloatingToolbarButton, FloatingToolbarCopyButton, FloatingToolbarInput, FloatingToolbarCustom, FloatingToolbarListPicker, FloatingToolbarColorPicker, FloatingToolbarEmojiPicker, FloatingToolbarDatePicker, FloatingToolbarSelect, FloatingToolbarSeparator, FloatingToolbarDropdown, FloatingToolbarFallbackItem, FloatingToolbarItem, FloatingToolbarConfig, FloatingToolbarHandler, FloatingToolbarButtonSpotlightConfig, typeOption, } from './floating-toolbar';
16
16
  export type { MarkOptions, NodeOptions } from './copy-button';
17
17
  export type { ContextPanelHandler } from './context-panel';
18
18
  export type { EditorAppearance } from './editor-appearance';
@@ -4,7 +4,7 @@ import type { QuickInsertItem, QuickInsertProvider } from '../provider-factory';
4
4
  import type { EmptyStateHandler } from './empty-state-handler';
5
5
  export type QuickInsertOptions = boolean | {
6
6
  provider?: Promise<QuickInsertProvider>;
7
- prioritySortingFn?: (items: QuickInsertItem[]) => Fuse.FuseSortFunction;
7
+ prioritySortingFn?: (items: QuickInsertItem[]) => Fuse.FuseSortFunction | undefined;
8
8
  onInsert?: (item: QuickInsertItem) => void;
9
9
  };
10
10
  export type QuickInsertHandlerFn = ((intl: IntlShape) => Array<QuickInsertItem>) & {
@@ -19,7 +19,7 @@ export type QuickInsertSearchOptions = {
19
19
  category?: string;
20
20
  disableDefaultItems?: boolean;
21
21
  featuredItems?: boolean;
22
- prioritySortingFn?: (items: QuickInsertItem[]) => Fuse.FuseSortFunction;
22
+ prioritySortingFn?: (items: QuickInsertItem[]) => Fuse.FuseSortFunction | undefined;
23
23
  };
24
24
  export type QuickInsertPluginState = {
25
25
  isElementBrowserModalOpen: boolean;
@@ -36,7 +36,7 @@ export interface QuickInsertPluginOptions {
36
36
  enableElementBrowser?: boolean;
37
37
  elementBrowserHelpUrl?: string;
38
38
  emptyStateHandler?: EmptyStateHandler;
39
- prioritySortingFn?: (items: QuickInsertItem[]) => Fuse.FuseSortFunction;
39
+ prioritySortingFn?: (items: QuickInsertItem[]) => Fuse.FuseSortFunction | undefined;
40
40
  onInsert?: (item: QuickInsertItem) => void;
41
41
  }
42
42
  export type QuickInsertSharedState = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "94.14.2",
3
+ "version": "94.16.0",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -110,7 +110,7 @@
110
110
  "dependencies": {
111
111
  "@atlaskit/activity-provider": "^2.4.0",
112
112
  "@atlaskit/adf-schema": "^44.2.0",
113
- "@atlaskit/adf-utils": "^19.11.0",
113
+ "@atlaskit/adf-utils": "^19.12.0",
114
114
  "@atlaskit/analytics-listeners": "^8.11.0",
115
115
  "@atlaskit/analytics-namespaced-context": "^6.12.0",
116
116
  "@atlaskit/analytics-next": "^10.1.0",
@@ -120,7 +120,7 @@
120
120
  "@atlaskit/codemod-utils": "^4.2.0",
121
121
  "@atlaskit/custom-steps": "^0.8.0",
122
122
  "@atlaskit/dropdown-menu": "^12.22.0",
123
- "@atlaskit/editor-json-transformer": "^8.20.0",
123
+ "@atlaskit/editor-json-transformer": "^8.21.0",
124
124
  "@atlaskit/editor-palette": "1.6.3",
125
125
  "@atlaskit/editor-prosemirror": "6.0.0",
126
126
  "@atlaskit/editor-shared-styles": "^3.2.0",
@@ -131,19 +131,19 @@
131
131
  "@atlaskit/link-datasource": "^3.8.0",
132
132
  "@atlaskit/link-picker": "^1.47.0",
133
133
  "@atlaskit/media-card": "^78.11.0",
134
- "@atlaskit/media-client": "^28.0.0",
134
+ "@atlaskit/media-client": "^28.1.0",
135
135
  "@atlaskit/media-client-react": "^2.3.0",
136
136
  "@atlaskit/media-common": "^11.7.0",
137
137
  "@atlaskit/media-file-preview": "^0.9.0",
138
138
  "@atlaskit/media-picker": "^67.0.0",
139
- "@atlaskit/media-ui": "^26.0.0",
139
+ "@atlaskit/media-ui": "^26.1.0",
140
140
  "@atlaskit/media-viewer": "49.2.7",
141
141
  "@atlaskit/mention": "^23.3.0",
142
142
  "@atlaskit/menu": "^2.13.0",
143
143
  "@atlaskit/onboarding": "^12.1.0",
144
144
  "@atlaskit/platform-feature-flags": "^0.3.0",
145
145
  "@atlaskit/popper": "^6.3.0",
146
- "@atlaskit/primitives": "^13.0.0",
146
+ "@atlaskit/primitives": "^13.1.0",
147
147
  "@atlaskit/profilecard": "^20.9.0",
148
148
  "@atlaskit/section-message": "^6.6.0",
149
149
  "@atlaskit/smart-card": "^30.2.0",
@@ -153,7 +153,7 @@
153
153
  "@atlaskit/textfield": "^6.5.0",
154
154
  "@atlaskit/tmp-editor-statsig": "^2.12.0",
155
155
  "@atlaskit/tokens": "^2.2.0",
156
- "@atlaskit/tooltip": "^18.8.0",
156
+ "@atlaskit/tooltip": "^18.9.0",
157
157
  "@atlaskit/width-detector": "^4.3.0",
158
158
  "@babel/runtime": "^7.0.0",
159
159
  "@emotion/react": "^11.7.1",
@@ -279,6 +279,9 @@
279
279
  },
280
280
  "platform_editor_element_dnd_nested_fix_patch_3": {
281
281
  "type": "boolean"
282
+ },
283
+ "platform_editor_reduce_element_browser_padding": {
284
+ "type": "boolean"
282
285
  }
283
286
  }
284
287
  }