@ckeditor/ckeditor5-ai 0.0.0-nightly-20231115.0 → 0.0.0-nightly-20231116.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.
- package/build/ai.js +1 -1
- package/build/translations/ar.js +1 -1
- package/build/translations/bg.js +1 -1
- package/build/translations/bn.js +1 -1
- package/build/translations/ca.js +1 -1
- package/build/translations/cs.js +1 -1
- package/build/translations/da.js +1 -1
- package/build/translations/de.js +1 -1
- package/build/translations/el.js +1 -1
- package/build/translations/es.js +1 -1
- package/build/translations/et.js +1 -1
- package/build/translations/fi.js +1 -1
- package/build/translations/fr.js +1 -1
- package/build/translations/he.js +1 -1
- package/build/translations/hi.js +1 -1
- package/build/translations/hu.js +1 -1
- package/build/translations/id.js +1 -1
- package/build/translations/it.js +1 -1
- package/build/translations/ja.js +1 -1
- package/build/translations/ko.js +1 -1
- package/build/translations/lt.js +1 -1
- package/build/translations/lv.js +1 -1
- package/build/translations/ms.js +1 -1
- package/build/translations/nl.js +1 -1
- package/build/translations/no.js +1 -1
- package/build/translations/pl.js +1 -1
- package/build/translations/pt-br.js +1 -1
- package/build/translations/pt.js +1 -1
- package/build/translations/ro.js +1 -1
- package/build/translations/ru.js +1 -1
- package/build/translations/sk.js +1 -1
- package/build/translations/sr.js +1 -1
- package/build/translations/sv.js +1 -1
- package/build/translations/th.js +1 -1
- package/build/translations/tr.js +1 -1
- package/build/translations/uk.js +1 -1
- package/build/translations/vi.js +1 -1
- package/build/translations/zh-cn.js +1 -1
- package/build/translations/zh.js +1 -1
- package/lang/translations/ar.po +13 -13
- package/lang/translations/bg.po +13 -13
- package/lang/translations/bn.po +13 -13
- package/lang/translations/ca.po +13 -13
- package/lang/translations/cs.po +13 -13
- package/lang/translations/da.po +13 -13
- package/lang/translations/de.po +13 -13
- package/lang/translations/el.po +13 -13
- package/lang/translations/es.po +13 -13
- package/lang/translations/et.po +13 -13
- package/lang/translations/fi.po +13 -13
- package/lang/translations/fr.po +13 -13
- package/lang/translations/he.po +13 -13
- package/lang/translations/hi.po +13 -13
- package/lang/translations/hu.po +13 -13
- package/lang/translations/id.po +13 -13
- package/lang/translations/it.po +13 -13
- package/lang/translations/ja.po +13 -13
- package/lang/translations/ko.po +13 -13
- package/lang/translations/lt.po +13 -13
- package/lang/translations/lv.po +13 -13
- package/lang/translations/ms.po +13 -13
- package/lang/translations/nl.po +13 -13
- package/lang/translations/no.po +13 -13
- package/lang/translations/pl.po +13 -13
- package/lang/translations/pt-br.po +13 -13
- package/lang/translations/pt.po +13 -13
- package/lang/translations/ro.po +13 -13
- package/lang/translations/ru.po +13 -13
- package/lang/translations/sk.po +13 -13
- package/lang/translations/sr.po +13 -13
- package/lang/translations/sv.po +13 -13
- package/lang/translations/th.po +13 -13
- package/lang/translations/tr.po +13 -13
- package/lang/translations/uk.po +13 -13
- package/lang/translations/vi.po +13 -13
- package/lang/translations/zh-cn.po +13 -13
- package/lang/translations/zh.po +13 -13
- package/package.json +3 -3
- package/src/aiassistant.js +1 -1
- package/src/aiassistantediting.js +1 -1
- package/src/aiassistantui.js +1 -1
- package/src/aiconnector.js +1 -1
- package/src/ui/aiassistantcontroller.js +1 -1
- package/src/ui/dropdown/aicommandslistview.js +1 -1
- package/src/ui/dropdown/buttonlabelwithhighlightview.js +1 -1
- package/src/ui/dropdown/labelwithhighlightview.js +1 -1
- package/src/ui/form/aiformcontentarea.js +1 -1
- package/src/ui/form/aiformerrorview.js +1 -1
- package/src/ui/form/aiformpromptview.js +1 -1
- package/src/ui/form/aiformtoolbarview.js +1 -1
- package/src/ui/form/aiformview.js +1 -1
- package/src/ui/form/aihistorylistitemview.js +1 -1
- package/src/ui/form/aihistorylistview.js +1 -1
- package/src/ui/form/prompthistory.js +1 -1
- package/src/ui/showaiassistantcommand.js +1 -1
- package/src/utils/common-translations.js +1 -1
- package/theme/ai-form.css +7 -2
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x34c4=['locale','clipboard','element','bind','copy','change:value','remove','setStartAfter','ck-ai-form__content-area--processing','-9999px','text/html','innerHTML','set','value','wheel','icon','setEndBefore','listenTo','AI\x20is\x20writing...','lastElementChild','appendChild','execCommand','execute','div','scrollTo','<span>]</span>','check','contentFieldView','Copy','_createLoader','_createCopyButton','ck-ai-form__loader','ClipboardItem','ck-hidden','createRange','ck-ai-form__content-area-wrapper','isEnabled','write','copyButtonView','setTemplate','class','removeAllRanges','render','scrollHeight','addRange','ck-ai-form__copy-button','loaderView','<span>[</span>','firstElementChild','querySelector','ck-reset_all-excluded','isVisible','ck-ai-form__copy-button-wrapper','.ck-ai-form__loader','createElement','\x20ck-ai-form__copy-button--copied','absolute','ck-ai-form__content-area','text/plain','style','isProcessing','focus','appendLoader','getSelection','setContent','_copyHTMLToClipboard','bindTemplate'];(function(_0x559ff9,_0x34c436){const _0x30df74=function(_0x531f91){while(--_0x531f91){_0x559ff9['push'](_0x559ff9['shift']());}};_0x30df74(++_0x34c436);}(_0x34c4,0x1cc));const _0x30df=function(_0x559ff9,_0x34c436){_0x559ff9=_0x559ff9-0x0;let _0x30df74=_0x34c4[_0x559ff9];return _0x30df74;};import{global as _0x225d75}from'ckeditor5/src/utils';import{View as _0x2d0b3e,ButtonView as _0x4eb727,SpinnerView as _0x4fa243}from'ckeditor5/src/ui';import _0x9fc59d from'../../../theme/icons/copy.svg';import{getTranslation as _0x128d35}from'../../utils/common-translations';import{icons as _0x19d55e}from'ckeditor5/src/core';export default class J extends _0x2d0b3e{constructor(_0x44a84a,_0x3a44c9=''){super(_0x44a84a),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x41c120=this[_0x30df('0x8')];this[_0x30df('0x24')]=new ContentFieldView(_0x44a84a,_0x3a44c9),this['copyButtonView']=this[_0x30df('0x27')](),this[_0x30df('0x30')]({'tag':_0x30df('0x20'),'attributes':{'class':['ck',_0x30df('0x2c'),_0x41c120['if'](_0x30df('0x3c'),_0x30df('0x2a'),_0x2b8047=>!_0x2b8047)],'tabindex':'-1'},'children':[{'tag':_0x30df('0x20'),'attributes':{'class':['ck',_0x30df('0x42'),_0x41c120['if'](_0x30df('0x2'),_0x30df('0x11'))]},'children':[this['contentFieldView'],{'tag':_0x30df('0x20'),'attributes':{'class':['ck',_0x30df('0x3d')]},'children':[this[_0x30df('0x2f')]]}]}]});}[_0x30df('0x33')](){super['render'](),this[_0x30df('0x16')]&&this[_0x30df('0x24')][_0x30df('0x6')](this['value']);let _0x2bfebd=!0x1;this['on'](_0x30df('0xe'),(_0x51c523,_0x264079,_0x23c603)=>{const _0x49a594=!this[_0x30df('0x24')][_0x30df('0xb')][_0x30df('0x3a')](_0x30df('0x3e'));this[_0x30df('0x24')][_0x30df('0x6')](_0x23c603),this[_0x30df('0x2')]&&_0x49a594&&!_0x2bfebd&&this[_0x30df('0xb')][_0x30df('0x21')]({'top':this[_0x30df('0xb')][_0x30df('0x34')],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x164c7c,_0x1de2ab,_0xbeb02a)=>{_0x2bfebd=!0x1,_0xbeb02a?(this[_0x30df('0x16')]=null,this[_0x30df('0x24')][_0x30df('0x4')]()):this[_0x30df('0x16')]||this['contentFieldView'][_0x30df('0x6')]('');}),this['listenTo'](this[_0x30df('0xb')],_0x30df('0x17'),()=>{_0x2bfebd=!0x0;}),this[_0x30df('0x1a')](this['element'],'mousedown',()=>{_0x2bfebd=!0x0;});}[_0x30df('0x3')](){this['element']['focus']();}[_0x30df('0x27')](){const _0x57de8c=this['locale'],_0x315ebd=new _0x4eb727(this[_0x30df('0x9')]),_0x527a28=_0x30df('0x36');return _0x315ebd[_0x30df('0x15')]({'label':_0x128d35(_0x57de8c,_0x30df('0x25')),'icon':_0x9fc59d,'class':_0x527a28,'tooltip':!0x0}),_0x315ebd[_0x30df('0xc')](_0x30df('0x3c'))['to'](this,_0x30df('0x16'),_0x498b72=>!!_0x498b72),_0x315ebd[_0x30df('0xc')](_0x30df('0x2d'))['to'](this,_0x30df('0x2'),_0x5c348f=>!_0x5c348f),_0x315ebd['on'](_0x30df('0x1f'),()=>{this[_0x30df('0x7')](this[_0x30df('0x24')][_0x30df('0xb')]),_0x315ebd[_0x30df('0x18')]=_0x19d55e[_0x30df('0x23')],_0x315ebd['class']=_0x527a28+_0x30df('0x40'),this[_0x30df('0x3')](),setTimeout(()=>{_0x315ebd[_0x30df('0x18')]=_0x9fc59d,_0x315ebd[_0x30df('0x31')]=_0x527a28;},0x3e8);}),_0x315ebd;}[_0x30df('0x7')](_0x15eeb1){const {window:_0x3e5798,document:_0x30211c}=_0x225d75;if(_0x3e5798[_0x30df('0x29')]){const {Blob:_0x96e739,ClipboardItem:_0x490a64}=_0x3e5798,_0x50fcc8=[new _0x490a64({'text/html':new _0x96e739([_0x15eeb1['innerHTML']],{'type':_0x30df('0x13')}),'text/plain':new _0x96e739([_0x15eeb1['textContent']||''],{'type':_0x30df('0x0')})})];navigator[_0x30df('0xa')][_0x30df('0x2e')](_0x50fcc8);}else{const _0x41e7f1=_0x30211c[_0x30df('0x3f')](_0x30df('0x20'));_0x41e7f1[_0x30df('0x1')]['position']=_0x30df('0x41'),_0x41e7f1[_0x30df('0x1')]['left']=_0x30df('0x12'),_0x41e7f1['innerHTML']=_0x30df('0x38')+_0x15eeb1[_0x30df('0x14')]+_0x30df('0x22'),_0x30211c['body'][_0x30df('0x1d')](_0x41e7f1);const _0x40e38b=_0x30211c[_0x30df('0x2b')]();_0x40e38b[_0x30df('0x10')](_0x41e7f1[_0x30df('0x39')]),_0x40e38b[_0x30df('0x19')](_0x41e7f1[_0x30df('0x1c')]);const _0x230215=_0x3e5798[_0x30df('0x5')]();_0x230215[_0x30df('0x32')](),_0x230215[_0x30df('0x35')](_0x40e38b),_0x30211c[_0x30df('0x1e')](_0x30df('0xd')),_0x41e7f1[_0x30df('0xf')]();}}}export class ContentFieldView extends _0x2d0b3e{constructor(_0x558dec,_0x2111b5=''){super(_0x558dec),this[_0x30df('0x37')]=this[_0x30df('0x26')](),this[_0x30df('0x30')]({'tag':_0x30df('0x20'),'attributes':{'class':['ck','ck-content',_0x2111b5,_0x30df('0x3b'),'ck-ai-form__content-field']}});}[_0x30df('0x6')](_0x2c982d){this[_0x30df('0xb')][_0x30df('0x14')]=_0x2c982d;}['appendLoader'](){this['element'][_0x30df('0x1d')](this[_0x30df('0x37')][_0x30df('0xb')]);}[_0x30df('0x26')](){const _0x3baca6=new _0x2d0b3e(),_0x59323d=this[_0x30df('0x9')],_0x50ec7c=new _0x4fa243();return _0x50ec7c[_0x30df('0x3c')]=!0x0,_0x3baca6[_0x30df('0x30')]({'tag':_0x30df('0x20'),'attributes':{'class':['ck',_0x30df('0x28')]},'children':[_0x50ec7c,{'text':_0x128d35(_0x59323d,_0x30df('0x1b'))}]}),_0x3baca6[_0x30df('0x33')](),_0x3baca6;}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x43a0=['setTemplate','text','div','set','content'];(function(_0x3eaba5,_0x43a070){const _0x2bcb72=function(_0x328552){while(--_0x328552){_0x3eaba5['push'](_0x3eaba5['shift']());}};_0x2bcb72(++_0x43a070);}(_0x43a0,0x16b));const _0x2bcb=function(_0x3eaba5,_0x43a070){_0x3eaba5=_0x3eaba5-0x0;let _0x2bcb72=_0x43a0[_0x3eaba5];return _0x2bcb72;};import{View as _0x529901,IconView as _0x25c174}from'ckeditor5/src/ui';import _0xf24e3 from'../../../theme/icons/error.svg';export default class Q extends _0x529901{constructor(_0x355a51,_0x467721=''){super(_0x355a51);const _0x592cfa=new _0x25c174(),_0x36809f=this['bindTemplate'];this[_0x2bcb('0x0')](_0x2bcb('0x3'),_0x467721),_0x592cfa[_0x2bcb('0x1')]=_0xf24e3,this[_0x2bcb('0x2')]({'tag':_0x2bcb('0x4'),'attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x592cfa,{'text':_0x36809f['to']('text')}]});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x67f4=['locale','submitButtonView','execute','_createSubmitButton','ck-ai-form__toggle-history','ck-ai-form__submit','excludeScrollbarsAndBorders','Submit','isVisible','isEmpty','isEnabled','history','bind','keystrokes','uiLanguageDirection','focus','History','focusLast','maxRows','right','requestAnimationFrame','style','window','isOn','submit','focusableChildren','set','focusCycler','target','width','filteredView','value','add','queryView','enter','resultsView','showHistoryButtonView','fieldView','render','minRows','_createShowHistoryButton','element'];(function(_0x7dcd48,_0x67f404){const _0x1de865=function(_0x163b43){while(--_0x163b43){_0x7dcd48['push'](_0x7dcd48['shift']());}};_0x1de865(++_0x67f404);}(_0x67f4,0x85));const _0x1de8=function(_0x7dcd48,_0x67f404){_0x7dcd48=_0x7dcd48-0x0;let _0x1de865=_0x67f4[_0x7dcd48];return _0x1de865;};import{Rect as _0x445d4a,global as _0x22d82e,isVisible as _0x37fc0c}from'ckeditor5/src/utils';import{AutocompleteView as _0x5bf74e,ButtonView as _0x1cade0}from'ckeditor5/src/ui';import{icons as _0x50a240}from'ckeditor5/src/core';import{escape as _0x4f4f5c}from'lodash-es';import{getTranslation as _0x5ef39b}from'../../utils/common-translations';import _0x547940 from'../../../theme/icons/submit.svg';export default class tt extends _0x5bf74e{constructor(_0x49f277,_0x267321){super(_0x49f277,_0x267321),this['queryView']['fieldView'][_0x1de8('0x20')]=0x1,this[_0x1de8('0x1a')][_0x1de8('0x1e')][_0x1de8('0xb')]=0x3,this['submitButtonView']=this[_0x1de8('0x26')](),this[_0x1de8('0x1d')]=this[_0x1de8('0x21')](),this[_0x1de8('0x12')]['add'](this[_0x1de8('0x1d')],0x1),this['focusableChildren'][_0x1de8('0x19')](this[_0x1de8('0x24')]);}[_0x1de8('0x1f')](){super[_0x1de8('0x1f')](),this[_0x1de8('0x1a')]['fieldWrapperChildren'][_0x1de8('0x19')](this[_0x1de8('0x1d')]),this['children'][_0x1de8('0x19')](this[_0x1de8('0x24')]),this[_0x1de8('0x6')][_0x1de8('0x13')](_0x1de8('0x1b'),(_0x12308b,_0x23df99)=>{_0x12308b[_0x1de8('0x15')]==this['queryView']['fieldView'][_0x1de8('0x22')]&&(this[_0x1de8('0x11')](),_0x23df99());});}[_0x1de8('0x26')](){const _0x2cd458=new _0x1cade0(this[_0x1de8('0x23')]),_0x32832a=this[_0x1de8('0x23')];return _0x2cd458[_0x1de8('0x13')]({'icon':_0x547940,'label':_0x5ef39b(_0x32832a,_0x1de8('0x0')),'isVisible':!0x0,'tooltip':!0x0,'class':_0x1de8('0x28')}),_0x2cd458['on'](_0x1de8('0x25'),()=>{this[_0x1de8('0x11')]();}),_0x2cd458[_0x1de8('0x5')](_0x1de8('0x3'))['to'](this['queryView'][_0x1de8('0x1e')],_0x1de8('0x2'),this,_0x1de8('0x3'),(_0x571c00,_0xd1ade3)=>!_0x571c00&&_0xd1ade3),_0x2cd458;}[_0x1de8('0x21')](){const _0x47ab56=new _0x1cade0(this[_0x1de8('0x23')]),_0x470671=this[_0x1de8('0x1c')],_0x14ca6f=this[_0x1de8('0x23')];_0x47ab56[_0x1de8('0x13')]({'label':_0x5ef39b(_0x14ca6f,_0x1de8('0x9')),'withText':!0x1,'icon':_0x50a240[_0x1de8('0x4')],'tooltip':!0x0,'tooltipPosition':'sw','class':_0x1de8('0x27')}),_0x47ab56['bind'](_0x1de8('0x10'))['to'](_0x470671,_0x1de8('0x1')),_0x47ab56[_0x1de8('0x5')](_0x1de8('0x3'))['to'](this,_0x1de8('0x3')),_0x47ab56['on'](_0x1de8('0x25'),()=>{_0x470671[_0x1de8('0x1')]=!_0x470671['isVisible'],_0x470671[_0x1de8('0x1')]?this[_0x1de8('0x17')][_0x1de8('0x8')]():this[_0x1de8('0x8')]();});const _0x4f9395=()=>{_0x22d82e[_0x1de8('0xf')][_0x1de8('0xd')](()=>{if(_0x37fc0c(this[_0x1de8('0x22')])){const _0x461c86=new _0x445d4a(this[_0x1de8('0x1a')][_0x1de8('0x1e')]['element']),_0x3d0fb7=_0x461c86[_0x1de8('0x16')],_0x1bf47f='rtl'===_0x14ca6f[_0x1de8('0x7')]?'left':_0x1de8('0xc');_0x461c86[_0x1de8('0x29')](),_0x47ab56[_0x1de8('0x22')][_0x1de8('0xe')][_0x1bf47f]=_0x3d0fb7-_0x461c86[_0x1de8('0x16')]+0x1+'px';}});};return this[_0x1de8('0x1a')][_0x1de8('0x1e')]['on']('update',_0x4f9395),this['on'](_0x1de8('0x1f'),_0x4f9395),_0x47ab56;}[_0x1de8('0x11')](){const _0x5f3c71=this[_0x1de8('0x1a')][_0x1de8('0x1e')][_0x1de8('0x22')][_0x1de8('0x18')];this['fire'](_0x1de8('0x11'),_0x4f4f5c(_0x5f3c71));}['focus'](_0xcef02){-0x1===_0xcef02?this[_0x1de8('0x14')][_0x1de8('0xa')]():this[_0x1de8('0x14')]['focusFirst']();}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x5d9c=['insertButton','stopButton','label','INSERT','extendTemplate','ck-hidden','bind','REPLACE','replace','_createButton','mainAction','set','toUpperCase','AI_','locale','isVisible','replaceButton','ck-ai-form__toolbar','Insert\x20below','items','_CONTENT','tryAgainButton','ck-button-action','bindTemplate','Try\x20again','Stop'];(function(_0xfe20ec,_0x5d9c82){const _0x444e60=function(_0x2e623e){while(--_0x2e623e){_0xfe20ec['push'](_0xfe20ec['shift']());}};_0x444e60(++_0x5d9c82);}(_0x5d9c,0xa6));const _0x444e=function(_0xfe20ec,_0x5d9c82){_0xfe20ec=_0xfe20ec-0x0;let _0x444e60=_0x5d9c[_0xfe20ec];return _0x444e60;};import{ToolbarView as _0x212117,ButtonView as _0x356feb}from'ckeditor5/src/ui';import{getTranslation as _0x1ae9f1}from'../../utils/common-translations';export var AIFormToolbarViewMainAction;!function(_0x332c02){_0x332c02['REPLACE']=_0x444e('0x18'),_0x332c02[_0x444e('0x13')]='insert';}(AIFormToolbarViewMainAction||(AIFormToolbarViewMainAction={}));export default class ti extends _0x212117{constructor(_0x58f984){super(_0x58f984),this[_0x444e('0x1')](_0x444e('0x5'),!0x1),this[_0x444e('0x1')](_0x444e('0x0'),AIFormToolbarViewMainAction[_0x444e('0x17')]),this[_0x444e('0x6')]=this[_0x444e('0x19')]('',_0x444e('0xc')),this[_0x444e('0x6')][_0x444e('0x16')](_0x444e('0x12'))['to'](this,'mainAction',_0x2e7da0=>_0x1ae9f1(_0x58f984,_0x444e('0x3')+_0x2e7da0[_0x444e('0x2')]()+_0x444e('0xa'))),this[_0x444e('0x10')]=this[_0x444e('0x19')](_0x1ae9f1(_0x58f984,_0x444e('0x8'))),this['tryAgainButton']=this[_0x444e('0x19')](_0x1ae9f1(_0x58f984,_0x444e('0xe'))),this[_0x444e('0x11')]=this[_0x444e('0x19')](_0x1ae9f1(_0x58f984,_0x444e('0xf')));const _0x125d40=this[_0x444e('0xd')];this[_0x444e('0x14')]({'attributes':{'class':[_0x444e('0x7'),_0x125d40['if'](_0x444e('0x5'),_0x444e('0x15'),_0x3dfaf1=>!_0x3dfaf1)]}}),this[_0x444e('0x9')]['addMany']([this[_0x444e('0x6')],this[_0x444e('0x10')],this[_0x444e('0xb')],this[_0x444e('0x11')]]);}[_0x444e('0x19')](_0x1d326e,_0x2c0127){const _0x427b7f=new _0x356feb(this[_0x444e('0x4')]);return _0x427b7f[_0x444e('0x1')]({'label':_0x1d326e,'class':_0x2c0127||'','isVisible':!0x0,'withText':!0x0}),_0x427b7f;}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x3e22=['queryView','add','REPLACE','clear','label','delegate','_promptHistory','Ask\x20AI\x20to\x20improve\x20generated\x20text','focusNext','stop','insertContentBelow','Ask\x20AI\x20to\x20edit\x20or\x20generate','shift\x20+\x20tab','stopProcessing','mainAction','historyGroupView','ck-ai-form','contentArea','copyButtonView','createCollection','set','locale','promptView','backwardCycle','AI\x20Assistant','listenTo','isError','insertButton','_focusables','isEnabled','element','fire','_createHistoryView','search','forwardCycle','focusPrevious','isVisible','isProcessing','execute','focusCycler','focus','bind','submit','prompt','AI_ERROR_FAILED','focusFirst','submitPrompt','finishProcessing','reset','value','setTemplate','ck-ai-form-content','ck-hidden','Empty\x20history','_createPromptView','toolbar','fieldView','text','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.','bindTo','div','keystrokes','tryAgainButton','bindTemplate','focusTracker','_createToolbar','clearHistory','stopButton','errorView','high','tab','_focusCycler','replaceButton','trim'];(function(_0xa8bc20,_0x3e226d){const _0x39d61e=function(_0x4bd92b){while(--_0x4bd92b){_0xa8bc20['push'](_0xa8bc20['shift']());}};_0x39d61e(++_0x3e226d);}(_0x3e22,0x90));const _0x39d6=function(_0xa8bc20,_0x3e226d){_0xa8bc20=_0xa8bc20-0x0;let _0x39d61e=_0x3e22[_0xa8bc20];return _0x39d61e;};import{FocusTracker as _0x3a5086,KeystrokeHandler as _0x327509}from'ckeditor5/src/utils';import{View as _0x304f87,FocusCycler as _0x56041c,createLabeledTextarea as _0x157061,FormHeaderView as _0x2f2305}from'ckeditor5/src/ui';import _0x2c4c34,{AIFormToolbarViewMainAction as _0x17ba7f}from'./aiformtoolbarview';import _0x1e07db from'./aiformcontentarea';import _0x4f4eaa from'./aiformerrorview';import _0x2875cb from'./aiformpromptview';import _0x43fb4f from'./aihistorylistview';import _0x230190 from'./aihistorylistitemview';import _0x3b565b from'./prompthistory';import{getTranslation as _0x573a69}from'../../utils/common-translations';import _0x25d787 from'../../../theme/icons/robot-pencil.svg';export default class v extends _0x304f87{constructor(_0x4a2432,_0x2bd7ba,_0x23332d=''){super(_0x4a2432),this['set'](_0x39d6('0x21'),!0x0),this[_0x39d6('0x18')](_0x39d6('0x29'),!0x1),this['set'](_0x39d6('0x2f'),''),this[_0x39d6('0x18')](_0x39d6('0x35'),''),this[_0x39d6('0x18')]('isError',!0x1),this[_0x39d6('0x18')](_0x39d6('0x12'),_0x17ba7f[_0x39d6('0x6')]),this[_0x39d6('0xa')]=new _0x3b565b(),this[_0x39d6('0x48')]=new _0x4f4eaa(_0x4a2432),this['header']=new _0x2f2305(_0x4a2432,{'label':_0x573a69(_0x4a2432,_0x39d6('0x1c')),'icon':_0x25d787}),this[_0x39d6('0x15')]=new _0x1e07db(_0x4a2432,_0x23332d),this[_0x39d6('0x15')]['bind'](_0x39d6('0x29'))['to'](this),this[_0x39d6('0x15')][_0x39d6('0x2d')](_0x39d6('0x35'))['to'](this),this[_0x39d6('0x3b')]=this[_0x39d6('0x45')](),this[_0x39d6('0x3b')]['bind'](_0x39d6('0x12'))['to'](this),this[_0x39d6('0x1a')]=this['_createPromptView'](),this[_0x39d6('0x44')]=new _0x3a5086(),this['keystrokes']=new _0x327509(),this[_0x39d6('0x20')]=this[_0x39d6('0x17')]([this[_0x39d6('0x15')],this[_0x39d6('0x15')][_0x39d6('0x16')],this['toolbar'],this[_0x39d6('0x1a')]]),this['_focusCycler']=new _0x56041c({'focusables':this['_focusables'],'focusTracker':this[_0x39d6('0x44')],'keystrokeHandler':this[_0x39d6('0x41')],'actions':{'focusPrevious':_0x39d6('0x10'),'focusNext':_0x39d6('0x0')}}),this['promptView'][_0x39d6('0x2b')]['on'](_0x39d6('0x26'),_0xfb1ed2=>{this[_0x39d6('0x1')][_0x39d6('0xc')](),_0xfb1ed2[_0x39d6('0xd')]();}),this[_0x39d6('0x1a')][_0x39d6('0x2b')]['on'](_0x39d6('0x1b'),_0x36f6e7=>{this[_0x39d6('0x1')][_0x39d6('0x27')](),_0x36f6e7['stop']();}),this[_0x39d6('0x1a')][_0x39d6('0x4')][_0x39d6('0x3c')][_0x39d6('0x2d')](_0x39d6('0x35'))['to'](this,_0x39d6('0x2f'));const _0x206ffa=this[_0x39d6('0x43')];this[_0x39d6('0x36')]({'tag':_0x39d6('0x40'),'attributes':{'class':['ck',_0x39d6('0x14'),_0x2bd7ba],'tabindex':'-1'},'children':[this['header'],{'tag':_0x39d6('0x40'),'attributes':{'class':['ck',_0x39d6('0x37')]},'children':[{'tag':_0x39d6('0x40'),'attributes':{'class':[_0x206ffa['if']('isError',_0x39d6('0x38'),_0x2c44ac=>!_0x2c44ac)]},'children':[this['errorView']]},this[_0x39d6('0x15')],this[_0x39d6('0x3b')],this['promptView']]}]});}['render'](){super['render'](),this[_0x39d6('0x44')][_0x39d6('0x5')](this[_0x39d6('0x15')]['element']),this[_0x39d6('0x44')][_0x39d6('0x5')](this[_0x39d6('0x15')][_0x39d6('0x16')][_0x39d6('0x22')]),this[_0x39d6('0x44')]['add'](this['toolbar']['element']),this[_0x39d6('0x44')][_0x39d6('0x5')](this[_0x39d6('0x1a')][_0x39d6('0x22')]),this[_0x39d6('0x41')][_0x39d6('0x1d')](this[_0x39d6('0x22')]);}[_0x39d6('0x2c')](){this[_0x39d6('0x1')][_0x39d6('0x31')]();}[_0x39d6('0x34')](){this[_0x39d6('0x2f')]='',this[_0x39d6('0x35')]='',this['promptView'][_0x39d6('0x34')](),this['contentArea']['isVisible']=!0x1,this[_0x39d6('0x3b')][_0x39d6('0x28')]=!0x1;}[_0x39d6('0x3a')](){const _0x4b6fd1=this['locale'],_0x3a5163=new _0x2875cb(_0x4b6fd1,{'queryView':{'label':_0x573a69(_0x4b6fd1,_0x39d6('0xf')),'creator':_0x157061,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':_0x573a69(_0x4b6fd1,_0x39d6('0x39')),'secondary':_0x573a69(_0x4b6fd1,_0x39d6('0x3e'))}}},'filteredView':this[_0x39d6('0x24')](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x3a5163[_0x39d6('0x2d')](_0x39d6('0x21'))['to'](this,_0x39d6('0x21'),this,_0x39d6('0x29'),(_0x1da9ff,_0x5e71c1)=>_0x1da9ff&&!_0x5e71c1),this[_0x39d6('0x1d')](_0x3a5163,_0x39d6('0x2e'),(_0x2f9dc4,_0x22b228)=>{this[_0x39d6('0x2f')]=_0x22b228,this[_0x39d6('0x23')](_0x39d6('0x32'),this[_0x39d6('0x2f')]),_0x22b228[_0x39d6('0x3')]()&&this[_0x39d6('0xa')][_0x39d6('0x5')]({'prompt':_0x22b228[_0x39d6('0x3')]()},0x0);},{'priority':_0x39d6('0x49')}),_0x3a5163;}['_createHistoryView'](){const _0x3696ab=new _0x43fb4f(this[_0x39d6('0x19')]);return _0x3696ab[_0x39d6('0x13')]['items'][_0x39d6('0x3f')](this[_0x39d6('0xa')])['as'](_0x230190),_0x3696ab['on'](_0x39d6('0x46'),()=>{this[_0x39d6('0xa')][_0x39d6('0x7')](),this[_0x39d6('0x1a')][_0x39d6('0x25')](''),this[_0x39d6('0x1a')][_0x39d6('0x2c')]();}),_0x3696ab;}[_0x39d6('0x45')](){const _0x12db42=new _0x2c4c34(this[_0x39d6('0x19')]);return _0x12db42[_0x39d6('0x2')][_0x39d6('0x2d')](_0x39d6('0x21'))['to'](this,'isEnabled',this,_0x39d6('0x29'),this,_0x39d6('0x35'),(_0x461688,_0x24b597,_0x51e186)=>_0x461688&&!_0x24b597&&!!_0x51e186),_0x12db42[_0x39d6('0x2')][_0x39d6('0x9')](_0x39d6('0x2a'))['to'](this,'replaceContent'),_0x12db42[_0x39d6('0x1f')]['bind'](_0x39d6('0x21'))['to'](this,'isEnabled',this,_0x39d6('0x29'),this,_0x39d6('0x35'),(_0x38edca,_0x52b95b,_0x434506)=>_0x38edca&&!_0x52b95b&&!!_0x434506),_0x12db42['insertButton'][_0x39d6('0x9')](_0x39d6('0x2a'))['to'](this,_0x39d6('0xe')),_0x12db42[_0x39d6('0x42')][_0x39d6('0x2d')](_0x39d6('0x21'))['to'](this,_0x39d6('0x21'),this,_0x39d6('0x29'),(_0x42761c,_0x4c016a)=>_0x42761c&&!_0x4c016a),_0x12db42['tryAgainButton'][_0x39d6('0x9')](_0x39d6('0x2a'))['to'](this,'tryAgainEvent'),_0x12db42[_0x39d6('0x47')][_0x39d6('0x2d')](_0x39d6('0x21'))['to'](this,_0x39d6('0x29')),_0x12db42[_0x39d6('0x47')][_0x39d6('0x9')](_0x39d6('0x2a'))['to'](this,_0x39d6('0x11')),_0x12db42;}['startProcessing'](){this[_0x39d6('0x35')]='',this[_0x39d6('0x1e')]=!0x1,this[_0x39d6('0x29')]=!0x0,this[_0x39d6('0x15')][_0x39d6('0x28')]=!0x0,this[_0x39d6('0x3b')][_0x39d6('0x28')]=!0x0,this['contentArea']['focus']();}[_0x39d6('0x33')](){const _0x3b7118=this[_0x39d6('0x19')];this['isProcessing']=!0x1,this[_0x39d6('0x2f')]='',this[_0x39d6('0x1a')][_0x39d6('0x34')](),this[_0x39d6('0x35')]&&(this['promptView'][_0x39d6('0x4')][_0x39d6('0x8')]=_0x573a69(_0x3b7118,_0x39d6('0xb')));}['handleError'](_0x915240){const _0x515039=this['locale'];this[_0x39d6('0x33')](),this[_0x39d6('0x1e')]=!0x0,this['errorView'][_0x39d6('0x3d')]=_0x915240||_0x573a69(_0x515039,_0x39d6('0x30')),this['value']||(this[_0x39d6('0x15')]['isVisible']=!0x1);}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2ca5=['set','children','prompt','locale','fire','execute'];(function(_0x51c279,_0x2ca5f4){const _0x2f97c6=function(_0x52312b){while(--_0x52312b){_0x51c279['push'](_0x51c279['shift']());}};_0x2f97c6(++_0x2ca5f4);}(_0x2ca5,0x79));const _0x2f97=function(_0x51c279,_0x2ca5f4){_0x51c279=_0x51c279-0x0;let _0x2f97c6=_0x2ca5[_0x51c279];return _0x2f97c6;};import{ListItemView as _0xffd6ae,ButtonView as _0x193e61}from'ckeditor5/src/ui';import _0x1f3638 from'../dropdown/buttonlabelwithhighlightview';import{unescape as _0x24e690}from'lodash-es';export default class nt extends _0xffd6ae{constructor(_0x1e2ccb){super();const _0x12011b=new _0x1f3638(),_0x4e8534=new _0x193e61(this[_0x2f97('0x2')],_0x12011b);this[_0x2f97('0x0')]['add'](_0x4e8534),_0x4e8534[_0x2f97('0x5')]({'label':_0x1e2ccb['prompt'],'withText':!0x0}),_0x4e8534['on'](_0x2f97('0x4'),()=>{this[_0x2f97('0x3')](_0x2f97('0x4'),{'value':_0x24e690(_0x1e2ccb[_0x2f97('0x1')])});});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x5617=['label','historyGroupView','add','clearHistory','items','execute','fire','Prompt\x20history','filter','locale','clearHistoryButton','Clear','_createClearHistoryButton','delegate'];(function(_0x427f99,_0x56176e){const _0x5e2685=function(_0x1d53d7){while(--_0x1d53d7){_0x427f99['push'](_0x427f99['shift']());}};_0x5e2685(++_0x56176e);}(_0x5617,0x17b));const _0x5e26=function(_0x427f99,_0x56176e){_0x427f99=_0x427f99-0x0;let _0x5e2685=_0x5617[_0x427f99];return _0x5e2685;};import{ListView as _0x30e1bf,ListItemGroupView as _0x36c783,ButtonView as _0x411011}from'ckeditor5/src/ui';import{getTranslation as _0xee5ae2}from'../../utils/common-translations';export default class ot extends _0x30e1bf{constructor(_0x1e122a){super(_0x1e122a),this[_0x5e26('0x9')]=this[_0x5e26('0xb')](),this[_0x5e26('0x0')]=new _0x36c783(),this[_0x5e26('0x0')]['children'][_0x5e26('0x1')](this[_0x5e26('0x9')],0x1),this[_0x5e26('0x0')][_0x5e26('0xd')]=_0xee5ae2(_0x1e122a,_0x5e26('0x6')),this[_0x5e26('0x0')][_0x5e26('0x3')][_0x5e26('0xc')](_0x5e26('0x4'))['to'](this),this[_0x5e26('0x3')][_0x5e26('0x1')](this['historyGroupView']);}[_0x5e26('0x7')](){let _0x40f2b5=0x0;for(const _0xab1bad of this[_0x5e26('0x3')])_0x40f2b5+=_0xab1bad[_0x5e26('0x3')]['length'];return{'resultsCount':_0x40f2b5,'totalItemsCount':_0x40f2b5};}['_createClearHistoryButton'](){const _0x45f19c=this[_0x5e26('0x8')],_0x4477a3=new _0x411011(this['locale']);return _0x4477a3['set']({'label':'('+_0xee5ae2(_0x45f19c,_0x5e26('0xa'))+')','withText':!0x0}),_0x4477a3['on'](_0x5e26('0x4'),()=>this[_0x5e26('0x5')](_0x5e26('0x2'))),_0x4477a3;}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x5471=['CKEditor/AIFormView/PromptHistory','length','remove','trim','getItem','parse','addMany','_loadFromSessionStorage','prompt','setItem','_saveToSessionStorage','last'];(function(_0x1bdf2b,_0x5471bf){const _0x2dfb18=function(_0x3497d4){while(--_0x3497d4){_0x1bdf2b['push'](_0x1bdf2b['shift']());}};_0x2dfb18(++_0x5471bf);}(_0x5471,0xd9));const _0x2dfb=function(_0x1bdf2b,_0x5471bf){_0x1bdf2b=_0x1bdf2b-0x0;let _0x2dfb18=_0x5471[_0x1bdf2b];return _0x2dfb18;};import{Collection as _0x1f2d46}from'ckeditor5/src/utils';const ts=_0x2dfb('0xb');export default class at extends _0x1f2d46{constructor(){super(),this[_0x2dfb('0x6')](),this['on']('add',(_0x1e2725,_0x274a7e)=>{const _0x185c4f=os(_0x274a7e[_0x2dfb('0x7')]);for(const _0xde0771 of this)if(_0xde0771!=_0x274a7e&&os(_0xde0771[_0x2dfb('0x7')])===_0x185c4f){this[_0x2dfb('0x1')](_0xde0771);break;}this[_0x2dfb('0x0')]>0x14&&this[_0x2dfb('0x1')](this[_0x2dfb('0xa')]),this[_0x2dfb('0x9')]();}),this['on'](_0x2dfb('0x1'),()=>{this[_0x2dfb('0x9')]();});}[_0x2dfb('0x6')](){const _0xadeeeb=sessionStorage[_0x2dfb('0x3')](ts)||'[]';this[_0x2dfb('0x5')](JSON[_0x2dfb('0x4')](_0xadeeeb));}[_0x2dfb('0x9')](){sessionStorage[_0x2dfb('0x8')](ts,JSON['stringify'](this['map'](_0x2a259f=>_0x2a259f)));}}function os(_0x48ecd2){return _0x48ecd2['toLowerCase']()[_0x2dfb('0x2')]();}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x46c0=['refresh','showUI','document','editor','getItems','name','plugins','getRanges','aiAssistant.disabledElements','includes','element','isEnabled'];(function(_0x422898,_0x46c0f2){const _0x50fcdd=function(_0x4922d4){while(--_0x4922d4){_0x422898['push'](_0x422898['shift']());}};_0x50fcdd(++_0x46c0f2);}(_0x46c0,0x17a));const _0x50fc=function(_0x422898,_0x46c0f2){_0x422898=_0x422898-0x0;let _0x50fcdd=_0x46c0[_0x422898];return _0x50fcdd;};import{Command as _0x2fcf70}from'ckeditor5/src/core';import _0x40f746 from'../aiassistantui';export default class I extends _0x2fcf70{[_0x50fc('0x6')](){const _0x37ed27=this[_0x50fc('0x9')]['model'][_0x50fc('0x8')]['selection'],_0x5a5266=this[_0x50fc('0x9')]['config']['get'](_0x50fc('0x2'));for(const _0x53dc97 of _0x37ed27[_0x50fc('0x1')]())for(const _0x200d7a of _0x53dc97[_0x50fc('0xa')]())if(_0x200d7a['is'](_0x50fc('0x4'))&&_0x5a5266[_0x50fc('0x3')](_0x200d7a[_0x50fc('0xb')]))return void(this[_0x50fc('0x5')]=!0x1);this[_0x50fc('0x5')]=!0x0;}['execute'](_0x33393f='',_0x17189f=''){this[_0x50fc('0x9')][_0x50fc('0x0')]['get'](_0x40f746)[_0x50fc('0x7')](_0x33393f,_0x17189f);}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
export function getTranslation(
|
|
23
|
+
export function getTranslation(_0x290c68,_0x21199d,_0x20329b){const t=_0x290c68['t'];switch(_0x21199d){case'Edit\x20or\x20review':return t('Edit\x20or\x20review');case'Improve\x20writing':return t('Improve\x20writing');case'Make\x20shorter':return t('Make\x20shorter');case'Make\x20longer':return t('Make\x20longer');case'Simplify\x20language':return t('Simplify\x20language');case'Generate\x20from\x20selection':return t('Generate\x20from\x20selection');case'Summarize':return t('Summarize');case'Continue':return t('Continue');case'Change\x20tone':return t('Change\x20tone');case'Professional':return t('Professional');case'Casual':return t('Casual');case'Direct':return t('Direct');case'Confident':return t('Confident');case'Friendly':return t('Friendly');case'Change\x20style':return t('Change\x20style');case'Business':return t('Business');case'Legal':return t('Legal');case'Journalism':return t('Journalism');case'Poetic':return t('Poetic');case'Translate':return t('Translate');case'Translate\x20to\x20%0':return t('Translate\x20to\x20%0',_0x20329b);case'English':return t('English');case'Spanish':return t('Spanish');case'German':return t('German');case'Portuguese':return t('Portuguese');case'French':return t('French');case'Simplified\x20Chinese':return t('Simplified\x20Chinese');case'Hindi':return t('Hindi');case'Arabic':return t('Arabic');case'AI\x20Assistant':return t('AI\x20Assistant');case'AI\x20Commands':return t('AI\x20Commands');case'Ask\x20AI\x20to\x20edit\x20or\x20generate':return t('Ask\x20AI\x20to\x20edit\x20or\x20generate');case'Ask\x20AI\x20to\x20improve\x20generated\x20text':return t('Ask\x20AI\x20to\x20improve\x20generated\x20text');case'Copy':return t('Copy');case'Submit':return t('Submit');case'Insert\x20below':return t('Insert\x20below');case'Try\x20again':return t('Try\x20again');case'Stop':return t('Stop');case'AI\x20is\x20writing...':return t('AI\x20is\x20writing...');case'History':return t('History');case'Empty\x20history':return t('Empty\x20history');case'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':return t('Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.');case'Prompt\x20history':return t('Prompt\x20history');case'Search\x20AI\x20command':return t('Search\x20AI\x20command');case'No\x20commands\x20found':return t('No\x20commands\x20found');case'No\x20commands\x20available':return t('No\x20commands\x20available');case'Clear':return t('Clear');case'AI_REPLACE_CONTENT':return t({'id':'AI_REPLACE_CONTENT','string':'Replace'});case'AI_INSERT_CONTENT':return t({'id':'AI_INSERT_CONTENT','string':'Insert'});case'AI_ERROR_AUTH_REQUEST':return t({'id':'AI_ERROR_AUTH_REQUEST','string':'Authorization\x20request\x20failed'});case'AI_ERROR_CONTEXT_LENGTH':return t({'id':'AI_ERROR_CONTEXT_LENGTH','string':'Selected\x20content\x20is\x20too\x20long'});case'AI_ERROR_MODERATION':return t({'id':'AI_ERROR_MODERATION','string':'Requested\x20query\x20does\x20not\x20pass\x20moderation\x20rules'});case'AI_ERROR_FAILED':return t({'id':'AI_ERROR_FAILED','string':'Failed\x20to\x20communicate\x20with\x20the\x20AI\x20service'});default:return _0x21199d;}}
|
package/theme/ai-form.css
CHANGED
|
@@ -208,9 +208,14 @@
|
|
|
208
208
|
font-size: var(--ck-ai-form-history-font-size);
|
|
209
209
|
justify-self: start;
|
|
210
210
|
background: none;
|
|
211
|
+
margin: var(--ck-spacing-medium) 0 0;
|
|
211
212
|
|
|
212
|
-
|
|
213
|
-
|
|
213
|
+
& .ck-button__label {
|
|
214
|
+
line-height: inherit;
|
|
215
|
+
|
|
216
|
+
&:hover {
|
|
217
|
+
text-decoration: underline;
|
|
218
|
+
}
|
|
214
219
|
}
|
|
215
220
|
}
|
|
216
221
|
|