@atlaskit/editor-plugin-panel 5.3.6 → 5.3.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,21 @@
1
1
  # @atlaskit/editor-plugin-panel
2
2
 
3
+ ## 5.3.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [`265c1bf0cefa4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/265c1bf0cefa4) -
8
+ Sorted type and interface props to improve Atlaskit docs
9
+ - Updated dependencies
10
+
11
+ ## 5.3.7
12
+
13
+ ### Patch Changes
14
+
15
+ - [`2dfa839c46c82`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2dfa839c46c82) -
16
+ Handle missing panel type mapping gracefully
17
+ - Updated dependencies
18
+
3
19
  ## 5.3.6
4
20
 
5
21
  ### Patch Changes
@@ -87,7 +87,7 @@ var panelTypeDropdown = exports.panelTypeDropdown = function panelTypeDropdown(_
87
87
  title: formatMessage(panelTitleAndIcon[_adfSchema.PanelType.ERROR].title)
88
88
  }];
89
89
  var selectedPanelType = activePanelType || _adfSchema.PanelType.INFO;
90
- var selectedTitleAndIcon = panelTitleAndIcon[selectedPanelType];
90
+ var selectedTitleAndIcon = panelTitleAndIcon[selectedPanelType] || panelTitleAndIcon[_adfSchema.PanelType.CUSTOM];
91
91
  return {
92
92
  id: 'panel-type-dropdown',
93
93
  testId: 'panel-type-dropdown-trigger',
@@ -87,7 +87,7 @@ export const panelTypeDropdown = ({
87
87
  title: formatMessage(panelTitleAndIcon[PanelType.ERROR].title)
88
88
  }];
89
89
  const selectedPanelType = activePanelType || PanelType.INFO;
90
- const selectedTitleAndIcon = panelTitleAndIcon[selectedPanelType];
90
+ const selectedTitleAndIcon = panelTitleAndIcon[selectedPanelType] || panelTitleAndIcon[PanelType.CUSTOM];
91
91
  return {
92
92
  id: 'panel-type-dropdown',
93
93
  testId: 'panel-type-dropdown-trigger',
@@ -80,7 +80,7 @@ export var panelTypeDropdown = function panelTypeDropdown(_ref) {
80
80
  title: formatMessage(panelTitleAndIcon[PanelType.ERROR].title)
81
81
  }];
82
82
  var selectedPanelType = activePanelType || PanelType.INFO;
83
- var selectedTitleAndIcon = panelTitleAndIcon[selectedPanelType];
83
+ var selectedTitleAndIcon = panelTitleAndIcon[selectedPanelType] || panelTitleAndIcon[PanelType.CUSTOM];
84
84
  return {
85
85
  id: 'panel-type-dropdown',
86
86
  testId: 'panel-type-dropdown-trigger',
@@ -13,10 +13,10 @@ export declare const panelIcons: {
13
13
  }>;
14
14
  };
15
15
  interface PanelIconAttributes {
16
- panelAttributes: PanelAttributes;
17
- providerFactory?: ProviderFactory;
18
16
  allowCustomPanel?: boolean;
17
+ panelAttributes: PanelAttributes;
19
18
  pluginInjectionApi: ExtractInjectionAPI<PanelPlugin> | undefined;
19
+ providerFactory?: ProviderFactory;
20
20
  }
21
21
  export declare const PanelIcon: (props: PanelIconAttributes) => React.JSX.Element | null;
22
22
  declare class PanelNodeView {
@@ -32,8 +32,8 @@ declare class PanelNodeView {
32
32
  key: string;
33
33
  constructor(node: PMNode, view: EditorView, getPos: getPosHandlerNode, pluginOptions: PanelPluginOptions, api: ExtractInjectionAPI<PanelPlugin> | undefined, nodeViewPortalProviderAPI: PortalProviderAPI, providerFactory?: ProviderFactory);
34
34
  ignoreMutation(mutation: MutationRecord | {
35
- type: 'selection';
36
35
  target: Node;
36
+ type: 'selection';
37
37
  }): boolean;
38
38
  destroy(): void;
39
39
  }
@@ -13,16 +13,16 @@ export interface PanelPluginConfig {
13
13
  }
14
14
  export type DomPanelAtrrs = {
15
15
  class: string;
16
- 'data-panel-type': string;
17
- 'data-testid'?: string;
18
16
  'data-panel-color'?: string;
19
17
  'data-panel-icon-id'?: string;
20
18
  'data-panel-icon-text'?: string;
19
+ 'data-panel-type': string;
20
+ 'data-testid'?: string;
21
21
  style: string;
22
22
  };
23
23
  export type EmojiInfo = {
24
- shortName: string;
25
24
  id: string;
25
+ shortName: string;
26
26
  };
27
27
  export type PanelPluginDependencies = [
28
28
  typeof decorationsPlugin,
@@ -30,9 +30,9 @@ export type PanelPluginDependencies = [
30
30
  EmojiPlugin
31
31
  ];
32
32
  export type PanelPlugin = NextEditorPlugin<'panel', {
33
- pluginConfiguration: PanelPluginOptions | undefined;
34
- dependencies: PanelPluginDependencies;
35
33
  actions: {
36
34
  insertPanel: (inputMethod: INPUT_METHOD.INSERT_MENU | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.TOOLBAR) => Command;
37
35
  };
36
+ dependencies: PanelPluginDependencies;
37
+ pluginConfiguration: PanelPluginOptions | undefined;
38
38
  }>;
@@ -13,10 +13,10 @@ export declare const panelIcons: {
13
13
  }>;
14
14
  };
15
15
  interface PanelIconAttributes {
16
- panelAttributes: PanelAttributes;
17
- providerFactory?: ProviderFactory;
18
16
  allowCustomPanel?: boolean;
17
+ panelAttributes: PanelAttributes;
19
18
  pluginInjectionApi: ExtractInjectionAPI<PanelPlugin> | undefined;
19
+ providerFactory?: ProviderFactory;
20
20
  }
21
21
  export declare const PanelIcon: (props: PanelIconAttributes) => React.JSX.Element | null;
22
22
  declare class PanelNodeView {
@@ -32,8 +32,8 @@ declare class PanelNodeView {
32
32
  key: string;
33
33
  constructor(node: PMNode, view: EditorView, getPos: getPosHandlerNode, pluginOptions: PanelPluginOptions, api: ExtractInjectionAPI<PanelPlugin> | undefined, nodeViewPortalProviderAPI: PortalProviderAPI, providerFactory?: ProviderFactory);
34
34
  ignoreMutation(mutation: MutationRecord | {
35
- type: 'selection';
36
35
  target: Node;
36
+ type: 'selection';
37
37
  }): boolean;
38
38
  destroy(): void;
39
39
  }
@@ -13,16 +13,16 @@ export interface PanelPluginConfig {
13
13
  }
14
14
  export type DomPanelAtrrs = {
15
15
  class: string;
16
- 'data-panel-type': string;
17
- 'data-testid'?: string;
18
16
  'data-panel-color'?: string;
19
17
  'data-panel-icon-id'?: string;
20
18
  'data-panel-icon-text'?: string;
19
+ 'data-panel-type': string;
20
+ 'data-testid'?: string;
21
21
  style: string;
22
22
  };
23
23
  export type EmojiInfo = {
24
- shortName: string;
25
24
  id: string;
25
+ shortName: string;
26
26
  };
27
27
  export type PanelPluginDependencies = [
28
28
  typeof decorationsPlugin,
@@ -30,9 +30,9 @@ export type PanelPluginDependencies = [
30
30
  EmojiPlugin
31
31
  ];
32
32
  export type PanelPlugin = NextEditorPlugin<'panel', {
33
- pluginConfiguration: PanelPluginOptions | undefined;
34
- dependencies: PanelPluginDependencies;
35
33
  actions: {
36
34
  insertPanel: (inputMethod: INPUT_METHOD.INSERT_MENU | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.TOOLBAR) => Command;
37
35
  };
36
+ dependencies: PanelPluginDependencies;
37
+ pluginConfiguration: PanelPluginOptions | undefined;
38
38
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-panel",
3
- "version": "5.3.6",
3
+ "version": "5.3.8",
4
4
  "description": "Panel plugin for @atlaskit/editor-core.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -41,13 +41,13 @@
41
41
  "@atlaskit/icon": "^28.0.0",
42
42
  "@atlaskit/platform-feature-flags": "^1.1.0",
43
43
  "@atlaskit/theme": "^19.0.0",
44
- "@atlaskit/tmp-editor-statsig": "^11.3.0",
44
+ "@atlaskit/tmp-editor-statsig": "^11.5.0",
45
45
  "@atlaskit/tokens": "^6.0.0",
46
46
  "@babel/runtime": "^7.0.0",
47
47
  "uuid": "^3.1.0"
48
48
  },
49
49
  "peerDependencies": {
50
- "@atlaskit/editor-common": "^107.26.0",
50
+ "@atlaskit/editor-common": "^107.28.0",
51
51
  "react": "^18.2.0",
52
52
  "react-dom": "^18.2.0",
53
53
  "react-intl-next": "npm:react-intl@^5.18.1"