@ckeditor/ckeditor5-link
Advanced tools
Comparing version 25.0.0 to 26.0.0
{ | ||
"name": "@ckeditor/ckeditor5-link", | ||
"version": "25.0.0", | ||
"version": "26.0.0", | ||
"description": "Link feature for CKEditor 5.", | ||
@@ -12,21 +12,26 @@ "keywords": [ | ||
], | ||
"main": "src/index.js", | ||
"dependencies": { | ||
"@ckeditor/ckeditor5-clipboard": "^25.0.0", | ||
"@ckeditor/ckeditor5-core": "^25.0.0", | ||
"@ckeditor/ckeditor5-engine": "^25.0.0", | ||
"@ckeditor/ckeditor5-image": "^25.0.0", | ||
"@ckeditor/ckeditor5-typing": "^25.0.0", | ||
"@ckeditor/ckeditor5-ui": "^25.0.0", | ||
"@ckeditor/ckeditor5-utils": "^25.0.0", | ||
"@ckeditor/ckeditor5-ui": "^26.0.0", | ||
"ckeditor5": "^26.0.0", | ||
"lodash-es": "^4.17.15" | ||
}, | ||
"devDependencies": { | ||
"@ckeditor/ckeditor5-basic-styles": "^25.0.0", | ||
"@ckeditor/ckeditor5-block-quote": "^25.0.0", | ||
"@ckeditor/ckeditor5-code-block": "^25.0.0", | ||
"@ckeditor/ckeditor5-editor-classic": "^25.0.0", | ||
"@ckeditor/ckeditor5-enter": "^25.0.0", | ||
"@ckeditor/ckeditor5-paragraph": "^25.0.0", | ||
"@ckeditor/ckeditor5-theme-lark": "^25.0.0", | ||
"@ckeditor/ckeditor5-undo": "^25.0.0" | ||
"@ckeditor/ckeditor5-basic-styles": "^26.0.0", | ||
"@ckeditor/ckeditor5-block-quote": "^26.0.0", | ||
"@ckeditor/ckeditor5-clipboard": "^26.0.0", | ||
"@ckeditor/ckeditor5-code-block": "^26.0.0", | ||
"@ckeditor/ckeditor5-core": "^26.0.0", | ||
"@ckeditor/ckeditor5-dev-utils": "^24.0.0", | ||
"@ckeditor/ckeditor5-editor-classic": "^26.0.0", | ||
"@ckeditor/ckeditor5-engine": "^26.0.0", | ||
"@ckeditor/ckeditor5-enter": "^26.0.0", | ||
"@ckeditor/ckeditor5-image": "^26.0.0", | ||
"@ckeditor/ckeditor5-paragraph": "^26.0.0", | ||
"@ckeditor/ckeditor5-theme-lark": "^26.0.0", | ||
"@ckeditor/ckeditor5-typing": "^26.0.0", | ||
"@ckeditor/ckeditor5-undo": "^26.0.0", | ||
"@ckeditor/ckeditor5-utils": "^26.0.0", | ||
"webpack": "^4.43.0", | ||
"webpack-cli": "^3.3.11" | ||
}, | ||
@@ -49,4 +54,8 @@ "engines": { | ||
"src", | ||
"theme" | ||
] | ||
"theme", | ||
"build" | ||
], | ||
"scripts": { | ||
"dll:build": "webpack" | ||
} | ||
} |
@@ -10,5 +10,5 @@ /** | ||
import Plugin from '@ckeditor/ckeditor5-core/src/plugin'; | ||
import TextWatcher from '@ckeditor/ckeditor5-typing/src/textwatcher'; | ||
import getLastTextLine from '@ckeditor/ckeditor5-typing/src/utils/getlasttextline'; | ||
import { Plugin } from 'ckeditor5/src/core'; | ||
import { TextWatcher, getLastTextLine } from 'ckeditor5/src/typing'; | ||
import { addLinkProtocolIfApplicable } from './utils'; | ||
@@ -31,6 +31,19 @@ | ||
'(?:' + | ||
// Host & domain names. | ||
'(?![-_])(?:[-\\w\\u00a1-\\uffff]{0,63}[^-_]\\.)+' + | ||
// TLD identifier name. | ||
'(?:[a-z\\u00a1-\\uffff]{2,})' + | ||
// IP address dotted notation octets | ||
// excludes loopback network 0.0.0.0 | ||
// excludes reserved space >= 224.0.0.0 | ||
// excludes network & broadcast addresses | ||
// (first & last IP address of each class) | ||
'(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])' + | ||
'(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}' + | ||
'(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))' + | ||
'|' + | ||
'(' + | ||
// Do not allow `www.foo` - see https://github.com/ckeditor/ckeditor5/issues/8050. | ||
'((?!www\\.)|(www\\.))' + | ||
// Host & domain names. | ||
'(?![-_])(?:[-\\w\\u00a1-\\uffff]{0,63}[^-_]\\.)+' + | ||
// TLD identifier name. | ||
'(?:[a-z\\u00a1-\\uffff]{2,})' + | ||
')' + | ||
')' + | ||
@@ -48,5 +61,5 @@ // port number (optional) | ||
'((?![-_])(?:[-\\w\\u00a1-\\uffff]{0,63}[^-_]\\.))+' + | ||
// TLD identifier name. | ||
'(?:[a-z\\u00a1-\\uffff]{2,})' + | ||
')' + | ||
// TLD identifier name. | ||
'(?:[a-z\\u00a1-\\uffff]{2,})' + | ||
')' + | ||
')$', 'i' ); | ||
@@ -53,0 +66,0 @@ |
@@ -10,3 +10,3 @@ /** | ||
import Plugin from '@ckeditor/ckeditor5-core/src/plugin'; | ||
import { Plugin } from 'ckeditor5/src/core'; | ||
import LinkEditing from './linkediting'; | ||
@@ -13,0 +13,0 @@ import LinkUI from './linkui'; |
@@ -10,7 +10,6 @@ /** | ||
import Command from '@ckeditor/ckeditor5-core/src/command'; | ||
import findAttributeRange from '@ckeditor/ckeditor5-typing/src/utils/findattributerange'; | ||
import toMap from '@ckeditor/ckeditor5-utils/src/tomap'; | ||
import Collection from '@ckeditor/ckeditor5-utils/src/collection'; | ||
import first from '@ckeditor/ckeditor5-utils/src/first'; | ||
import { Command } from 'ckeditor5/src/core'; | ||
import { findAttributeRange } from 'ckeditor5/src/typing'; | ||
import { Collection, toMap, first } from 'ckeditor5/src/utils'; | ||
import AutomaticDecorators from './utils/automaticdecorators'; | ||
@@ -17,0 +16,0 @@ import { isImageAllowed } from './utils'; |
@@ -10,13 +10,11 @@ /** | ||
import Plugin from '@ckeditor/ckeditor5-core/src/plugin'; | ||
import MouseObserver from '@ckeditor/ckeditor5-engine/src/view/observer/mouseobserver'; | ||
import TwoStepCaretMovement from '@ckeditor/ckeditor5-typing/src/twostepcaretmovement'; | ||
import inlineHighlight from '@ckeditor/ckeditor5-typing/src/utils/inlinehighlight'; | ||
import Input from '@ckeditor/ckeditor5-typing/src/input'; | ||
import Clipboard from '@ckeditor/ckeditor5-clipboard/src/clipboard'; | ||
import { Plugin } from 'ckeditor5/src/core'; | ||
import { MouseObserver } from 'ckeditor5/src/engine'; | ||
import { Input, TwoStepCaretMovement, inlineHighlight, findAttributeRange } from 'ckeditor5/src/typing'; | ||
import { Clipboard } from 'ckeditor5/src/clipboard'; | ||
import { keyCodes } from 'ckeditor5/src/utils'; | ||
import LinkCommand from './linkcommand'; | ||
import UnlinkCommand from './unlinkcommand'; | ||
import ManualDecorator from './utils/manualdecorator'; | ||
import findAttributeRange from '@ckeditor/ckeditor5-typing/src/utils/findattributerange'; | ||
import { keyCodes } from '@ckeditor/ckeditor5-utils/src/keyboard'; | ||
import { createLinkElement, ensureSafeUrl, getLocalizedDecorators, normalizeDecorators } from './utils'; | ||
@@ -23,0 +21,0 @@ |
@@ -10,3 +10,3 @@ /** | ||
import Plugin from '@ckeditor/ckeditor5-core/src/plugin'; | ||
import { Plugin } from 'ckeditor5/src/core'; | ||
import LinkImageEditing from './linkimageediting'; | ||
@@ -13,0 +13,0 @@ import LinkImageUI from './linkimageui'; |
@@ -10,6 +10,6 @@ /** | ||
import Plugin from '@ckeditor/ckeditor5-core/src/plugin'; | ||
import ImageEditing from '@ckeditor/ckeditor5-image/src/image/imageediting'; | ||
import Matcher from '@ckeditor/ckeditor5-engine/src/view/matcher'; | ||
import toMap from '@ckeditor/ckeditor5-utils/src/tomap'; | ||
import { Plugin } from 'ckeditor5/src/core'; | ||
import { Matcher } from 'ckeditor5/src/engine'; | ||
import { toMap } from 'ckeditor5/src/utils'; | ||
import LinkEditing from './linkediting'; | ||
@@ -32,3 +32,3 @@ | ||
static get requires() { | ||
return [ ImageEditing, LinkEditing ]; | ||
return [ 'ImageEditing', LinkEditing ]; | ||
} | ||
@@ -35,0 +35,0 @@ |
@@ -10,8 +10,8 @@ /** | ||
import ButtonView from '@ckeditor/ckeditor5-ui/src/button/buttonview'; | ||
import Plugin from '@ckeditor/ckeditor5-core/src/plugin'; | ||
import Image from '@ckeditor/ckeditor5-image/src/image'; | ||
import { ButtonView } from 'ckeditor5/src/ui'; | ||
import { Plugin } from 'ckeditor5/src/core'; | ||
import LinkUI from './linkui'; | ||
import LinkEditing from './linkediting'; | ||
import { isImageWidget } from '@ckeditor/ckeditor5-image/src/image/utils'; | ||
import { LINK_KEYSTROKE } from './utils'; | ||
@@ -34,3 +34,3 @@ | ||
static get requires() { | ||
return [ Image, LinkEditing, LinkUI ]; | ||
return [ LinkEditing, LinkUI, 'Image' ]; | ||
} | ||
@@ -53,3 +53,3 @@ | ||
this.listenTo( viewDocument, 'click', ( evt, data ) => { | ||
const hasLink = isImageLinked( viewDocument.selection.getSelectedElement() ); | ||
const hasLink = isImageLinked( viewDocument.selection.getSelectedElement(), editor.plugins.get( 'Image' ) ); | ||
@@ -97,3 +97,3 @@ if ( hasLink ) { | ||
this.listenTo( button, 'execute', () => { | ||
const hasLink = isImageLinked( editor.editing.view.document.selection.getSelectedElement() ); | ||
const hasLink = isImageLinked( editor.editing.view.document.selection.getSelectedElement(), editor.plugins.get( 'Image' ) ); | ||
@@ -116,4 +116,4 @@ if ( hasLink ) { | ||
// @returns {Boolean} | ||
function isImageLinked( element ) { | ||
const isImage = element && isImageWidget( element ); | ||
function isImageLinked( element, image ) { | ||
const isImage = element && image.isImageWidget( element ); | ||
@@ -120,0 +120,0 @@ if ( !isImage ) { |
@@ -10,13 +10,9 @@ /** | ||
import Plugin from '@ckeditor/ckeditor5-core/src/plugin'; | ||
import ClickObserver from '@ckeditor/ckeditor5-engine/src/view/observer/clickobserver'; | ||
import { addLinkProtocolIfApplicable, isLinkElement, LINK_KEYSTROKE } from './utils'; | ||
import { Plugin } from 'ckeditor5/src/core'; | ||
import { ClickObserver } from 'ckeditor5/src/engine'; | ||
import { ButtonView, ContextualBalloon, clickOutsideHandler } from 'ckeditor5/src/ui'; | ||
import ContextualBalloon from '@ckeditor/ckeditor5-ui/src/panel/balloon/contextualballoon'; | ||
import clickOutsideHandler from '@ckeditor/ckeditor5-ui/src/bindings/clickoutsidehandler'; | ||
import ButtonView from '@ckeditor/ckeditor5-ui/src/button/buttonview'; | ||
import LinkFormView from './ui/linkformview'; | ||
import LinkActionsView from './ui/linkactionsview'; | ||
import { addLinkProtocolIfApplicable, isLinkElement, LINK_KEYSTROKE } from './utils'; | ||
@@ -23,0 +19,0 @@ import linkIcon from '../theme/icons/link.svg'; |
@@ -10,18 +10,15 @@ /** | ||
import View from '@ckeditor/ckeditor5-ui/src/view'; | ||
import ViewCollection from '@ckeditor/ckeditor5-ui/src/viewcollection'; | ||
import { ButtonView, View, ViewCollection, FocusCycler } from 'ckeditor5/src/ui'; | ||
import { FocusTracker, KeystrokeHandler } from 'ckeditor5/src/utils'; | ||
import { icons } from 'ckeditor5/src/core'; | ||
import ButtonView from '@ckeditor/ckeditor5-ui/src/button/buttonview'; | ||
import FocusTracker from '@ckeditor/ckeditor5-utils/src/focustracker'; | ||
import FocusCycler from '@ckeditor/ckeditor5-ui/src/focuscycler'; | ||
import KeystrokeHandler from '@ckeditor/ckeditor5-utils/src/keystrokehandler'; | ||
import { ensureSafeUrl } from '../utils'; | ||
import unlinkIcon from '../../theme/icons/unlink.svg'; | ||
import pencilIcon from '@ckeditor/ckeditor5-core/theme/icons/pencil.svg'; | ||
// See: #8833. | ||
// eslint-disable-next-line ckeditor5-rules/ckeditor-imports | ||
import '@ckeditor/ckeditor5-ui/theme/components/responsive-form/responsiveform.css'; | ||
import '../../theme/linkactions.css'; | ||
import '@ckeditor/ckeditor5-ui/theme/components/responsive-form/responsiveform.css'; | ||
import unlinkIcon from '../../theme/icons/unlink.svg'; | ||
/** | ||
@@ -77,3 +74,3 @@ * The link actions view class. This view displays the link preview, allows | ||
*/ | ||
this.editButtonView = this._createButton( t( 'Edit link' ), pencilIcon, 'edit' ); | ||
this.editButtonView = this._createButton( t( 'Edit link' ), icons.pencil, 'edit' ); | ||
@@ -80,0 +77,0 @@ /** |
@@ -10,21 +10,20 @@ /** | ||
import View from '@ckeditor/ckeditor5-ui/src/view'; | ||
import ViewCollection from '@ckeditor/ckeditor5-ui/src/viewcollection'; | ||
import { | ||
ButtonView, | ||
FocusCycler, | ||
LabeledFieldView, | ||
SwitchButtonView, | ||
View, | ||
ViewCollection, | ||
createLabeledInputText, | ||
injectCssTransitionDisabler, | ||
submitHandler | ||
} from 'ckeditor5/src/ui'; | ||
import { FocusTracker, KeystrokeHandler } from 'ckeditor5/src/utils'; | ||
import { icons } from 'ckeditor5/src/core'; | ||
import ButtonView from '@ckeditor/ckeditor5-ui/src/button/buttonview'; | ||
import SwitchButtonView from '@ckeditor/ckeditor5-ui/src/button/switchbuttonview'; | ||
import LabeledFieldView from '@ckeditor/ckeditor5-ui/src/labeledfield/labeledfieldview'; | ||
import { createLabeledInputText } from '@ckeditor/ckeditor5-ui/src/labeledfield/utils'; | ||
import injectCssTransitionDisabler from '@ckeditor/ckeditor5-ui/src/bindings/injectcsstransitiondisabler'; | ||
import submitHandler from '@ckeditor/ckeditor5-ui/src/bindings/submithandler'; | ||
import FocusTracker from '@ckeditor/ckeditor5-utils/src/focustracker'; | ||
import FocusCycler from '@ckeditor/ckeditor5-ui/src/focuscycler'; | ||
import KeystrokeHandler from '@ckeditor/ckeditor5-utils/src/keystrokehandler'; | ||
import checkIcon from '@ckeditor/ckeditor5-core/theme/icons/check.svg'; | ||
import cancelIcon from '@ckeditor/ckeditor5-core/theme/icons/cancel.svg'; | ||
// See: #8833. | ||
// eslint-disable-next-line ckeditor5-rules/ckeditor-imports | ||
import '@ckeditor/ckeditor5-ui/theme/components/responsive-form/responsiveform.css'; | ||
import '../../theme/linkform.css'; | ||
import '@ckeditor/ckeditor5-ui/theme/components/responsive-form/responsiveform.css'; | ||
@@ -81,3 +80,3 @@ /** | ||
*/ | ||
this.saveButtonView = this._createButton( t( 'Save' ), checkIcon, 'ck-button-save' ); | ||
this.saveButtonView = this._createButton( t( 'Save' ), icons.check, 'ck-button-save' ); | ||
this.saveButtonView.type = 'submit'; | ||
@@ -90,3 +89,3 @@ | ||
*/ | ||
this.cancelButtonView = this._createButton( t( 'Cancel' ), cancelIcon, 'ck-button-cancel', 'cancel' ); | ||
this.cancelButtonView = this._createButton( t( 'Cancel' ), icons.cancel, 'ck-button-cancel', 'cancel' ); | ||
@@ -93,0 +92,0 @@ /** |
@@ -10,5 +10,6 @@ /** | ||
import Command from '@ckeditor/ckeditor5-core/src/command'; | ||
import findAttributeRange from '@ckeditor/ckeditor5-typing/src/utils/findattributerange'; | ||
import first from '@ckeditor/ckeditor5-utils/src/first'; | ||
import { Command } from 'ckeditor5/src/core'; | ||
import { findAttributeRange } from 'ckeditor5/src/typing'; | ||
import { first } from 'ckeditor5/src/utils'; | ||
import { isImageAllowed } from './utils'; | ||
@@ -15,0 +16,0 @@ |
@@ -10,3 +10,3 @@ /** | ||
import toMap from '@ckeditor/ckeditor5-utils/src/tomap'; | ||
import { toMap } from 'ckeditor5/src/utils'; | ||
@@ -13,0 +13,0 @@ /** |
@@ -10,4 +10,3 @@ /** | ||
import ObservableMixin from '@ckeditor/ckeditor5-utils/src/observablemixin'; | ||
import mix from '@ckeditor/ckeditor5-utils/src/mix'; | ||
import { ObservableMixin, mix } from 'ckeditor5/src/utils'; | ||
@@ -14,0 +13,0 @@ /** |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1360557
3
81
3178
9
17
+ Addedckeditor5@^26.0.0
+ Added@ckeditor/ckeditor5-clipboard@26.0.0(transitive)
+ Added@ckeditor/ckeditor5-core@26.0.0(transitive)
+ Added@ckeditor/ckeditor5-engine@26.0.0(transitive)
+ Added@ckeditor/ckeditor5-enter@26.0.0(transitive)
+ Added@ckeditor/ckeditor5-paragraph@26.0.0(transitive)
+ Added@ckeditor/ckeditor5-select-all@26.0.0(transitive)
+ Added@ckeditor/ckeditor5-typing@26.0.0(transitive)
+ Added@ckeditor/ckeditor5-ui@26.0.0(transitive)
+ Added@ckeditor/ckeditor5-undo@26.0.0(transitive)
+ Added@ckeditor/ckeditor5-upload@26.0.0(transitive)
+ Added@ckeditor/ckeditor5-utils@26.0.0(transitive)
+ Added@ckeditor/ckeditor5-widget@26.0.0(transitive)
+ Addedckeditor5@26.0.0(transitive)
- Removed@ckeditor/ckeditor5-core@^25.0.0
- Removed@ckeditor/ckeditor5-engine@^25.0.0
- Removed@ckeditor/ckeditor5-image@^25.0.0
- Removed@ckeditor/ckeditor5-typing@^25.0.0
- Removed@ckeditor/ckeditor5-utils@^25.0.0
- Removed@ckeditor/ckeditor5-clipboard@25.0.0(transitive)
- Removed@ckeditor/ckeditor5-core@25.0.0(transitive)
- Removed@ckeditor/ckeditor5-engine@25.0.0(transitive)
- Removed@ckeditor/ckeditor5-image@25.0.0(transitive)
- Removed@ckeditor/ckeditor5-typing@25.0.0(transitive)
- Removed@ckeditor/ckeditor5-ui@25.0.0(transitive)
- Removed@ckeditor/ckeditor5-undo@25.0.0(transitive)
- Removed@ckeditor/ckeditor5-upload@25.0.0(transitive)
- Removed@ckeditor/ckeditor5-utils@25.0.0(transitive)
- Removed@ckeditor/ckeditor5-widget@25.0.0(transitive)