@ckeditor/ckeditor5-select-all 47.6.1-alpha.1 → 48.0.0-alpha.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 (90) hide show
  1. package/ckeditor5-metadata.json +2 -2
  2. package/dist/index.css +3 -0
  3. package/dist/index.css.map +1 -0
  4. package/package.json +23 -42
  5. package/lang/contexts.json +0 -3
  6. package/lang/translations/af.po +0 -16
  7. package/lang/translations/ar.po +0 -16
  8. package/lang/translations/ast.po +0 -16
  9. package/lang/translations/az.po +0 -16
  10. package/lang/translations/be.po +0 -16
  11. package/lang/translations/bg.po +0 -16
  12. package/lang/translations/bn.po +0 -16
  13. package/lang/translations/bs.po +0 -16
  14. package/lang/translations/ca.po +0 -16
  15. package/lang/translations/cs.po +0 -16
  16. package/lang/translations/da.po +0 -16
  17. package/lang/translations/de-ch.po +0 -16
  18. package/lang/translations/de.po +0 -16
  19. package/lang/translations/el.po +0 -16
  20. package/lang/translations/en-au.po +0 -16
  21. package/lang/translations/en-gb.po +0 -16
  22. package/lang/translations/en.po +0 -16
  23. package/lang/translations/eo.po +0 -16
  24. package/lang/translations/es-co.po +0 -16
  25. package/lang/translations/es.po +0 -16
  26. package/lang/translations/et.po +0 -16
  27. package/lang/translations/eu.po +0 -16
  28. package/lang/translations/fa.po +0 -16
  29. package/lang/translations/fi.po +0 -16
  30. package/lang/translations/fr.po +0 -16
  31. package/lang/translations/gl.po +0 -16
  32. package/lang/translations/gu.po +0 -16
  33. package/lang/translations/he.po +0 -16
  34. package/lang/translations/hi.po +0 -16
  35. package/lang/translations/hr.po +0 -16
  36. package/lang/translations/hu.po +0 -16
  37. package/lang/translations/hy.po +0 -16
  38. package/lang/translations/id.po +0 -16
  39. package/lang/translations/it.po +0 -16
  40. package/lang/translations/ja.po +0 -16
  41. package/lang/translations/jv.po +0 -16
  42. package/lang/translations/kk.po +0 -16
  43. package/lang/translations/km.po +0 -16
  44. package/lang/translations/kn.po +0 -16
  45. package/lang/translations/ko.po +0 -16
  46. package/lang/translations/ku.po +0 -16
  47. package/lang/translations/lt.po +0 -16
  48. package/lang/translations/lv.po +0 -16
  49. package/lang/translations/ms.po +0 -16
  50. package/lang/translations/nb.po +0 -16
  51. package/lang/translations/ne.po +0 -16
  52. package/lang/translations/nl.po +0 -16
  53. package/lang/translations/no.po +0 -16
  54. package/lang/translations/oc.po +0 -16
  55. package/lang/translations/pl.po +0 -16
  56. package/lang/translations/pt-br.po +0 -16
  57. package/lang/translations/pt.po +0 -16
  58. package/lang/translations/ro.po +0 -16
  59. package/lang/translations/ru.po +0 -16
  60. package/lang/translations/si.po +0 -16
  61. package/lang/translations/sk.po +0 -16
  62. package/lang/translations/sl.po +0 -16
  63. package/lang/translations/sq.po +0 -16
  64. package/lang/translations/sr-latn.po +0 -16
  65. package/lang/translations/sr.po +0 -16
  66. package/lang/translations/sv.po +0 -16
  67. package/lang/translations/th.po +0 -16
  68. package/lang/translations/ti.po +0 -16
  69. package/lang/translations/tk.po +0 -16
  70. package/lang/translations/tr.po +0 -16
  71. package/lang/translations/tt.po +0 -16
  72. package/lang/translations/ug.po +0 -16
  73. package/lang/translations/uk.po +0 -16
  74. package/lang/translations/ur.po +0 -16
  75. package/lang/translations/uz.po +0 -16
  76. package/lang/translations/vi.po +0 -16
  77. package/lang/translations/zh-cn.po +0 -16
  78. package/lang/translations/zh.po +0 -16
  79. package/src/augmentation.js +0 -5
  80. package/src/index.js +0 -12
  81. package/src/selectall.js +0 -38
  82. package/src/selectallcommand.js +0 -64
  83. package/src/selectallediting.js +0 -56
  84. package/src/selectallui.js +0 -69
  85. /package/{src → dist}/augmentation.d.ts +0 -0
  86. /package/{src → dist}/index.d.ts +0 -0
  87. /package/{src → dist}/selectall.d.ts +0 -0
  88. /package/{src → dist}/selectallcommand.d.ts +0 -0
  89. /package/{src → dist}/selectallediting.d.ts +0 -0
  90. /package/{src → dist}/selectallui.d.ts +0 -0
@@ -1,16 +0,0 @@
1
- # Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
2
- #
3
- # Want to contribute to this file? Submit your changes via a GitHub Pull Request.
4
- #
5
- # Check out the official contributor's guide:
6
- # https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
7
- #
8
- msgid ""
9
- msgstr ""
10
- "Language: uk\n"
11
- "Plural-Forms: nplurals=3; plural=(n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);\n"
12
- "Content-Type: text/plain; charset=UTF-8\n"
13
-
14
- msgctxt "The label of the select all toolbar button."
15
- msgid "Select all"
16
- msgstr "Вибрати все"
@@ -1,16 +0,0 @@
1
- # Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
2
- #
3
- # Want to contribute to this file? Submit your changes via a GitHub Pull Request.
4
- #
5
- # Check out the official contributor's guide:
6
- # https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
7
- #
8
- msgid ""
9
- msgstr ""
10
- "Language: ur\n"
11
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
12
- "Content-Type: text/plain; charset=UTF-8\n"
13
-
14
- msgctxt "The label of the select all toolbar button."
15
- msgid "Select all"
16
- msgstr "سب منتخب کریں"
@@ -1,16 +0,0 @@
1
- # Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
2
- #
3
- # Want to contribute to this file? Submit your changes via a GitHub Pull Request.
4
- #
5
- # Check out the official contributor's guide:
6
- # https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
7
- #
8
- msgid ""
9
- msgstr ""
10
- "Language: uz\n"
11
- "Plural-Forms: nplurals=2; plural=(n > 1);\n"
12
- "Content-Type: text/plain; charset=UTF-8\n"
13
-
14
- msgctxt "The label of the select all toolbar button."
15
- msgid "Select all"
16
- msgstr "Hammasini tanlash"
@@ -1,16 +0,0 @@
1
- # Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
2
- #
3
- # Want to contribute to this file? Submit your changes via a GitHub Pull Request.
4
- #
5
- # Check out the official contributor's guide:
6
- # https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
7
- #
8
- msgid ""
9
- msgstr ""
10
- "Language: vi\n"
11
- "Plural-Forms: nplurals=1; plural=0;\n"
12
- "Content-Type: text/plain; charset=UTF-8\n"
13
-
14
- msgctxt "The label of the select all toolbar button."
15
- msgid "Select all"
16
- msgstr "Chọn tất cả"
@@ -1,16 +0,0 @@
1
- # Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
2
- #
3
- # Want to contribute to this file? Submit your changes via a GitHub Pull Request.
4
- #
5
- # Check out the official contributor's guide:
6
- # https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
7
- #
8
- msgid ""
9
- msgstr ""
10
- "Language: zh_CN\n"
11
- "Plural-Forms: nplurals=1; plural=0;\n"
12
- "Content-Type: text/plain; charset=UTF-8\n"
13
-
14
- msgctxt "The label of the select all toolbar button."
15
- msgid "Select all"
16
- msgstr "全选"
@@ -1,16 +0,0 @@
1
- # Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
2
- #
3
- # Want to contribute to this file? Submit your changes via a GitHub Pull Request.
4
- #
5
- # Check out the official contributor's guide:
6
- # https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
7
- #
8
- msgid ""
9
- msgstr ""
10
- "Language: zh_TW\n"
11
- "Plural-Forms: nplurals=1; plural=0;\n"
12
- "Content-Type: text/plain; charset=UTF-8\n"
13
-
14
- msgctxt "The label of the select all toolbar button."
15
- msgid "Select all"
16
- msgstr "選取全部"
@@ -1,5 +0,0 @@
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
- export {};
package/src/index.js DELETED
@@ -1,12 +0,0 @@
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
- /**
6
- * @module select-all
7
- */
8
- export { SelectAll } from './selectall.js';
9
- export { SelectAllEditing } from './selectallediting.js';
10
- export { SelectAllUI } from './selectallui.js';
11
- export { SelectAllCommand } from './selectallcommand.js';
12
- import './augmentation.js';
package/src/selectall.js DELETED
@@ -1,38 +0,0 @@
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
- /**
6
- * @module select-all/selectall
7
- */
8
- import { Plugin } from '@ckeditor/ckeditor5-core';
9
- import { SelectAllEditing } from './selectallediting.js';
10
- import { SelectAllUI } from './selectallui.js';
11
- /**
12
- * The select all feature.
13
- *
14
- * This is a "glue" plugin which loads the {@link module:select-all/selectallediting~SelectAllEditing select all editing feature}
15
- * and the {@link module:select-all/selectallui~SelectAllUI select all UI feature}.
16
- *
17
- * Please refer to the documentation of individual features to learn more.
18
- */
19
- export class SelectAll extends Plugin {
20
- /**
21
- * @inheritDoc
22
- */
23
- static get requires() {
24
- return [SelectAllEditing, SelectAllUI];
25
- }
26
- /**
27
- * @inheritDoc
28
- */
29
- static get pluginName() {
30
- return 'SelectAll';
31
- }
32
- /**
33
- * @inheritDoc
34
- */
35
- static get isOfficialPlugin() {
36
- return true;
37
- }
38
- }
@@ -1,64 +0,0 @@
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
- /**
6
- * @module select-all/selectallcommand
7
- */
8
- import { Command } from '@ckeditor/ckeditor5-core';
9
- /**
10
- * The select all command.
11
- *
12
- * It is used by the {@link module:select-all/selectallediting~SelectAllEditing select all editing feature} to handle
13
- * the <kbd>Ctrl/⌘</kbd>+<kbd>A</kbd> keystroke.
14
- *
15
- * Executing this command changes the {@glink framework/architecture/editing-engine#model model}
16
- * selection so it contains the entire content of the editable root of the editor the selection is
17
- * {@link module:engine/model/selection~ModelSelection#anchor anchored} in.
18
- *
19
- * If the selection was anchored in a {@glink framework/tutorials/widgets/implementing-a-block-widget nested editable}
20
- * (e.g. a caption of an image), the new selection will contain its entire content. Successive executions of this command
21
- * will expand the selection to encompass more and more content up to the entire editable root of the editor.
22
- */
23
- export class SelectAllCommand extends Command {
24
- /**
25
- * @inheritDoc
26
- */
27
- constructor(editor) {
28
- super(editor);
29
- // It does not affect data so should be enabled in read-only mode.
30
- this.affectsData = false;
31
- }
32
- /**
33
- * @inheritDoc
34
- */
35
- execute() {
36
- const model = this.editor.model;
37
- const selection = model.document.selection;
38
- let scopeElement = model.schema.getLimitElement(selection);
39
- // If an entire scope is selected, or the selection's ancestor is not a scope yet,
40
- // browse through ancestors to find the enclosing parent scope.
41
- if (selection.containsEntireContent(scopeElement) || !isSelectAllScope(model.schema, scopeElement)) {
42
- do {
43
- scopeElement = scopeElement.parent;
44
- // Do nothing, if the entire `root` is already selected.
45
- if (!scopeElement) {
46
- return;
47
- }
48
- } while (!isSelectAllScope(model.schema, scopeElement));
49
- }
50
- model.change(writer => {
51
- writer.setSelection(scopeElement, 'in');
52
- });
53
- }
54
- }
55
- /**
56
- * Checks whether the element is a valid select-all scope. Returns true, if the element is a
57
- * {@link module:engine/model/schema~ModelSchema#isLimit limit}, and can contain any text or paragraph.
58
- *
59
- * @param schema Schema to check against.
60
- * @param element Model element.
61
- */
62
- function isSelectAllScope(schema, element) {
63
- return schema.isLimit(element) && (schema.checkChild(element, '$text') || schema.checkChild(element, 'paragraph'));
64
- }
@@ -1,56 +0,0 @@
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
- /**
6
- * @module select-all/selectallediting
7
- */
8
- import { Plugin } from '@ckeditor/ckeditor5-core';
9
- import { getCode, parseKeystroke } from '@ckeditor/ckeditor5-utils';
10
- import { SelectAllCommand } from './selectallcommand.js';
11
- const SELECT_ALL_KEYSTROKE = /* #__PURE__ */ parseKeystroke('Ctrl+A');
12
- /**
13
- * The select all editing feature.
14
- *
15
- * It registers the `'selectAll'` {@link module:select-all/selectallcommand~SelectAllCommand command}
16
- * and the <kbd>Ctrl/⌘</kbd>+<kbd>A</kbd> keystroke listener which executes it.
17
- */
18
- export class SelectAllEditing extends Plugin {
19
- /**
20
- * @inheritDoc
21
- */
22
- static get pluginName() {
23
- return 'SelectAllEditing';
24
- }
25
- /**
26
- * @inheritDoc
27
- */
28
- static get isOfficialPlugin() {
29
- return true;
30
- }
31
- /**
32
- * @inheritDoc
33
- */
34
- init() {
35
- const editor = this.editor;
36
- const t = editor.t;
37
- const view = editor.editing.view;
38
- const viewDocument = view.document;
39
- editor.commands.add('selectAll', new SelectAllCommand(editor));
40
- this.listenTo(viewDocument, 'keydown', (eventInfo, domEventData) => {
41
- if (getCode(domEventData) === SELECT_ALL_KEYSTROKE) {
42
- editor.execute('selectAll');
43
- domEventData.preventDefault();
44
- }
45
- });
46
- // Add the information about the keystroke to the accessibility database.
47
- editor.accessibility.addKeystrokeInfos({
48
- keystrokes: [
49
- {
50
- label: t('Select all'),
51
- keystroke: 'CTRL+A'
52
- }
53
- ]
54
- });
55
- }
56
- }
@@ -1,69 +0,0 @@
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
- /**
6
- * @module select-all/selectallui
7
- */
8
- import { Plugin } from '@ckeditor/ckeditor5-core';
9
- import { IconSelectAll } from '@ckeditor/ckeditor5-icons';
10
- import { ButtonView, MenuBarMenuListItemButtonView } from '@ckeditor/ckeditor5-ui';
11
- /**
12
- * The select all UI feature.
13
- *
14
- * It registers the `'selectAll'` UI button in the editor's
15
- * {@link module:ui/componentfactory~ComponentFactory component factory}. When clicked, the button
16
- * executes the {@link module:select-all/selectallcommand~SelectAllCommand select all command}.
17
- */
18
- export class SelectAllUI extends Plugin {
19
- /**
20
- * @inheritDoc
21
- */
22
- static get pluginName() {
23
- return 'SelectAllUI';
24
- }
25
- /**
26
- * @inheritDoc
27
- */
28
- static get isOfficialPlugin() {
29
- return true;
30
- }
31
- /**
32
- * @inheritDoc
33
- */
34
- init() {
35
- const editor = this.editor;
36
- editor.ui.componentFactory.add('selectAll', () => {
37
- const buttonView = this._createButton(ButtonView);
38
- buttonView.set({
39
- tooltip: true
40
- });
41
- return buttonView;
42
- });
43
- editor.ui.componentFactory.add('menuBar:selectAll', () => {
44
- return this._createButton(MenuBarMenuListItemButtonView);
45
- });
46
- }
47
- /**
48
- * Creates a button for select all command to use either in toolbar or in menu bar.
49
- */
50
- _createButton(ButtonClass) {
51
- const editor = this.editor;
52
- const locale = editor.locale;
53
- const command = editor.commands.get('selectAll');
54
- const view = new ButtonClass(editor.locale);
55
- const t = locale.t;
56
- view.set({
57
- label: t('Select all'),
58
- icon: IconSelectAll,
59
- keystroke: 'Ctrl+A'
60
- });
61
- view.bind('isEnabled').to(command, 'isEnabled');
62
- // Execute the command.
63
- this.listenTo(view, 'execute', () => {
64
- editor.execute('selectAll');
65
- editor.editing.view.focus();
66
- });
67
- return view;
68
- }
69
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes