@ckeditor/ckeditor5-template 41.3.0 → 41.4.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 (114) hide show
  1. package/build/template.js +1 -1
  2. package/dist/index-content.css +4 -0
  3. package/dist/index-editor.css +102 -0
  4. package/dist/index.css +153 -0
  5. package/dist/index.js +23 -0
  6. package/dist/translations/ar.d.ts +8 -0
  7. package/dist/translations/ar.js +23 -0
  8. package/dist/translations/bg.d.ts +8 -0
  9. package/dist/translations/bg.js +23 -0
  10. package/dist/translations/bn.d.ts +8 -0
  11. package/dist/translations/bn.js +23 -0
  12. package/dist/translations/ca.d.ts +8 -0
  13. package/dist/translations/ca.js +23 -0
  14. package/dist/translations/cs.d.ts +8 -0
  15. package/dist/translations/cs.js +23 -0
  16. package/dist/translations/da.d.ts +8 -0
  17. package/dist/translations/da.js +23 -0
  18. package/dist/translations/de.d.ts +8 -0
  19. package/dist/translations/de.js +23 -0
  20. package/dist/translations/el.d.ts +8 -0
  21. package/dist/translations/el.js +23 -0
  22. package/dist/translations/en-au.d.ts +8 -0
  23. package/dist/translations/en-au.js +23 -0
  24. package/dist/translations/en.d.ts +8 -0
  25. package/dist/translations/en.js +23 -0
  26. package/dist/translations/es.d.ts +8 -0
  27. package/dist/translations/es.js +23 -0
  28. package/dist/translations/et.d.ts +8 -0
  29. package/dist/translations/et.js +23 -0
  30. package/dist/translations/fi.d.ts +8 -0
  31. package/dist/translations/fi.js +23 -0
  32. package/dist/translations/fr.d.ts +8 -0
  33. package/dist/translations/fr.js +23 -0
  34. package/dist/translations/gl.d.ts +8 -0
  35. package/dist/translations/gl.js +23 -0
  36. package/dist/translations/he.d.ts +8 -0
  37. package/dist/translations/he.js +23 -0
  38. package/dist/translations/hi.d.ts +8 -0
  39. package/dist/translations/hi.js +23 -0
  40. package/dist/translations/hr.d.ts +8 -0
  41. package/dist/translations/hr.js +23 -0
  42. package/dist/translations/hu.d.ts +8 -0
  43. package/dist/translations/hu.js +23 -0
  44. package/dist/translations/id.d.ts +8 -0
  45. package/dist/translations/id.js +23 -0
  46. package/dist/translations/it.d.ts +8 -0
  47. package/dist/translations/it.js +23 -0
  48. package/dist/translations/ja.d.ts +8 -0
  49. package/dist/translations/ja.js +23 -0
  50. package/dist/translations/ko.d.ts +8 -0
  51. package/dist/translations/ko.js +23 -0
  52. package/dist/translations/lt.d.ts +8 -0
  53. package/dist/translations/lt.js +23 -0
  54. package/dist/translations/lv.d.ts +8 -0
  55. package/dist/translations/lv.js +23 -0
  56. package/dist/translations/ms.d.ts +8 -0
  57. package/dist/translations/ms.js +23 -0
  58. package/dist/translations/nl.d.ts +8 -0
  59. package/dist/translations/nl.js +23 -0
  60. package/dist/translations/no.d.ts +8 -0
  61. package/dist/translations/no.js +23 -0
  62. package/dist/translations/pl.d.ts +8 -0
  63. package/dist/translations/pl.js +23 -0
  64. package/dist/translations/pt-br.d.ts +8 -0
  65. package/dist/translations/pt-br.js +23 -0
  66. package/dist/translations/pt.d.ts +8 -0
  67. package/dist/translations/pt.js +23 -0
  68. package/dist/translations/ro.d.ts +8 -0
  69. package/dist/translations/ro.js +23 -0
  70. package/dist/translations/ru.d.ts +8 -0
  71. package/dist/translations/ru.js +23 -0
  72. package/dist/translations/sk.d.ts +8 -0
  73. package/dist/translations/sk.js +23 -0
  74. package/dist/translations/sr-latn.d.ts +8 -0
  75. package/dist/translations/sr-latn.js +23 -0
  76. package/dist/translations/sr.d.ts +8 -0
  77. package/dist/translations/sr.js +23 -0
  78. package/dist/translations/sv.d.ts +8 -0
  79. package/dist/translations/sv.js +23 -0
  80. package/dist/translations/th.d.ts +8 -0
  81. package/dist/translations/th.js +23 -0
  82. package/dist/translations/tr.d.ts +8 -0
  83. package/dist/translations/tr.js +23 -0
  84. package/dist/translations/uk.d.ts +8 -0
  85. package/dist/translations/uk.js +23 -0
  86. package/dist/translations/uz.d.ts +8 -0
  87. package/dist/translations/uz.js +23 -0
  88. package/dist/translations/vi.d.ts +8 -0
  89. package/dist/translations/vi.js +23 -0
  90. package/dist/translations/zh-cn.d.ts +8 -0
  91. package/dist/translations/zh-cn.js +23 -0
  92. package/dist/translations/zh.d.ts +8 -0
  93. package/dist/translations/zh.js +23 -0
  94. package/dist/types/augmentation.d.ts +27 -0
  95. package/dist/types/index.d.ts +17 -0
  96. package/dist/types/template.d.ts +119 -0
  97. package/dist/types/templatecommand.d.ts +27 -0
  98. package/dist/types/templateediting.d.ts +34 -0
  99. package/dist/types/templateui.d.ts +33 -0
  100. package/dist/types/ui/templatelistbuttonview.d.ts +108 -0
  101. package/dist/types/ui/templatelistitemview.d.ts +38 -0
  102. package/dist/types/ui/templatelistview.d.ts +42 -0
  103. package/lang/contexts.json +2 -1
  104. package/package.json +5 -4
  105. package/src/index.js +1 -1
  106. package/src/template.d.ts +1 -1
  107. package/src/template.js +1 -1
  108. package/src/templatecommand.js +1 -1
  109. package/src/templateediting.js +1 -1
  110. package/src/templateui.js +1 -1
  111. package/src/ui/templatelistbuttonview.js +1 -1
  112. package/src/ui/templatelistitemview.d.ts +1 -1
  113. package/src/ui/templatelistitemview.js +1 -1
  114. package/src/ui/templatelistview.js +1 -1
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ export default{'zh-cn':{'dictionary':{'Template':'模板','Insert\x20template':'插入模板','No\x20templates\x20available.':'无可用的模板','No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.':'未找到与\x22%0\x22匹配的模板。','Please\x20try\x20a\x20different\x20phrase\x20or\x20check\x20the\x20spelling.':'请尝试使用不同的短语或检查拼写。','Search\x20template':'搜索模板'},'getPluralForm':_0x593fe2=>0x0}};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+
6
+ import type { Translations } from 'ckeditor5';
7
+ declare const translations: Translations;
8
+ export default translations;
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ export default{'zh':{'dictionary':{'Template':'範本','Insert\x20template':'插入範本','No\x20templates\x20available.':'無可用範本。','No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.':'找不到符合「%0」的範本','Please\x20try\x20a\x20different\x20phrase\x20or\x20check\x20the\x20spelling.':'請嘗試其他詞彙或確認拼寫是否正確。','Search\x20template':'搜尋範本'},'getPluralForm':_0x4944db=>0x0}};
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
+ */
9
+ import type { Template, TemplateCommand, TemplateEditing, TemplateUI, TemplateConfig } from './index.js';
10
+ declare module '@ckeditor/ckeditor5-core' {
11
+ interface PluginsMap {
12
+ [Template.pluginName]: Template;
13
+ [TemplateEditing.pluginName]: TemplateEditing;
14
+ [TemplateUI.pluginName]: TemplateUI;
15
+ }
16
+ interface CommandsMap {
17
+ insertTemplate: TemplateCommand;
18
+ }
19
+ interface EditorConfig {
20
+ /**
21
+ * The configuration of the {@link module:template/template~Template} feature.
22
+ *
23
+ * Read more in {@link module:template/template~TemplateConfig}.
24
+ */
25
+ template?: TemplateConfig;
26
+ }
27
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
+ */
9
+ /**
10
+ * @module template
11
+ */
12
+ export { default as Template } from './template.js';
13
+ export { default as TemplateCommand } from './templatecommand.js';
14
+ export { default as TemplateEditing } from './templateediting.js';
15
+ export { default as TemplateUI } from './templateui.js';
16
+ export type { TemplateConfig, TemplateDefinition } from './template.js';
17
+ import './augmentation.js';
@@ -0,0 +1,119 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
+ */
9
+ /**
10
+ * @module template/template
11
+ * @publicApi
12
+ */
13
+ import { Plugin } from 'ckeditor5/src/core.js';
14
+ import TemplateEditing from './templateediting.js';
15
+ import TemplateUI from './templateui.js';
16
+ /**
17
+ * The template feature.
18
+ *
19
+ * For a detailed overview, check the {@glink features/template Content templates} feature guide.
20
+ */
21
+ export default class Template extends Plugin {
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ static get requires(): readonly [typeof TemplateEditing, typeof TemplateUI];
26
+ /**
27
+ * @inheritDoc
28
+ */
29
+ static get pluginName(): "Template";
30
+ }
31
+ /**
32
+ * The configuration of the template feature.
33
+ *
34
+ * ```ts
35
+ * ClassicEditor
36
+ * .create( {
37
+ * template: ... // Template feature configuration.
38
+ * } )
39
+ * .then( ... )
40
+ * .catch( ... );
41
+ *```
42
+ * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
43
+ */
44
+ export interface TemplateConfig {
45
+ /**
46
+ * A list of all template definitions to be displayed in the `'insertTemplate'` UI dropdown.
47
+ *
48
+ * An example configuration:
49
+ *
50
+ * ```json
51
+ * {
52
+ * template: {
53
+ * definitions: [
54
+ * {
55
+ * title: 'Issue acknowledgement (plain text)',
56
+ * data: 'Dear customer, thank you for your report! The issue is currently being worked on by our development team.'
57
+ * },
58
+ * {
59
+ * title: 'Signature (multi-line)',
60
+ * data: '<p><b>Jane Doe</b></p><p>Marketing Specialist at <a href="https://example.com>Example.com</a></p>',
61
+ * description: 'Author signature with the link to the website.'
62
+ * },
63
+ * {
64
+ * title: 'Example table',
65
+ * data: '<table><tr><td>Cell #1</td><td></td></tr><tr><td></td><td>Cell #2</td></tr></table>',
66
+ * icon: '<svg viewBox="0 0 45 45" xmlns="http://www.w3.org/2000/svg">...</svg>',
67
+ * description: 'This template inserts a table.'
68
+ * },
69
+ * {
70
+ * title: 'Insert userAgent data',
71
+ * data: navigator.userAgent
72
+ * },
73
+ * {
74
+ * title: 'Insert translate to English link (function)',
75
+ * data: () => '<a href="' + location.href + '/en" title="Translate to English">Translate to English</a>'
76
+ * },
77
+ * // ...
78
+ * ]
79
+ * }
80
+ * }
81
+ * ```
82
+ */
83
+ definitions?: Array<TemplateDefinition>;
84
+ }
85
+ /**
86
+ * An object describing a single template definition.
87
+ *
88
+ * ```json
89
+ * {
90
+ * // Mandatory fields:
91
+ * title: 'Example template',
92
+ * data: '<table><tr><td>Cell #1</td><td></td></tr><tr><td></td><td>Cell #2</td></tr></table>',
93
+ *
94
+ * // Optional configuration:
95
+ * icon: '<svg viewBox="0 0 45 45" xmlns="http://www.w3.org/2000/svg">...</svg>',
96
+ * description: 'This template inserts a table.'
97
+ * }
98
+ * ```
99
+ */
100
+ export type TemplateDefinition = {
101
+ /**
102
+ * The title of the template.
103
+ */
104
+ title: string;
105
+ /**
106
+ * An HTML string to be inserted into the document or a callback function that returns an HTML string
107
+ * to be inserted into the document when the template is selected.
108
+ */
109
+ data: (() => string) | string;
110
+ /**
111
+ * An optional SVG string representing the icon of the template. The default size of the icon is 45x45 pixels.
112
+ * Be sure to set the correct `viewBox` attribute in the icon source. If not provided, a generic icon will be used instead.
113
+ */
114
+ icon?: string;
115
+ /**
116
+ * An optional long description of the template presented to the users.
117
+ */
118
+ description?: string;
119
+ };
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
+ */
9
+ /**
10
+ * @module template/templatecommand
11
+ * @publicApi
12
+ */
13
+ import { Command } from 'ckeditor5/src/core.js';
14
+ /**
15
+ * The template command.
16
+ *
17
+ * Inserts a template into the editor content.
18
+ */
19
+ export default class TemplateCommand extends Command {
20
+ /**
21
+ * Inserts the template data at the position of the selection.
22
+ *
23
+ * @fires execute
24
+ * @param templateData Template data should be a raw HTML string or a function that returns one.
25
+ */
26
+ execute(templateData: string | Function): void;
27
+ }
@@ -0,0 +1,34 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
+ */
9
+ /**
10
+ * @module template/templateediting
11
+ */
12
+ import { Plugin, type Editor } from 'ckeditor5/src/core.js';
13
+ /**
14
+ * The template editing plugin.
15
+ */
16
+ export default class TemplateEditing extends Plugin {
17
+ licenseKey: string;
18
+ /**
19
+ * @inheritDoc
20
+ */
21
+ static get pluginName(): "TemplateEditing";
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ constructor(editor: Editor);
26
+ /**
27
+ * @inheritDoc
28
+ */
29
+ init(): void;
30
+ /**
31
+ * @inheritDoc
32
+ */
33
+ destroy(): void;
34
+ }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
+ */
9
+ /**
10
+ * @module template/templateui
11
+ */
12
+ import { Plugin } from 'ckeditor5/src/core.js';
13
+ import '../theme/template.css';
14
+ /**
15
+ * The UI plugin of the template feature.
16
+ *
17
+ * It registers the `'insertTemplate'` UI dropdown in the editor's {@link module:ui/componentfactory~ComponentFactory component factory}
18
+ * that displays a list of templates and allows to insert them into the editor content.
19
+ */
20
+ export default class TemplateUI extends Plugin {
21
+ /**
22
+ * @inheritDoc
23
+ */
24
+ static get pluginName(): "TemplateUI";
25
+ /**
26
+ * @inheritDoc
27
+ */
28
+ init(): void;
29
+ /**
30
+ * @inheritDoc
31
+ */
32
+ afterInit(): void;
33
+ }
@@ -0,0 +1,108 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
+ */
9
+ /**
10
+ * @module template/ui/templatelistbuttonview
11
+ */
12
+ import type { Locale } from 'ckeditor5/src/utils.js';
13
+ import { ButtonView, HighlightedTextView, View } from 'ckeditor5/src/ui.js';
14
+ import type { TemplateDefinition } from '../template.js';
15
+ /**
16
+ * A class representing an individual button (template) in the list. Renders a rich preview of the template option.
17
+ *
18
+ * @protected
19
+ */
20
+ export default class TemplateListButtonView extends ButtonView {
21
+ /**
22
+ * The definition of the template that the button will apply when executed.
23
+ *
24
+ * @readonly
25
+ */
26
+ templateDefinition: TemplateDefinition;
27
+ /**
28
+ * The view rendering the text part of the template definition.
29
+ *
30
+ * @protected
31
+ * @readonly
32
+ */
33
+ textPartView: TextPartView | null;
34
+ /**
35
+ * Creates an instance of the {@link module:template/ui/templatelistbuttonview~TemplateListButtonView} class.
36
+ *
37
+ * @param locale The localization services instance.
38
+ * @param templateDefinition The definition of the template.
39
+ */
40
+ constructor(locale: Locale, templateDefinition: TemplateDefinition);
41
+ /**
42
+ * @inheritDoc
43
+ */
44
+ render(): void;
45
+ destroy(): void;
46
+ /**
47
+ * Tells whether the `title` or `description` of the {@link #templateDefinition} match against the provided regular expression.
48
+ *
49
+ * @param regExp A regular expression to match the definition against.
50
+ * @returns When the match is positive, an object with the `title` and `description` keys is returned that describes
51
+ * the match. Otherwise, this method returns `null`.
52
+ */
53
+ isMatching(regExp: RegExp): object | null;
54
+ /**
55
+ * Highlights a subset of the {@link #textPartView} text according to a specified regular expression. When `null` is passed,
56
+ * the highlighting is turned off.
57
+ *
58
+ * @param regExp A regular expression used to highlight the matching text in the {@link #textPartView}.
59
+ */
60
+ highlightText(regExp: RegExp | null): void;
61
+ }
62
+ /**
63
+ * A view representing the title and the description of the template.
64
+ *
65
+ * @protected
66
+ */
67
+ export declare class TextPartView extends View {
68
+ /**
69
+ * The title text of the template.
70
+ *
71
+ * @readonly
72
+ */
73
+ title: string;
74
+ /**
75
+ * The description text of the template.
76
+ *
77
+ * @readonly
78
+ */
79
+ description: string | undefined;
80
+ /**
81
+ * Renders the title text of a template.
82
+ *
83
+ * **Note**: It acts as a label of the entire button in the context of accessibility.
84
+ *
85
+ * @readonly
86
+ */
87
+ titleView: HighlightedTextView;
88
+ /**
89
+ * Renders the description text of a template.
90
+ *
91
+ * @readonly
92
+ */
93
+ descriptionView: HighlightedTextView;
94
+ /**
95
+ * Creates an instance of the text part view.
96
+ *
97
+ * @param locale The {@link module:core/editor/editor~Editor#locale} instance.
98
+ * @param templateDefinition The definition of the template.
99
+ * @param labelId A unique ID that connects the entire button with the {@link #titleView} in the context of accessibility.
100
+ */
101
+ constructor(locale: Locale, templateDefinition: TemplateDefinition, labelId: string);
102
+ /**
103
+ * Highlights a subset of the {@link #titleView} and {@link #descriptionView} text according to a specified regular expression.
104
+ *
105
+ * @param regExp
106
+ */
107
+ highlightText(regExp: RegExp | null): void;
108
+ }
@@ -0,0 +1,38 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
+ */
9
+ /**
10
+ * @module template/ui/templatelistitemview
11
+ */
12
+ import type { Locale } from 'ckeditor5/src/utils.js';
13
+ import { ListItemView } from 'ckeditor5/src/ui.js';
14
+ import type TemplateListButtonView from './templatelistbuttonview.js';
15
+ /**
16
+ * A view representing an item in the list of tempaltes.
17
+ *
18
+ * @protected
19
+ */
20
+ export default class TemplateListItemView extends ListItemView {
21
+ /**
22
+ * The initial index of the item in the list of templates.
23
+ * Useful while searching and sorting to reverse the list to the same order.
24
+ */
25
+ readonly originalIndex: number;
26
+ /**
27
+ * The instance of the template button view containing the title,
28
+ * icon, and description of the template.
29
+ */
30
+ buttonView: TemplateListButtonView | null;
31
+ /**
32
+ * Creates an instance of the {@link module:template/ui/templatelistitemview~TemplateListItemView} class.
33
+ *
34
+ * @param locale The localization services instance.
35
+ * @param originalIndex The initial index of the item in the list of templates.
36
+ */
37
+ constructor(locale: Locale, originalIndex: number);
38
+ }
@@ -0,0 +1,42 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
+ */
9
+ /**
10
+ * @module template/ui/templatelistview
11
+ */
12
+ import { ListView, type FilteredView } from 'ckeditor5/src/ui.js';
13
+ /**
14
+ * The template list view class with filtering and sorting.
15
+ *
16
+ * @private
17
+ */
18
+ export default class TemplateListView extends ListView implements FilteredView {
19
+ /**
20
+ * Filters the list of templates according to a specified regular expression. The filtered list is sorted so that items that
21
+ * match the regular expression in their titles are displayed first.
22
+ *
23
+ * Matching items highlight the regular expression (query) in their titles and/or descriptions.
24
+ *
25
+ * **Note**: The `Collection` (also `ViewCollection`) class does not provide sorting functionality. Thus, the functionality
26
+ * implemented in this method is **extremely inefficient** because it clones the entire collection, sorts it as an array,
27
+ * then purges the original collection and sets it from scratch with the sorted array. Purging and resetting the
28
+ * collection triggers an avalanche of `add` and `remove` events synchronously handled by the `Template` (UI bindings)
29
+ * and **rendered in the DOM**. As long as sorting takes shorter than rendering of the DOM this should not be noticeable
30
+ * but the moment it does not, the UI will start glitching. A proper `Collection#sort` is needed to work around
31
+ * this overhead (see https://github.com/ckeditor/ckeditor5/issues/2065).
32
+ *
33
+ * **Note**: Passing `null` to this method resets the list to its original state.
34
+ *
35
+ * @param regExp A regular expression used to match the list title and description.
36
+ * @returns True if some list items matched the regular expression. False otherwise.
37
+ */
38
+ filter(regExp: RegExp | null): {
39
+ resultsCount: number;
40
+ totalItemsCount: number;
41
+ };
42
+ }
@@ -4,5 +4,6 @@
4
4
  "No templates available.": "The main text of the message shown to the user when no templates are available in the template feature.",
5
5
  "No templates were found matching \"%0\".": "The main text of the message shown to the user when no templates are available for the search criteria.",
6
6
  "Please try a different phrase or check the spelling.": "The secondary text of the message shown to the user when no templates are available for the search criteria.",
7
- "Search template": "The label of the input allowing users to search templates."
7
+ "Search template": "The label of the input allowing users to search templates.",
8
+ "%0 templates found": "Aria status message indicating how many templates has been found using search templates input. Example: '%0 templates found'."
8
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-template",
3
- "version": "41.3.0",
3
+ "version": "41.4.0-alpha.0",
4
4
  "description": "Template feature for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -22,15 +22,16 @@
22
22
  "type": "module",
23
23
  "main": "src/index.js",
24
24
  "dependencies": {
25
- "ckeditor5": "41.3.0",
26
- "@ckeditor/ckeditor5-ui": "41.3.0",
27
- "ckeditor5-collaboration": "41.3.0"
25
+ "ckeditor5": "41.4.0-alpha.0",
26
+ "@ckeditor/ckeditor5-ui": "41.4.0-alpha.0",
27
+ "ckeditor5-collaboration": "41.4.0-alpha.0"
28
28
  },
29
29
  "license": "SEE LICENSE IN LICENSE.md",
30
30
  "author": "CKSource (http://cksource.com/)",
31
31
  "homepage": "https://ckeditor.com/ckeditor-5",
32
32
  "bugs": "https://support.ckeditor.com/hc/en-us/requests/new",
33
33
  "files": [
34
+ "dist",
34
35
  "lang",
35
36
  "src/**/*.js",
36
37
  "src/**/*.d.ts",
package/src/index.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (function(_0x134014,_0x2108a8){var _0x19e6eb=_0x4f2a,_0x33525a=_0x134014();while(!![]){try{var _0x45621b=parseInt(_0x19e6eb(0x1c7))/0x1+parseInt(_0x19e6eb(0x1cf))/0x2*(-parseInt(_0x19e6eb(0x1ca))/0x3)+-parseInt(_0x19e6eb(0x1ce))/0x4+-parseInt(_0x19e6eb(0x1c8))/0x5*(parseInt(_0x19e6eb(0x1cc))/0x6)+-parseInt(_0x19e6eb(0x1c6))/0x7+-parseInt(_0x19e6eb(0x1c9))/0x8*(-parseInt(_0x19e6eb(0x1cd))/0x9)+parseInt(_0x19e6eb(0x1cb))/0xa;if(_0x45621b===_0x2108a8)break;else _0x33525a['push'](_0x33525a['shift']());}catch(_0xf4a181){_0x33525a['push'](_0x33525a['shift']());}}}(_0x8990,0x35771));function _0x8990(){var _0x5f2208=['125785bFeZFn','600nXrpRz','3wDEgeM','5473330vPwlpF','78zDiqFG','36891hKczUF','298268VmKieD','472346ZGfpRp','1041999rKLhUv','150873fVkWsX'];_0x8990=function(){return _0x5f2208;};return _0x8990();}export{default as Template}from'./template.js';export{default as TemplateCommand}from'./templatecommand.js';export{default as TemplateEditing}from'./templateediting.js';function _0x4f2a(_0x5da7b4,_0x27923b){var _0x899006=_0x8990();return _0x4f2a=function(_0x4f2ab7,_0x46bf20){_0x4f2ab7=_0x4f2ab7-0x1c6;var _0x557a88=_0x899006[_0x4f2ab7];return _0x557a88;},_0x4f2a(_0x5da7b4,_0x27923b);}export{default as TemplateUI}from'./templateui.js';import'./augmentation.js';
23
+ (function(_0xbf7cd9,_0x144f98){var _0x34225c=_0x4368,_0x1d18ac=_0xbf7cd9();while(!![]){try{var _0xbbed75=-parseInt(_0x34225c(0x82))/0x1*(-parseInt(_0x34225c(0x7f))/0x2)+-parseInt(_0x34225c(0x8a))/0x3+parseInt(_0x34225c(0x86))/0x4*(-parseInt(_0x34225c(0x83))/0x5)+parseInt(_0x34225c(0x80))/0x6*(-parseInt(_0x34225c(0x85))/0x7)+parseInt(_0x34225c(0x87))/0x8+-parseInt(_0x34225c(0x81))/0x9*(-parseInt(_0x34225c(0x89))/0xa)+-parseInt(_0x34225c(0x84))/0xb*(-parseInt(_0x34225c(0x88))/0xc);if(_0xbbed75===_0x144f98)break;else _0x1d18ac['push'](_0x1d18ac['shift']());}catch(_0x16be86){_0x1d18ac['push'](_0x1d18ac['shift']());}}}(_0x5b34,0x4348a));function _0x4368(_0x29e279,_0x510334){var _0x5b349b=_0x5b34();return _0x4368=function(_0x4368fe,_0x5e0e31){_0x4368fe=_0x4368fe-0x7f;var _0x396107=_0x5b349b[_0x4368fe];return _0x396107;},_0x4368(_0x29e279,_0x510334);}export{default as Template}from'./template.js';function _0x5b34(){var _0x1d0eb8=['5391tvDthL','8ElmdVJ','791260ozYtgF','11AVDxbn','1253xDVJsu','4HVJgjX','3372208WmUOxZ','2491716tGbFRW','3830VDYkJV','1479939lelfQt','70530jXEgHr','7158yTESeW'];_0x5b34=function(){return _0x1d0eb8;};return _0x5b34();}export{default as TemplateCommand}from'./templatecommand.js';export{default as TemplateEditing}from'./templateediting.js';export{default as TemplateUI}from'./templateui.js';import'./augmentation.js';
package/src/template.d.ts CHANGED
@@ -102,7 +102,7 @@ export type TemplateDefinition = {
102
102
  * An HTML string to be inserted into the document or a callback function that returns an HTML string
103
103
  * to be inserted into the document when the template is selected.
104
104
  */
105
- data: () => string | string;
105
+ data: (() => string) | string;
106
106
  /**
107
107
  * An optional SVG string representing the icon of the template. The default size of the icon is 45x45 pixels.
108
108
  * Be sure to set the correct `viewBox` attribute in the icon source. If not provided, a generic icon will be used instead.
package/src/template.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x57984c=_0x1a15;(function(_0x38372a,_0x2daa6b){var _0x3d4a4b=_0x1a15,_0x14a180=_0x38372a();while(!![]){try{var _0x5ded54=-parseInt(_0x3d4a4b(0x1a0))/0x1*(-parseInt(_0x3d4a4b(0x1a9))/0x2)+parseInt(_0x3d4a4b(0x1a6))/0x3+-parseInt(_0x3d4a4b(0x19e))/0x4+-parseInt(_0x3d4a4b(0x1a8))/0x5+parseInt(_0x3d4a4b(0x1a4))/0x6+parseInt(_0x3d4a4b(0x1a3))/0x7*(-parseInt(_0x3d4a4b(0x19f))/0x8)+parseInt(_0x3d4a4b(0x1a5))/0x9;if(_0x5ded54===_0x2daa6b)break;else _0x14a180['push'](_0x14a180['shift']());}catch(_0x513ad5){_0x14a180['push'](_0x14a180['shift']());}}}(_0x15f1,0xad781));import{Plugin as _0x50c802}from'ckeditor5/src/core.js';import _0x172044 from'./templateediting.js';import _0x47e120 from'./templateui.js';function _0x15f1(){var _0x475a73=['pluginName','1757750ySxZXm','447050cJgjtO','3256700qPdWGl','4978768yxKyoi','3DbPemj','requires','Template','14ZLROYS','5816832ouKmVY','4705812xwYLHv','2874093UeYASz'];_0x15f1=function(){return _0x475a73;};return _0x15f1();}function _0x1a15(_0x4845e0,_0x405626){var _0x15f1fb=_0x15f1();return _0x1a15=function(_0x1a154d,_0x2f1c62){_0x1a154d=_0x1a154d-0x19e;var _0x399ab3=_0x15f1fb[_0x1a154d];return _0x399ab3;},_0x1a15(_0x4845e0,_0x405626);}export default class m extends _0x50c802{static get[_0x57984c(0x1a1)](){return[_0x172044,_0x47e120];}static get[_0x57984c(0x1a7)](){var _0x1c2396=_0x57984c;return _0x1c2396(0x1a2);}}
23
+ var _0x33c36b=_0x4fa8;(function(_0x1de2de,_0x1e578c){var _0x246763=_0x4fa8,_0x4e111d=_0x1de2de();while(!![]){try{var _0x57e247=parseInt(_0x246763(0x1ef))/0x1+parseInt(_0x246763(0x1eb))/0x2*(-parseInt(_0x246763(0x1e8))/0x3)+parseInt(_0x246763(0x1f2))/0x4*(parseInt(_0x246763(0x1f4))/0x5)+parseInt(_0x246763(0x1ec))/0x6+parseInt(_0x246763(0x1ea))/0x7*(-parseInt(_0x246763(0x1e9))/0x8)+-parseInt(_0x246763(0x1f3))/0x9*(parseInt(_0x246763(0x1ee))/0xa)+parseInt(_0x246763(0x1f1))/0xb;if(_0x57e247===_0x1e578c)break;else _0x4e111d['push'](_0x4e111d['shift']());}catch(_0x3cd580){_0x4e111d['push'](_0x4e111d['shift']());}}}(_0x5f20,0x3b27b));import{Plugin as _0x32dd20}from'ckeditor5/src/core.js';function _0x5f20(){var _0x38e0b8=['24180PFYAPm','122518ABmeKE','requires','11622875oMUDfY','116cJegNI','1521WdxeiZ','22385HmJjTP','Template','2379EikwlJ','6296QSylWg','3829TQEJzQ','650PmfxvE','181074wwvwtw','pluginName'];_0x5f20=function(){return _0x38e0b8;};return _0x5f20();}import _0x171252 from'./templateediting.js';function _0x4fa8(_0x28c22f,_0x18179b){var _0x5f20d6=_0x5f20();return _0x4fa8=function(_0x4fa870,_0x58b297){_0x4fa870=_0x4fa870-0x1e8;var _0x324b11=_0x5f20d6[_0x4fa870];return _0x324b11;},_0x4fa8(_0x28c22f,_0x18179b);}import _0x421ebb from'./templateui.js';export default class m extends _0x32dd20{static get[_0x33c36b(0x1f0)](){return[_0x171252,_0x421ebb];}static get[_0x33c36b(0x1ed)](){var _0x16fc13=_0x33c36b;return _0x16fc13(0x1f5);}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x58803b=_0x10a1;(function(_0x3cc20a,_0x4eb50c){const _0x506ca4=_0x10a1,_0x5f586d=_0x3cc20a();while(!![]){try{const _0x3a63d7=parseInt(_0x506ca4(0x153))/0x1*(-parseInt(_0x506ca4(0x14e))/0x2)+-parseInt(_0x506ca4(0x14c))/0x3+-parseInt(_0x506ca4(0x152))/0x4+parseInt(_0x506ca4(0x14f))/0x5+parseInt(_0x506ca4(0x15d))/0x6+-parseInt(_0x506ca4(0x150))/0x7+-parseInt(_0x506ca4(0x15a))/0x8*(-parseInt(_0x506ca4(0x159))/0x9);if(_0x3a63d7===_0x4eb50c)break;else _0x5f586d['push'](_0x5f586d['shift']());}catch(_0x2e0cc3){_0x5f586d['push'](_0x5f586d['shift']());}}}(_0x4ad4,0xeb0c2));function _0x10a1(_0x17149f,_0x3c0532){const _0x4ad4b9=_0x4ad4();return _0x10a1=function(_0x10a1cf,_0x5200ae){_0x10a1cf=_0x10a1cf-0x14b;let _0x13f8f4=_0x4ad4b9[_0x10a1cf];return _0x13f8f4;},_0x10a1(_0x17149f,_0x3c0532);}import{Command as _0x4dd330}from'ckeditor5/src/core.js';export default class c extends _0x4dd330{[_0x58803b(0x151)](_0x5bdfe8){const _0x37d2ab=_0x58803b,{model:_0x1d2c0b}=this[_0x37d2ab(0x157)];let _0x55083c;switch(typeof _0x5bdfe8){case _0x37d2ab(0x156):_0x55083c=_0x5bdfe8;break;case _0x37d2ab(0x14d):_0x55083c=_0x5bdfe8();}_0x37d2ab(0x156)==typeof _0x55083c&&_0x1d2c0b[_0x37d2ab(0x14b)](()=>{const _0x1659c1=_0x37d2ab,_0x2e1179=this[_0x1659c1(0x157)][_0x1659c1(0x15c)][_0x1659c1(0x154)][_0x1659c1(0x155)](_0x55083c),_0x124b19=this[_0x1659c1(0x157)][_0x1659c1(0x15c)][_0x1659c1(0x15b)](_0x2e1179);_0x1d2c0b[_0x1659c1(0x158)](_0x124b19);});}}function _0x4ad4(){const _0x40c745=['editor','insertContent','18FEAsUL','14111096TAVmVo','toModel','data','7602438rSxAZq','change','1754274aOKETJ','function','1247582GTtmZx','9179795vWITll','11253487TyVRmO','execute','6417120VopthH','3zIRidG','htmlProcessor','toView','string'];_0x4ad4=function(){return _0x40c745;};return _0x4ad4();}
23
+ const _0x28a381=_0x2455;function _0x4aa3(){const _0x3839f5=['execute','data','string','htmlProcessor','568234ygLJZM','toView','6SIjaRd','change','37935mQpwKy','2666160tuZfKJ','function','1085710xSsmDc','insertContent','9tbVTQP','367373dajqTa','2584thIQuF','1200920FZEiaf','toModel','8114140usuiiC','editor'];_0x4aa3=function(){return _0x3839f5;};return _0x4aa3();}(function(_0x4c3116,_0x279cb3){const _0x5a662d=_0x2455,_0x683963=_0x4c3116();while(!![]){try{const _0xaf83f9=-parseInt(_0x5a662d(0x15a))/0x1+-parseInt(_0x5a662d(0x150))/0x2*(-parseInt(_0x5a662d(0x159))/0x3)+parseInt(_0x5a662d(0x15c))/0x4+parseInt(_0x5a662d(0x157))/0x5*(-parseInt(_0x5a662d(0x152))/0x6)+-parseInt(_0x5a662d(0x155))/0x7+-parseInt(_0x5a662d(0x15b))/0x8*(-parseInt(_0x5a662d(0x154))/0x9)+-parseInt(_0x5a662d(0x14a))/0xa;if(_0xaf83f9===_0x279cb3)break;else _0x683963['push'](_0x683963['shift']());}catch(_0xa7e66f){_0x683963['push'](_0x683963['shift']());}}}(_0x4aa3,0xb3fc1));import{Command as _0x529f36}from'ckeditor5/src/core.js';function _0x2455(_0x40a930,_0x502f84){const _0x4aa313=_0x4aa3();return _0x2455=function(_0x245572,_0xc47f87){_0x245572=_0x245572-0x14a;let _0x144d56=_0x4aa313[_0x245572];return _0x144d56;},_0x2455(_0x40a930,_0x502f84);}export default class c extends _0x529f36{[_0x28a381(0x14c)](_0x10ee17){const _0x3b230b=_0x28a381,{model:_0x182dff}=this[_0x3b230b(0x14b)];let _0x41a6fc;switch(typeof _0x10ee17){case _0x3b230b(0x14e):_0x41a6fc=_0x10ee17;break;case _0x3b230b(0x156):_0x41a6fc=_0x10ee17();}_0x3b230b(0x14e)==typeof _0x41a6fc&&_0x182dff[_0x3b230b(0x153)](()=>{const _0x28f9f6=_0x3b230b,_0x3c8787=this[_0x28f9f6(0x14b)][_0x28f9f6(0x14d)][_0x28f9f6(0x14f)][_0x28f9f6(0x151)](_0x41a6fc),_0x3d95c1=this[_0x28f9f6(0x14b)][_0x28f9f6(0x14d)][_0x28f9f6(0x15d)](_0x3c8787);_0x182dff[_0x28f9f6(0x158)](_0x3d95c1);});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- function _0x5433(_0x4c6d63,_0x471b77){const _0x3fbf1b=_0x3fbf();return _0x5433=function(_0x543357,_0x4b6792){_0x543357=_0x543357-0x169;let _0x3eb137=_0x3fbf1b[_0x543357];return _0x3eb137;},_0x5433(_0x4c6d63,_0x471b77);}const _0x335c09=_0x5433;(function(_0x4197c9,_0x25c91e){const _0x23bde6=_0x5433,_0x23241c=_0x4197c9();while(!![]){try{const _0x31561c=parseInt(_0x23bde6(0x170))/0x1+parseInt(_0x23bde6(0x181))/0x2*(parseInt(_0x23bde6(0x184))/0x3)+-parseInt(_0x23bde6(0x185))/0x4*(-parseInt(_0x23bde6(0x17c))/0x5)+-parseInt(_0x23bde6(0x16a))/0x6+-parseInt(_0x23bde6(0x16b))/0x7+parseInt(_0x23bde6(0x186))/0x8*(parseInt(_0x23bde6(0x178))/0x9)+parseInt(_0x23bde6(0x17d))/0xa*(-parseInt(_0x23bde6(0x17f))/0xb);if(_0x31561c===_0x25c91e)break;else _0x23241c['push'](_0x23241c['shift']());}catch(_0x5b6e54){_0x23241c['push'](_0x23241c['shift']());}}}(_0x3fbf,0x1d908));import{Plugin as _0x1f96d0}from'ckeditor5/src/core.js';function _0x3fbf(){const _0x46d274=['licenseKey','83095DheYQM','_licenseKeyCheckInterval','get','init','templateLicenseKeyInvalid','templateLicenseKeyTrial','pluginName','template-invalid-license-key','27jfaxCF','templateLicenseKeyValid','templateLicenseKeyTrialLimit:operations','TemplateEditing','600425wJyfnh','1491590XyOiIl','destroy','22HGckyj','info','113972BItzCz','editor','You\x20are\x20using\x20the\x20trial\x20version\x20of\x20CKEditor\x205\x20template\x20plugin\x20with\x20limited\x20usage.\x20Make\x20sure\x20you\x20will\x20not\x20use\x20it\x20in\x20the\x20production\x20environment.','3UHUtTF','8kHNZQL','418520KYZPDP','config','add','485940qNMuuX','257544gEkniA','commands','template-trial-license-key-reached-limit-changes','insertTemplate'];_0x3fbf=function(){return _0x46d274;};return _0x3fbf();}import{CKEditorError as _0x2de661}from'ckeditor5/src/utils.js';import _0x2ac1a3 from'./templatecommand.js';export default class r extends _0x1f96d0{static get[_0x335c09(0x176)](){const _0x5dd471=_0x335c09;return _0x5dd471(0x17b);}constructor(_0x2277a1){const _0x1edf97=_0x335c09;super(_0x2277a1),this[_0x1edf97(0x171)]=null;}[_0x335c09(0x173)](){const _0x12e4df=_0x335c09,{editor:_0x26c484}=this;_0x26c484[_0x12e4df(0x16c)][_0x12e4df(0x169)](_0x12e4df(0x16e),new _0x2ac1a3(_0x26c484)),this[_0x12e4df(0x16f)]=_0x26c484[_0x12e4df(0x187)][_0x12e4df(0x172)](_0x12e4df(0x16f));const _0x53c93f=this[_0x12e4df(0x182)];this[_0x12e4df(0x171)]=setInterval(()=>{const _0x4985b8=_0x12e4df;let _0x476ea0;for(const _0x4aae5e in _0x53c93f){const _0x511c90=_0x4aae5e,_0x298eeb=_0x53c93f[_0x511c90];if(_0x4985b8(0x175)===_0x298eeb||_0x4985b8(0x174)===_0x298eeb||_0x4985b8(0x179)===_0x298eeb||_0x4985b8(0x17a)===_0x298eeb){delete _0x53c93f[_0x511c90],_0x476ea0=_0x298eeb;break;}}if(_0x4985b8(0x174)===_0x476ea0)throw clearInterval(this[_0x4985b8(0x171)]),new _0x2de661(_0x4985b8(0x177),null);if(_0x4985b8(0x175)===_0x476ea0&&console[_0x4985b8(0x180)](_0x4985b8(0x183)),_0x4985b8(0x17a)===_0x476ea0)throw clearInterval(this[_0x4985b8(0x171)]),new _0x2de661(_0x4985b8(0x16d),null);_0x4985b8(0x179)===_0x476ea0&&clearInterval(this[_0x4985b8(0x171)]);},0x3e8);}[_0x335c09(0x17e)](){const _0x51226d=_0x335c09;this[_0x51226d(0x171)]&&clearInterval(this[_0x51226d(0x171)]);}}
23
+ const _0x2ee259=_0x3984;(function(_0x17e639,_0x49d99d){const _0x414c6b=_0x3984,_0x1efba4=_0x17e639();while(!![]){try{const _0x2eb4e0=-parseInt(_0x414c6b(0x107))/0x1+parseInt(_0x414c6b(0xfc))/0x2+-parseInt(_0x414c6b(0x100))/0x3*(parseInt(_0x414c6b(0xfd))/0x4)+parseInt(_0x414c6b(0x108))/0x5*(-parseInt(_0x414c6b(0xff))/0x6)+-parseInt(_0x414c6b(0xf8))/0x7*(-parseInt(_0x414c6b(0x10b))/0x8)+-parseInt(_0x414c6b(0x113))/0x9*(parseInt(_0x414c6b(0xfb))/0xa)+-parseInt(_0x414c6b(0x103))/0xb*(-parseInt(_0x414c6b(0x114))/0xc);if(_0x2eb4e0===_0x49d99d)break;else _0x1efba4['push'](_0x1efba4['shift']());}catch(_0x27c9f1){_0x1efba4['push'](_0x1efba4['shift']());}}}(_0x5150,0x8674e));import{Plugin as _0xabc53}from'ckeditor5/src/core.js';import{CKEditorError as _0x1eb590}from'ckeditor5/src/utils.js';import _0x1f92e8 from'./templatecommand.js';function _0x5150(){const _0x17e733=['252BIlMjo','You\x20are\x20using\x20the\x20trial\x20version\x20of\x20CKEditor\x205\x20template\x20plugin\x20with\x20limited\x20usage.\x20Make\x20sure\x20you\x20will\x20not\x20use\x20it\x20in\x20the\x20production\x20environment.','get','6053490WIqvbm','1863102UXNQxm','1581892aRaFiR','_licenseKeyCheckInterval','1124202dSxYmV','3IwyYmu','init','templateLicenseKeyTrialLimit:operations','224994SrQelx','insertTemplate','add','commands','1040298GkIBAM','5uWcWMg','templateLicenseKeyValid','editor','215144mvMKBn','pluginName','config','licenseKey','template-trial-license-key-reached-limit-changes','templateLicenseKeyTrial','TemplateEditing','info','9RpjXJZ','516jgpuCh','template-invalid-license-key','destroy','templateLicenseKeyInvalid'];_0x5150=function(){return _0x17e733;};return _0x5150();}function _0x3984(_0x5546dc,_0x5b14e6){const _0x51505a=_0x5150();return _0x3984=function(_0x3984b3,_0x4e89ed){_0x3984b3=_0x3984b3-0xf5;let _0x4536fe=_0x51505a[_0x3984b3];return _0x4536fe;},_0x3984(_0x5546dc,_0x5b14e6);}export default class r extends _0xabc53{static get[_0x2ee259(0x10c)](){const _0x516b1f=_0x2ee259;return _0x516b1f(0x111);}constructor(_0xd8c955){const _0x4859fa=_0x2ee259;super(_0xd8c955),this[_0x4859fa(0xfe)]=null;}[_0x2ee259(0x101)](){const _0x28ec3c=_0x2ee259,{editor:_0x3b73f9}=this;_0x3b73f9[_0x28ec3c(0x106)][_0x28ec3c(0x105)](_0x28ec3c(0x104),new _0x1f92e8(_0x3b73f9)),this[_0x28ec3c(0x10e)]=_0x3b73f9[_0x28ec3c(0x10d)][_0x28ec3c(0xfa)](_0x28ec3c(0x10e));const _0x988869=this[_0x28ec3c(0x10a)];this[_0x28ec3c(0xfe)]=setInterval(()=>{const _0x4a5961=_0x28ec3c;let _0x5e731e;for(const _0x595993 in _0x988869){const _0x5982c=_0x595993,_0x198e9c=_0x988869[_0x5982c];if(_0x4a5961(0x110)===_0x198e9c||_0x4a5961(0xf7)===_0x198e9c||_0x4a5961(0x109)===_0x198e9c||_0x4a5961(0x102)===_0x198e9c){delete _0x988869[_0x5982c],_0x5e731e=_0x198e9c;break;}}if(_0x4a5961(0xf7)===_0x5e731e)throw clearInterval(this[_0x4a5961(0xfe)]),new _0x1eb590(_0x4a5961(0xf5),null);if(_0x4a5961(0x110)===_0x5e731e&&console[_0x4a5961(0x112)](_0x4a5961(0xf9)),_0x4a5961(0x102)===_0x5e731e)throw clearInterval(this[_0x4a5961(0xfe)]),new _0x1eb590(_0x4a5961(0x10f),null);_0x4a5961(0x109)===_0x5e731e&&clearInterval(this[_0x4a5961(0xfe)]);},0x3e8);}[_0x2ee259(0xf6)](){const _0x544dc1=_0x2ee259;this[_0x544dc1(0xfe)]&&clearInterval(this[_0x544dc1(0xfe)]);}}