@ckeditor/ckeditor5-link 48.2.0 → 48.3.0-alpha.1

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.
@@ -1,31 +1,31 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
- import { ButtonView, IconView } from '@ckeditor/ckeditor5-ui';
6
- import type { Locale } from '@ckeditor/ckeditor5-utils';
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ import { ButtonView, IconView } from "@ckeditor/ckeditor5-ui";
6
+ import type { Locale } from "@ckeditor/ckeditor5-utils";
7
7
  /**
8
- * Represents a view for a dropdown menu button.
9
- */
8
+ * Represents a view for a dropdown menu button.
9
+ */
10
10
  export declare class LinkButtonView extends ButtonView {
11
- /**
12
- * An icon that displays an arrow to indicate a direction of the menu.
13
- */
14
- readonly arrowView: IconView;
15
- /**
16
- * Creates an instance of the dropdown menu button view.
17
- *
18
- * @param locale The localization services instance.
19
- */
20
- constructor(locale?: Locale);
21
- /**
22
- * @inheritDoc
23
- */
24
- render(): void;
25
- /**
26
- * Creates the arrow view instance.
27
- *
28
- * @private
29
- */
30
- private _createArrowView;
11
+ /**
12
+ * An icon that displays an arrow to indicate a direction of the menu.
13
+ */
14
+ readonly arrowView: IconView;
15
+ /**
16
+ * Creates an instance of the dropdown menu button view.
17
+ *
18
+ * @param locale The localization services instance.
19
+ */
20
+ constructor(locale?: Locale);
21
+ /**
22
+ * @inheritDoc
23
+ */
24
+ override render(): void;
25
+ /**
26
+ * Creates the arrow view instance.
27
+ *
28
+ * @private
29
+ */
30
+ private _createArrowView;
31
31
  }
@@ -1,154 +1,154 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * @module link/ui/linkformview
7
- */
8
- import { ButtonView, LabeledFieldView, View, ViewCollection, type InputTextView } from '@ckeditor/ckeditor5-ui';
9
- import { FocusTracker, KeystrokeHandler, type Locale } from '@ckeditor/ckeditor5-utils';
10
- import '../../theme/linkform.css';
6
+ * @module link/ui/linkformview
7
+ */
8
+ import { ButtonView, LabeledFieldView, View, ViewCollection, type InputTextView } from "@ckeditor/ckeditor5-ui";
9
+ import { FocusTracker, KeystrokeHandler, type Locale } from "@ckeditor/ckeditor5-utils";
10
+ import "../../theme/linkform.css";
11
11
  /**
12
- * The link form view.
13
- */
12
+ * The link form view.
13
+ */
14
14
  export declare class LinkFormView extends View {
15
- /**
16
- * Tracks information about DOM focus in the form.
17
- */
18
- readonly focusTracker: FocusTracker;
19
- /**
20
- * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
21
- */
22
- readonly keystrokes: KeystrokeHandler;
23
- /**
24
- * The Back button view displayed in the header.
25
- */
26
- backButtonView: ButtonView;
27
- /**
28
- * The Save button view.
29
- */
30
- saveButtonView: ButtonView;
31
- /**
32
- * The "Displayed text" input view.
33
- */
34
- displayedTextInputView: LabeledFieldView<InputTextView>;
35
- /**
36
- * The URL input view.
37
- */
38
- urlInputView: LabeledFieldView<InputTextView>;
39
- /**
40
- * A collection of child views.
41
- */
42
- readonly children: ViewCollection;
43
- /**
44
- * A collection of child views in the providers list.
45
- */
46
- readonly providersListChildren: ViewCollection<ButtonView>;
47
- /**
48
- * An array of form validators used by {@link #isValid}.
49
- */
50
- private readonly _validators;
51
- /**
52
- * A collection of views that can be focused in the form.
53
- */
54
- private readonly _focusables;
55
- /**
56
- * Helps cycling over {@link #_focusables} in the form.
57
- */
58
- private readonly _focusCycler;
59
- /**
60
- * Creates an instance of the {@link module:link/ui/linkformview~LinkFormView} class.
61
- *
62
- * Also see {@link #render}.
63
- *
64
- * @param locale The localization services instance.
65
- * @param validators Form validators used by {@link #isValid}.
66
- */
67
- constructor(locale: Locale, validators: Array<LinkFormValidatorCallback>);
68
- /**
69
- * @inheritDoc
70
- */
71
- render(): void;
72
- /**
73
- * @inheritDoc
74
- */
75
- destroy(): void;
76
- /**
77
- * Focuses the fist {@link #_focusables} in the form.
78
- */
79
- focus(): void;
80
- /**
81
- * Validates the form and returns `false` when some fields are invalid.
82
- */
83
- isValid(): boolean;
84
- /**
85
- * Cleans up the supplementary error and information text of the {@link #urlInputView}
86
- * bringing them back to the state when the form has been displayed for the first time.
87
- *
88
- * See {@link #isValid}.
89
- */
90
- resetFormStatus(): void;
91
- /**
92
- * Creates a back button view that cancels the form.
93
- */
94
- private _createBackButton;
95
- /**
96
- * Creates a save button view that inserts the link.
97
- */
98
- private _createSaveButton;
99
- /**
100
- * Creates a header view for the form.
101
- */
102
- private _createHeaderView;
103
- /**
104
- * Creates a view for the providers list.
105
- */
106
- private _createProvidersListView;
107
- /**
108
- * Creates a labeled input view for the "Displayed text" field.
109
- */
110
- private _createDisplayedTextInput;
111
- /**
112
- * Creates a labeled input view for the URL field.
113
- *
114
- * @returns Labeled field view instance.
115
- */
116
- private _createUrlInput;
117
- /**
118
- * Populates the {@link #children} collection of the form.
119
- */
120
- private _createFormChildren;
121
- /**
122
- * The native DOM `value` of the {@link #urlInputView} element.
123
- *
124
- * **Note**: Do not confuse it with the {@link module:ui/inputtext/inputtextview~InputTextView#value}
125
- * which works one way only and may not represent the actual state of the component in the DOM.
126
- */
127
- get url(): string | null;
15
+ /**
16
+ * Tracks information about DOM focus in the form.
17
+ */
18
+ readonly focusTracker: FocusTracker;
19
+ /**
20
+ * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
21
+ */
22
+ readonly keystrokes: KeystrokeHandler;
23
+ /**
24
+ * The Back button view displayed in the header.
25
+ */
26
+ backButtonView: ButtonView;
27
+ /**
28
+ * The Save button view.
29
+ */
30
+ saveButtonView: ButtonView;
31
+ /**
32
+ * The "Displayed text" input view.
33
+ */
34
+ displayedTextInputView: LabeledFieldView<InputTextView>;
35
+ /**
36
+ * The URL input view.
37
+ */
38
+ urlInputView: LabeledFieldView<InputTextView>;
39
+ /**
40
+ * A collection of child views.
41
+ */
42
+ readonly children: ViewCollection;
43
+ /**
44
+ * A collection of child views in the providers list.
45
+ */
46
+ readonly providersListChildren: ViewCollection<ButtonView>;
47
+ /**
48
+ * An array of form validators used by {@link #isValid}.
49
+ */
50
+ private readonly _validators;
51
+ /**
52
+ * A collection of views that can be focused in the form.
53
+ */
54
+ private readonly _focusables;
55
+ /**
56
+ * Helps cycling over {@link #_focusables} in the form.
57
+ */
58
+ private readonly _focusCycler;
59
+ /**
60
+ * Creates an instance of the {@link module:link/ui/linkformview~LinkFormView} class.
61
+ *
62
+ * Also see {@link #render}.
63
+ *
64
+ * @param locale The localization services instance.
65
+ * @param validators Form validators used by {@link #isValid}.
66
+ */
67
+ constructor(locale: Locale, validators: Array<LinkFormValidatorCallback>);
68
+ /**
69
+ * @inheritDoc
70
+ */
71
+ override render(): void;
72
+ /**
73
+ * @inheritDoc
74
+ */
75
+ override destroy(): void;
76
+ /**
77
+ * Focuses the fist {@link #_focusables} in the form.
78
+ */
79
+ focus(): void;
80
+ /**
81
+ * Validates the form and returns `false` when some fields are invalid.
82
+ */
83
+ isValid(): boolean;
84
+ /**
85
+ * Cleans up the supplementary error and information text of the {@link #urlInputView}
86
+ * bringing them back to the state when the form has been displayed for the first time.
87
+ *
88
+ * See {@link #isValid}.
89
+ */
90
+ resetFormStatus(): void;
91
+ /**
92
+ * Creates a back button view that cancels the form.
93
+ */
94
+ private _createBackButton;
95
+ /**
96
+ * Creates a save button view that inserts the link.
97
+ */
98
+ private _createSaveButton;
99
+ /**
100
+ * Creates a header view for the form.
101
+ */
102
+ private _createHeaderView;
103
+ /**
104
+ * Creates a view for the providers list.
105
+ */
106
+ private _createProvidersListView;
107
+ /**
108
+ * Creates a labeled input view for the "Displayed text" field.
109
+ */
110
+ private _createDisplayedTextInput;
111
+ /**
112
+ * Creates a labeled input view for the URL field.
113
+ *
114
+ * @returns Labeled field view instance.
115
+ */
116
+ private _createUrlInput;
117
+ /**
118
+ * Populates the {@link #children} collection of the form.
119
+ */
120
+ private _createFormChildren;
121
+ /**
122
+ * The native DOM `value` of the {@link #urlInputView} element.
123
+ *
124
+ * **Note**: Do not confuse it with the {@link module:ui/inputtext/inputtextview~InputTextView#value}
125
+ * which works one way only and may not represent the actual state of the component in the DOM.
126
+ */
127
+ get url(): string | null;
128
128
  }
129
129
  /**
130
- * Callback used by {@link ~LinkFormView} to check if passed form value is valid.
131
- *
132
- * * If `undefined` is returned, it is assumed that the form value is correct and there is no error.
133
- * * If string is returned, it is assumed that the form value is incorrect and the returned string is displayed in the error label
134
- */
130
+ * Callback used by {@link ~LinkFormView} to check if passed form value is valid.
131
+ *
132
+ * * If `undefined` is returned, it is assumed that the form value is correct and there is no error.
133
+ * * If string is returned, it is assumed that the form value is incorrect and the returned string is displayed in the error label
134
+ */
135
135
  export type LinkFormValidatorCallback = (form: LinkFormView) => string | undefined;
136
136
  /**
137
- * Fired when the form view is submitted (when one of the children triggered the submit event),
138
- * for example with a click on {@link ~LinkFormView#saveButtonView}.
139
- *
140
- * @eventName ~LinkFormView#submit
141
- */
137
+ * Fired when the form view is submitted (when one of the children triggered the submit event),
138
+ * for example with a click on {@link ~LinkFormView#saveButtonView}.
139
+ *
140
+ * @eventName ~LinkFormView#submit
141
+ */
142
142
  export type LinkFormSubmitEvent = {
143
- name: 'submit';
144
- args: [];
143
+ name: "submit";
144
+ args: [];
145
145
  };
146
146
  /**
147
- * Fired when the form view is canceled, for example with a click on {@link ~LinkFormView#backButtonView}.
148
- *
149
- * @eventName ~LinkFormView#cancel
150
- */
147
+ * Fired when the form view is canceled, for example with a click on {@link ~LinkFormView#backButtonView}.
148
+ *
149
+ * @eventName ~LinkFormView#cancel
150
+ */
151
151
  export type LinkFormCancelEvent = {
152
- name: 'cancel';
153
- args: [];
152
+ name: "cancel";
153
+ args: [];
154
154
  };
@@ -1,35 +1,35 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * @module link/ui/linkpreviewbuttonview
7
- */
8
- import { ButtonView } from '@ckeditor/ckeditor5-ui';
9
- import type { Locale } from '@ckeditor/ckeditor5-utils';
6
+ * @module link/ui/linkpreviewbuttonview
7
+ */
8
+ import { ButtonView } from "@ckeditor/ckeditor5-ui";
9
+ import type { Locale } from "@ckeditor/ckeditor5-utils";
10
10
  /**
11
- * The link button class. Rendered as an `<a>` tag with link opening in a new tab.
12
- *
13
- * Provides a custom `navigate` cancelable event.
14
- */
11
+ * The link button class. Rendered as an `<a>` tag with link opening in a new tab.
12
+ *
13
+ * Provides a custom `navigate` cancelable event.
14
+ */
15
15
  export declare class LinkPreviewButtonView extends ButtonView {
16
- /**
17
- * The value of the "href" attribute of the link.
18
- *
19
- * @observable
20
- */
21
- href: string | undefined;
22
- /**
23
- * @inheritDoc
24
- */
25
- constructor(locale: Locale);
16
+ /**
17
+ * The value of the "href" attribute of the link.
18
+ *
19
+ * @observable
20
+ */
21
+ href: string | undefined;
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ constructor(locale: Locale);
26
26
  }
27
27
  /**
28
- * Fired when the button view is clicked.
29
- *
30
- * @eventName ~LinkPreviewButtonView#navigate
31
- */
28
+ * Fired when the button view is clicked.
29
+ *
30
+ * @eventName ~LinkPreviewButtonView#navigate
31
+ */
32
32
  export type LinkPreviewButtonNavigateEvent = {
33
- name: 'navigate';
34
- args: [href: string, cancel: () => void];
33
+ name: "navigate";
34
+ args: [href: string, cancel: () => void];
35
35
  };
@@ -1,88 +1,88 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * @module link/ui/linkpropertiesview
7
- */
8
- import { ButtonView, View, ViewCollection, type SwitchButtonView } from '@ckeditor/ckeditor5-ui';
9
- import { FocusTracker, KeystrokeHandler, type Locale } from '@ckeditor/ckeditor5-utils';
10
- import '../../theme/linkproperties.css';
6
+ * @module link/ui/linkpropertiesview
7
+ */
8
+ import { ButtonView, View, ViewCollection, type SwitchButtonView } from "@ckeditor/ckeditor5-ui";
9
+ import { FocusTracker, KeystrokeHandler, type Locale } from "@ckeditor/ckeditor5-utils";
10
+ import "../../theme/linkproperties.css";
11
11
  /**
12
- * The link properties view controller class.
13
- *
14
- * See {@link module:link/ui/linkpropertiesview~LinkPropertiesView}.
15
- */
12
+ * The link properties view controller class.
13
+ *
14
+ * See {@link module:link/ui/linkpropertiesview~LinkPropertiesView}.
15
+ */
16
16
  export declare class LinkPropertiesView extends View {
17
- /**
18
- * Tracks information about DOM focus in the form.
19
- */
20
- readonly focusTracker: FocusTracker;
21
- /**
22
- * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
23
- */
24
- readonly keystrokes: KeystrokeHandler;
25
- /**
26
- * The Back button view displayed in the header.
27
- */
28
- backButtonView: ButtonView;
29
- /**
30
- * A collection of child views.
31
- */
32
- readonly children: ViewCollection;
33
- /**
34
- * A collection of {@link module:ui/button/switchbuttonview~SwitchButtonView},
35
- * which corresponds to {@link module:link/linkcommand~LinkCommand#manualDecorators manual decorators}
36
- * configured in the editor.
37
- */
38
- readonly listChildren: ViewCollection<SwitchButtonView>;
39
- /**
40
- * A collection of views that can be focused in the form.
41
- */
42
- private readonly _focusables;
43
- /**
44
- * Helps cycling over {@link #_focusables} in the form.
45
- */
46
- private readonly _focusCycler;
47
- /**
48
- * Creates an instance of the {@link module:link/ui/linkpropertiesview~LinkPropertiesView} class.
49
- *
50
- * Also see {@link #render}.
51
- *
52
- * @param locale The localization services instance.
53
- */
54
- constructor(locale: Locale);
55
- /**
56
- * @inheritDoc
57
- */
58
- render(): void;
59
- /**
60
- * @inheritDoc
61
- */
62
- destroy(): void;
63
- /**
64
- * Focuses the fist {@link #_focusables} in the form.
65
- */
66
- focus(): void;
67
- /**
68
- * Creates a back button view.
69
- */
70
- private _createBackButton;
71
- /**
72
- * Creates a header view for the form.
73
- */
74
- private _createHeaderView;
75
- /**
76
- * Creates a form view that displays the {@link #listChildren} collection.
77
- */
78
- private _createListView;
17
+ /**
18
+ * Tracks information about DOM focus in the form.
19
+ */
20
+ readonly focusTracker: FocusTracker;
21
+ /**
22
+ * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
23
+ */
24
+ readonly keystrokes: KeystrokeHandler;
25
+ /**
26
+ * The Back button view displayed in the header.
27
+ */
28
+ backButtonView: ButtonView;
29
+ /**
30
+ * A collection of child views.
31
+ */
32
+ readonly children: ViewCollection;
33
+ /**
34
+ * A collection of {@link module:ui/button/switchbuttonview~SwitchButtonView},
35
+ * which corresponds to {@link module:link/linkcommand~LinkCommand#manualDecorators manual decorators}
36
+ * configured in the editor.
37
+ */
38
+ readonly listChildren: ViewCollection<SwitchButtonView>;
39
+ /**
40
+ * A collection of views that can be focused in the form.
41
+ */
42
+ private readonly _focusables;
43
+ /**
44
+ * Helps cycling over {@link #_focusables} in the form.
45
+ */
46
+ private readonly _focusCycler;
47
+ /**
48
+ * Creates an instance of the {@link module:link/ui/linkpropertiesview~LinkPropertiesView} class.
49
+ *
50
+ * Also see {@link #render}.
51
+ *
52
+ * @param locale The localization services instance.
53
+ */
54
+ constructor(locale: Locale);
55
+ /**
56
+ * @inheritDoc
57
+ */
58
+ override render(): void;
59
+ /**
60
+ * @inheritDoc
61
+ */
62
+ override destroy(): void;
63
+ /**
64
+ * Focuses the fist {@link #_focusables} in the form.
65
+ */
66
+ focus(): void;
67
+ /**
68
+ * Creates a back button view.
69
+ */
70
+ private _createBackButton;
71
+ /**
72
+ * Creates a header view for the form.
73
+ */
74
+ private _createHeaderView;
75
+ /**
76
+ * Creates a form view that displays the {@link #listChildren} collection.
77
+ */
78
+ private _createListView;
79
79
  }
80
80
  /**
81
- * Fired when the {@link ~LinkPropertiesView#backButtonView} is pressed.
82
- *
83
- * @eventName ~LinkPropertiesView#back
84
- */
81
+ * Fired when the {@link ~LinkPropertiesView#backButtonView} is pressed.
82
+ *
83
+ * @eventName ~LinkPropertiesView#back
84
+ */
85
85
  export type LinkPropertiesBackEvent = {
86
- name: 'back';
87
- args: [];
86
+ name: "back";
87
+ args: [];
88
88
  };