@atlaskit/editor-core 191.1.4 → 191.3.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 (34) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/afm-cc/tsconfig.json +0 -3
  3. package/dist/cjs/create-editor/create-plugins-list.js +0 -1
  4. package/dist/cjs/presets/universal.js +0 -6
  5. package/dist/cjs/version-wrapper.js +1 -1
  6. package/dist/es2019/create-editor/create-plugins-list.js +0 -1
  7. package/dist/es2019/presets/universal.js +0 -6
  8. package/dist/es2019/version-wrapper.js +1 -1
  9. package/dist/esm/create-editor/create-plugins-list.js +0 -1
  10. package/dist/esm/presets/universal.js +0 -6
  11. package/dist/esm/version-wrapper.js +1 -1
  12. package/dist/types/presets/default.d.ts +0 -2
  13. package/dist/types-ts4.5/presets/default.d.ts +0 -2
  14. package/package.json +3 -6
  15. package/dist/cjs/plugins/index.js +0 -13
  16. package/dist/cjs/plugins/jira-issue/index.js +0 -43
  17. package/dist/cjs/plugins/jira-issue/nodeviews/jira-issue.js +0 -31
  18. package/dist/cjs/plugins/rank.js +0 -8
  19. package/dist/es2019/plugins/index.js +0 -1
  20. package/dist/es2019/plugins/jira-issue/index.js +0 -35
  21. package/dist/es2019/plugins/jira-issue/nodeviews/jira-issue.js +0 -68
  22. package/dist/es2019/plugins/rank.js +0 -2
  23. package/dist/esm/plugins/index.js +0 -1
  24. package/dist/esm/plugins/jira-issue/index.js +0 -36
  25. package/dist/esm/plugins/jira-issue/nodeviews/jira-issue.js +0 -24
  26. package/dist/esm/plugins/rank.js +0 -2
  27. package/dist/types/plugins/index.d.ts +0 -1
  28. package/dist/types/plugins/jira-issue/index.d.ts +0 -5
  29. package/dist/types/plugins/jira-issue/nodeviews/jira-issue.d.ts +0 -7
  30. package/dist/types/plugins/rank.d.ts +0 -2
  31. package/dist/types-ts4.5/plugins/index.d.ts +0 -1
  32. package/dist/types-ts4.5/plugins/jira-issue/index.d.ts +0 -5
  33. package/dist/types-ts4.5/plugins/jira-issue/nodeviews/jira-issue.d.ts +0 -7
  34. package/dist/types-ts4.5/plugins/rank.d.ts +0 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 191.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#67557](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/67557) [`124d0c6d5286`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/124d0c6d5286) - Migrating block-type, text-color, and text-formatting to use useSharedPluginState rather than WithPluginState. Removing unused option on default preset. Adding formattingIsPresent prop to TextFormattingState.
8
+
9
+ ### Patch Changes
10
+
11
+ - [#66463](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/66463) [`9008e1bbfd75`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9008e1bbfd75) - Adding new editor-plugins facade package
12
+ - [#67051](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/67051) [`08b5bd90a149`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/08b5bd90a149) - [ux] The table selector popup should gradually expand to 10 x 10 rows when hovered
13
+ - Updated dependencies
14
+
15
+ ## 191.2.0
16
+
17
+ ### Minor Changes
18
+
19
+ - [#67522](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/67522) [`0801c7c7f4d3`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0801c7c7f4d3) - Remove jira issue plugin from editor-core.
20
+
3
21
  ## 191.1.4
4
22
 
5
23
  ### Patch Changes
@@ -259,9 +259,6 @@
259
259
  {
260
260
  "path": "../../../design-system/icon/afm-cc/tsconfig.json"
261
261
  },
262
- {
263
- "path": "../../../design-system/logo/afm-cc/tsconfig.json"
264
- },
265
262
  {
266
263
  "path": "../../../media/media-card/afm-cc/tsconfig.json"
267
264
  },
@@ -89,7 +89,6 @@ function getDefaultPresetOptionsFromEditorProps(props, createAnalyticsEvent) {
89
89
  selection: {
90
90
  useLongPressSelection: false
91
91
  },
92
- cardOptions: cardOptions,
93
92
  hyperlinkOptions: {
94
93
  editorAppearance: props.appearance,
95
94
  linkPicker: (_props$linking2 = props.linking) === null || _props$linking2 === void 0 ? void 0 : _props$linking2.linkPicker,
@@ -50,7 +50,6 @@ var _editorPluginAnnotation = require("@atlaskit/editor-plugin-annotation");
50
50
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
51
51
  var _editorPluginCollabEdit = require("@atlaskit/editor-plugin-collab-edit");
52
52
  var _editorPluginAvatarGroup = require("@atlaskit/editor-plugin-avatar-group");
53
- var _plugins = require("../plugins");
54
53
  var _editorPluginExtension = require("@atlaskit/editor-plugin-extension");
55
54
  var _editorPluginBeforePrimaryToolbar = require("@atlaskit/editor-plugin-before-primary-toolbar");
56
55
  var _editorPluginFeedbackDialog = require("@atlaskit/editor-plugin-feedback-dialog");
@@ -265,11 +264,6 @@ function createUniversalPreset(appearance, props, featureFlags, prevAppearance,
265
264
  return builder.add([plugin, props.maxContentSize]);
266
265
  }
267
266
  return builder;
268
- }).maybeAdd(_plugins.jiraIssuePlugin, function (plugin, builder) {
269
- if (!(0, _platformFeatureFlags.getBooleanFF)('platform.editor.deprecate-jira-issue-plugin') && props.allowJiraIssue) {
270
- return builder.add(plugin);
271
- }
272
- return builder;
273
267
  }).maybeAdd(_editorPluginPanel.panelPlugin, function (plugin, builder) {
274
268
  if (props.allowPanel) {
275
269
  var allowPanel = (0, _typeof2.default)(props.allowPanel) === 'object' ? props.allowPanel : {};
@@ -5,4 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "191.1.4";
8
+ var version = exports.version = "191.3.0";
@@ -77,7 +77,6 @@ export function getDefaultPresetOptionsFromEditorProps(props, createAnalyticsEve
77
77
  selection: {
78
78
  useLongPressSelection: false
79
79
  },
80
- cardOptions,
81
80
  hyperlinkOptions: {
82
81
  editorAppearance: props.appearance,
83
82
  linkPicker: (_props$linking2 = props.linking) === null || _props$linking2 === void 0 ? void 0 : _props$linking2.linkPicker,
@@ -40,7 +40,6 @@ import { annotationPlugin } from '@atlaskit/editor-plugin-annotation';
40
40
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
41
41
  import { collabEditPlugin } from '@atlaskit/editor-plugin-collab-edit';
42
42
  import { avatarGroupPlugin } from '@atlaskit/editor-plugin-avatar-group';
43
- import { jiraIssuePlugin } from '../plugins';
44
43
  import { extensionPlugin } from '@atlaskit/editor-plugin-extension';
45
44
  import { beforePrimaryToolbarPlugin } from '@atlaskit/editor-plugin-before-primary-toolbar';
46
45
  import { feedbackDialogPlugin } from '@atlaskit/editor-plugin-feedback-dialog';
@@ -259,11 +258,6 @@ export default function createUniversalPreset(appearance, props, featureFlags, p
259
258
  return builder.add([plugin, props.maxContentSize]);
260
259
  }
261
260
  return builder;
262
- }).maybeAdd(jiraIssuePlugin, (plugin, builder) => {
263
- if (!getBooleanFF('platform.editor.deprecate-jira-issue-plugin') && props.allowJiraIssue) {
264
- return builder.add(plugin);
265
- }
266
- return builder;
267
261
  }).maybeAdd(panelPlugin, (plugin, builder) => {
268
262
  if (props.allowPanel) {
269
263
  const allowPanel = typeof props.allowPanel === 'object' ? props.allowPanel : {};
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "191.1.4";
2
+ export const version = "191.3.0";
@@ -80,7 +80,6 @@ export function getDefaultPresetOptionsFromEditorProps(props, createAnalyticsEve
80
80
  selection: {
81
81
  useLongPressSelection: false
82
82
  },
83
- cardOptions: cardOptions,
84
83
  hyperlinkOptions: {
85
84
  editorAppearance: props.appearance,
86
85
  linkPicker: (_props$linking2 = props.linking) === null || _props$linking2 === void 0 ? void 0 : _props$linking2.linkPicker,
@@ -44,7 +44,6 @@ import { annotationPlugin } from '@atlaskit/editor-plugin-annotation';
44
44
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
45
45
  import { collabEditPlugin } from '@atlaskit/editor-plugin-collab-edit';
46
46
  import { avatarGroupPlugin } from '@atlaskit/editor-plugin-avatar-group';
47
- import { jiraIssuePlugin } from '../plugins';
48
47
  import { extensionPlugin } from '@atlaskit/editor-plugin-extension';
49
48
  import { beforePrimaryToolbarPlugin } from '@atlaskit/editor-plugin-before-primary-toolbar';
50
49
  import { feedbackDialogPlugin } from '@atlaskit/editor-plugin-feedback-dialog';
@@ -257,11 +256,6 @@ export default function createUniversalPreset(appearance, props, featureFlags, p
257
256
  return builder.add([plugin, props.maxContentSize]);
258
257
  }
259
258
  return builder;
260
- }).maybeAdd(jiraIssuePlugin, function (plugin, builder) {
261
- if (!getBooleanFF('platform.editor.deprecate-jira-issue-plugin') && props.allowJiraIssue) {
262
- return builder.add(plugin);
263
- }
264
- return builder;
265
259
  }).maybeAdd(panelPlugin, function (plugin, builder) {
266
260
  if (props.allowPanel) {
267
261
  var allowPanel = _typeof(props.allowPanel) === 'object' ? props.allowPanel : {};
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "191.1.4";
2
+ export var version = "191.3.0";
@@ -9,7 +9,6 @@ import type { AnnotationProviders } from '@atlaskit/editor-plugin-annotation';
9
9
  import type { TextFormattingOptions, HyperlinkPluginOptions, QuickInsertPluginOptions } from '@atlaskit/editor-common/types';
10
10
  import type { CodeBlockOptions } from '@atlaskit/editor-plugin-code-block';
11
11
  import type { SelectionPluginOptions } from '@atlaskit/editor-common/selection';
12
- import type { CardOptions } from '@atlaskit/editor-common/card';
13
12
  import type { TypeAheadPluginOptions } from '@atlaskit/editor-plugin-type-ahead';
14
13
  import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
15
14
  export type DefaultPresetPluginOptions = {
@@ -23,7 +22,6 @@ export type DefaultPresetPluginOptions = {
23
22
  quickInsert?: QuickInsertPluginOptions;
24
23
  codeBlock?: CodeBlockOptions;
25
24
  selection?: SelectionPluginOptions;
26
- cardOptions?: CardOptions;
27
25
  hyperlinkOptions?: HyperlinkPluginOptions;
28
26
  createAnalyticsEvent?: CreateUIAnalyticsEvent;
29
27
  typeAhead?: TypeAheadPluginOptions;
@@ -9,7 +9,6 @@ import type { AnnotationProviders } from '@atlaskit/editor-plugin-annotation';
9
9
  import type { TextFormattingOptions, HyperlinkPluginOptions, QuickInsertPluginOptions } from '@atlaskit/editor-common/types';
10
10
  import type { CodeBlockOptions } from '@atlaskit/editor-plugin-code-block';
11
11
  import type { SelectionPluginOptions } from '@atlaskit/editor-common/selection';
12
- import type { CardOptions } from '@atlaskit/editor-common/card';
13
12
  import type { TypeAheadPluginOptions } from '@atlaskit/editor-plugin-type-ahead';
14
13
  import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
15
14
  export type DefaultPresetPluginOptions = {
@@ -23,7 +22,6 @@ export type DefaultPresetPluginOptions = {
23
22
  quickInsert?: QuickInsertPluginOptions;
24
23
  codeBlock?: CodeBlockOptions;
25
24
  selection?: SelectionPluginOptions;
26
- cardOptions?: CardOptions;
27
25
  hyperlinkOptions?: HyperlinkPluginOptions;
28
26
  createAnalyticsEvent?: CreateUIAnalyticsEvent;
29
27
  typeAhead?: TypeAheadPluginOptions;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "191.1.4",
3
+ "version": "191.3.0",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -46,7 +46,7 @@
46
46
  "@atlaskit/analytics-next": "^9.1.0",
47
47
  "@atlaskit/analytics-next-stable-react-context": "1.0.1",
48
48
  "@atlaskit/button": "^17.2.0",
49
- "@atlaskit/editor-common": "^76.39.0",
49
+ "@atlaskit/editor-common": "^76.40.0",
50
50
  "@atlaskit/editor-json-transformer": "^8.10.0",
51
51
  "@atlaskit/editor-plugin-alignment": "^0.1.0",
52
52
  "@atlaskit/editor-plugin-analytics": "^0.4.0",
@@ -123,7 +123,6 @@
123
123
  "@atlaskit/editor-shared-styles": "^2.9.0",
124
124
  "@atlaskit/emoji": "^67.6.0",
125
125
  "@atlaskit/icon": "^22.0.0",
126
- "@atlaskit/logo": "^13.15.0",
127
126
  "@atlaskit/media-card": "^77.7.0",
128
127
  "@atlaskit/mention": "^22.1.0",
129
128
  "@atlaskit/platform-feature-flags": "^0.2.0",
@@ -171,6 +170,7 @@
171
170
  "@atlaskit/link-analytics": "^8.3.0",
172
171
  "@atlaskit/link-provider": "^1.6.0",
173
172
  "@atlaskit/link-test-helpers": "^6.2.0",
173
+ "@atlaskit/logo": "^13.15.0",
174
174
  "@atlaskit/media-core": "^34.1.0",
175
175
  "@atlaskit/media-integration-test-helpers": "^3.0.0",
176
176
  "@atlaskit/media-test-helpers": "^33.0.0",
@@ -358,9 +358,6 @@
358
358
  "type": "boolean",
359
359
  "referenceOnly": "true"
360
360
  },
361
- "platform.editor.deprecate-jira-issue-plugin": {
362
- "type": "boolean"
363
- },
364
361
  "platform.editor.ordered-list-inserting-nodes_bh0vo": {
365
362
  "type": "boolean",
366
363
  "referenceOnly": "true"
@@ -1,13 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- Object.defineProperty(exports, "jiraIssuePlugin", {
8
- enumerable: true,
9
- get: function get() {
10
- return _jiraIssue.default;
11
- }
12
- });
13
- var _jiraIssue = _interopRequireDefault(require("./jira-issue"));
@@ -1,43 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.pluginKey = exports.default = void 0;
8
- var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
9
- var _state = require("@atlaskit/editor-prosemirror/state");
10
- var _adfSchema = require("@atlaskit/adf-schema");
11
- var _reactNodeView = _interopRequireDefault(require("@atlaskit/editor-common/react-node-view"));
12
- var _jiraIssue = _interopRequireDefault(require("./nodeviews/jira-issue"));
13
- var pluginKey = exports.pluginKey = new _state.PluginKey('jiraIssuePlugin');
14
- var createPlugin = function createPlugin(_ref) {
15
- var portalProviderAPI = _ref.portalProviderAPI,
16
- eventDispatcher = _ref.eventDispatcher;
17
- return new _safePlugin.SafePlugin({
18
- key: pluginKey,
19
- props: {
20
- nodeViews: {
21
- confluenceJiraIssue: _reactNodeView.default.fromComponent(_jiraIssue.default, portalProviderAPI, eventDispatcher)
22
- }
23
- }
24
- });
25
- };
26
- var jiraIssuePlugin = function jiraIssuePlugin() {
27
- return {
28
- name: 'confluenceJiraIssue',
29
- nodes: function nodes() {
30
- return [{
31
- name: 'confluenceJiraIssue',
32
- node: _adfSchema.confluenceJiraIssue
33
- }];
34
- },
35
- pmPlugins: function pmPlugins() {
36
- return [{
37
- name: 'jiraIssue',
38
- plugin: createPlugin
39
- }];
40
- }
41
- };
42
- };
43
- var _default = exports.default = jiraIssuePlugin;
@@ -1,31 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = JIRAIssueNode;
8
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
- var _react = require("@emotion/react");
10
- var _jiraIcon = require("@atlaskit/logo/jira-icon");
11
- var _constants = require("@atlaskit/theme/constants");
12
- var _colors = require("@atlaskit/theme/colors");
13
- var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
14
- var _templateObject, _templateObject2, _templateObject3;
15
- /** @jsx jsx */
16
- var wrapperNode = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n background: ", ";\n border: 1px solid ", ";\n border-radius: ", "px;\n box-sizing: border-box;\n cursor: default;\n display: inline-flex;\n font-size: ", ";\n margin: 0 ", ";\n min-height: 24px;\n padding: 0 ", ";\n user-select: none;\n vertical-align: middle;\n white-space: nowrap;\n\n .ProseMirror-selectednode & {\n background: ", ";\n outline: none;\n }\n"])), "var(--ds-background-neutral, ".concat(_colors.N30, ")"), "var(--ds-border, ".concat(_colors.N50, ")"), (0, _constants.borderRadius)(), (0, _editorSharedStyles.relativeFontSizeToBase16)(13), "var(--ds-space-025, 2px)", "var(--ds-space-050, 4px)", "var(--ds-background-selected, ".concat(_colors.N50, ")"));
17
- var jiraChildNode = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-block;\n color: ", ";\n line-height: 24px;\n vertical-align: top;\n\n &::before {\n color: ", ";\n content: 'JIRA | ';\n }\n"])), "var(--ds-text-subtlest, #707070)", "var(--ds-text, black)");
18
- var svgChildNode = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-block;\n height: 24px;\n vertical-align: top;\n width: 24px;\n\n & > div {\n height: 24px;\n width: 24px;\n }\n"])));
19
- function JIRAIssueNode(props) {
20
- var issueKey = props.node.attrs.issueKey;
21
- return (0, _react.jsx)("span", {
22
- css: wrapperNode,
23
- "data-testid": "jira-issue-node"
24
- }, (0, _react.jsx)("span", {
25
- css: svgChildNode
26
- }, (0, _react.jsx)(_jiraIcon.JiraIcon, {
27
- size: "small"
28
- })), (0, _react.jsx)("span", {
29
- css: jiraChildNode
30
- }, issueKey));
31
- }
@@ -1,8 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _legacyRankPlugins = require("@atlaskit/editor-common/legacy-rank-plugins");
8
- var _default = exports.default = _legacyRankPlugins.rankEditorPlugins;
@@ -1 +0,0 @@
1
- export { default as jiraIssuePlugin } from './jira-issue';
@@ -1,35 +0,0 @@
1
- import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- import { PluginKey } from '@atlaskit/editor-prosemirror/state';
3
- import { confluenceJiraIssue } from '@atlaskit/adf-schema';
4
- import ReactNodeView from '@atlaskit/editor-common/react-node-view';
5
- import ReactJIRAIssueNode from './nodeviews/jira-issue';
6
- export const pluginKey = new PluginKey('jiraIssuePlugin');
7
- const createPlugin = ({
8
- portalProviderAPI,
9
- eventDispatcher
10
- }) => {
11
- return new SafePlugin({
12
- key: pluginKey,
13
- props: {
14
- nodeViews: {
15
- confluenceJiraIssue: ReactNodeView.fromComponent(ReactJIRAIssueNode, portalProviderAPI, eventDispatcher)
16
- }
17
- }
18
- });
19
- };
20
- const jiraIssuePlugin = () => ({
21
- name: 'confluenceJiraIssue',
22
- nodes() {
23
- return [{
24
- name: 'confluenceJiraIssue',
25
- node: confluenceJiraIssue
26
- }];
27
- },
28
- pmPlugins() {
29
- return [{
30
- name: 'jiraIssue',
31
- plugin: createPlugin
32
- }];
33
- }
34
- });
35
- export default jiraIssuePlugin;
@@ -1,68 +0,0 @@
1
- /** @jsx jsx */
2
- import { css, jsx } from '@emotion/react';
3
- import { JiraIcon } from '@atlaskit/logo/jira-icon';
4
- import { borderRadius } from '@atlaskit/theme/constants';
5
- import { N30, N50 } from '@atlaskit/theme/colors';
6
- import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
7
- const wrapperNode = css`
8
- align-items: center;
9
- background: ${`var(--ds-background-neutral, ${N30})`};
10
- border: 1px solid ${`var(--ds-border, ${N50})`};
11
- border-radius: ${borderRadius()}px;
12
- box-sizing: border-box;
13
- cursor: default;
14
- display: inline-flex;
15
- font-size: ${relativeFontSizeToBase16(13)};
16
- margin: 0 ${"var(--ds-space-025, 2px)"};
17
- min-height: 24px;
18
- padding: 0 ${"var(--ds-space-050, 4px)"};
19
- user-select: none;
20
- vertical-align: middle;
21
- white-space: nowrap;
22
-
23
- .ProseMirror-selectednode & {
24
- background: ${`var(--ds-background-selected, ${N50})`};
25
- outline: none;
26
- }
27
- `;
28
- const jiraChildNode = css`
29
- display: inline-block;
30
- color: ${"var(--ds-text-subtlest, #707070)"};
31
- line-height: 24px;
32
- vertical-align: top;
33
-
34
- &::before {
35
- color: ${"var(--ds-text, black)"};
36
- content: 'JIRA | ';
37
- }
38
- `;
39
- const svgChildNode = css`
40
- display: inline-block;
41
- height: 24px;
42
- vertical-align: top;
43
- width: 24px;
44
-
45
- & > div {
46
- height: 24px;
47
- width: 24px;
48
- }
49
- `;
50
- export default function JIRAIssueNode(props) {
51
- const {
52
- node: {
53
- attrs: {
54
- issueKey
55
- }
56
- }
57
- } = props;
58
- return jsx("span", {
59
- css: wrapperNode,
60
- "data-testid": "jira-issue-node"
61
- }, jsx("span", {
62
- css: svgChildNode
63
- }, jsx(JiraIcon, {
64
- size: "small"
65
- })), jsx("span", {
66
- css: jiraChildNode
67
- }, issueKey));
68
- }
@@ -1,2 +0,0 @@
1
- import { rankEditorPlugins } from '@atlaskit/editor-common/legacy-rank-plugins';
2
- export default rankEditorPlugins;
@@ -1 +0,0 @@
1
- export { default as jiraIssuePlugin } from './jira-issue';
@@ -1,36 +0,0 @@
1
- import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- import { PluginKey } from '@atlaskit/editor-prosemirror/state';
3
- import { confluenceJiraIssue } from '@atlaskit/adf-schema';
4
- import ReactNodeView from '@atlaskit/editor-common/react-node-view';
5
- import ReactJIRAIssueNode from './nodeviews/jira-issue';
6
- export var pluginKey = new PluginKey('jiraIssuePlugin');
7
- var createPlugin = function createPlugin(_ref) {
8
- var portalProviderAPI = _ref.portalProviderAPI,
9
- eventDispatcher = _ref.eventDispatcher;
10
- return new SafePlugin({
11
- key: pluginKey,
12
- props: {
13
- nodeViews: {
14
- confluenceJiraIssue: ReactNodeView.fromComponent(ReactJIRAIssueNode, portalProviderAPI, eventDispatcher)
15
- }
16
- }
17
- });
18
- };
19
- var jiraIssuePlugin = function jiraIssuePlugin() {
20
- return {
21
- name: 'confluenceJiraIssue',
22
- nodes: function nodes() {
23
- return [{
24
- name: 'confluenceJiraIssue',
25
- node: confluenceJiraIssue
26
- }];
27
- },
28
- pmPlugins: function pmPlugins() {
29
- return [{
30
- name: 'jiraIssue',
31
- plugin: createPlugin
32
- }];
33
- }
34
- };
35
- };
36
- export default jiraIssuePlugin;
@@ -1,24 +0,0 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject, _templateObject2, _templateObject3;
3
- /** @jsx jsx */
4
- import { css, jsx } from '@emotion/react';
5
- import { JiraIcon } from '@atlaskit/logo/jira-icon';
6
- import { borderRadius } from '@atlaskit/theme/constants';
7
- import { N30, N50 } from '@atlaskit/theme/colors';
8
- import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
9
- var wrapperNode = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n align-items: center;\n background: ", ";\n border: 1px solid ", ";\n border-radius: ", "px;\n box-sizing: border-box;\n cursor: default;\n display: inline-flex;\n font-size: ", ";\n margin: 0 ", ";\n min-height: 24px;\n padding: 0 ", ";\n user-select: none;\n vertical-align: middle;\n white-space: nowrap;\n\n .ProseMirror-selectednode & {\n background: ", ";\n outline: none;\n }\n"])), "var(--ds-background-neutral, ".concat(N30, ")"), "var(--ds-border, ".concat(N50, ")"), borderRadius(), relativeFontSizeToBase16(13), "var(--ds-space-025, 2px)", "var(--ds-space-050, 4px)", "var(--ds-background-selected, ".concat(N50, ")"));
10
- var jiraChildNode = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: inline-block;\n color: ", ";\n line-height: 24px;\n vertical-align: top;\n\n &::before {\n color: ", ";\n content: 'JIRA | ';\n }\n"])), "var(--ds-text-subtlest, #707070)", "var(--ds-text, black)");
11
- var svgChildNode = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: inline-block;\n height: 24px;\n vertical-align: top;\n width: 24px;\n\n & > div {\n height: 24px;\n width: 24px;\n }\n"])));
12
- export default function JIRAIssueNode(props) {
13
- var issueKey = props.node.attrs.issueKey;
14
- return jsx("span", {
15
- css: wrapperNode,
16
- "data-testid": "jira-issue-node"
17
- }, jsx("span", {
18
- css: svgChildNode
19
- }, jsx(JiraIcon, {
20
- size: "small"
21
- })), jsx("span", {
22
- css: jiraChildNode
23
- }, issueKey));
24
- }
@@ -1,2 +0,0 @@
1
- import { rankEditorPlugins } from '@atlaskit/editor-common/legacy-rank-plugins';
2
- export default rankEditorPlugins;
@@ -1 +0,0 @@
1
- export { default as jiraIssuePlugin } from './jira-issue';
@@ -1,5 +0,0 @@
1
- import { PluginKey } from '@atlaskit/editor-prosemirror/state';
2
- import type { NextEditorPlugin } from '../../types';
3
- export declare const pluginKey: PluginKey<any>;
4
- declare const jiraIssuePlugin: NextEditorPlugin<'confluenceJiraIssue'>;
5
- export default jiraIssuePlugin;
@@ -1,7 +0,0 @@
1
- /** @jsx jsx */
2
- import { jsx } from '@emotion/react';
3
- import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
4
- export interface Props {
5
- node: PMNode;
6
- }
7
- export default function JIRAIssueNode(props: Props): jsx.JSX.Element;
@@ -1,2 +0,0 @@
1
- import { rankEditorPlugins } from '@atlaskit/editor-common/legacy-rank-plugins';
2
- export default rankEditorPlugins;
@@ -1 +0,0 @@
1
- export { default as jiraIssuePlugin } from './jira-issue';
@@ -1,5 +0,0 @@
1
- import { PluginKey } from '@atlaskit/editor-prosemirror/state';
2
- import type { NextEditorPlugin } from '../../types';
3
- export declare const pluginKey: PluginKey<any>;
4
- declare const jiraIssuePlugin: NextEditorPlugin<'confluenceJiraIssue'>;
5
- export default jiraIssuePlugin;
@@ -1,7 +0,0 @@
1
- /** @jsx jsx */
2
- import { jsx } from '@emotion/react';
3
- import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
4
- export interface Props {
5
- node: PMNode;
6
- }
7
- export default function JIRAIssueNode(props: Props): jsx.JSX.Element;
@@ -1,2 +0,0 @@
1
- import { rankEditorPlugins } from '@atlaskit/editor-common/legacy-rank-plugins';
2
- export default rankEditorPlugins;