@ckeditor/ckeditor5-ai 40.0.0 → 40.1.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 (149) hide show
  1. package/LICENSE.md +2 -2
  2. package/build/ai.js +2 -2
  3. package/build/translations/af.js +1 -1
  4. package/build/translations/ar.js +1 -1
  5. package/build/translations/bg.js +1 -1
  6. package/build/translations/bn.js +1 -1
  7. package/build/translations/bs.js +1 -1
  8. package/build/translations/ca.js +1 -1
  9. package/build/translations/cs.js +1 -1
  10. package/build/translations/da.js +1 -1
  11. package/build/translations/de-ch.js +1 -1
  12. package/build/translations/de.js +1 -1
  13. package/build/translations/el.js +1 -1
  14. package/build/translations/en-au.js +1 -1
  15. package/build/translations/es-co.js +1 -1
  16. package/build/translations/es.js +1 -1
  17. package/build/translations/et.js +1 -1
  18. package/build/translations/fa.js +1 -1
  19. package/build/translations/fi.js +1 -1
  20. package/build/translations/fr.js +1 -1
  21. package/build/translations/gl.js +1 -1
  22. package/build/translations/he.js +1 -1
  23. package/build/translations/hi.js +1 -1
  24. package/build/translations/hr.js +1 -1
  25. package/build/translations/hu.js +1 -1
  26. package/build/translations/id.js +1 -1
  27. package/build/translations/it.js +1 -1
  28. package/build/translations/ja.js +1 -1
  29. package/build/translations/jv.js +1 -1
  30. package/build/translations/ko.js +1 -1
  31. package/build/translations/lt.js +1 -1
  32. package/build/translations/lv.js +1 -1
  33. package/build/translations/ms.js +1 -1
  34. package/build/translations/nl.js +1 -1
  35. package/build/translations/no.js +1 -1
  36. package/build/translations/pl.js +1 -1
  37. package/build/translations/pt-br.js +1 -1
  38. package/build/translations/pt.js +1 -1
  39. package/build/translations/ro.js +1 -1
  40. package/build/translations/ru.js +1 -1
  41. package/build/translations/sk.js +1 -1
  42. package/build/translations/sr-latn.js +1 -1
  43. package/build/translations/sr.js +1 -1
  44. package/build/translations/sv.js +1 -1
  45. package/build/translations/th.js +1 -1
  46. package/build/translations/tk.js +1 -1
  47. package/build/translations/tr.js +1 -1
  48. package/build/translations/ug.js +1 -1
  49. package/build/translations/uk.js +1 -1
  50. package/build/translations/ur.js +1 -1
  51. package/build/translations/uz.js +1 -0
  52. package/build/translations/vi.js +1 -1
  53. package/build/translations/zh-cn.js +1 -1
  54. package/build/translations/zh.js +1 -1
  55. package/lang/contexts.json +1 -0
  56. package/lang/translations/af.po +60 -16
  57. package/lang/translations/ar.po +60 -16
  58. package/lang/translations/bg.po +60 -16
  59. package/lang/translations/bn.po +60 -16
  60. package/lang/translations/bs.po +60 -16
  61. package/lang/translations/ca.po +60 -16
  62. package/lang/translations/cs.po +60 -16
  63. package/lang/translations/da.po +60 -16
  64. package/lang/translations/de-ch.po +60 -16
  65. package/lang/translations/de.po +60 -16
  66. package/lang/translations/el.po +60 -16
  67. package/lang/translations/en-au.po +60 -16
  68. package/lang/translations/en.po +60 -16
  69. package/lang/translations/es-co.po +60 -16
  70. package/lang/translations/es.po +60 -16
  71. package/lang/translations/et.po +60 -16
  72. package/lang/translations/fa.po +60 -16
  73. package/lang/translations/fi.po +60 -16
  74. package/lang/translations/fr.po +60 -16
  75. package/lang/translations/gl.po +60 -16
  76. package/lang/translations/he.po +60 -16
  77. package/lang/translations/hi.po +60 -16
  78. package/lang/translations/hr.po +93 -49
  79. package/lang/translations/hu.po +60 -16
  80. package/lang/translations/id.po +60 -16
  81. package/lang/translations/it.po +60 -16
  82. package/lang/translations/ja.po +60 -16
  83. package/lang/translations/jv.po +60 -16
  84. package/lang/translations/ko.po +60 -16
  85. package/lang/translations/lt.po +60 -16
  86. package/lang/translations/lv.po +60 -16
  87. package/lang/translations/ms.po +60 -16
  88. package/lang/translations/nl.po +60 -16
  89. package/lang/translations/no.po +60 -16
  90. package/lang/translations/pl.po +60 -16
  91. package/lang/translations/pt-br.po +60 -16
  92. package/lang/translations/pt.po +60 -16
  93. package/lang/translations/ro.po +60 -16
  94. package/lang/translations/ru.po +60 -16
  95. package/lang/translations/sk.po +60 -16
  96. package/lang/translations/sr-latn.po +60 -16
  97. package/lang/translations/sr.po +60 -16
  98. package/lang/translations/sv.po +60 -16
  99. package/lang/translations/th.po +60 -16
  100. package/lang/translations/tk.po +60 -16
  101. package/lang/translations/tr.po +60 -16
  102. package/lang/translations/ug.po +94 -50
  103. package/lang/translations/uk.po +60 -16
  104. package/lang/translations/ur.po +60 -16
  105. package/lang/translations/uz.po +226 -0
  106. package/lang/translations/vi.po +60 -16
  107. package/lang/translations/zh-cn.po +60 -16
  108. package/lang/translations/zh.po +60 -16
  109. package/package.json +3 -3
  110. package/src/aiassistant.d.ts +458 -419
  111. package/src/aiassistant.js +1 -1
  112. package/src/aiassistantediting.d.ts +45 -45
  113. package/src/aiassistantediting.js +1 -1
  114. package/src/aiassistantui.d.ts +44 -46
  115. package/src/aiassistantui.js +1 -1
  116. package/src/aiconnector.d.ts +45 -44
  117. package/src/aiconnector.js +1 -1
  118. package/src/augmentation.d.ts +26 -26
  119. package/src/index.d.ts +9 -9
  120. package/src/ui/aiassistantcontroller.d.ts +96 -59
  121. package/src/ui/aiassistantcontroller.js +1 -1
  122. package/src/ui/dropdown/aicommandslistview.d.ts +22 -22
  123. package/src/ui/dropdown/aicommandslistview.js +1 -1
  124. package/src/ui/dropdown/buttonlabelwithhighlightview.d.ts +29 -29
  125. package/src/ui/dropdown/buttonlabelwithhighlightview.js +1 -1
  126. package/src/ui/dropdown/labelwithhighlightview.d.ts +25 -0
  127. package/src/ui/dropdown/labelwithhighlightview.js +23 -0
  128. package/src/ui/form/aiformcontentarea.d.ts +48 -48
  129. package/src/ui/form/aiformcontentarea.js +1 -1
  130. package/src/ui/form/aiformerrorview.d.ts +26 -26
  131. package/src/ui/form/aiformerrorview.js +1 -1
  132. package/src/ui/form/aiformpromptview.d.ts +46 -46
  133. package/src/ui/form/aiformpromptview.js +1 -1
  134. package/src/ui/form/aiformtoolbarview.d.ts +54 -41
  135. package/src/ui/form/aiformtoolbarview.js +1 -1
  136. package/src/ui/form/aiformview.d.ts +142 -131
  137. package/src/ui/form/aiformview.js +1 -1
  138. package/src/ui/form/aihistorylistitemview.d.ts +18 -18
  139. package/src/ui/form/aihistorylistitemview.js +1 -1
  140. package/src/ui/form/aihistorylistview.d.ts +35 -35
  141. package/src/ui/form/aihistorylistview.js +1 -1
  142. package/src/ui/form/prompthistory.d.ts +20 -20
  143. package/src/ui/form/prompthistory.js +1 -1
  144. package/src/ui/showaiassistantcommand.d.ts +26 -26
  145. package/src/ui/showaiassistantcommand.js +1 -1
  146. package/src/utils/common-translations.d.ts +9 -9
  147. package/src/utils/common-translations.js +1 -1
  148. package/theme/ai-form.css +58 -11
  149. package/theme/ai.css +20 -15
@@ -1,59 +1,96 @@
1
- /**
2
- * @license Copyright (c) 2003-2023, 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
- import { type default as AIConnector } from '../aiconnector';
6
- import type { default as AIFormView } from './form/aiformview';
7
- declare const AIAssistantController_base: {
8
- new (): import("ckeditor5/src/utils").Observable;
9
- prototype: import("ckeditor5/src/utils").Observable;
10
- };
11
- /**
12
- * Controller for the AI assistant.
13
- *
14
- * It takes a AI balloon view, listens to events fired by that view and based on them performs actions on an AI handler.
15
- * This controller is also responsible for streaming the AI response for the UI.
16
- */
17
- export default class AIAssistantController extends AIAssistantController_base {
18
- /**
19
- * An instance of the {@link module:ai/aiconnector~AIConnector}.
20
- */
21
- readonly connector: AIConnector;
22
- /**
23
- * An instance of the {@link module:ai/ui/aiformview~AIFormView}.
24
- */
25
- readonly view: AIFormView;
26
- /**
27
- * The previous value of the user prompt. It is kept to handle the try again event.
28
- *
29
- * @observable
30
- */
31
- previousPrompt?: string;
32
- /**
33
- * The previous value of the context for the AI request. It is kept to handle the try again event.
34
- *
35
- * Initially it is the selected HTML content from the editor. Subsequently,
36
- * the context is replaced by each response from AI.
37
- *
38
- * @observable
39
- */
40
- previousContext?: string;
41
- /**
42
- * Flag that indicates if the processing is in progress.
43
- *
44
- * @observable
45
- */
46
- isProcessing: boolean;
47
- /**
48
- * @param connector AI connector instance.
49
- * @param view AI form view.
50
- * @param htmlContent The selected HTML content on which the AI should base.
51
- * @param prompt The initial prompt that causes the processing to start.
52
- */
53
- constructor(connector: AIConnector, view: AIFormView, htmlContent: string, prompt?: string);
54
- /**
55
- * Destroys `AIAssistantController` instance.
56
- */
57
- destroy(): void;
58
- }
59
- export {};
1
+ /**
2
+ * @license Copyright (c) 2003-2023, 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
+ import { type default as AIConnector } from '../aiconnector';
6
+ import type { default as AIFormView } from './form/aiformview';
7
+ import type { AIFormToolbarViewMainAction } from './form/aiformtoolbarview';
8
+ import type { Editor } from 'ckeditor5/src/core';
9
+ declare const AIAssistantController_base: {
10
+ new (): import("ckeditor5/src/utils").Observable;
11
+ prototype: import("ckeditor5/src/utils").Observable;
12
+ };
13
+ /**
14
+ * Controller for the AI assistant.
15
+ *
16
+ * It takes a AI balloon view, listens to events fired by that view and based on them performs actions on an AI handler.
17
+ * This controller is also responsible for streaming the AI response for the UI.
18
+ */
19
+ export default class AIAssistantController extends AIAssistantController_base {
20
+ /**
21
+ * The editor instance.
22
+ */
23
+ readonly editor: Editor;
24
+ /**
25
+ * An instance of the {@link module:ai/aiconnector~AIConnector}.
26
+ */
27
+ readonly connector: AIConnector;
28
+ /**
29
+ * An instance of the {@link module:ai/ui/aiformview~AIFormView}.
30
+ */
31
+ readonly view: AIFormView;
32
+ /**
33
+ * It is the selected HTML content from the editor on which the balloon has been initialized.
34
+ */
35
+ initialContext: string;
36
+ /**
37
+ * The value returned by the AI after executing the prompt. It will be used as a context for the next calls.
38
+ *
39
+ * This value is also displayed in the view.
40
+ */
41
+ currentContext: string;
42
+ /**
43
+ * The previous value of the context for the AI request. It is kept to handle the try again event.
44
+ *
45
+ * Initially it is the selected HTML content from the editor. Subsequently,
46
+ * the context is replaced by each response from AI.
47
+ *
48
+ * @observable
49
+ */
50
+ previousContext?: string;
51
+ /**
52
+ * The previous value of the user prompt. It is kept to handle the try again event.
53
+ *
54
+ * @observable
55
+ */
56
+ previousPrompt?: string;
57
+ /**
58
+ * The label of the previous executed prompt. It is connected to #previousPrompt and is kept to handle the try again event.
59
+ *
60
+ * @observable
61
+ */
62
+ previousLabel?: string;
63
+ /**
64
+ * Flag that indicates if the processing is in progress.
65
+ *
66
+ * @observable
67
+ */
68
+ isProcessing: boolean;
69
+ /**
70
+ * @param connector AI connector instance.
71
+ * @param view AI form view.
72
+ */
73
+ constructor(editor: Editor, connector: AIConnector, view: AIFormView);
74
+ /**
75
+ * Destroys `AIAssistantController` instance.
76
+ */
77
+ destroy(): void;
78
+ /**
79
+ * Handles the initial prompt for a new context and inits the listener for the visible view.
80
+ *
81
+ * This function should be called whenever the AI balloon is displayed.
82
+ *
83
+ * @param options
84
+ * @param options.htmlContent The selected HTML content on which the AI should base.
85
+ * @param options.prompt The initial prompt that causes the processing to start.
86
+ * @param options.label The label that will be displayed in the view.
87
+ * @param options.mainAction The action name for the main insertion button.
88
+ */
89
+ updateView({ prompt, htmlContent, label, mainAction }: {
90
+ prompt: string;
91
+ htmlContent: string;
92
+ label: string;
93
+ mainAction: AIFormToolbarViewMainAction;
94
+ }): Promise<void>;
95
+ }
96
+ export {};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x2ef6=['connector','isProcessing','previousPrompt','stopProcessing','view','previousContext','_handlePrompt','startProcessing','_updateValue','finishProcessing','abort','stopListening','finally','submitPrompt','handleError','once','set','render','destroy','listenTo','catch'];(function(_0x4557ac,_0x2ef671){const _0x476276=function(_0x57a67c){while(--_0x57a67c){_0x4557ac['push'](_0x4557ac['shift']());}};_0x476276(++_0x2ef671);}(_0x2ef6,0x187));const _0x4762=function(_0x4557ac,_0x2ef671){_0x4557ac=_0x4557ac-0x0;let _0x476276=_0x2ef6[_0x4557ac];return _0x476276;};import{ObservableMixin as _0x3191af}from'ckeditor5/src/utils';import{AIRequestError as _0x20abd1}from'../aiconnector';export default class I extends _0x3191af(){constructor(_0x5a4b3e,_0x3187f8,_0x589562,_0x4bab65){super(),this['connector']=_0x5a4b3e,this['view']=_0x3187f8,this[_0x4762('0x3')]({'previousPrompt':void 0x0,'previousContext':void 0x0,'isProcessing':!0x1}),_0x4bab65&&this[_0x4762('0xc')][_0x4762('0x2')](_0x4762('0x4'),()=>{this[_0x4762('0xe')](_0x4bab65,_0x589562);}),this[_0x4762('0x6')](this[_0x4762('0xc')],_0x4762('0x0'),(_0x29a4aa,_0x3c6b48)=>{const _0x27f6aa=this['view']['value']||_0x589562;this[_0x4762('0xe')](_0x3c6b48,_0x27f6aa);}),this[_0x4762('0x6')](this['view'],'tryAgainEvent',()=>{this[_0x4762('0xe')](this[_0x4762('0xa')],this[_0x4762('0xd')]);}),this['listenTo'](this[_0x4762('0xc')],_0x4762('0xb'),()=>{this[_0x4762('0x9')]=!0x1,this[_0x4762('0x8')][_0x4762('0x12')](),this[_0x4762('0xc')]['finishProcessing']();});}[_0x4762('0x5')](){this[_0x4762('0x13')]();}async['_handlePrompt'](_0xcf87cb,_0x3537d4){return this[_0x4762('0x9')]=!0x0,this[_0x4762('0xc')][_0x4762('0xf')](),this[_0x4762('0xa')]=_0xcf87cb,this[_0x4762('0xd')]=_0x3537d4,new Promise(_0x56d5ce=>{this[_0x4762('0x8')]['processPrompt'](_0xcf87cb,_0x3537d4,_0x306969=>this[_0x4762('0x10')](_0x306969))[_0x4762('0x7')](_0x812213=>{_0x812213 instanceof _0x20abd1?this[_0x4762('0xc')]['handleError'](_0x812213['message']):this[_0x4762('0xc')][_0x4762('0x1')](),_0x56d5ce();})[_0x4762('0x14')](()=>{this[_0x4762('0x9')]=!0x1,this[_0x4762('0xc')][_0x4762('0x11')](),_0x56d5ce();});});}[_0x4762('0x10')](_0x22deb2){this[_0x4762('0xc')]['value']=''+_0x22deb2;}}
23
+ const _0x50ac=['div','initialContext','currentContext','innerHTML','isProcessing','stopListening','startProcessing','previousPrompt','finishProcessing','destroy','connector','_updateValue','handleError','once','tryAgainEvent','prompt','processPrompt','catch','stopProcessing','mainAction','_sanitizationContainer','domConverter','previousLabel','bind','listenTo','submitPrompt','previousContext','view','createElement','_sanitizeHTML','set','setContentOf','editor','reset','abort','message','_handlePrompt'];(function(_0x1c6470,_0x50acb2){const _0x589874=function(_0x4cb4ec){while(--_0x4cb4ec){_0x1c6470['push'](_0x1c6470['shift']());}};_0x589874(++_0x50acb2);}(_0x50ac,0xdb));const _0x5898=function(_0x1c6470,_0x50acb2){_0x1c6470=_0x1c6470-0x0;let _0x589874=_0x50ac[_0x1c6470];return _0x589874;};import{ObservableMixin as _0x55829f}from'ckeditor5/src/utils';import{AIRequestError as _0x1b0948}from'../aiconnector';export default class g extends _0x55829f(){constructor(_0x2eee64,_0x23b8ec,_0x3e1db1){super(),this[_0x5898('0x23')]=_0x2eee64,this[_0x5898('0xd')]=_0x23b8ec,this[_0x5898('0x17')]=document[_0x5898('0x1f')](_0x5898('0x3')),this['view']=_0x3e1db1,this[_0x5898('0x21')]({'initialContext':'','currentContext':'','previousContext':void 0x0,'previousPrompt':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['view'][_0x5898('0x1a')]('value')['to'](this,'currentContext',this['_sanitizeHTML'][_0x5898('0x1a')](this)),this[_0x5898('0x1b')](this[_0x5898('0x1e')],_0x5898('0x1c'),(_0x527a1e,_0x37c1f7)=>{const _0x228bba=this[_0x5898('0x5')]||this['initialContext'];this[_0x5898('0x2')](_0x37c1f7,_0x228bba);}),this[_0x5898('0x1b')](this[_0x5898('0x1e')],_0x5898('0x11'),()=>{this['view'][_0x5898('0x12')]=this['previousLabel'],this[_0x5898('0x2')](this[_0x5898('0xa')],this['previousContext'],this[_0x5898('0x19')]);}),this[_0x5898('0x1b')](this[_0x5898('0x1e')],_0x5898('0x15'),()=>{this[_0x5898('0x15')]();});}[_0x5898('0xc')](){this[_0x5898('0x8')]();}async['updateView']({prompt:_0x25bebd,htmlContent:_0x302c0a,label:_0x22790c,mainAction:_0x3cb4f4}){this[_0x5898('0x1e')]['prompt']=_0x22790c,this[_0x5898('0x1e')][_0x5898('0x16')]=_0x3cb4f4,this[_0x5898('0x4')]=_0x302c0a,_0x25bebd&&(this[_0x5898('0x1e')]['isRendered']?this[_0x5898('0x2')](_0x25bebd,_0x302c0a,_0x22790c):this['view'][_0x5898('0x10')]('render',()=>{this[_0x5898('0x2')](_0x25bebd,_0x302c0a,_0x22790c);}));}[_0x5898('0x15')](){this['isProcessing']&&(this[_0x5898('0x7')]=!0x1,this[_0x5898('0x1e')][_0x5898('0xb')](),this[_0x5898('0xd')][_0x5898('0x0')]());}[_0x5898('0x24')](){this[_0x5898('0x4')]='',this[_0x5898('0x5')]='',this[_0x5898('0x1d')]='',this['previousPrompt']='',this[_0x5898('0x19')]='',this[_0x5898('0x1e')]['reset'](),this[_0x5898('0x15')]();}async[_0x5898('0x2')](_0x2119bc,_0x5403bc,_0x368803){return this[_0x5898('0x7')]=!0x0,this[_0x5898('0x1e')][_0x5898('0x9')](),this[_0x5898('0x1d')]=_0x5403bc,this[_0x5898('0xa')]=_0x2119bc,this[_0x5898('0x19')]=_0x368803||_0x2119bc,new Promise(_0x1de4af=>{this[_0x5898('0xd')][_0x5898('0x13')](_0x2119bc,_0x5403bc,_0xb23dc3=>this[_0x5898('0xe')](_0xb23dc3))[_0x5898('0x14')](_0x192d70=>{_0x192d70 instanceof _0x1b0948?this[_0x5898('0x1e')]['handleError'](_0x192d70[_0x5898('0x1')]):this[_0x5898('0x1e')][_0x5898('0xf')](),_0x1de4af();})['finally'](()=>{this[_0x5898('0x15')](),_0x1de4af();});});}['_updateValue'](_0x553d43){this[_0x5898('0x5')]=''+_0x553d43;}[_0x5898('0x20')](_0xe31135){return this[_0x5898('0x23')]['editing']['view'][_0x5898('0x18')][_0x5898('0x22')](this['_sanitizationContainer'],_0xe31135),this[_0x5898('0x17')][_0x5898('0x6')];}}
@@ -1,22 +1,22 @@
1
- /**
2
- * @license Copyright (c) 2003-2023, 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
- * @module ai/ui/aicommandslistview
7
- */
8
- import { ListView, type FilteredView } from 'ckeditor5/src/ui';
9
- /**
10
- * A list view that displays a list of AI commands with filtering capabilities.
11
- *
12
- * @private
13
- */
14
- export default class AICommandsListView extends ListView implements FilteredView {
15
- /**
16
- * @inheritDoc
17
- */
18
- filter(regExp: RegExp | null): {
19
- resultsCount: number;
20
- totalItemsCount: number;
21
- };
22
- }
1
+ /**
2
+ * @license Copyright (c) 2003-2023, 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
+ * @module ai/ui/aicommandslistview
7
+ */
8
+ import { ListView, type FilteredView } from 'ckeditor5/src/ui';
9
+ /**
10
+ * A list view that displays a list of AI commands with filtering capabilities.
11
+ *
12
+ * @private
13
+ */
14
+ export default class AICommandsListView extends ListView implements FilteredView {
15
+ /**
16
+ * @inheritDoc
17
+ */
18
+ filter(regExp: RegExp | null): {
19
+ resultsCount: number;
20
+ totalItemsCount: number;
21
+ };
22
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x34b7=['items','length','isVisible','filter','children','highlightText','labelView'];(function(_0x3e148b,_0x34b7a6){const _0x96013a=function(_0x134738){while(--_0x134738){_0x3e148b['push'](_0x3e148b['shift']());}};_0x96013a(++_0x34b7a6);}(_0x34b7,0x169));const _0x9601=function(_0x3e148b,_0x34b7a6){_0x3e148b=_0x3e148b-0x0;let _0x96013a=_0x34b7[_0x3e148b];return _0x96013a;};import{ListView as _0x24b8a3}from'ckeditor5/src/ui';export default class g extends _0x24b8a3{['filter'](_0x3ce949){let _0x1bf9bd=0x0,_0x3abfa3=0x0;for(const _0x1a8b42 of this[_0x9601('0x3')]){const _0x5e3f08=_0x1a8b42;for(const _0x30aced of _0x5e3f08['items']){const _0x4ca43e=_0x30aced[_0x9601('0x0')]['first'],_0x297dd2=_0x4ca43e[_0x9601('0x2')];_0x3ce949?(_0x30aced[_0x9601('0x5')]=!!_0x4ca43e['label']['match'](_0x3ce949),_0x30aced[_0x9601('0x5')]&&(_0x297dd2[_0x9601('0x1')](_0x3ce949),_0x3abfa3++)):(_0x30aced[_0x9601('0x5')]=!0x0,_0x297dd2[_0x9601('0x1')](null),_0x3abfa3++),_0x1bf9bd++;}_0x5e3f08[_0x9601('0x5')]=!!_0x5e3f08[_0x9601('0x3')][_0x9601('0x6')](_0x15708b=>_0x15708b['isVisible'])[_0x9601('0x4')];}return{'resultsCount':_0x3abfa3,'totalItemsCount':_0x1bf9bd};}}
23
+ const _0x3a61=['label','isVisible','labelView','match','items','children','first','filter','highlightText','length'];(function(_0x3c831d,_0x3a613b){const _0x14e51c=function(_0x12bff9){while(--_0x12bff9){_0x3c831d['push'](_0x3c831d['shift']());}};_0x14e51c(++_0x3a613b);}(_0x3a61,0x73));const _0x14e5=function(_0x3c831d,_0x3a613b){_0x3c831d=_0x3c831d-0x0;let _0x14e51c=_0x3a61[_0x3c831d];return _0x14e51c;};import{ListView as _0xf20607}from'ckeditor5/src/ui';export default class y extends _0xf20607{[_0x14e5('0x2')](_0x38f928){let _0x1ae765=0x0,_0x22eee1=0x0;for(const _0x424eb5 of this['items']){const _0x45c5b1=_0x424eb5,_0x446b45=_0x38f928&&!!_0x45c5b1[_0x14e5('0x5')][_0x14e5('0x8')](_0x38f928);_0x45c5b1[_0x14e5('0x7')][_0x14e5('0x3')](_0x446b45?_0x38f928:null);for(const _0x4187a4 of _0x45c5b1['items']){const _0xca2fb9=_0x4187a4[_0x14e5('0x0')][_0x14e5('0x1')],_0x31bfa7=_0xca2fb9[_0x14e5('0x7')];if(_0x38f928){const _0x46fd7d=!!_0xca2fb9[_0x14e5('0x5')][_0x14e5('0x8')](_0x38f928);_0x31bfa7[_0x14e5('0x3')](_0x46fd7d?_0x38f928:null),_0x4187a4[_0x14e5('0x6')]=_0x446b45||_0x46fd7d;}else _0x4187a4[_0x14e5('0x6')]=!0x0,_0x31bfa7[_0x14e5('0x3')](null);}const _0x568b20=_0x45c5b1[_0x14e5('0x9')][_0x14e5('0x2')](_0x47b189=>_0x47b189[_0x14e5('0x6')])[_0x14e5('0x4')];_0x1ae765+=_0x45c5b1['items']['length'],_0x22eee1+=_0x446b45?_0x45c5b1[_0x14e5('0x9')][_0x14e5('0x4')]:_0x568b20,_0x45c5b1[_0x14e5('0x6')]=_0x446b45||!!_0x568b20;}return{'resultsCount':_0x22eee1,'totalItemsCount':_0x1ae765};}}
@@ -1,29 +1,29 @@
1
- /**
2
- * @license Copyright (c) 2003-2023, 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
- * @module ai/ui/buttonlabelwithhighlightview
7
- */
8
- import { type ButtonLabel, HighlightedTextView } from 'ckeditor5/src/ui';
9
- /**
10
- * A button label view that can highlight a text fragment.
11
- */
12
- export default class ButtonLabelWithHighlightView extends HighlightedTextView implements ButtonLabel {
13
- /**
14
- * @inheritDoc
15
- */
16
- style: string | undefined;
17
- /**
18
- * @inheritDoc
19
- */
20
- text: string | undefined;
21
- /**
22
- * @inheritDoc
23
- */
24
- id: string | undefined;
25
- /**
26
- * @inheritDoc
27
- */
28
- constructor();
29
- }
1
+ /**
2
+ * @license Copyright (c) 2003-2023, 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
+ * @module ai/ui/buttonlabelwithhighlightview
7
+ */
8
+ import { type ButtonLabel, HighlightedTextView } from 'ckeditor5/src/ui';
9
+ /**
10
+ * A button label view that can highlight a text fragment.
11
+ */
12
+ export default class ButtonLabelWithHighlightView extends HighlightedTextView implements ButtonLabel {
13
+ /**
14
+ * @inheritDoc
15
+ */
16
+ style: string | undefined;
17
+ /**
18
+ * @inheritDoc
19
+ */
20
+ text: string | undefined;
21
+ /**
22
+ * @inheritDoc
23
+ */
24
+ id: string | undefined;
25
+ /**
26
+ * @inheritDoc
27
+ */
28
+ constructor();
29
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x36be=['extendTemplate','set','bindTemplate','style'];(function(_0xfd1ca,_0x36bec2){const _0xda4ac1=function(_0x2d79ee){while(--_0x2d79ee){_0xfd1ca['push'](_0xfd1ca['shift']());}};_0xda4ac1(++_0x36bec2);}(_0x36be,0x68));const _0xda4a=function(_0xfd1ca,_0x36bec2){_0xfd1ca=_0xfd1ca-0x0;let _0xda4ac1=_0x36be[_0xfd1ca];return _0xda4ac1;};import{HighlightedTextView as _0x5cf719}from'ckeditor5/src/ui';export default class C extends _0x5cf719{constructor(){super(),this[_0xda4a('0x1')]({'style':void 0x0,'text':void 0x0,'id':void 0x0});const _0x456ec4=this[_0xda4a('0x2')];this[_0xda4a('0x0')]({'attributes':{'class':['ck-button__label'],'style':_0x456ec4['to'](_0xda4a('0x3')),'id':_0x456ec4['to']('id')}});}}
23
+ const _0x58a3=['style','extendTemplate','set','ck-button__label'];(function(_0xaae97c,_0x58a3f3){const _0x52fdba=function(_0x288d54){while(--_0x288d54){_0xaae97c['push'](_0xaae97c['shift']());}};_0x52fdba(++_0x58a3f3);}(_0x58a3,0x90));const _0x52fd=function(_0xaae97c,_0x58a3f3){_0xaae97c=_0xaae97c-0x0;let _0x52fdba=_0x58a3[_0xaae97c];return _0x52fdba;};import{HighlightedTextView as _0x5d4807}from'ckeditor5/src/ui';export default class C extends _0x5d4807{constructor(){super(),this[_0x52fd('0x2')]({'style':void 0x0,'text':void 0x0,'id':void 0x0});const _0x234700=this['bindTemplate'];this[_0x52fd('0x1')]({'attributes':{'class':[_0x52fd('0x3')],'style':_0x234700['to'](_0x52fd('0x0')),'id':_0x234700['to']('id')}});}}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2023, 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
+ * @module ai/ui/labelwithhighlightview
7
+ */
8
+ import { type LabelView, HighlightedTextView } from 'ckeditor5/src/ui';
9
+ /**
10
+ * A label view that can highlight a text fragment.
11
+ */
12
+ export default class LabelWithHighlightView extends HighlightedTextView implements LabelView {
13
+ /**
14
+ * @inheritDoc
15
+ */
16
+ readonly id: string;
17
+ /**
18
+ * @inheritDoc
19
+ */
20
+ for: string | undefined;
21
+ /**
22
+ * @inheritDoc
23
+ */
24
+ constructor();
25
+ }
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2023, 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
+ const _0x4e24=['for','set','bindTemplate','ck-label','ck-editor__label_'];(function(_0x46b2ac,_0x4e2413){const _0x567911=function(_0xff3b0c){while(--_0xff3b0c){_0x46b2ac['push'](_0x46b2ac['shift']());}};_0x567911(++_0x4e2413);}(_0x4e24,0x76));const _0x5679=function(_0x46b2ac,_0x4e2413){_0x46b2ac=_0x46b2ac-0x0;let _0x567911=_0x4e24[_0x46b2ac];return _0x567911;};import{HighlightedTextView as _0x2492ab}from'ckeditor5/src/ui';import{uid as _0x4ca17f}from'ckeditor5/src/utils';export default class k extends _0x2492ab{constructor(){super(),this[_0x5679('0x3')](_0x5679('0x2'),void 0x0);const _0x1c6f91=this[_0x5679('0x4')];this['id']=_0x5679('0x1')+_0x4ca17f(),this['extendTemplate']({'attributes':{'class':['ck',_0x5679('0x0')],'id':this['id'],'for':_0x1c6f91['to'](_0x5679('0x2'))}});}}
@@ -1,48 +1,48 @@
1
- /**
2
- * @license Copyright (c) 2003-2023, 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
- * @module ai/ui/aiformcontentarea
7
- */
8
- import { type Locale } from 'ckeditor5/src/utils';
9
- import { View, ButtonView } from 'ckeditor5/src/ui';
10
- /**
11
- * A class representing the text area view of the AI assistant.
12
- */
13
- export default class AIFormContentArea extends View {
14
- /**
15
- * The value which is displayed in the content field.
16
- *
17
- * @observable
18
- */
19
- value: string | null;
20
- /**
21
- * Controls whether the content area is visible.
22
- *
23
- * @observable
24
- * @default false
25
- */
26
- isVisible: boolean;
27
- /**
28
- * Indicates if the content area is during processing which can change inner values.
29
- */
30
- isProcessing: boolean;
31
- /**
32
- * The textarea view.
33
- */
34
- contentFieldView: ContentFieldView;
35
- /**
36
- * The copy button displayed in the bottom-right corner of text area.
37
- */
38
- copyButtonView: ButtonView;
39
- /**
40
- * @inheritDoc
41
- */
42
- constructor(locale: Locale, extraCssClass?: string);
43
- /**
44
- * @inheritDoc
45
- */
46
- render(): void;
47
- focus(): void;
48
- }
1
+ /**
2
+ * @license Copyright (c) 2003-2023, 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
+ * @module ai/ui/aiformcontentarea
7
+ */
8
+ import { type Locale } from 'ckeditor5/src/utils';
9
+ import { View, ButtonView } from 'ckeditor5/src/ui';
10
+ /**
11
+ * A class representing the text area view of the AI assistant.
12
+ */
13
+ export default class AIFormContentArea extends View {
14
+ /**
15
+ * The value which is displayed in the content field.
16
+ *
17
+ * @observable
18
+ */
19
+ value: string | null;
20
+ /**
21
+ * Controls whether the content area is visible.
22
+ *
23
+ * @observable
24
+ * @default false
25
+ */
26
+ isVisible: boolean;
27
+ /**
28
+ * Indicates if the content area is during processing which can change inner values.
29
+ */
30
+ isProcessing: boolean;
31
+ /**
32
+ * The textarea view.
33
+ */
34
+ contentFieldView: ContentFieldView;
35
+ /**
36
+ * The copy button displayed in the bottom-right corner of text area.
37
+ */
38
+ copyButtonView: ButtonView;
39
+ /**
40
+ * @inheritDoc
41
+ */
42
+ constructor(locale: Locale, extraCssClass?: string);
43
+ /**
44
+ * @inheritDoc
45
+ */
46
+ render(): void;
47
+ focus(): void;
48
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x18ce=['isEnabled','scrollHeight','ck-content','isVisible','textContent','ck-ai-form__content-area-wrapper','ck-ai-form__copy-button','bind','ck-ai-form__copy-button-wrapper','element','contentFieldView','_createLoader','style','text/html','ClipboardItem','loaderView','change:isProcessing','remove','.ck-ai-form__loader','innerHTML','createElement','ck-hidden','position','_copyHTMLToClipboard','bindTemplate','scrollTo','appendLoader','removeAllRanges','_createCopyButton','execCommand','render','value','clipboard','isProcessing','setContent','addRange','appendChild','setTemplate','copyButtonView','copy','locale','text/plain','focus','div','ck-ai-form__content-area','execute','write','change:value','left','class','-9999px'];(function(_0x5d26b5,_0x18cee4){const _0x33b0ef=function(_0x3bd0c8){while(--_0x3bd0c8){_0x5d26b5['push'](_0x5d26b5['shift']());}};_0x33b0ef(++_0x18cee4);}(_0x18ce,0x1eb));const _0x33b0=function(_0x5d26b5,_0x18cee4){_0x5d26b5=_0x5d26b5-0x0;let _0x33b0ef=_0x18ce[_0x5d26b5];return _0x33b0ef;};import{global as _0x15a759}from'ckeditor5/src/utils';import{View as _0x306ae0,ButtonView as _0x42c4ee,SpinnerView as _0x157b07}from'ckeditor5/src/ui';import _0x3e37fe from'../../../theme/icons/copy.svg';import{getTranslation as _0x79ef4b}from'../../utils/common-translations';import{icons as _0x5c8901}from'ckeditor5/src/core';export default class M extends _0x306ae0{constructor(_0x437fa0,_0x2778d0=''){super(_0x437fa0),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x28d8bb=this[_0x33b0('0x2b')];this[_0x33b0('0x1d')]=new ContentFieldView(_0x437fa0,_0x2778d0),this['copyButtonView']=this[_0x33b0('0x2f')](),this[_0x33b0('0x5')]({'tag':'div','attributes':{'class':['ck',_0x33b0('0x18'),_0x28d8bb['if'](_0x33b0('0x16'),_0x33b0('0x28'),_0x265554=>!_0x265554)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck',_0x33b0('0xc'),_0x28d8bb['if'](_0x33b0('0x1'),'ck-ai-form__content-area--processing')]},'children':[this['contentFieldView'],{'tag':_0x33b0('0xb'),'attributes':{'class':['ck',_0x33b0('0x1b')]},'children':[this[_0x33b0('0x6')]]}]}]});}[_0x33b0('0x31')](){super[_0x33b0('0x31')](),this[_0x33b0('0x32')]&&this['contentFieldView'][_0x33b0('0x2')](this[_0x33b0('0x32')]),this['on'](_0x33b0('0xf'),(_0x4f9e4d,_0x548108,_0x567cad)=>{const _0x94cb=!this['contentFieldView']['element']['querySelector'](_0x33b0('0x25'));this[_0x33b0('0x1d')][_0x33b0('0x2')](_0x567cad),this[_0x33b0('0x1')]&&_0x94cb&&this[_0x33b0('0x1c')][_0x33b0('0x2c')]({'top':this[_0x33b0('0x1c')][_0x33b0('0x14')],'behavior':'smooth'});}),this['on'](_0x33b0('0x23'),(_0x8e2a45,_0x4fb235,_0x161559)=>{_0x161559?(this[_0x33b0('0x32')]=null,this[_0x33b0('0x1d')]['appendLoader']()):this['value']||this[_0x33b0('0x1d')][_0x33b0('0x2')]('');});}['focus'](){this['element'][_0x33b0('0xa')]();}[_0x33b0('0x2f')](){const _0x535476=this[_0x33b0('0x8')],_0x3070b5=new _0x42c4ee(this[_0x33b0('0x8')]),_0x2281ff=_0x33b0('0x19');return _0x3070b5['set']({'label':_0x79ef4b(_0x535476,'Copy'),'icon':_0x3e37fe,'class':_0x2281ff,'tooltip':!0x0}),_0x3070b5[_0x33b0('0x1a')](_0x33b0('0x16'))['to'](this,'value',_0x3a9d40=>!!_0x3a9d40),_0x3070b5[_0x33b0('0x1a')](_0x33b0('0x13'))['to'](this,'isProcessing',_0x3cb7ec=>!_0x3cb7ec),_0x3070b5['on'](_0x33b0('0xd'),()=>{this[_0x33b0('0x2a')](this['contentFieldView'][_0x33b0('0x1c')]),_0x3070b5['icon']=_0x5c8901['check'],_0x3070b5['class']=_0x2281ff+'\x20ck-ai-form__copy-button--copied',this[_0x33b0('0xa')](),setTimeout(()=>{_0x3070b5['icon']=_0x3e37fe,_0x3070b5[_0x33b0('0x11')]=_0x2281ff;},0x3e8);}),_0x3070b5;}[_0x33b0('0x2a')](_0x66ebd7){const {window:_0x86f361,document:_0x41117a}=_0x15a759;if(_0x86f361[_0x33b0('0x21')]){const {Blob:_0x2db330,ClipboardItem:_0x57d375}=_0x86f361,_0x34e37a=[new _0x57d375({'text/html':new _0x2db330([_0x66ebd7[_0x33b0('0x26')]],{'type':_0x33b0('0x20')}),'text/plain':new _0x2db330([_0x66ebd7[_0x33b0('0x17')]||''],{'type':_0x33b0('0x9')})})];navigator[_0x33b0('0x0')][_0x33b0('0xe')](_0x34e37a);}else{const _0x2a2048=_0x41117a[_0x33b0('0x27')](_0x33b0('0xb'));_0x2a2048[_0x33b0('0x1f')][_0x33b0('0x29')]='absolute',_0x2a2048[_0x33b0('0x1f')][_0x33b0('0x10')]=_0x33b0('0x12'),_0x2a2048[_0x33b0('0x26')]=_0x66ebd7[_0x33b0('0x26')],_0x41117a['body'][_0x33b0('0x4')](_0x2a2048);const _0x101b46=_0x41117a['createRange']();_0x101b46['selectNodeContents'](_0x2a2048);const _0x40343=_0x86f361['getSelection']();_0x40343[_0x33b0('0x2e')](),_0x40343[_0x33b0('0x3')](_0x101b46),_0x41117a[_0x33b0('0x30')](_0x33b0('0x7')),_0x2a2048[_0x33b0('0x24')]();}}}export class ContentFieldView extends _0x306ae0{constructor(_0x39cb90,_0x38eacd=''){super(_0x39cb90),this[_0x33b0('0x22')]=this[_0x33b0('0x1e')](),this[_0x33b0('0x5')]({'tag':_0x33b0('0xb'),'attributes':{'class':['ck',_0x33b0('0x15'),_0x38eacd,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x20f466){this['element'][_0x33b0('0x26')]=_0x20f466;}[_0x33b0('0x2d')](){this[_0x33b0('0x1c')][_0x33b0('0x4')](this[_0x33b0('0x22')][_0x33b0('0x1c')]);}['_createLoader'](){const _0x3bd92f=new _0x306ae0(),_0x5f5217=this[_0x33b0('0x8')],_0x51ac03=new _0x157b07();return _0x51ac03['isVisible']=!0x0,_0x3bd92f['setTemplate']({'tag':_0x33b0('0xb'),'attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x51ac03,{'text':_0x79ef4b(_0x5f5217,'AI\x20is\x20writing...')}]}),_0x3bd92f[_0x33b0('0x31')](),_0x3bd92f;}}
23
+ const _0x37da=['left','focus','write','locale','.ck-ai-form__loader','copy','createRange','firstElementChild','listenTo','div','ck-ai-form__content-area--processing','ck-ai-form__content-area-wrapper','render','ck-ai-form__copy-button','appendChild','lastElementChild','remove','contentFieldView','_createLoader','-9999px','_createCopyButton','<span>]</span>','ck-ai-form__copy-button-wrapper','wheel','AI\x20is\x20writing...','scrollHeight','text/html','bind','value','bindTemplate','execute','setTemplate','ck-reset_all-excluded','absolute','isVisible','setContent','isProcessing','_copyHTMLToClipboard','body','ClipboardItem','change:isProcessing','class','Copy','execCommand','getSelection','isEnabled','ck-ai-form__loader','loaderView','element','text/plain','copyButtonView','addRange','textContent','style','\x20ck-ai-form__copy-button--copied','<span>[</span>','ck-ai-form__content-field','ck-ai-form__content-area','innerHTML','set','appendLoader','ck-hidden','mousedown','querySelector','createElement','ck-content'];(function(_0x1ef129,_0x37da3b){const _0x2d5b3f=function(_0xd91507){while(--_0xd91507){_0x1ef129['push'](_0x1ef129['shift']());}};_0x2d5b3f(++_0x37da3b);}(_0x37da,0xe6));const _0x2d5b=function(_0x1ef129,_0x37da3b){_0x1ef129=_0x1ef129-0x0;let _0x2d5b3f=_0x37da[_0x1ef129];return _0x2d5b3f;};import{global as _0x1881ef}from'ckeditor5/src/utils';import{View as _0x1a3271,ButtonView as _0x2837dc,SpinnerView as _0x46bf30}from'ckeditor5/src/ui';import _0x438ad8 from'../../../theme/icons/copy.svg';import{getTranslation as _0x3c0cad}from'../../utils/common-translations';import{icons as _0x257af4}from'ckeditor5/src/core';export default class J extends _0x1a3271{constructor(_0x406bcb,_0x3ee16e=''){super(_0x406bcb),this[_0x2d5b('0x1b')]({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x2d0334=this[_0x2d5b('0x3f')];this[_0x2d5b('0x33')]=new ContentFieldView(_0x406bcb,_0x3ee16e),this['copyButtonView']=this[_0x2d5b('0x36')](),this[_0x2d5b('0x41')]({'tag':_0x2d5b('0x2b'),'attributes':{'class':['ck',_0x2d5b('0x2d'),_0x2d0334['if']('isVisible',_0x2d5b('0x1d'),_0x3aabae=>!_0x3aabae)],'tabindex':'-1'},'children':[{'tag':_0x2d5b('0x2b'),'attributes':{'class':['ck',_0x2d5b('0x19'),_0x2d0334['if']('isProcessing',_0x2d5b('0x2c'))]},'children':[this[_0x2d5b('0x33')],{'tag':_0x2d5b('0x2b'),'attributes':{'class':['ck',_0x2d5b('0x38')]},'children':[this[_0x2d5b('0x12')]]}]}]});}[_0x2d5b('0x2e')](){super[_0x2d5b('0x2e')](),this[_0x2d5b('0x3e')]&&this['contentFieldView'][_0x2d5b('0x3')](this[_0x2d5b('0x3e')]);let _0x369a77=!0x1;this['on']('change:value',(_0x72c91e,_0x386ac2,_0x756b60)=>{const _0x7c885c=!this[_0x2d5b('0x33')][_0x2d5b('0x10')][_0x2d5b('0x1f')](_0x2d5b('0x26'));this[_0x2d5b('0x33')][_0x2d5b('0x3')](_0x756b60),this[_0x2d5b('0x4')]&&_0x7c885c&&!_0x369a77&&this[_0x2d5b('0x10')]['scrollTo']({'top':this[_0x2d5b('0x10')][_0x2d5b('0x3b')],'behavior':'smooth'});}),this['on'](_0x2d5b('0x8'),(_0x4156ab,_0x58f4f1,_0x38a753)=>{_0x369a77=!0x1,_0x38a753?(this[_0x2d5b('0x3e')]=null,this[_0x2d5b('0x33')][_0x2d5b('0x1c')]()):this[_0x2d5b('0x3e')]||this[_0x2d5b('0x33')][_0x2d5b('0x3')]('');}),this[_0x2d5b('0x2a')](this[_0x2d5b('0x10')],_0x2d5b('0x39'),()=>{_0x369a77=!0x0;}),this[_0x2d5b('0x2a')](this[_0x2d5b('0x10')],_0x2d5b('0x1e'),()=>{_0x369a77=!0x0;});}[_0x2d5b('0x23')](){this[_0x2d5b('0x10')]['focus']();}['_createCopyButton'](){const _0x423e8b=this['locale'],_0x44edf4=new _0x2837dc(this['locale']),_0x4b8c20=_0x2d5b('0x2f');return _0x44edf4[_0x2d5b('0x1b')]({'label':_0x3c0cad(_0x423e8b,_0x2d5b('0xa')),'icon':_0x438ad8,'class':_0x4b8c20,'tooltip':!0x0}),_0x44edf4['bind'](_0x2d5b('0x2'))['to'](this,'value',_0xa08e7e=>!!_0xa08e7e),_0x44edf4[_0x2d5b('0x3d')](_0x2d5b('0xd'))['to'](this,_0x2d5b('0x4'),_0x3824c8=>!_0x3824c8),_0x44edf4['on'](_0x2d5b('0x40'),()=>{this['_copyHTMLToClipboard'](this[_0x2d5b('0x33')][_0x2d5b('0x10')]),_0x44edf4['icon']=_0x257af4['check'],_0x44edf4[_0x2d5b('0x9')]=_0x4b8c20+_0x2d5b('0x16'),this[_0x2d5b('0x23')](),setTimeout(()=>{_0x44edf4['icon']=_0x438ad8,_0x44edf4['class']=_0x4b8c20;},0x3e8);}),_0x44edf4;}[_0x2d5b('0x5')](_0x2ae24e){const {window:_0x5a7dd7,document:_0x1a87b6}=_0x1881ef;if(_0x5a7dd7[_0x2d5b('0x7')]){const {Blob:_0x490df0,ClipboardItem:_0x3cc060}=_0x5a7dd7,_0x118cd8=[new _0x3cc060({'text/html':new _0x490df0([_0x2ae24e[_0x2d5b('0x1a')]],{'type':_0x2d5b('0x3c')}),'text/plain':new _0x490df0([_0x2ae24e[_0x2d5b('0x14')]||''],{'type':_0x2d5b('0x11')})})];navigator['clipboard'][_0x2d5b('0x24')](_0x118cd8);}else{const _0x56f4e0=_0x1a87b6[_0x2d5b('0x20')](_0x2d5b('0x2b'));_0x56f4e0[_0x2d5b('0x15')]['position']=_0x2d5b('0x1'),_0x56f4e0['style'][_0x2d5b('0x22')]=_0x2d5b('0x35'),_0x56f4e0[_0x2d5b('0x1a')]=_0x2d5b('0x17')+_0x2ae24e['innerHTML']+_0x2d5b('0x37'),_0x1a87b6[_0x2d5b('0x6')]['appendChild'](_0x56f4e0);const _0x322151=_0x1a87b6[_0x2d5b('0x28')]();_0x322151['setStartAfter'](_0x56f4e0[_0x2d5b('0x29')]),_0x322151['setEndBefore'](_0x56f4e0[_0x2d5b('0x31')]);const _0x583f1e=_0x5a7dd7[_0x2d5b('0xc')]();_0x583f1e['removeAllRanges'](),_0x583f1e[_0x2d5b('0x13')](_0x322151),_0x1a87b6[_0x2d5b('0xb')](_0x2d5b('0x27')),_0x56f4e0[_0x2d5b('0x32')]();}}}export class ContentFieldView extends _0x1a3271{constructor(_0xbdc529,_0x4efc61=''){super(_0xbdc529),this[_0x2d5b('0xf')]=this[_0x2d5b('0x34')](),this[_0x2d5b('0x41')]({'tag':'div','attributes':{'class':['ck',_0x2d5b('0x21'),_0x4efc61,_0x2d5b('0x0'),_0x2d5b('0x18')]}});}[_0x2d5b('0x3')](_0x5012f6){this[_0x2d5b('0x10')][_0x2d5b('0x1a')]=_0x5012f6;}[_0x2d5b('0x1c')](){this[_0x2d5b('0x10')][_0x2d5b('0x30')](this[_0x2d5b('0xf')][_0x2d5b('0x10')]);}[_0x2d5b('0x34')](){const _0x59fc02=new _0x1a3271(),_0x51a3f4=this[_0x2d5b('0x25')],_0x43144d=new _0x46bf30();return _0x43144d['isVisible']=!0x0,_0x59fc02[_0x2d5b('0x41')]({'tag':'div','attributes':{'class':['ck',_0x2d5b('0xe')]},'children':[_0x43144d,{'text':_0x3c0cad(_0x51a3f4,_0x2d5b('0x3a'))}]}),_0x59fc02[_0x2d5b('0x2e')](),_0x59fc02;}}
@@ -1,26 +1,26 @@
1
- /**
2
- * @license Copyright (c) 2003-2023, 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
- * @module ai/ui/aiformerrorview
7
- */
8
- import type { Locale } from 'ckeditor5/src/utils';
9
- import { View } from 'ckeditor5/src/ui';
10
- /**
11
- * A class representing the error view of the AI assistant.
12
- */
13
- export default class AIFormErrorView extends View {
14
- /**
15
- * The text of the error.
16
- *
17
- * @observable
18
- */
19
- text: string;
20
- /**
21
- * Creates an instance of the {@link module:ai/ui/aiformerrorview~AIFormErrorView} class.
22
- *
23
- * @param locale The localization services instance.
24
- */
25
- constructor(locale: Locale, text?: string);
26
- }
1
+ /**
2
+ * @license Copyright (c) 2003-2023, 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
+ * @module ai/ui/aiformerrorview
7
+ */
8
+ import type { Locale } from 'ckeditor5/src/utils';
9
+ import { View } from 'ckeditor5/src/ui';
10
+ /**
11
+ * A class representing the error view of the AI assistant.
12
+ */
13
+ export default class AIFormErrorView extends View {
14
+ /**
15
+ * The text of the error.
16
+ *
17
+ * @observable
18
+ */
19
+ text: string;
20
+ /**
21
+ * Creates an instance of the {@link module:ai/ui/aiformerrorview~AIFormErrorView} class.
22
+ *
23
+ * @param locale The localization services instance.
24
+ */
25
+ constructor(locale: Locale, text?: string);
26
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x2a0b=['set','text','content','setTemplate','bindTemplate','div','ck-ai-form__error'];(function(_0x35b5de,_0x2a0b2f){const _0x484251=function(_0x29f41d){while(--_0x29f41d){_0x35b5de['push'](_0x35b5de['shift']());}};_0x484251(++_0x2a0b2f);}(_0x2a0b,0x145));const _0x4842=function(_0x35b5de,_0x2a0b2f){_0x35b5de=_0x35b5de-0x0;let _0x484251=_0x2a0b[_0x35b5de];return _0x484251;};import{View as _0x423231,IconView as _0x192b42}from'ckeditor5/src/ui';import _0x80cd23 from'../../../theme/icons/error.svg';export default class J extends _0x423231{constructor(_0x189d5e,_0x406cce=''){super(_0x189d5e);const _0xe8707a=new _0x192b42(),_0x70c12b=this[_0x4842('0x1')];this[_0x4842('0x4')](_0x4842('0x5'),_0x406cce),_0xe8707a[_0x4842('0x6')]=_0x80cd23,this[_0x4842('0x0')]({'tag':_0x4842('0x2'),'attributes':{'class':['ck',_0x4842('0x3')]},'children':[_0xe8707a,{'text':_0x70c12b['to'](_0x4842('0x5'))}]});}}
23
+ const _0x2199=['text','ck-ai-form__error','div','content','bindTemplate'];(function(_0x4ed82f,_0x2199a1){const _0xcf369a=function(_0x31f5d0){while(--_0x31f5d0){_0x4ed82f['push'](_0x4ed82f['shift']());}};_0xcf369a(++_0x2199a1);}(_0x2199,0x1af));const _0xcf36=function(_0x4ed82f,_0x2199a1){_0x4ed82f=_0x4ed82f-0x0;let _0xcf369a=_0x2199[_0x4ed82f];return _0xcf369a;};import{View as _0x3defb9,IconView as _0x641722}from'ckeditor5/src/ui';import _0x1e9c05 from'../../../theme/icons/error.svg';export default class Q extends _0x3defb9{constructor(_0x36e729,_0x5621a4=''){super(_0x36e729);const _0x4f2bbd=new _0x641722(),_0x32e241=this[_0xcf36('0x3')];this['set'](_0xcf36('0x4'),_0x5621a4),_0x4f2bbd[_0xcf36('0x2')]=_0x1e9c05,this['setTemplate']({'tag':_0xcf36('0x1'),'attributes':{'class':['ck',_0xcf36('0x0')]},'children':[_0x4f2bbd,{'text':_0x32e241['to'](_0xcf36('0x4'))}]});}}