@atlaskit/editor-plugin-hyperlink 32.0.4 → 32.0.6
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,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-hyperlink
|
|
2
2
|
|
|
3
|
+
## 32.0.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`827a297d8c605`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/827a297d8c605) -
|
|
8
|
+
Delete unreachable source files
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 32.0.5
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 32.0.4
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-hyperlink",
|
|
3
|
-
"version": "32.0.
|
|
3
|
+
"version": "32.0.6",
|
|
4
4
|
"description": "Hyperlink plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -39,13 +39,12 @@
|
|
|
39
39
|
"@atlaskit/icon": "^38.0.0",
|
|
40
40
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
41
41
|
"@atlaskit/prosemirror-input-rules": "^4.1.0",
|
|
42
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
42
|
+
"@atlaskit/tmp-editor-statsig": "^250.0.0",
|
|
43
43
|
"@babel/runtime": "^7.0.0",
|
|
44
|
-
"@emotion/react": "^11.7.1",
|
|
45
44
|
"uuid": "^11.1.1"
|
|
46
45
|
},
|
|
47
46
|
"peerDependencies": {
|
|
48
|
-
"@atlaskit/editor-common": "^134.
|
|
47
|
+
"@atlaskit/editor-common": "^134.4.0",
|
|
49
48
|
"react": "^18.2.0 || ^19.2.0",
|
|
50
49
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
51
50
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
@@ -1,47 +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.PrimaryToolbarComponent = void 0;
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
var _react2 = require("@emotion/react");
|
|
10
|
-
var _reactIntl = require("react-intl");
|
|
11
|
-
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
12
|
-
var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
13
|
-
var _insertBlock = require("@atlaskit/editor-common/messages/insert-block");
|
|
14
|
-
var _ToolbarButton = _interopRequireDefault(require("@atlaskit/editor-common/ui-menu/ToolbarButton"));
|
|
15
|
-
var _link = _interopRequireDefault(require("@atlaskit/icon/core/link"));
|
|
16
|
-
/* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation */
|
|
17
|
-
/**
|
|
18
|
-
* @jsxRuntime classic
|
|
19
|
-
* @jsx jsx
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
23
|
-
|
|
24
|
-
var PrimaryToolbarComponentWithIntl = function PrimaryToolbarComponentWithIntl(_ref) {
|
|
25
|
-
var api = _ref.api,
|
|
26
|
-
intl = _ref.intl;
|
|
27
|
-
var formatMessage = intl.formatMessage;
|
|
28
|
-
var content = formatMessage(_insertBlock.toolbarInsertBlockMessages.link);
|
|
29
|
-
var onClick = (0, _react.useCallback)(function () {
|
|
30
|
-
var _api$core, _api$hyperlink;
|
|
31
|
-
api === null || api === void 0 || (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute(api === null || api === void 0 || (_api$hyperlink = api.hyperlink) === null || _api$hyperlink === void 0 ? void 0 : _api$hyperlink.commands.showLinkToolbar(_enums.INPUT_METHOD.TOOLBAR));
|
|
32
|
-
}, [api]);
|
|
33
|
-
return (0, _react2.jsx)(_ToolbarButton.default, {
|
|
34
|
-
onClick: onClick,
|
|
35
|
-
"aria-haspopup": "dialog",
|
|
36
|
-
"aria-keyshortcuts": (0, _keymaps.getAriaKeyshortcuts)(_keymaps.addLink),
|
|
37
|
-
"aria-label": content,
|
|
38
|
-
testId: content,
|
|
39
|
-
title: content,
|
|
40
|
-
iconBefore: (0, _react2.jsx)(_link.default, {
|
|
41
|
-
label: content,
|
|
42
|
-
color: "currentColor",
|
|
43
|
-
spacing: "spacious"
|
|
44
|
-
})
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
var PrimaryToolbarComponent = exports.PrimaryToolbarComponent = (0, _reactIntl.injectIntl)(PrimaryToolbarComponentWithIntl);
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation */
|
|
2
|
-
/**
|
|
3
|
-
* @jsxRuntime classic
|
|
4
|
-
* @jsx jsx
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { useCallback } from 'react';
|
|
8
|
-
|
|
9
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
|
-
import { jsx } from '@emotion/react';
|
|
11
|
-
import { injectIntl } from 'react-intl';
|
|
12
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
13
|
-
import { addLink, getAriaKeyshortcuts } from '@atlaskit/editor-common/keymaps';
|
|
14
|
-
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages/insert-block';
|
|
15
|
-
import ToolbarButton from '@atlaskit/editor-common/ui-menu/ToolbarButton';
|
|
16
|
-
import LinkIcon from '@atlaskit/icon/core/link';
|
|
17
|
-
const PrimaryToolbarComponentWithIntl = ({
|
|
18
|
-
api,
|
|
19
|
-
// TODO: ED-26959 - Analytics
|
|
20
|
-
// editorAnalyticsAPI,
|
|
21
|
-
intl
|
|
22
|
-
}) => {
|
|
23
|
-
const {
|
|
24
|
-
formatMessage
|
|
25
|
-
} = intl;
|
|
26
|
-
const content = formatMessage(messages.link);
|
|
27
|
-
const onClick = useCallback(() => {
|
|
28
|
-
var _api$core, _api$hyperlink;
|
|
29
|
-
api === null || api === void 0 ? void 0 : (_api$core = api.core) === null || _api$core === void 0 ? void 0 : _api$core.actions.execute(api === null || api === void 0 ? void 0 : (_api$hyperlink = api.hyperlink) === null || _api$hyperlink === void 0 ? void 0 : _api$hyperlink.commands.showLinkToolbar(INPUT_METHOD.TOOLBAR));
|
|
30
|
-
}, [api]);
|
|
31
|
-
return jsx(ToolbarButton, {
|
|
32
|
-
onClick: onClick,
|
|
33
|
-
"aria-haspopup": "dialog",
|
|
34
|
-
"aria-keyshortcuts": getAriaKeyshortcuts(addLink),
|
|
35
|
-
"aria-label": content,
|
|
36
|
-
testId: content,
|
|
37
|
-
title: content,
|
|
38
|
-
iconBefore: jsx(LinkIcon, {
|
|
39
|
-
label: content,
|
|
40
|
-
color: "currentColor",
|
|
41
|
-
spacing: "spacious"
|
|
42
|
-
})
|
|
43
|
-
});
|
|
44
|
-
};
|
|
45
|
-
export const PrimaryToolbarComponent = injectIntl(PrimaryToolbarComponentWithIntl);
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation */
|
|
2
|
-
/**
|
|
3
|
-
* @jsxRuntime classic
|
|
4
|
-
* @jsx jsx
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { useCallback } from 'react';
|
|
8
|
-
|
|
9
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
|
-
import { jsx } from '@emotion/react';
|
|
11
|
-
import { injectIntl } from 'react-intl';
|
|
12
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
13
|
-
import { addLink, getAriaKeyshortcuts } from '@atlaskit/editor-common/keymaps';
|
|
14
|
-
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages/insert-block';
|
|
15
|
-
import ToolbarButton from '@atlaskit/editor-common/ui-menu/ToolbarButton';
|
|
16
|
-
import LinkIcon from '@atlaskit/icon/core/link';
|
|
17
|
-
var PrimaryToolbarComponentWithIntl = function PrimaryToolbarComponentWithIntl(_ref) {
|
|
18
|
-
var api = _ref.api,
|
|
19
|
-
intl = _ref.intl;
|
|
20
|
-
var formatMessage = intl.formatMessage;
|
|
21
|
-
var content = formatMessage(messages.link);
|
|
22
|
-
var onClick = useCallback(function () {
|
|
23
|
-
var _api$core, _api$hyperlink;
|
|
24
|
-
api === null || api === void 0 || (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute(api === null || api === void 0 || (_api$hyperlink = api.hyperlink) === null || _api$hyperlink === void 0 ? void 0 : _api$hyperlink.commands.showLinkToolbar(INPUT_METHOD.TOOLBAR));
|
|
25
|
-
}, [api]);
|
|
26
|
-
return jsx(ToolbarButton, {
|
|
27
|
-
onClick: onClick,
|
|
28
|
-
"aria-haspopup": "dialog",
|
|
29
|
-
"aria-keyshortcuts": getAriaKeyshortcuts(addLink),
|
|
30
|
-
"aria-label": content,
|
|
31
|
-
testId: content,
|
|
32
|
-
title: content,
|
|
33
|
-
iconBefore: jsx(LinkIcon, {
|
|
34
|
-
label: content,
|
|
35
|
-
color: "currentColor",
|
|
36
|
-
spacing: "spacious"
|
|
37
|
-
})
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
export var PrimaryToolbarComponent = injectIntl(PrimaryToolbarComponentWithIntl);
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { type ComponentType, type FC } from 'react';
|
|
6
|
-
import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
|
|
7
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics/api';
|
|
8
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
9
|
-
import type { HyperlinkPlugin } from '../hyperlinkPluginType';
|
|
10
|
-
type PrimaryToolbarComponentProps = {
|
|
11
|
-
api: ExtractInjectionAPI<HyperlinkPlugin> | undefined;
|
|
12
|
-
editorAnalyticsAPI?: EditorAnalyticsAPI;
|
|
13
|
-
} & WrappedComponentProps;
|
|
14
|
-
export declare const PrimaryToolbarComponent: FC<WithIntlProps<PrimaryToolbarComponentProps>> & {
|
|
15
|
-
WrappedComponent: ComponentType<PrimaryToolbarComponentProps>;
|
|
16
|
-
};
|
|
17
|
-
export {};
|