@ckeditor/ckeditor5-ai 46.1.1 → 47.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +18 -5
- package/README.md +10 -9
- package/build/ai.js +2 -2
- package/build/translations/af.js +1 -1
- package/build/translations/ar.js +1 -1
- package/build/translations/ast.js +1 -1
- package/build/translations/az.js +1 -1
- package/build/translations/be.js +1 -1
- package/build/translations/bg.js +1 -1
- package/build/translations/bn.js +1 -1
- package/build/translations/bs.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-ch.js +1 -1
- package/build/translations/de.js +1 -1
- package/build/translations/el.js +1 -1
- package/build/translations/en-au.js +1 -1
- package/build/translations/en-gb.js +1 -1
- package/build/translations/eo.js +1 -1
- package/build/translations/es-co.js +1 -1
- package/build/translations/es.js +1 -1
- package/build/translations/et.js +1 -1
- package/build/translations/eu.js +1 -1
- package/build/translations/fa.js +1 -1
- package/build/translations/fi.js +1 -1
- package/build/translations/fr.js +1 -1
- package/build/translations/gl.js +1 -1
- package/build/translations/gu.js +1 -1
- package/build/translations/he.js +1 -1
- package/build/translations/hi.js +1 -1
- package/build/translations/hr.js +1 -1
- package/build/translations/hu.js +1 -1
- package/build/translations/hy.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/jv.js +1 -1
- package/build/translations/kk.js +1 -1
- package/build/translations/km.js +1 -1
- package/build/translations/kn.js +1 -1
- package/build/translations/ko.js +1 -1
- package/build/translations/ku.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/nb.js +1 -1
- package/build/translations/ne.js +1 -1
- package/build/translations/nl.js +1 -1
- package/build/translations/no.js +1 -1
- package/build/translations/oc.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/si.js +1 -1
- package/build/translations/sk.js +1 -1
- package/build/translations/sl.js +1 -1
- package/build/translations/sq.js +1 -1
- package/build/translations/sr-latn.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/ti.js +1 -1
- package/build/translations/tk.js +1 -1
- package/build/translations/tr.js +1 -1
- package/build/translations/tt.js +1 -1
- package/build/translations/ug.js +1 -1
- package/build/translations/uk.js +1 -1
- package/build/translations/ur.js +1 -1
- package/build/translations/uz.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/ckeditor5-metadata.json +24 -3
- package/dist/index-content.css +0 -1
- package/dist/index-editor.css +2742 -0
- package/dist/index.css +3141 -0
- package/dist/index.js +4 -2
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/lang/contexts.json +163 -1
- package/lang/translations/af.po +612 -0
- package/lang/translations/ar.po +628 -0
- package/lang/translations/ast.po +612 -0
- package/lang/translations/az.po +612 -0
- package/lang/translations/be.po +616 -0
- package/lang/translations/bg.po +612 -0
- package/lang/translations/bn.po +612 -0
- package/lang/translations/bs.po +616 -0
- package/lang/translations/ca.po +612 -0
- package/lang/translations/cs.po +616 -0
- package/lang/translations/da.po +612 -0
- package/lang/translations/de-ch.po +612 -0
- package/lang/translations/de.po +612 -0
- package/lang/translations/el.po +612 -0
- package/lang/translations/en-au.po +612 -0
- package/lang/translations/en-gb.po +612 -0
- package/lang/translations/en.po +612 -0
- package/lang/translations/eo.po +612 -0
- package/lang/translations/es-co.po +612 -0
- package/lang/translations/es.po +612 -0
- package/lang/translations/et.po +612 -0
- package/lang/translations/eu.po +612 -0
- package/lang/translations/fa.po +608 -0
- package/lang/translations/fi.po +612 -0
- package/lang/translations/fr.po +612 -0
- package/lang/translations/gl.po +612 -0
- package/lang/translations/gu.po +612 -0
- package/lang/translations/he.po +612 -0
- package/lang/translations/hi.po +612 -0
- package/lang/translations/hr.po +616 -0
- package/lang/translations/hu.po +612 -0
- package/lang/translations/hy.po +612 -0
- package/lang/translations/id.po +608 -0
- package/lang/translations/it.po +612 -0
- package/lang/translations/ja.po +608 -0
- package/lang/translations/jv.po +612 -0
- package/lang/translations/kk.po +612 -0
- package/lang/translations/km.po +608 -0
- package/lang/translations/kn.po +612 -0
- package/lang/translations/ko.po +608 -0
- package/lang/translations/ku.po +612 -0
- package/lang/translations/lt.po +616 -0
- package/lang/translations/lv.po +616 -0
- package/lang/translations/ms.po +608 -0
- package/lang/translations/nb.po +612 -0
- package/lang/translations/ne.po +612 -0
- package/lang/translations/nl.po +612 -0
- package/lang/translations/no.po +612 -0
- package/lang/translations/oc.po +612 -0
- package/lang/translations/pl.po +616 -0
- package/lang/translations/pt-br.po +612 -0
- package/lang/translations/pt.po +612 -0
- package/lang/translations/ro.po +616 -0
- package/lang/translations/ru.po +616 -0
- package/lang/translations/si.po +612 -0
- package/lang/translations/sk.po +616 -0
- package/lang/translations/sl.po +620 -0
- package/lang/translations/sq.po +612 -0
- package/lang/translations/sr-latn.po +616 -0
- package/lang/translations/sr.po +616 -0
- package/lang/translations/sv.po +612 -0
- package/lang/translations/th.po +608 -0
- package/lang/translations/ti.po +612 -0
- package/lang/translations/tk.po +612 -0
- package/lang/translations/tr.po +612 -0
- package/lang/translations/tt.po +608 -0
- package/lang/translations/ug.po +608 -0
- package/lang/translations/uk.po +616 -0
- package/lang/translations/ur.po +612 -0
- package/lang/translations/uz.po +612 -0
- package/lang/translations/vi.po +608 -0
- package/lang/translations/zh-cn.po +608 -0
- package/lang/translations/zh.po +608 -0
- package/package.json +23 -11
- package/src/aiactions/aiactions.d.ts +48 -0
- package/src/aiactions/aiactions.js +23 -0
- package/src/aiactions/model/aiactionsinteraction.d.ts +48 -0
- package/src/aiactions/model/aiactionsinteraction.js +23 -0
- package/src/aiactions/model/aiactionsreply.d.ts +15 -0
- package/src/aiactions/model/aiactionsreply.js +23 -0
- package/src/{adapters → aiassistant/adapters}/aiadapter.d.ts +1 -1
- package/src/aiassistant/adapters/aiadapter.js +23 -0
- package/src/{adapters → aiassistant/adapters}/aitextadapter.d.ts +9 -9
- package/src/aiassistant/adapters/aitextadapter.js +23 -0
- package/src/{adapters → aiassistant/adapters}/awstextadapter.d.ts +36 -23
- package/src/aiassistant/adapters/awstextadapter.js +23 -0
- package/src/{adapters → aiassistant/adapters}/openaitextadapter.d.ts +38 -25
- package/src/aiassistant/adapters/openaitextadapter.js +23 -0
- package/src/{aiassistant.d.ts → aiassistant/aiassistant.d.ts} +54 -13
- package/src/aiassistant/aiassistant.js +23 -0
- package/src/aiassistant/aiassistantediting.js +23 -0
- package/src/{aiassistantui.d.ts → aiassistant/aiassistantui.d.ts} +4 -4
- package/src/aiassistant/aiassistantui.js +23 -0
- package/src/{legacyerrors.js → aiassistant/legacyerrors.js} +1 -1
- package/src/{ui → aiassistant/ui}/aiassistantcontroller.d.ts +5 -4
- package/src/aiassistant/ui/aiassistantcontroller.js +24 -0
- package/src/{ui → aiassistant/ui}/form/aiformcontentarea.d.ts +1 -1
- package/src/aiassistant/ui/form/aiformcontentarea.js +23 -0
- package/src/aiassistant/ui/form/aiformerrorview.js +23 -0
- package/src/{ui → aiassistant/ui}/form/aiformpromptview.d.ts +1 -1
- package/src/aiassistant/ui/form/aiformpromptview.js +23 -0
- package/src/{ui → aiassistant/ui}/form/aiformtoolbarview.d.ts +1 -1
- package/src/aiassistant/ui/form/aiformtoolbarview.js +23 -0
- package/src/{ui → aiassistant/ui}/form/aiformview.d.ts +1 -1
- package/src/aiassistant/ui/form/aiformview.js +23 -0
- package/src/{ui → aiassistant/ui}/form/aihistorylistitemview.d.ts +1 -1
- package/src/aiassistant/ui/form/aihistorylistitemview.js +23 -0
- package/src/{ui → aiassistant/ui}/form/aihistorylistview.d.ts +1 -1
- package/src/aiassistant/ui/form/aihistorylistview.js +23 -0
- package/src/{ui → aiassistant/ui}/form/prompthistory.d.ts +3 -0
- package/src/aiassistant/ui/form/prompthistory.js +23 -0
- package/src/{ui → aiassistant/ui}/showaiassistantcommand.d.ts +2 -2
- package/src/aiassistant/ui/showaiassistantcommand.js +23 -0
- package/src/{utils → aiassistant/utils}/common-translations.d.ts +1 -1
- package/src/{utils → aiassistant/utils}/common-translations.js +1 -1
- package/src/{utils → aiassistant/utils}/normalizecommandsconfig.d.ts +2 -2
- package/src/{utils → aiassistant/utils}/normalizecommandsconfig.js +1 -1
- package/src/aiballoon/aiballoon.d.ts +72 -0
- package/src/aiballoon/aiballoon.js +23 -0
- package/src/aiballoon/ui/aiballoondisclaimerview.d.ts +17 -0
- package/src/aiballoon/ui/aiballoondisclaimerview.js +23 -0
- package/src/aiballoon/ui/aiballoontoolbarview.d.ts +31 -0
- package/src/aiballoon/ui/aiballoontoolbarview.js +23 -0
- package/src/aiballoon/ui/aiballoonview.d.ts +109 -0
- package/src/aiballoon/ui/aiballoonview.js +23 -0
- package/src/aichat/aichat.d.ts +79 -0
- package/src/aichat/aichat.js +23 -0
- package/src/aichat/aichatcontroller.d.ts +68 -0
- package/src/aichat/aichatcontroller.js +23 -0
- package/src/aichat/aichatui.d.ts +297 -0
- package/src/aichat/aichatui.js +23 -0
- package/src/aichat/model/aichatcontext.d.ts +360 -0
- package/src/aichat/model/aichatcontext.js +23 -0
- package/src/aichat/model/aichatconversation.d.ts +270 -0
- package/src/aichat/model/aichatconversation.js +23 -0
- package/src/aichat/model/aichatinteraction.d.ts +46 -0
- package/src/aichat/model/aichatinteraction.js +23 -0
- package/src/aichat/model/aichatmodels.d.ts +77 -0
- package/src/aichat/model/aichatmodels.js +23 -0
- package/src/aichat/ui/aichatcontrolsview.d.ts +98 -0
- package/src/aichat/ui/aichatcontrolsview.js +23 -0
- package/src/aichat/ui/aichatfeedview.d.ts +114 -0
- package/src/aichat/ui/aichatfeedview.js +23 -0
- package/src/aichat/ui/aichatheaderview.d.ts +29 -0
- package/src/aichat/ui/aichatheaderview.js +23 -0
- package/src/aichat/ui/aichatview.d.ts +37 -0
- package/src/aichat/ui/aichatview.js +23 -0
- package/src/aichat/ui/controls/aichatchipsoverflowmanager.d.ts +71 -0
- package/src/aichat/ui/controls/aichatchipsoverflowmanager.js +23 -0
- package/src/aichat/ui/controls/aichatcontextitembuttonview.d.ts +46 -0
- package/src/aichat/ui/controls/aichatcontextitembuttonview.js +23 -0
- package/src/aichat/ui/controls/aichatcontextpanelurlinputview.d.ts +89 -0
- package/src/aichat/ui/controls/aichatcontextpanelurlinputview.js +23 -0
- package/src/aichat/ui/controls/aichatcontextpanelview.d.ts +105 -0
- package/src/aichat/ui/controls/aichatcontextpanelview.js +23 -0
- package/src/aichat/ui/controls/aichatcontrolsloaderview.d.ts +12 -0
- package/src/aichat/ui/controls/aichatcontrolsloaderview.js +23 -0
- package/src/aichat/ui/controls/aichatpromptcapabilitiesview.d.ts +89 -0
- package/src/aichat/ui/controls/aichatpromptcapabilitiesview.js +23 -0
- package/src/aichat/ui/controls/aichatpromptinputview.d.ts +44 -0
- package/src/aichat/ui/controls/aichatpromptinputview.js +23 -0
- package/src/aichat/ui/controls/aichatpromptsuggestionslistview.d.ts +17 -0
- package/src/aichat/ui/controls/aichatpromptsuggestionslistview.js +23 -0
- package/src/aichat/ui/controls/resources/aichatresourcelistitemview.d.ts +61 -0
- package/src/aichat/ui/controls/resources/aichatresourcelistitemview.js +23 -0
- package/src/aichat/ui/controls/resources/aichatresourcesballoonview.d.ts +100 -0
- package/src/aichat/ui/controls/resources/aichatresourcesballoonview.js +23 -0
- package/src/aichat/ui/controls/resources/aichatresourceslistview.d.ts +49 -0
- package/src/aichat/ui/controls/resources/aichatresourceslistview.js +23 -0
- package/src/aichat/ui/controls/resources/aichatresourcessearchinputview.d.ts +61 -0
- package/src/aichat/ui/controls/resources/aichatresourcessearchinputview.js +23 -0
- package/src/aichat/ui/controls/resources/aichatresourcesview.d.ts +54 -0
- package/src/aichat/ui/controls/resources/aichatresourcesview.js +23 -0
- package/src/aichat/ui/feed/aichatfeedcontextchipsview.d.ts +27 -0
- package/src/aichat/ui/feed/aichatfeedcontextchipsview.js +23 -0
- package/src/aichat/ui/feed/aichatfeederroritemview.d.ts +39 -0
- package/src/aichat/ui/feed/aichatfeederroritemview.js +23 -0
- package/src/aichat/ui/feed/aichatfeedinteractionheaderview.d.ts +29 -0
- package/src/aichat/ui/feed/aichatfeedinteractionheaderview.js +23 -0
- package/src/aichat/ui/feed/aichatfeeditemview.d.ts +46 -0
- package/src/aichat/ui/feed/aichatfeeditemview.js +23 -0
- package/src/aichat/ui/feed/aichatfeedreplyitemview.d.ts +46 -0
- package/src/aichat/ui/feed/aichatfeedreplyitemview.js +23 -0
- package/src/aichat/ui/feed/aichatfeedsuggestionitemactionsview.d.ts +74 -0
- package/src/aichat/ui/feed/aichatfeedsuggestionitemactionsview.js +23 -0
- package/src/aichat/ui/feed/aichatfeedsuggestionitemview.d.ts +74 -0
- package/src/aichat/ui/feed/aichatfeedsuggestionitemview.js +23 -0
- package/src/aichat/ui/feed/aichatfeedusermessageitem.d.ts +40 -0
- package/src/aichat/ui/feed/aichatfeedusermessageitem.js +23 -0
- package/src/aichat/utils/eventnames.d.ts +5 -0
- package/src/aichat/utils/eventnames.js +23 -0
- package/src/aichat/utils/promisequeue.d.ts +32 -0
- package/src/aichat/utils/promisequeue.js +23 -0
- package/src/aichat/utils/scrollmanager.d.ts +23 -0
- package/src/aichat/utils/scrollmanager.js +23 -0
- package/src/aichathistory/aichathistory.d.ts +30 -0
- package/src/aichathistory/aichathistory.js +23 -0
- package/src/aichathistory/aichathistorycontroller.d.ts +40 -0
- package/src/aichathistory/aichathistorycontroller.js +23 -0
- package/src/aichathistory/aichathistoryui.d.ts +112 -0
- package/src/aichathistory/aichathistoryui.js +23 -0
- package/src/aichathistory/model/aichathistoryconversations.d.ts +114 -0
- package/src/aichathistory/model/aichathistoryconversations.js +23 -0
- package/src/aichathistory/model/aichathistoryitem.d.ts +59 -0
- package/src/aichathistory/model/aichathistoryitem.js +23 -0
- package/src/aichathistory/ui/aichathistorylistitemview.d.ts +42 -0
- package/src/aichathistory/ui/aichathistorylistitemview.js +23 -0
- package/src/aichathistory/ui/aichathistorylistview.d.ts +31 -0
- package/src/aichathistory/ui/aichathistorylistview.js +23 -0
- package/src/aichathistory/ui/aichathistorysectionlistview.d.ts +17 -0
- package/src/aichathistory/ui/aichathistorysectionlistview.js +23 -0
- package/src/aichathistory/ui/aichathistoryview.d.ts +41 -0
- package/src/aichathistory/ui/aichathistoryview.js +23 -0
- package/src/aiconfig.d.ts +92 -30
- package/src/aicore/aiconnector.d.ts +302 -0
- package/src/aicore/aiconnector.js +23 -0
- package/src/aicore/aiediting.d.ts +61 -0
- package/src/aicore/aiediting.js +23 -0
- package/src/aicore/model/aicapabilities.d.ts +55 -0
- package/src/aicore/model/aicapabilities.js +23 -0
- package/src/aicore/model/aicontext.d.ts +53 -0
- package/src/aicore/model/aicontext.js +23 -0
- package/src/aicore/model/aiinteraction.d.ts +135 -0
- package/src/aicore/model/aiinteraction.js +23 -0
- package/src/aicore/model/aireply.d.ts +178 -0
- package/src/aicore/model/aireply.js +23 -0
- package/src/aicore/pipeline/airesponseapplier.d.ts +291 -0
- package/src/aicore/pipeline/airesponseapplier.js +24 -0
- package/src/aicore/pipeline/airesponseparser.d.ts +27 -0
- package/src/aicore/pipeline/airesponseparser.js +24 -0
- package/src/aicore/ui/aidisclaimerview.d.ts +17 -0
- package/src/aicore/ui/aidisclaimerview.js +23 -0
- package/src/aicore/ui/aiskeleton.d.ts +37 -0
- package/src/aicore/ui/aiskeleton.js +23 -0
- package/src/aicore/ui/aispinner.d.ts +14 -0
- package/src/aicore/ui/aispinner.js +23 -0
- package/src/aicore/ui/suggestioncontainer/aiminitoolbarview.d.ts +62 -0
- package/src/aicore/ui/suggestioncontainer/aiminitoolbarview.js +23 -0
- package/src/aicore/ui/suggestioncontainer/aisuggestionbodyview.d.ts +38 -0
- package/src/aicore/ui/suggestioncontainer/aisuggestionbodyview.js +23 -0
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontainerview.d.ts +80 -0
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontainerview.js +23 -0
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartview.d.ts +39 -0
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartview.js +23 -0
- package/src/aicore/ui/suggestioncontainer/aisuggestionheaderview.d.ts +39 -0
- package/src/aicore/ui/suggestioncontainer/aisuggestionheaderview.js +23 -0
- package/src/aicore/utils/common-translations.d.ts +9 -0
- package/src/aicore/utils/common-translations.js +23 -0
- package/src/aicore/utils/createresizebutton.d.ts +12 -0
- package/src/aicore/utils/createresizebutton.js +23 -0
- package/src/aicore/utils/documentposition.d.ts +41 -0
- package/src/aicore/utils/documentposition.js +23 -0
- package/src/aicore/utils/documentrange.d.ts +46 -0
- package/src/aicore/utils/documentrange.js +23 -0
- package/src/aicore/utils/eventnames.d.ts +9 -0
- package/src/aicore/utils/eventnames.js +23 -0
- package/src/aicore/utils/geteditorfromcontext.d.ts +6 -0
- package/src/aicore/utils/geteditorfromcontext.js +23 -0
- package/src/aicore/utils/getoperationsfromreply.d.ts +21 -0
- package/src/aicore/utils/getoperationsfromreply.js +23 -0
- package/src/aicore/utils/getsuggestionpartsfromreply.d.ts +19 -0
- package/src/aicore/utils/getsuggestionpartsfromreply.js +23 -0
- package/src/aicore/utils/htmlparser.d.ts +35 -0
- package/src/aicore/utils/htmlparser.js +23 -0
- package/src/aicore/utils/htmlstreamer.d.ts +123 -0
- package/src/aicore/utils/htmlstreamer.js +23 -0
- package/src/aiquickactions/aiquickactions.d.ts +41 -0
- package/src/aiquickactions/aiquickactions.js +23 -0
- package/src/aiquickactions/aiquickactionscommand.d.ts +12 -0
- package/src/aiquickactions/aiquickactionscommand.js +23 -0
- package/src/aiquickactions/aiquickactionsediting.d.ts +23 -0
- package/src/aiquickactions/aiquickactionsediting.js +23 -0
- package/src/aiquickactions/aiquickactionsui.d.ts +150 -0
- package/src/aiquickactions/aiquickactionsui.js +23 -0
- package/src/aiquickactions/ui/aiquickactionsbuttoncreator.d.ts +30 -0
- package/src/aiquickactions/ui/aiquickactionsbuttoncreator.js +23 -0
- package/src/aiquickactions/ui/aiquickactionsdropdowncontentview.d.ts +45 -0
- package/src/aiquickactions/ui/aiquickactionsdropdowncontentview.js +23 -0
- package/src/aiquickactions/ui/aiquickactionsdropdowncreator.d.ts +45 -0
- package/src/aiquickactions/ui/aiquickactionsdropdowncreator.js +23 -0
- package/src/aiquickactions/utils/common-translations.d.ts +9 -0
- package/src/aiquickactions/utils/common-translations.js +23 -0
- package/src/aireviewmode/aireviewmode.d.ts +30 -0
- package/src/aireviewmode/aireviewmode.js +23 -0
- package/src/aireviewmode/aireviewmodecontroller.d.ts +32 -0
- package/src/aireviewmode/aireviewmodecontroller.js +23 -0
- package/src/aireviewmode/aireviewmodeediting.d.ts +129 -0
- package/src/aireviewmode/aireviewmodeediting.js +23 -0
- package/src/aireviewmode/aireviewmodeui.d.ts +73 -0
- package/src/aireviewmode/aireviewmodeui.js +23 -0
- package/src/aireviewmode/model/aireviewcheck.d.ts +60 -0
- package/src/aireviewmode/model/aireviewcheck.js +23 -0
- package/src/aireviewmode/model/aireviewcheckcustom.d.ts +17 -0
- package/src/aireviewmode/model/aireviewcheckcustom.js +23 -0
- package/src/aireviewmode/model/aireviewchecklist.d.ts +31 -0
- package/src/aireviewmode/model/aireviewchecklist.js +23 -0
- package/src/aireviewmode/model/aireviewcheckresult.d.ts +39 -0
- package/src/aireviewmode/model/aireviewcheckresult.js +23 -0
- package/src/aireviewmode/model/aireviewcheckresultchange.d.ts +42 -0
- package/src/aireviewmode/model/aireviewcheckresultchange.js +23 -0
- package/src/aireviewmode/model/aireviewcheckrun.d.ts +102 -0
- package/src/aireviewmode/model/aireviewcheckrun.js +23 -0
- package/src/aireviewmode/model/aireviewcustomcheckrun.d.ts +18 -0
- package/src/aireviewmode/model/aireviewcustomcheckrun.js +23 -0
- package/src/aireviewmode/model/aireviewmodels.d.ts +26 -0
- package/src/aireviewmode/model/aireviewmodels.js +23 -0
- package/src/aireviewmode/model/aireviewsystemcheckrun.d.ts +14 -0
- package/src/aireviewmode/model/aireviewsystemcheckrun.js +23 -0
- package/src/aireviewmode/ui/aireviemodepromptinputview.d.ts +29 -0
- package/src/aireviewmode/ui/aireviemodepromptinputview.js +23 -0
- package/src/aireviewmode/ui/aireviewmodechecklistitemresultview.d.ts +46 -0
- package/src/aireviewmode/ui/aireviewmodechecklistitemresultview.js +23 -0
- package/src/aireviewmode/ui/aireviewmodecustomcheckview.d.ts +23 -0
- package/src/aireviewmode/ui/aireviewmodecustomcheckview.js +23 -0
- package/src/aireviewmode/ui/aireviewmodereviewchecklistview.d.ts +23 -0
- package/src/aireviewmode/ui/aireviewmodereviewchecklistview.js +23 -0
- package/src/aireviewmode/ui/aireviewmodereviewcheckresultsview.d.ts +80 -0
- package/src/aireviewmode/ui/aireviewmodereviewcheckresultsview.js +23 -0
- package/src/aireviewmode/ui/aireviewmodereviewcommandlistitemview.d.ts +45 -0
- package/src/aireviewmode/ui/aireviewmodereviewcommandlistitemview.js +23 -0
- package/src/aireviewmode/ui/aireviewmodereviewcompletedview.d.ts +18 -0
- package/src/aireviewmode/ui/aireviewmodereviewcompletedview.js +23 -0
- package/src/aireviewmode/ui/aireviewmodeview.d.ts +42 -0
- package/src/aireviewmode/ui/aireviewmodeview.js +23 -0
- package/src/aireviewmode/ui/form/aireviewmodeformamanager.d.ts +16 -0
- package/src/aireviewmode/ui/form/aireviewmodeformamanager.js +23 -0
- package/src/aireviewmode/ui/form/aireviewmodeformdropdown.d.ts +20 -0
- package/src/aireviewmode/ui/form/aireviewmodeformdropdown.js +23 -0
- package/src/aireviewmode/ui/form/aireviewmodeformmanager.d.ts +16 -0
- package/src/aireviewmode/ui/form/aireviewmodeformmanager.js +23 -0
- package/src/aireviewmode/utils/common-translations.d.ts +9 -0
- package/src/aireviewmode/utils/common-translations.js +23 -0
- package/src/aitabs/aitabs.d.ts +92 -0
- package/src/aitabs/aitabs.js +23 -0
- package/src/aitabs/aitabsmainview.d.ts +45 -0
- package/src/aitabs/aitabsmainview.js +23 -0
- package/src/aitabs/tabs/aitabsview.d.ts +147 -0
- package/src/aitabs/tabs/aitabsview.js +23 -0
- package/src/aitabs/tabs/tabbuttonview.d.ts +47 -0
- package/src/aitabs/tabs/tabbuttonview.js +23 -0
- package/src/aitabs/tabs/tabpanelview.d.ts +44 -0
- package/src/aitabs/tabs/tabpanelview.js +23 -0
- package/src/augmentation.d.ts +22 -6
- package/src/index.d.ts +40 -9
- package/src/index.js +1 -1
- package/theme/aiballoon/aiballoon.css +207 -0
- package/theme/aichat/aichat-controls/aichat-context-chip.css +139 -0
- package/theme/aichat/aichat-controls/aichat-context-controls-balloon-panels.css +194 -0
- package/theme/aichat/aichat-controls/aichat-context-controls.css +46 -0
- package/theme/aichat/aichat-controls/aichat-controls-button.css +74 -0
- package/theme/aichat/aichat-controls/aichat-controls-loader.css +93 -0
- package/theme/aichat/aichat-controls/prompt-capabilities.css +46 -0
- package/theme/aichat/aichat-controls/prompt-input.css +55 -0
- package/theme/aichat/aichat-controls.css +154 -0
- package/theme/aichat/aichat.css +68 -0
- package/theme/aichat/aichatfeed.css +376 -0
- package/theme/aichat/aichathistory.css +235 -0
- package/theme/aichat/aiminitoolbar.css +94 -0
- package/theme/aichat/aisuggestioncontainer.css +203 -0
- package/theme/aiquickactions/aiquickactions.css +43 -0
- package/theme/aireviewmode/aireviewmode-check-list.css +255 -0
- package/theme/aireviewmode/aireviewmode-check-run.css +202 -0
- package/theme/aireviewmode/aireviewmode-review-completed.css +52 -0
- package/theme/aireviewmode/aireviewmode.css +73 -0
- package/theme/aitabs/aitabsview.css +64 -0
- package/theme/aitabs/tabs/tabbuttonview.css +74 -0
- package/theme/aitabs/tabs/tabsview.css +78 -0
- package/theme/common/aibutton.css +145 -0
- package/theme/common/aichaterror.css +61 -0
- package/theme/common/aidisclaimer.css +29 -0
- package/theme/common/aiheader.css +88 -0
- package/theme/common/aiskeleton.css +54 -0
- package/theme/common/aispinner.css +58 -0
- package/src/adapters/aiadapter.js +0 -23
- package/src/adapters/aitextadapter.js +0 -23
- package/src/adapters/awstextadapter.js +0 -23
- package/src/adapters/openaitextadapter.js +0 -23
- package/src/aiassistant.js +0 -23
- package/src/aiassistantediting.js +0 -23
- package/src/aiassistantui.js +0 -23
- package/src/ui/aiassistantcontroller.js +0 -24
- package/src/ui/form/aiformcontentarea.js +0 -23
- package/src/ui/form/aiformerrorview.js +0 -23
- package/src/ui/form/aiformpromptview.js +0 -23
- package/src/ui/form/aiformtoolbarview.js +0 -23
- package/src/ui/form/aiformview.js +0 -23
- package/src/ui/form/aihistorylistitemview.js +0 -23
- package/src/ui/form/aihistorylistview.js +0 -23
- package/src/ui/form/prompthistory.js +0 -23
- package/src/ui/showaiassistantcommand.js +0 -23
- /package/src/{aiassistantediting.d.ts → aiassistant/aiassistantediting.d.ts} +0 -0
- /package/src/{legacyerrors.d.ts → aiassistant/legacyerrors.d.ts} +0 -0
- /package/src/{ui → aiassistant/ui}/form/aiformerrorview.d.ts +0 -0
- /package/theme/{ai-dropdown.css → aiassistant/ai-dropdown.css} +0 -0
- /package/theme/{ai-form.css → aiassistant/ai-form.css} +0 -0
- /package/theme/{ai.css → aiassistant/ai.css} +0 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module ai/aichat/ui/aichatfeedview
|
|
7
|
+
*/
|
|
8
|
+
import { type Locale } from 'ckeditor5/src/utils.js';
|
|
9
|
+
import { View, type ViewCollection, type BodyCollection } from 'ckeditor5/src/ui.js';
|
|
10
|
+
import { type AIChatFeedItemView } from './feed/aichatfeeditemview.js';
|
|
11
|
+
import { type AIContentRenderingStrategy } from '../../aicore/ui/suggestioncontainer/aisuggestioncontentpartview.js';
|
|
12
|
+
import { type Document } from '../../aicore/utils/htmlparser.js';
|
|
13
|
+
import { AIChatFeedSuggestionItemView } from './feed/aichatfeedsuggestionitemview.js';
|
|
14
|
+
import { AIChatFeedReplyItemView } from './feed/aichatfeedreplyitemview.js';
|
|
15
|
+
import { AIChatFeedUserMessageItemView } from './feed/aichatfeedusermessageitem.js';
|
|
16
|
+
import { AIChatFeedErrorItemView } from './feed/aichatfeederroritemview.js';
|
|
17
|
+
import { AIChatFeedInteractionHeaderView } from './feed/aichatfeedinteractionheaderview.js';
|
|
18
|
+
import { type AISuggestionContentPartDefinition } from '../../aicore/utils/getsuggestionpartsfromreply.js';
|
|
19
|
+
import { type AIReplySource } from '../../aicore/model/aireply.js';
|
|
20
|
+
/**
|
|
21
|
+
* A view that displays the chat feed with various items.
|
|
22
|
+
*/
|
|
23
|
+
export declare class AIChatFeedView extends View {
|
|
24
|
+
/**
|
|
25
|
+
* A collection of feed items.
|
|
26
|
+
*/
|
|
27
|
+
readonly children: ViewCollection<AIChatFeedItemView>;
|
|
28
|
+
/**
|
|
29
|
+
* The pending state of the feed. It indicates whether the feed is currently processing
|
|
30
|
+
* a response, meaning there is an active interaction.
|
|
31
|
+
*
|
|
32
|
+
* @observable
|
|
33
|
+
*/
|
|
34
|
+
isPending: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* The loading message displayed when the feed is processing a response.
|
|
37
|
+
*
|
|
38
|
+
* @observable
|
|
39
|
+
*/
|
|
40
|
+
loadingMessage: string;
|
|
41
|
+
isLoadingSkeletonVisible: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* @inheritDoc
|
|
44
|
+
*/
|
|
45
|
+
constructor(locale: Locale, bodyCollection: BodyCollection);
|
|
46
|
+
render(): void;
|
|
47
|
+
destroy(): void;
|
|
48
|
+
/**
|
|
49
|
+
* Removes all items from the feed.
|
|
50
|
+
*/
|
|
51
|
+
clear(): void;
|
|
52
|
+
/**
|
|
53
|
+
* Adds a new item to the feed.
|
|
54
|
+
*/
|
|
55
|
+
addItem<T extends keyof ChatFeedAddItemTypesInstances>(itemType: T, options: ChatFeedAddItemTypesInstances[T]['options']): void;
|
|
56
|
+
/**
|
|
57
|
+
* Updates the content of an item in the feed.
|
|
58
|
+
*
|
|
59
|
+
* **Note**: The content is updated (streamed) asynchronously.
|
|
60
|
+
*/
|
|
61
|
+
updateReplyItem({ id, parsedContent, renderingStrategy, abortSignal }: {
|
|
62
|
+
id: string;
|
|
63
|
+
parsedContent: Document;
|
|
64
|
+
renderingStrategy: AIContentRenderingStrategy;
|
|
65
|
+
abortSignal: AbortSignal;
|
|
66
|
+
}): Promise<void>;
|
|
67
|
+
updateWebSources(id: string, sources: Array<AIReplySource>): Promise<void>;
|
|
68
|
+
updateSuggestionItem({ id, parts, renderingStrategy, abortSignal }: {
|
|
69
|
+
id: string;
|
|
70
|
+
parts: Array<AISuggestionContentPartDefinition>;
|
|
71
|
+
renderingStrategy: AIContentRenderingStrategy;
|
|
72
|
+
abortSignal: AbortSignal;
|
|
73
|
+
}): Promise<void>;
|
|
74
|
+
updateSuggestionPartState({ id, index, state }: {
|
|
75
|
+
id: string;
|
|
76
|
+
index: number;
|
|
77
|
+
state: string;
|
|
78
|
+
}): void;
|
|
79
|
+
/**
|
|
80
|
+
* Marks an item as done.
|
|
81
|
+
*
|
|
82
|
+
* **Note**: Marking the item as done cleans up the streaming animations.
|
|
83
|
+
*/
|
|
84
|
+
markItemAsDone(id: string): void;
|
|
85
|
+
/**
|
|
86
|
+
* Returns all item ids.
|
|
87
|
+
*/
|
|
88
|
+
getItemIds(): Array<string>;
|
|
89
|
+
/**
|
|
90
|
+
* Removes an item from the feed.
|
|
91
|
+
*/
|
|
92
|
+
removeItem(id: string): void;
|
|
93
|
+
scrollToSuggestion(replyId: string, partIndex: number): void;
|
|
94
|
+
setLoadingMessage(message: string): void;
|
|
95
|
+
/**
|
|
96
|
+
* Toggles the loading skeleton in the feed.
|
|
97
|
+
*/
|
|
98
|
+
toggleLoadingSkeleton(isLoading: boolean): void;
|
|
99
|
+
/**
|
|
100
|
+
* Starts the auto-scrolling of the feed.
|
|
101
|
+
*/
|
|
102
|
+
startAutoScroll(): void;
|
|
103
|
+
/**
|
|
104
|
+
* Stops the auto-scrolling of the feed.
|
|
105
|
+
*/
|
|
106
|
+
stopAutoScroll(): void;
|
|
107
|
+
}
|
|
108
|
+
export interface ChatFeedAddItemTypesInstances {
|
|
109
|
+
'interaction-header': AIChatFeedInteractionHeaderView;
|
|
110
|
+
'ai-reply': AIChatFeedReplyItemView;
|
|
111
|
+
'ai-suggestion-reply': AIChatFeedSuggestionItemView;
|
|
112
|
+
'user-message': AIChatFeedUserMessageItemView;
|
|
113
|
+
'error-message': AIChatFeedErrorItemView;
|
|
114
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, 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 _0x4735fa=_0x8d8a;(function(_0x3715c8,_0x1968ab){const _0x456924=_0x8d8a,_0x3abe21=_0x3715c8();while(!![]){try{const _0x20a193=-parseInt(_0x456924(0xa7))/0x1*(parseInt(_0x456924(0xc6))/0x2)+-parseInt(_0x456924(0xd0))/0x3+-parseInt(_0x456924(0xd8))/0x4*(parseInt(_0x456924(0xde))/0x5)+-parseInt(_0x456924(0xb7))/0x6*(parseInt(_0x456924(0xd1))/0x7)+-parseInt(_0x456924(0xcb))/0x8+-parseInt(_0x456924(0xca))/0x9*(parseInt(_0x456924(0xe5))/0xa)+-parseInt(_0x456924(0xab))/0xb*(-parseInt(_0x456924(0xd2))/0xc);if(_0x20a193===_0x1968ab)break;else _0x3abe21['push'](_0x3abe21['shift']());}catch(_0x2133fb){_0x3abe21['push'](_0x3abe21['shift']());}}}(_0x49d1,0x41e41));import{CKEditorError as _0x2239e4,logWarning as _0x51f28f,scrollViewportToShowTarget as _0x3ee015}from'ckeditor5/src/utils.js';function _0x8d8a(_0x2b38c2,_0xe7eda6){const _0x49d1f7=_0x49d1();return _0x8d8a=function(_0x8d8ad1,_0x1de524){_0x8d8ad1=_0x8d8ad1-0xa2;let _0x4208fc=_0x49d1f7[_0x8d8ad1];return _0x4208fc;},_0x8d8a(_0x2b38c2,_0xe7eda6);}import{View as _0x99fc4d}from'ckeditor5/src/ui.js';import{AI_CHAT_UI_EVENT_NAMES as _0x1b82df}from'../utils/eventnames.js';import{AIChatFeedSuggestionItemView as _0x53b9f4}from'./feed/aichatfeedsuggestionitemview.js';function _0x49d1(){const _0x566418=['isVisible','188170HdeIdm','ai-chat-feed-view-item-not-a-reply-item','startAutoScroll','getItemIds','_createTemplateChildren','ck-ai-chat__loader','bindTemplate','addItem','ai-suggestion-reply','span','_createLoaderChildren','setTemplate','start','locale','updateWebSources','scrollManager','stop','_createFeedItems','set','77SULhNd','ck-ai-chat-feed-view-scroll-to-suggestion-invalid-item','loadingMessage','delegate','11806454cvDcLz','isPending','ai-reply','removeItem','_bodyCollection','getPartView','interaction-header','ai-chat-feed-view-item-not-a-suggestion-item','isLoadingSkeletonVisible','remove','children','_setupTemplate','6YvixoA','ck-ai-chat-feed-view-scroll-to-suggestion-part-view-not-found','includes','ck-ai-chat__loader-text','updatePartState','options','getItemById','updateSuggestionPartState','extendTemplate','ck-ai-chat__feed__items','updateReplyItem','updateContent','ai-chat-feed-view-item-not-found','find','ck-hidden','394wCDrVD','toggleLoadingSkeleton','add','_createSkeletonLoader','9VJCRvs','2735192ruEtUa','markAsDone','updateSuggestionItem','ai-chat-feed-view-item-not-a-suggestion-or-reply-item','aiFeed','317088KROAXj','2089178UybRsd','12idwNRc','clear','setLoadingMessage','stopAutoScroll','destroy','render','18712jeVZRp','scrollToSuggestion','div','ck-ai-chat__feed','map','createCollection','25FYFaUt','updateSources','user-message','markItemAsDone','element','_createFeedLoader'];_0x49d1=function(){return _0x566418;};return _0x49d1();}import{AIChatFeedReplyItemView as _0x509064}from'./feed/aichatfeedreplyitemview.js';import{AIChatFeedUserMessageItemView as _0x3b59ca}from'./feed/aichatfeedusermessageitem.js';import{AIChatFeedErrorItemView as _0x4f8506}from'./feed/aichatfeederroritemview.js';import{AIChatFeedInteractionHeaderView as _0x3966ea}from'./feed/aichatfeedinteractionheaderview.js';import{ScrollManager as _0x388c35}from'../utils/scrollmanager.js';import{AISkeletonView as _0x280495,SKELETON_DEFINITIONS as _0x30469a}from'../../aicore/ui/aiskeleton.js';import{AISpinnerView as _0x4908e5}from'../../aicore/ui/aispinner.js';export class AIChatFeedView extends _0x99fc4d{[_0x4735fa(0xb5)];[_0x4735fa(0xa3)];[_0x4735fa(0xaf)];constructor(_0x1e8e68,_0x7ff7b8){const _0x5f2f53=_0x4735fa;super(_0x1e8e68),this[_0x5f2f53(0xaf)]=_0x7ff7b8,this[_0x5f2f53(0xa6)](_0x5f2f53(0xac),!0x1),this[_0x5f2f53(0xa6)](_0x5f2f53(0xa9),''),this[_0x5f2f53(0xa6)](_0x5f2f53(0xb3),!0x1),this[_0x5f2f53(0xb5)]=this[_0x5f2f53(0xdd)](),this[_0x5f2f53(0xb5)][_0x5f2f53(0xaa)](..._0x1b82df)['to'](this),this[_0x5f2f53(0xb6)]();}[_0x4735fa(0xd7)](){const _0x4902e9=_0x4735fa;super[_0x4902e9(0xd7)](),this[_0x4902e9(0xa3)]=new _0x388c35(this[_0x4902e9(0xe2)]);}[_0x4735fa(0xd6)](){const _0x16fdce=_0x4735fa;super[_0x16fdce(0xd6)](),this[_0x16fdce(0xa3)][_0x16fdce(0xd6)]();}[_0x4735fa(0xd3)](){const _0x3ec6ab=_0x4735fa;this[_0x3ec6ab(0xb5)][_0x3ec6ab(0xd3)]();}[_0x4735fa(0xec)](_0x24fc4b,_0x8e7233){const _0xc987a4=_0x4735fa;let _0x589ce8;_0x589ce8=_0xc987a4(0xad)===_0x24fc4b?new _0x509064(_0x8e7233):_0xc987a4(0xed)===_0x24fc4b?new _0x53b9f4(this[_0xc987a4(0xf2)],_0x8e7233):_0xc987a4(0xe0)===_0x24fc4b?new _0x3b59ca(this[_0xc987a4(0xf2)],_0x8e7233,this[_0xc987a4(0xaf)]):_0xc987a4(0xb1)===_0x24fc4b?new _0x3966ea(this[_0xc987a4(0xf2)],_0x8e7233):new _0x4f8506(_0x8e7233),this[_0xc987a4(0xb5)][_0xc987a4(0xc8)](_0x589ce8);}async[_0x4735fa(0xc1)]({id:_0x2e306c,parsedContent:_0x20b4d,renderingStrategy:_0x54841a,abortSignal:_0x417879}){const _0x7e1c1a=_0x4735fa,_0x9fc2a0=this[_0x7e1c1a(0xbd)](_0x2e306c);if(!(_0x9fc2a0 instanceof _0x509064))throw new _0x2239e4(_0x7e1c1a(0xe6),null,{'itemView':_0x9fc2a0,'id':_0x2e306c,'parsedContent':_0x20b4d});await _0x9fc2a0[_0x7e1c1a(0xc2)]({'parsedContent':_0x20b4d,'renderingStrategy':_0x54841a,'abortSignal':_0x417879});}async[_0x4735fa(0xa2)](_0x4b3f5f,_0x3bfe1d){const _0x2d9b3b=_0x4735fa,_0x42d569=this[_0x2d9b3b(0xbd)](_0x4b3f5f);if(_0x42d569 instanceof _0x53b9f4)_0x42d569[_0x2d9b3b(0xdf)](_0x3bfe1d);else{if(!(_0x42d569 instanceof _0x509064))throw new _0x2239e4(_0x2d9b3b(0xce),null,{'itemView':_0x42d569,'id':_0x4b3f5f,'sources':_0x3bfe1d});_0x42d569[_0x2d9b3b(0xdf)](_0x3bfe1d);}}async[_0x4735fa(0xcd)]({id:_0x3ecabd,parts:_0x11bf8f,renderingStrategy:_0x381e0e,abortSignal:_0x4cb70b}){const _0x40688c=_0x4735fa,_0x5cfdcd=this[_0x40688c(0xbd)](_0x3ecabd);if(!(_0x5cfdcd instanceof _0x53b9f4))throw new _0x2239e4(_0x40688c(0xb2),null,{'itemView':_0x5cfdcd,'id':_0x3ecabd,'parts':_0x11bf8f});await _0x5cfdcd[_0x40688c(0xc2)]({'parts':_0x11bf8f,'renderingStrategy':_0x381e0e,'abortSignal':_0x4cb70b});}[_0x4735fa(0xbe)]({id:_0x91c5b5,index:_0x566a31,state:_0x3e1ce9}){const _0x5ea86e=_0x4735fa,_0x2f932a=this[_0x5ea86e(0xbd)](_0x91c5b5);if(!(_0x2f932a instanceof _0x53b9f4))throw new _0x2239e4(_0x5ea86e(0xb2),this,{'id':_0x91c5b5});_0x2f932a[_0x5ea86e(0xbb)](_0x566a31,_0x3e1ce9);}[_0x4735fa(0xe1)](_0x3c1e86){const _0x518770=_0x4735fa;this[_0x518770(0xbd)](_0x3c1e86)[_0x518770(0xcc)]();}[_0x4735fa(0xe8)](){const _0x5b4b37=_0x4735fa;return this[_0x5b4b37(0xb5)][_0x5b4b37(0xdc)](_0x32e6e1=>_0x32e6e1[_0x5b4b37(0xbc)]['id']);}[_0x4735fa(0xae)](_0x256d6e){const _0x5bfd5c=_0x4735fa;this[_0x5bfd5c(0xb5)][_0x5bfd5c(0xb4)](this[_0x5bfd5c(0xbd)](_0x256d6e));}[_0x4735fa(0xd9)](_0x2925b8,_0x8ce4df){const _0x58481e=_0x4735fa,_0x220c1a=this[_0x58481e(0xbd)](_0x2925b8);if(!(_0x220c1a instanceof _0x53b9f4))return void _0x51f28f(_0x58481e(0xa8),{'replyId':_0x2925b8,'partIndex':_0x8ce4df});const _0x108064=_0x220c1a[_0x58481e(0xb0)](_0x8ce4df);_0x108064?_0x3ee015({'target':_0x108064[_0x58481e(0xe2)],'ancestorOffset':0x14,'alignToTop':!0x0,'forceScroll':!0x0}):_0x51f28f(_0x58481e(0xb8),{'replyId':_0x2925b8,'partIndex':_0x8ce4df});}[_0x4735fa(0xb6)](){const _0x3707e4=_0x4735fa;this[_0x3707e4(0xf0)]({'tag':_0x3707e4(0xda),'attributes':{'class':['ck',_0x3707e4(0xdb)]},'children':this[_0x3707e4(0xe9)]()});}[_0x4735fa(0xe9)](){const _0x409159=_0x4735fa,_0x402540=this[_0x409159(0xc9)]();return[this[_0x409159(0xa5)](),_0x402540,this[_0x409159(0xe3)]()];}[_0x4735fa(0xc9)](){const _0x219446=_0x4735fa,_0x4efc56=new _0x280495(this[_0x219446(0xf2)],_0x30469a[_0x219446(0xcf)]);return _0x4efc56[_0x219446(0xbf)]({'attributes':{'class':[this[_0x219446(0xeb)]['if'](_0x219446(0xb3),_0x219446(0xc5),_0x309d1a=>!_0x309d1a)]}}),_0x4efc56;}[_0x4735fa(0xa5)](){const _0x308a7c=_0x4735fa,_0x39aba9=new _0x99fc4d(this[_0x308a7c(0xf2)]);return _0x39aba9[_0x308a7c(0xf0)]({'tag':_0x308a7c(0xda),'attributes':{'class':['ck',_0x308a7c(0xc0),this[_0x308a7c(0xeb)]['if'](_0x308a7c(0xb3),_0x308a7c(0xc5))]},'children':this[_0x308a7c(0xb5)]}),_0x39aba9;}[_0x4735fa(0xe3)](){const _0x5631bf=_0x4735fa,_0x3379c5=new _0x99fc4d(this[_0x5631bf(0xf2)]);return _0x3379c5[_0x5631bf(0xf0)]({'tag':_0x5631bf(0xda),'attributes':{'class':['ck',_0x5631bf(0xea),this[_0x5631bf(0xeb)]['if'](_0x5631bf(0xac),_0x5631bf(0xc5),_0x4b54e8=>!_0x4b54e8)]},'children':this[_0x5631bf(0xef)]()}),_0x3379c5;}[_0x4735fa(0xef)](){const _0x44a3c4=_0x4735fa,_0x5d05cd=new _0x4908e5();return _0x5d05cd[_0x44a3c4(0xe4)]=!0x0,[_0x5d05cd,{'tag':_0x44a3c4(0xee),'attributes':{'class':['ck',_0x44a3c4(0xba)]},'children':[{'text':this[_0x44a3c4(0xeb)]['to'](_0x44a3c4(0xa9))}]}];}[_0x4735fa(0xbd)](_0x561cbd){const _0x2c2854=_0x4735fa,_0x549fbb=this[_0x2c2854(0xb5)][_0x2c2854(0xc4)](_0xaf26cf=>_0xaf26cf[_0x2c2854(0xbc)]['id'][_0x2c2854(0xb9)](_0x561cbd));if(!_0x549fbb)throw new _0x2239e4(_0x2c2854(0xc3),this,{'id':_0x561cbd});return _0x549fbb;}[_0x4735fa(0xd4)](_0x353e50){const _0x14d2ba=_0x4735fa;this[_0x14d2ba(0xa6)](_0x14d2ba(0xa9),_0x353e50);}[_0x4735fa(0xc7)](_0x4a0f34){const _0x1802de=_0x4735fa;this[_0x1802de(0xa6)](_0x1802de(0xb3),_0x4a0f34);}[_0x4735fa(0xe7)](){const _0x52f617=_0x4735fa;this[_0x52f617(0xa3)][_0x52f617(0xf1)]();}[_0x4735fa(0xd5)](){const _0x587e65=_0x4735fa;this[_0x587e65(0xa3)][_0x587e65(0xa4)]();}}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module ai/aichat/ui/aichatheaderview
|
|
7
|
+
*/
|
|
8
|
+
import { type Locale } from 'ckeditor5/src/utils.js';
|
|
9
|
+
import { ButtonView, FormHeaderView } from 'ckeditor5/src/ui.js';
|
|
10
|
+
export declare class AIChatHeaderView extends FormHeaderView {
|
|
11
|
+
/**
|
|
12
|
+
* The button to start a new conversation.
|
|
13
|
+
*/
|
|
14
|
+
readonly conversationStartButton: ButtonView;
|
|
15
|
+
/**
|
|
16
|
+
* The button to resize the chat view.
|
|
17
|
+
*/
|
|
18
|
+
readonly resizeButton?: ButtonView;
|
|
19
|
+
/**
|
|
20
|
+
* Indicates whether the tabs view is maximized.
|
|
21
|
+
*
|
|
22
|
+
* @observable
|
|
23
|
+
*/
|
|
24
|
+
isMaximized: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* @inheritDoc
|
|
27
|
+
*/
|
|
28
|
+
constructor(locale: Locale, showResizeButton: boolean);
|
|
29
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, 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 _0x4d9ebe=_0x168c;function _0x351c(){const _0x4a2416=['30jUfrcb','AI_CHAT_HEADING','ck-ai-header\x20ck-ai-header_chat','1773EsRBRJ','fire','1238784ObzNdk','startConversation','add','conversationStartButton','188596OUEDEB','24177caapnM','locale','_createStartConversationButton','120KIEiEg','isMaximized','ck-ai-chat__start-conversation','16AyLtXG','48IiOoSG','set','children','resizeButton','1658489XoPezg','execute','AI_CHAT_LABEL_NEW_CHAT','21950KOpmZK','430793Vjudpj','667645ssenhN'];_0x351c=function(){return _0x4a2416;};return _0x351c();}(function(_0x25ffd6,_0x5e0512){const _0x34729f=_0x168c,_0x59256c=_0x25ffd6();while(!![]){try{const _0x32d30d=-parseInt(_0x34729f(0x1be))/0x1+parseInt(_0x34729f(0x1b5))/0x2*(parseInt(_0x34729f(0x1c9))/0x3)+-parseInt(_0x34729f(0x1c8))/0x4*(parseInt(_0x34729f(0x1bf))/0x5)+-parseInt(_0x34729f(0x1c4))/0x6+-parseInt(_0x34729f(0x1b9))/0x7*(-parseInt(_0x34729f(0x1b4))/0x8)+parseInt(_0x34729f(0x1c2))/0x9*(parseInt(_0x34729f(0x1bc))/0xa)+parseInt(_0x34729f(0x1bd))/0xb*(parseInt(_0x34729f(0x1cc))/0xc);if(_0x32d30d===_0x5e0512)break;else _0x59256c['push'](_0x59256c['shift']());}catch(_0x409923){_0x59256c['push'](_0x59256c['shift']());}}}(_0x351c,0x519e8));import{ButtonView as _0x2f849b,FormHeaderView as _0x273e0e}from'ckeditor5/src/ui.js';import{IconPlus as _0x3fb06c,IconAIChat as _0x5a8eb0}from'ckeditor5/src/icons.js';import{getTranslation as _0x38b562}from'../../aicore/utils/common-translations.js';function _0x168c(_0x44432e,_0x437602){const _0x351c5f=_0x351c();return _0x168c=function(_0x168c67,_0x35bc42){_0x168c67=_0x168c67-0x1b3;let _0x2921a5=_0x351c5f[_0x168c67];return _0x2921a5;},_0x168c(_0x44432e,_0x437602);}import{createResizeButton as _0x3331c9}from'../../aicore/utils/createresizebutton.js';export class AIChatHeaderView extends _0x273e0e{[_0x4d9ebe(0x1c7)];[_0x4d9ebe(0x1b8)];constructor(_0x446619,_0x3fcd12){const _0x359ff6=_0x4d9ebe;super(_0x446619,{'label':_0x38b562(_0x446619,_0x359ff6(0x1c0)),'class':_0x359ff6(0x1c1),'icon':_0x5a8eb0}),this[_0x359ff6(0x1b6)](_0x359ff6(0x1cd),!0x1),this[_0x359ff6(0x1c7)]=this[_0x359ff6(0x1cb)](_0x446619),this[_0x359ff6(0x1b7)][_0x359ff6(0x1c6)](this[_0x359ff6(0x1c7)]),_0x3fcd12&&(this[_0x359ff6(0x1b8)]=_0x3331c9(_0x446619,this),this[_0x359ff6(0x1b7)][_0x359ff6(0x1c6)](this[_0x359ff6(0x1b8)]));}[_0x4d9ebe(0x1cb)](_0xc45d34){const _0x53a62f=_0x4d9ebe,_0x495edd=new _0x2f849b(_0xc45d34);return _0x495edd[_0x53a62f(0x1b6)]({'label':_0x38b562(this[_0x53a62f(0x1ca)],_0x53a62f(0x1bb)),'withText':!0x0,'icon':_0x3fb06c,'class':_0x53a62f(0x1b3)}),_0x495edd['on'](_0x53a62f(0x1ba),()=>{const _0x51a233=_0x53a62f;this[_0x51a233(0x1c3)](_0x51a233(0x1c5));}),_0x495edd;}}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module ai/aichat/ui/aichatview
|
|
7
|
+
*/
|
|
8
|
+
import { type Locale } from 'ckeditor5/src/utils.js';
|
|
9
|
+
import { type FormHeaderView, View } from 'ckeditor5/src/ui.js';
|
|
10
|
+
import { AIChatFeedView } from './aichatfeedview.js';
|
|
11
|
+
import { AIChatControlsView } from './aichatcontrolsview.js';
|
|
12
|
+
import { AIDisclaimerView } from '../../aicore/ui/aidisclaimerview.js';
|
|
13
|
+
import { type AIContextProvider, type AIContextResourceState } from '../../aichat/model/aichatcontext.js';
|
|
14
|
+
/**
|
|
15
|
+
* The main view of the AI chat plugin.
|
|
16
|
+
*
|
|
17
|
+
* It contains the header, feed and controls views.
|
|
18
|
+
*/
|
|
19
|
+
export declare class AIChatView extends View {
|
|
20
|
+
chatHeader: FormHeaderView;
|
|
21
|
+
chatFeed: AIChatFeedView;
|
|
22
|
+
chatControls: AIChatControlsView;
|
|
23
|
+
chatDisclaimer: AIDisclaimerView;
|
|
24
|
+
constructor(locale: Locale, showResizeButton: boolean);
|
|
25
|
+
/**
|
|
26
|
+
* Populates a source resource balloon with loaded resources.
|
|
27
|
+
*/
|
|
28
|
+
populateSourceResourceBalloon(sourceId: string, source: AIContextProvider, resources: Array<AIContextResourceState>, uid: string): void;
|
|
29
|
+
/**
|
|
30
|
+
* Closes the source resource balloon and cleans up its state.
|
|
31
|
+
*/
|
|
32
|
+
closeSourceResourceBalloon(sourceId: string): void;
|
|
33
|
+
/**
|
|
34
|
+
* @inheritDoc
|
|
35
|
+
*/
|
|
36
|
+
destroy(): void;
|
|
37
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, 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
|
+
function _0x5ed0(){var _0x106659=['_bodyCollection','1565139hFIcBU','detachFromDom','3304KzvXdF','div','setTemplate','closeSourceResourceBalloon','ck-rounded-corners','chatHeader','destroy','2DTofOH','ck-reset_all','chatFeed','120686NNPIsc','delegate','3364695GcEOIi','ck-ai-chat','194260BnqnGx','385KgrpSK','1147165GxiKWL','4353400FqNlGm','chatDisclaimer','chatControls','populateSourceResourceBalloon','8PLTMyx','attachToDom','uiLanguageDirection','3732FNKuLh'];_0x5ed0=function(){return _0x106659;};return _0x5ed0();}var _0x5971e0=_0x1ce6;(function(_0xab0ee9,_0x4e59ec){var _0x37bd09=_0x1ce6,_0x402590=_0xab0ee9();while(!![]){try{var _0x315b15=-parseInt(_0x37bd09(0x93))/0x1+-parseInt(_0x37bd09(0x90))/0x2*(-parseInt(_0x37bd09(0x87))/0x3)+parseInt(_0x37bd09(0x82))/0x4*(parseInt(_0x37bd09(0x7d))/0x5)+parseInt(_0x37bd09(0x85))/0x6*(-parseInt(_0x37bd09(0x89))/0x7)+-parseInt(_0x37bd09(0x7e))/0x8+-parseInt(_0x37bd09(0x95))/0x9+-parseInt(_0x37bd09(0x97))/0xa*(-parseInt(_0x37bd09(0x7c))/0xb);if(_0x315b15===_0x4e59ec)break;else _0x402590['push'](_0x402590['shift']());}catch(_0x15b38d){_0x402590['push'](_0x402590['shift']());}}}(_0x5ed0,0x501fd));import{View as _0x45f1ea,BodyCollection as _0x38e94c}from'ckeditor5/src/ui.js';import{AI_CHAT_UI_EVENT_NAMES as _0x5d939e}from'../utils/eventnames.js';import{AIChatFeedView as _0x10fb45}from'./aichatfeedview.js';import{AIChatControlsView as _0x121c0b}from'./aichatcontrolsview.js';import{AIChatHeaderView as _0x24c51b}from'./aichatheaderview.js';import{AIDisclaimerView as _0x60b820}from'../../aicore/ui/aidisclaimerview.js';function _0x1ce6(_0x524898,_0x64d142){var _0x5ed0f8=_0x5ed0();return _0x1ce6=function(_0x1ce603,_0x45aee5){_0x1ce603=_0x1ce603-0x7c;var _0x136ed6=_0x5ed0f8[_0x1ce603];return _0x136ed6;},_0x1ce6(_0x524898,_0x64d142);}export class AIChatView extends _0x45f1ea{[_0x5971e0(0x8e)];[_0x5971e0(0x92)];[_0x5971e0(0x80)];[_0x5971e0(0x7f)];[_0x5971e0(0x86)];constructor(_0x3bfc75,_0x536452){var _0x46e439=_0x5971e0;super(_0x3bfc75),this[_0x46e439(0x86)]=new _0x38e94c(_0x3bfc75),this[_0x46e439(0x86)][_0x46e439(0x83)](),this[_0x46e439(0x8e)]=new _0x24c51b(_0x3bfc75,_0x536452),this[_0x46e439(0x8e)][_0x46e439(0x94)](..._0x5d939e)['to'](this),this[_0x46e439(0x92)]=new _0x10fb45(_0x3bfc75,this[_0x46e439(0x86)]),this[_0x46e439(0x92)][_0x46e439(0x94)](..._0x5d939e)['to'](this),this[_0x46e439(0x80)]=new _0x121c0b(_0x3bfc75,this[_0x46e439(0x86)]),this[_0x46e439(0x80)][_0x46e439(0x94)](..._0x5d939e)['to'](this),this[_0x46e439(0x7f)]=new _0x60b820(_0x3bfc75),this[_0x46e439(0x8b)]({'tag':_0x46e439(0x8a),'attributes':{'class':['ck',_0x46e439(0x91),_0x46e439(0x96),_0x46e439(0x8d)],'dir':_0x3bfc75[_0x46e439(0x84)]},'children':[this[_0x46e439(0x8e)],this[_0x46e439(0x92)],this[_0x46e439(0x80)],this[_0x46e439(0x7f)]]});}[_0x5971e0(0x81)](_0x2cf99b,_0x250b5f,_0x133b19,_0x404812){var _0x4eea96=_0x5971e0;this[_0x4eea96(0x80)][_0x4eea96(0x81)](_0x2cf99b,_0x250b5f,_0x133b19,_0x404812);}[_0x5971e0(0x8c)](_0x483dea){var _0x47c335=_0x5971e0;this[_0x47c335(0x80)][_0x47c335(0x8c)](_0x483dea);}[_0x5971e0(0x8f)](){var _0x4b552f=_0x5971e0;this[_0x4b552f(0x86)][_0x4b552f(0x88)](),super[_0x4b552f(0x8f)]();}}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module ai/aichat/ui/controls/aichatchipsoverflowmanager
|
|
7
|
+
*/
|
|
8
|
+
import { View, type BodyCollection, ButtonView } from 'ckeditor5/src/ui.js';
|
|
9
|
+
import { type Locale, Collection } from 'ckeditor5/src/utils.js';
|
|
10
|
+
import { type AIChatContextItemButtonView } from './aichatcontextitembuttonview.js';
|
|
11
|
+
/**
|
|
12
|
+
* Configuration interface for the chips overflow manager.
|
|
13
|
+
*/
|
|
14
|
+
export interface ChipsOverflowConfig {
|
|
15
|
+
cssClasses: {
|
|
16
|
+
showMoreButton: string;
|
|
17
|
+
showMoreBalloon: string;
|
|
18
|
+
overflowContainer: string;
|
|
19
|
+
controlsButton?: string;
|
|
20
|
+
calculationContainer?: string;
|
|
21
|
+
};
|
|
22
|
+
maxVisibleRows?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Tolerance for row detection in pixels.
|
|
25
|
+
*/
|
|
26
|
+
rowDetectionTolerance?: number;
|
|
27
|
+
showMoreLabelPrefix?: string;
|
|
28
|
+
viewportOffset?: {
|
|
29
|
+
top: number;
|
|
30
|
+
bottom: number;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* A reusable component for managing chips overflow with show more functionality.
|
|
35
|
+
*/
|
|
36
|
+
export declare class AIChatChipsOverflowManager {
|
|
37
|
+
constructor(locale: Locale, visibleChips: Collection<AIChatContextItemButtonView>, config: ChipsOverflowConfig, bodyCollection: BodyCollection, parentView: View);
|
|
38
|
+
/**
|
|
39
|
+
* Sets the container element that holds the chips.
|
|
40
|
+
*/
|
|
41
|
+
setContainerElement(element: HTMLElement): void;
|
|
42
|
+
/**
|
|
43
|
+
* Gets the show more button view.
|
|
44
|
+
*/
|
|
45
|
+
get showMoreButtonView(): ButtonView | null;
|
|
46
|
+
/**
|
|
47
|
+
* Gets the overflow chips collection.
|
|
48
|
+
*/
|
|
49
|
+
get overflowChips(): Collection<AIChatContextItemButtonView>;
|
|
50
|
+
/**
|
|
51
|
+
* Reorganizes chips to handle overflow.
|
|
52
|
+
*/
|
|
53
|
+
reorganizeChips(): void;
|
|
54
|
+
/**
|
|
55
|
+
* Shows the show more balloon panel.
|
|
56
|
+
*/
|
|
57
|
+
showBalloonPanel(): void;
|
|
58
|
+
/**
|
|
59
|
+
* Hides the show more balloon panel.
|
|
60
|
+
*/
|
|
61
|
+
hideBalloonPanel(): void;
|
|
62
|
+
/**
|
|
63
|
+
* Clears all overflow chips and resets the overflow state.
|
|
64
|
+
* This properly updates the show more button counter and hides it when no overflow items remain.
|
|
65
|
+
*/
|
|
66
|
+
clear(): void;
|
|
67
|
+
/**
|
|
68
|
+
* Destroys the overflow manager and cleans up resources.
|
|
69
|
+
*/
|
|
70
|
+
destroy(): void;
|
|
71
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, 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 _0x172429=_0x7c74;function _0x7c74(_0x40661d,_0x16c7e3){const _0x168b3a=_0x168b();return _0x7c74=function(_0x7c7446,_0x5919b7){_0x7c7446=_0x7c7446-0x7f;let _0x1134a3=_0x168b3a[_0x7c7446];return _0x1134a3;},_0x7c74(_0x40661d,_0x16c7e3);}(function(_0x5d0e1e,_0x1a094f){const _0x3ec130=_0x7c74,_0x2d83e8=_0x5d0e1e();while(!![]){try{const _0x572872=parseInt(_0x3ec130(0x109))/0x1*(parseInt(_0x3ec130(0x102))/0x2)+parseInt(_0x3ec130(0xba))/0x3+parseInt(_0x3ec130(0xe4))/0x4+-parseInt(_0x3ec130(0xc3))/0x5+parseInt(_0x3ec130(0xa1))/0x6*(-parseInt(_0x3ec130(0xc5))/0x7)+-parseInt(_0x3ec130(0xee))/0x8+-parseInt(_0x3ec130(0xdd))/0x9;if(_0x572872===_0x1a094f)break;else _0x2d83e8['push'](_0x2d83e8['shift']());}catch(_0x337c7b){_0x2d83e8['push'](_0x2d83e8['shift']());}}}(_0x168b,0xf0a64));import{View as _0x42d6e2,BalloonPanelView as _0x34f352,ButtonView as _0x41e6de,clickOutsideHandler as _0x7fa681}from'ckeditor5/src/ui.js';import{Collection as _0x20b120}from'ckeditor5/src/utils.js';function _0x168b(){const _0x4275b8=['clear','height','setContainerElement','abs','cloneNode','_updateOverflowUI','innerWidth','_config','6613792PAhtyM','button','div','querySelector','extendTemplate','showMoreButtonView','_targetContainer','body','_restoreAncestorVisibility','_intersectionObserver','observe','slice','left','getBoundingClientRect','block\x20!important','from','_createContainerElements','opacity','isConnected','destroy','10130bhdaAK','bottom','parentElement','_containerElement','_createShowMoreButtonView','style','_renderChipsAndCountRows','289iGMqud','_overflowChips','push','_testButtonFit','_findTargetContainer','display','label','visible','_createShowMoreButton','_bodyCollection','50px','clientWidth','execute','pointerEvents','clientHeight','isVisible','showMoreButton','_showMoreBalloonPanelView','show','includes','overflowChips','_locale','_showMoreButtonView','disableAnimationOnEnter','position','pin','_calculateOverflowInContainer','_applyCalculationStyles','boxSizing','visibility','children','_pendingCalculation','visible\x20!important','isOn','innerHTML','_ancestorsToRestore','zIndex','undefined','_calculateContainerWidth','border-box','isIntersecting','classList','none','6WDTUId','0px','innerHeight','_updateShowMoreButtonVisibility','showMoreBalloon','disconnect','filter','absolute','toLowerCase','_visibleChips','_createCalculationContainer','_handleShowMoreButtonClick','.ck-ai-chat','_checkAndHandleOverflow','300px','_createShowMoreBalloonPanelView','some','forEach','showMoreLabelPrefix','maxVisibleRows','_isContainerVisible','appendChild','pop','hideBalloonPanel','_makeAncestorsVisible','5307621ZNPhaL','overflowContainer','_distributeChips','offsetWidth','set','block','-9999px','textContent','reorganizeChips','3221730FsMOXh','setTemplate','10298652HggtsX','rowDetectionTolerance','showBalloonPanel','_createMockButton','controlsButton','className','render','cssClasses','_parentView','content','top','add','documentElement','hidden','remove','auto','_repinBalloonPanel','createElement','tagName','width','right','calculationContainer','element','_updateBalloonContent','9653247IGopaQ','+\x201','getComputedStyle','hide','_setupVisibilityObserver','_applyOverflowResults','ck-calculation-container','7070388CDnuEv','length'];_0x168b=function(){return _0x4275b8;};return _0x168b();}const sn={'maxVisibleRows':0x2,'rowDetectionTolerance':0x5,'showMoreLabelPrefix':'+\x20','viewportOffset':{'top':0x64,'bottom':0xa}},hn=_0x172429(0xaf);export class AIChatChipsOverflowManager{[_0x172429(0x8b)];[_0x172429(0xed)];[_0x172429(0xaa)];[_0x172429(0x10a)];[_0x172429(0x8c)]=null;[_0x172429(0x87)]=null;[_0x172429(0x105)]=null;[_0x172429(0x7f)];[_0x172429(0xcd)]=null;[_0x172429(0xf7)]=null;[_0x172429(0x95)]=!0x1;constructor(_0x178dff,_0x513c85,_0x3a4c7f,_0x95b876,_0x5b9844){const _0x142f59=_0x172429;this[_0x142f59(0x8b)]=_0x178dff,this[_0x142f59(0xaa)]=_0x513c85,this[_0x142f59(0xed)]={...sn,..._0x3a4c7f,'cssClasses':{'controlsButton':'','calculationContainer':_0x142f59(0xe3),..._0x3a4c7f[_0x142f59(0xcc)]}},this[_0x142f59(0x10a)]=new _0x20b120(),this[_0x142f59(0x7f)]=_0x95b876,this[_0x142f59(0xcd)]=_0x5b9844||null;}[_0x172429(0xe8)](_0x95c30f){const _0x10720e=_0x172429;this[_0x10720e(0xf7)]&&(this[_0x10720e(0xf7)][_0x10720e(0xa6)](),this[_0x10720e(0xf7)]=null),this[_0x10720e(0x105)]=_0x95c30f,this[_0x10720e(0xe1)]();}get[_0x172429(0xf3)](){const _0xf09d5b=_0x172429;return this[_0xf09d5b(0x8c)];}get[_0x172429(0x8a)](){const _0x539b45=_0x172429;return this[_0x539b45(0x10a)];}[_0x172429(0xc2)](){requestAnimationFrame(()=>{const _0x957568=_0x7c74;this[_0x957568(0xae)]();});}[_0x172429(0xc7)](){const _0x54de79=_0x172429;this[_0x54de79(0x8c)]&&this[_0x54de79(0x87)]&&(this[_0x54de79(0xdc)](),this[_0x54de79(0x8c)][_0x54de79(0x97)]=!0x0,this[_0x54de79(0x87)][_0x54de79(0x88)](),this[_0x54de79(0x87)][_0x54de79(0x8f)]({'target':this[_0x54de79(0x8c)][_0x54de79(0xdb)],'limiter':document[_0x54de79(0xf1)](_0x54de79(0xad))}));}[_0x172429(0xb8)](){const _0x2c4078=_0x172429;this[_0x2c4078(0x8c)]&&this[_0x2c4078(0x87)]&&(this[_0x2c4078(0x8c)][_0x2c4078(0x97)]=!0x1,this[_0x2c4078(0x87)][_0x2c4078(0xe0)]());}[_0x172429(0xe6)](){const _0x2e61e4=_0x172429;this[_0x2e61e4(0x10a)][_0x2e61e4(0xe6)](),this[_0x2e61e4(0xb8)](),this[_0x2e61e4(0xa4)](),this[_0x2e61e4(0x8c)]&&(this[_0x2e61e4(0x8c)][_0x2e61e4(0x10f)]=''),this[_0x2e61e4(0x87)]&&this[_0x2e61e4(0x87)][_0x2e61e4(0xce)][_0x2e61e4(0xe6)]();}[_0x172429(0x101)](){const _0x380f0d=_0x172429;this[_0x380f0d(0xf7)]&&(this[_0x380f0d(0xf7)][_0x380f0d(0xa6)](),this[_0x380f0d(0xf7)]=null),this[_0x380f0d(0x8c)]&&(this[_0x380f0d(0x8c)][_0x380f0d(0x101)](),this[_0x380f0d(0x8c)]=null),this[_0x380f0d(0x87)]&&(this[_0x380f0d(0x87)][_0x380f0d(0x101)](),this[_0x380f0d(0x87)]=null);}[_0x172429(0xae)](){const _0x3969ce=_0x172429;if(!this[_0x3969ce(0x105)])return;if(!this[_0x3969ce(0xb5)]())return void(this[_0x3969ce(0x95)]=!0x0);this[_0x3969ce(0x95)]=!0x1;const _0x5ccf26=[...this[_0x3969ce(0xaa)],...this[_0x3969ce(0x10a)]],_0x1b7fb3=this[_0x3969ce(0xab)](),_0x1e4857=this[_0x3969ce(0x90)](_0x1b7fb3,_0x5ccf26),_0xc910c6=_0x1b7fb3[_0x3969ce(0x99)];_0xc910c6&&this[_0x3969ce(0xf6)](_0xc910c6),_0x1b7fb3[_0x3969ce(0xd3)](),this[_0x3969ce(0xe2)](_0x5ccf26,_0x1e4857);}[_0x172429(0x111)](){const _0x540455=_0x172429;this[_0x540455(0x8c)]=this[_0x540455(0x106)](),this[_0x540455(0x87)]=this[_0x540455(0xb0)](),this[_0x540455(0x8c)][_0x540455(0xcb)](),this[_0x540455(0x105)][_0x540455(0xb6)](this[_0x540455(0x8c)][_0x540455(0xdb)]),this[_0x540455(0x8c)]['on'](_0x540455(0x82),()=>{const _0x34c5ad=_0x540455;this[_0x34c5ad(0xac)]();}),_0x7fa681({'emitter':this[_0x540455(0x87)],'contextElements':[this[_0x540455(0x87)][_0x540455(0xdb)],this[_0x540455(0x8c)][_0x540455(0xdb)]],'callback':()=>this[_0x540455(0xb8)](),'activator':()=>this[_0x540455(0x8c)][_0x540455(0x97)]});}[_0x172429(0x106)](){const _0x1e08e1=_0x172429,_0x249b16=new _0x41e6de(this[_0x1e08e1(0x8b)]);_0x249b16[_0x1e08e1(0xbe)]({'label':'','withText':!0x0,'isToggleable':!0x0});const _0x497d4b=[this[_0x1e08e1(0xed)][_0x1e08e1(0xcc)][_0x1e08e1(0x86)]];return this[_0x1e08e1(0xed)][_0x1e08e1(0xcc)][_0x1e08e1(0xc9)]&&_0x497d4b[_0x1e08e1(0x10b)](this[_0x1e08e1(0xed)][_0x1e08e1(0xcc)][_0x1e08e1(0xc9)]),_0x249b16[_0x1e08e1(0xf2)]({'attributes':{'class':_0x497d4b}}),_0x249b16;}[_0x172429(0xb0)](){const _0x176720=_0x172429,_0x19d39c=new _0x34f352(this[_0x176720(0x8b)]);return _0x19d39c[_0x176720(0xf2)]({'attributes':{'class':this[_0x176720(0xed)][_0x176720(0xcc)][_0x176720(0xa5)]}}),this[_0x176720(0x7f)][_0x176720(0xd0)](_0x19d39c),_0x19d39c;}[_0x172429(0xdc)](){const _0x4e9aea=_0x172429;if(this[_0x4e9aea(0x87)]&&(this[_0x4e9aea(0x87)][_0x4e9aea(0xce)][_0x4e9aea(0xe6)](),this[_0x4e9aea(0x10a)][_0x4e9aea(0xe5)]>0x0)){this[_0x4e9aea(0x10a)][_0x4e9aea(0xb2)](_0x54b788=>{const _0x306408=_0x4e9aea;_0x54b788[_0x306408(0x8d)]();});const _0x4a3c6b=new _0x42d6e2(this[_0x4e9aea(0x8b)]);_0x4a3c6b[_0x4e9aea(0xc4)]({'tag':_0x4e9aea(0xf0),'attributes':{'class':this[_0x4e9aea(0xed)][_0x4e9aea(0xcc)][_0x4e9aea(0xbb)]},'children':this[_0x4e9aea(0x10a)]}),this[_0x4e9aea(0x87)][_0x4e9aea(0xce)][_0x4e9aea(0xd0)](_0x4a3c6b);}}[_0x172429(0xac)](){const _0x3a0f22=_0x172429;this[_0x3a0f22(0x8c)][_0x3a0f22(0x97)]?this[_0x3a0f22(0xb8)]():this[_0x3a0f22(0xc7)]();}[_0x172429(0xa4)](){const _0x2c1c1d=_0x172429,_0x336093=this[_0x2c1c1d(0x10a)][_0x2c1c1d(0xe5)]>0x0;this[_0x2c1c1d(0x8c)]?.[_0x2c1c1d(0xdb)]&&(this[_0x2c1c1d(0x8c)][_0x2c1c1d(0xdb)][_0x2c1c1d(0x107)][_0x2c1c1d(0x10e)]=_0x336093?'':_0x2c1c1d(0xa0));}[_0x172429(0xd5)](){const _0x27d917=_0x172429;this[_0x27d917(0x8c)]?.[_0x27d917(0x97)]&&this[_0x27d917(0x87)]?.[_0x27d917(0x85)]&&this[_0x27d917(0x8c)][_0x27d917(0xdb)]&&this[_0x27d917(0x87)][_0x27d917(0x8f)]({'target':this[_0x27d917(0x8c)][_0x27d917(0xdb)],'limiter':document[_0x27d917(0xf1)](_0x27d917(0xad))});}[_0x172429(0x10d)](_0x3decd2){const _0x322a8f=_0x172429,_0x3c3291=this[_0x322a8f(0x105)]?.[_0x322a8f(0xd7)][_0x322a8f(0xa9)]()||_0x322a8f(0xf0),_0x93454a=this[_0x322a8f(0x105)]?.[_0x322a8f(0x9f)];if(_0x93454a){const _0x3ca3dc=_0x93454a[0x0]||'',_0x2e39f0=_0x3decd2[_0x322a8f(0xf1)]('.'+_0x3ca3dc),_0x5bd241=_0x3decd2[_0x322a8f(0xf1)](_0x3c3291);return _0x2e39f0||_0x5bd241||_0x3decd2;}return _0x3decd2[_0x322a8f(0xf1)](_0x3c3291)||_0x3decd2;}[_0x172429(0x9c)](){const _0x94477d=_0x172429,_0x1e8f66=this[_0x94477d(0xcd)]?.[_0x94477d(0xdb)]||this[_0x94477d(0x105)];if(!_0x1e8f66)return hn;const _0x88f5f7=window[_0x94477d(0xdf)](_0x1e8f66)[_0x94477d(0xd8)];if(_0x94477d(0xd4)===_0x88f5f7||_0x94477d(0xa2)===_0x88f5f7||!_0x88f5f7){const _0x47b033=_0x1e8f66[_0x94477d(0x104)];if(_0x47b033){const _0x140d6e=window[_0x94477d(0xdf)](_0x47b033);return _0x94477d(0xd4)!==_0x140d6e[_0x94477d(0xd8)]?_0x140d6e[_0x94477d(0xd8)]:hn;}return hn;}return _0x88f5f7;}[_0x172429(0x91)](_0x35f4b0,_0x182ec6){const _0x5f4c25=_0x172429;this[_0x5f4c25(0xed)][_0x5f4c25(0xcc)][_0x5f4c25(0xda)]&&_0x35f4b0[_0x5f4c25(0x9f)][_0x5f4c25(0xd0)](this[_0x5f4c25(0xed)][_0x5f4c25(0xcc)][_0x5f4c25(0xda)]),_0x35f4b0[_0x5f4c25(0x107)][_0x5f4c25(0xd8)]=_0x182ec6,_0x35f4b0[_0x5f4c25(0x107)][_0x5f4c25(0x8e)]=_0x5f4c25(0xa8),_0x35f4b0[_0x5f4c25(0x107)][_0x5f4c25(0xcf)]=_0x5f4c25(0xc0),_0x35f4b0[_0x5f4c25(0x107)][_0x5f4c25(0xfa)]=_0x5f4c25(0xc0),_0x35f4b0[_0x5f4c25(0x107)][_0x5f4c25(0xff)]='0',_0x35f4b0[_0x5f4c25(0x107)][_0x5f4c25(0x83)]=_0x5f4c25(0xa0),_0x35f4b0[_0x5f4c25(0x107)][_0x5f4c25(0x9a)]='-1',_0x35f4b0[_0x5f4c25(0x107)][_0x5f4c25(0x93)]=_0x5f4c25(0x96),_0x35f4b0[_0x5f4c25(0x107)][_0x5f4c25(0x10e)]=_0x5f4c25(0xfc),_0x35f4b0[_0x5f4c25(0x107)][_0x5f4c25(0x92)]=_0x5f4c25(0x9d);}[_0x172429(0xf6)](_0x4f9fc1){const _0x105e8c=_0x172429;_0x4f9fc1[_0x105e8c(0xb2)](({element:_0x1e95b1,originalDisplay:_0x20f814,originalVisibility:_0x58712f})=>{const _0x5398c7=_0x105e8c;_0x1e95b1[_0x5398c7(0x107)][_0x5398c7(0x10e)]=_0x20f814,_0x1e95b1[_0x5398c7(0x107)][_0x5398c7(0x93)]=_0x58712f;});}[_0x172429(0xb9)](_0x4b9b88){const _0x479425=_0x172429,_0x2ec8c7=[];let _0x2a0af2=_0x4b9b88;for(;_0x2a0af2&&_0x2a0af2!==document[_0x479425(0xf5)];){const _0x56f1a4=window[_0x479425(0xdf)](_0x2a0af2);_0x479425(0xa0)!==_0x56f1a4[_0x479425(0x10e)]&&_0x479425(0xd2)!==_0x56f1a4[_0x479425(0x93)]||(_0x2ec8c7[_0x479425(0x10b)]({'element':_0x2a0af2,'originalDisplay':_0x2a0af2[_0x479425(0x107)][_0x479425(0x10e)],'originalVisibility':_0x2a0af2[_0x479425(0x107)][_0x479425(0x93)]}),_0x2a0af2[_0x479425(0x107)][_0x479425(0x10e)]=_0x479425(0xbf),_0x2a0af2[_0x479425(0x107)][_0x479425(0x93)]=_0x479425(0x110)),_0x2a0af2=_0x2a0af2[_0x479425(0x104)];}return _0x2ec8c7;}[_0x172429(0xfe)](){const _0x589a11=_0x172429;let _0x3a21ce,_0x5c3d7d;return this[_0x589a11(0xcd)]?.[_0x589a11(0xdb)]?(_0x3a21ce=this[_0x589a11(0xcd)][_0x589a11(0xdb)][_0x589a11(0xea)](!0x0),_0x5c3d7d=this[_0x589a11(0x10d)](_0x3a21ce)):(_0x3a21ce=document[_0x589a11(0xd6)](_0x589a11(0xf0)),_0x5c3d7d=_0x3a21ce),{'calculationContainer':_0x3a21ce,'targetContainer':_0x5c3d7d};}[_0x172429(0xab)](){const _0x234b03=_0x172429,{calculationContainer:_0x1e3785,targetContainer:_0x476a1e}=this[_0x234b03(0xfe)](),_0x2302ff=this[_0x234b03(0x9c)]();this[_0x234b03(0x91)](_0x1e3785,_0x2302ff);const _0x2a69c8=this[_0x234b03(0xcd)]?.[_0x234b03(0xdb)]||this[_0x234b03(0x105)],_0x14c91f=_0x2a69c8?.[_0x234b03(0x104)];_0x14c91f?_0x14c91f[_0x234b03(0xb6)](_0x1e3785):document[_0x234b03(0xf5)][_0x234b03(0xb6)](_0x1e3785),_0x1e3785[_0x234b03(0xf4)]=_0x476a1e;const _0x29c030=this[_0x234b03(0xb9)](_0x14c91f||null);return _0x1e3785[_0x234b03(0xbd)],_0x1e3785[_0x234b03(0x99)]=_0x29c030,_0x1e3785;}[_0x172429(0x90)](_0x332cb2,_0x27c9d2){const _0xbd4c39=_0x172429,_0x128d14=_0x332cb2[_0xbd4c39(0xf4)]||_0x332cb2,_0x3bc2f8=[],{rowCount:_0x1bc93f}=this[_0xbd4c39(0x108)](_0x128d14,_0x27c9d2);if(_0x1bc93f<=this[_0xbd4c39(0xed)][_0xbd4c39(0xb4)])return _0x3bc2f8;const _0x372bd4=_0x27c9d2[_0xbd4c39(0xf9)]();for(;_0x372bd4[_0xbd4c39(0xe5)]>0x0;){if(this[_0xbd4c39(0x10c)](_0x332cb2,_0x128d14,_0x372bd4)){const _0x44e324=_0x27c9d2[_0xbd4c39(0xa7)](_0x13200b=>!_0x372bd4[_0xbd4c39(0x89)](_0x13200b));_0x3bc2f8[_0xbd4c39(0x10b)](..._0x44e324);break;}if(!_0x372bd4[_0xbd4c39(0xb7)]())break;}return _0x3bc2f8;}[_0x172429(0x108)](_0x418987,_0x4b4c2d){const _0x195ff4=_0x172429;_0x418987[_0x195ff4(0x98)]='',_0x4b4c2d[_0x195ff4(0xb2)](_0x10a2d9=>{const _0x32d01e=_0x195ff4;if(_0x10a2d9[_0x32d01e(0xdb)]){const _0x5e6942=_0x10a2d9[_0x32d01e(0xdb)][_0x32d01e(0xea)](!0x0);_0x418987[_0x32d01e(0xb6)](_0x5e6942);}}),_0x418987[_0x195ff4(0xbd)];const _0x175492=_0x418987[_0x195ff4(0x94)],_0x5e4110=[];return Array[_0x195ff4(0xfd)](_0x175492)[_0x195ff4(0xb2)](_0x2cf725=>{const _0xd42727=_0x195ff4,_0x507e8b=_0x2cf725[_0xd42727(0xfb)]()[_0xd42727(0xcf)];_0x5e4110[_0xd42727(0xb1)](_0x3d5102=>Math[_0xd42727(0xe9)](_0x3d5102-_0x507e8b)<this[_0xd42727(0xed)][_0xd42727(0xc6)])||_0x5e4110[_0xd42727(0x10b)](_0x507e8b);}),{'rowCount':_0x5e4110[_0x195ff4(0xe5)]};}[_0x172429(0xc8)](){const _0x2a42f6=_0x172429,_0x4b715b=document[_0x2a42f6(0xd6)](_0x2a42f6(0xef));return _0x4b715b[_0x2a42f6(0xca)]=this[_0x2a42f6(0xed)][_0x2a42f6(0xcc)][_0x2a42f6(0x86)],this[_0x2a42f6(0xed)][_0x2a42f6(0xcc)][_0x2a42f6(0xc9)]&&_0x4b715b[_0x2a42f6(0x9f)][_0x2a42f6(0xd0)](this[_0x2a42f6(0xed)][_0x2a42f6(0xcc)][_0x2a42f6(0xc9)]),_0x4b715b[_0x2a42f6(0xc1)]=_0x2a42f6(0xde),_0x4b715b;}[_0x172429(0x10c)](_0x52638f,_0x5c12b8,_0x49490c){const _0x281cdd=_0x172429;this[_0x281cdd(0x108)](_0x5c12b8,_0x49490c);const _0xb55bd9=this[_0x281cdd(0xc8)]();_0x52638f[_0x281cdd(0xb6)](_0xb55bd9),_0x52638f[_0x281cdd(0xbd)];const _0x24e662=[..._0x5c12b8[_0x281cdd(0x94)],_0xb55bd9],_0x3f4776=[];_0x24e662[_0x281cdd(0xb2)](_0x51cdd7=>{const _0x338374=_0x281cdd,_0x59a79c=_0x51cdd7[_0x338374(0xfb)]()[_0x338374(0xcf)];_0x3f4776[_0x338374(0xb1)](_0x4cd93a=>Math[_0x338374(0xe9)](_0x4cd93a-_0x59a79c)<this[_0x338374(0xed)][_0x338374(0xc6)])||_0x3f4776[_0x338374(0x10b)](_0x59a79c);});const _0x4d15bf=_0x3f4776[_0x281cdd(0xe5)];return _0xb55bd9[_0x281cdd(0xd3)](),_0x4d15bf<=this[_0x281cdd(0xed)][_0x281cdd(0xb4)];}[_0x172429(0xbc)](_0x2dd1d2,_0x314e00){const _0x11a7b2=_0x172429;this[_0x11a7b2(0xaa)][_0x11a7b2(0xe6)](),this[_0x11a7b2(0x10a)][_0x11a7b2(0xe6)](),_0x2dd1d2[_0x11a7b2(0xb2)](_0xad1a2f=>{const _0x43f1b5=_0x11a7b2;_0x314e00[_0x43f1b5(0x89)](_0xad1a2f)?this[_0x43f1b5(0x10a)][_0x43f1b5(0xd0)](_0xad1a2f):this[_0x43f1b5(0xaa)][_0x43f1b5(0xd0)](_0xad1a2f);});}[_0x172429(0xeb)](_0x52e639){const _0xbc6a6c=_0x172429;if(_0x52e639>0x0&&!this[_0xbc6a6c(0x8c)]&&this[_0xbc6a6c(0x111)](),_0x52e639>0x0&&this[_0xbc6a6c(0x8c)]){const _0x4ecb7a=''+this[_0xbc6a6c(0xed)][_0xbc6a6c(0xb3)]+(_0x52e639<0x63?_0x52e639:'99');this[_0xbc6a6c(0x8c)][_0xbc6a6c(0x10f)]=_0x4ecb7a;}this[_0xbc6a6c(0xdc)](),this[_0xbc6a6c(0xa4)](),this[_0xbc6a6c(0xd5)]();}[_0x172429(0xe2)](_0x3dc89c,_0x6f2e46){const _0x44f9ed=_0x172429;this[_0x44f9ed(0xbc)](_0x3dc89c,_0x6f2e46),this[_0x44f9ed(0xeb)](_0x6f2e46[_0x44f9ed(0xe5)]);}[_0x172429(0xe1)](){const _0x16d495=_0x172429;this[_0x16d495(0x105)]&&_0x16d495(0x9b)!=typeof IntersectionObserver&&(this[_0x16d495(0xf7)]=new IntersectionObserver(_0x44ffaf=>{const _0x302b67=_0x16d495;_0x44ffaf[0x0][_0x302b67(0x9e)]&&this[_0x302b67(0x95)]&&requestAnimationFrame(()=>{const _0x10fcc2=_0x302b67;this[_0x10fcc2(0xae)]();});},{'threshold':0.01,'rootMargin':_0x16d495(0x80)}),this[_0x16d495(0xf7)][_0x16d495(0xf8)](this[_0x16d495(0x105)]));}[_0x172429(0xb5)](){const _0x20bb23=_0x172429;if(!this[_0x20bb23(0x105)])return!0x1;if(!this[_0x20bb23(0x105)][_0x20bb23(0x100)])return!0x1;const _0x159b8d=this[_0x20bb23(0x105)][_0x20bb23(0xfb)]();if(0x0===_0x159b8d[_0x20bb23(0xd8)]||0x0===_0x159b8d[_0x20bb23(0xe7)])return!0x1;const _0xb1615f=window[_0x20bb23(0xa3)]||document[_0x20bb23(0xd1)][_0x20bb23(0x84)],_0x15ec08=window[_0x20bb23(0xec)]||document[_0x20bb23(0xd1)][_0x20bb23(0x81)],_0x1bb613=0xc8;return _0x159b8d[_0x20bb23(0x103)]>=-0xc8&&_0x159b8d[_0x20bb23(0xcf)]<=_0xb1615f+_0x1bb613&&_0x159b8d[_0x20bb23(0xd9)]>=-0xc8&&_0x159b8d[_0x20bb23(0xfa)]<=_0x15ec08+_0x1bb613;}}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module ai/aichat/ui/controls/aichatcontextitembuttonview
|
|
7
|
+
*/
|
|
8
|
+
import { ButtonView } from 'ckeditor5/src/ui.js';
|
|
9
|
+
import { type Locale } from 'ckeditor5/src/utils.js';
|
|
10
|
+
import type { AIContextItem } from '../../../aicore/model/aicontext.js';
|
|
11
|
+
/**
|
|
12
|
+
* A button view representing a context item in the AI chat interface.
|
|
13
|
+
*
|
|
14
|
+
* This component displays a context item (file, document, or URL) as a chip
|
|
15
|
+
* with an icon, label, and optional remove button depending on the readonly state.
|
|
16
|
+
*/
|
|
17
|
+
export declare class AIChatContextItemButtonView extends ButtonView {
|
|
18
|
+
id: string;
|
|
19
|
+
itemType: AIContextItem['type'];
|
|
20
|
+
label: string;
|
|
21
|
+
readonly: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Observable flag indicating if the context item is loading.
|
|
24
|
+
* @observable
|
|
25
|
+
*/
|
|
26
|
+
isLoading: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Creates an instance of the context item button view.
|
|
29
|
+
*
|
|
30
|
+
* @param locale The locale instance.
|
|
31
|
+
* @param contextItem The context item to display.
|
|
32
|
+
* @param readonly Whether the view is in readonly mode.
|
|
33
|
+
* @param isAnimationOnEnterEnabled Whether the enter animation is enabled.
|
|
34
|
+
* @param isLoading Whether the context item is loading.
|
|
35
|
+
*/
|
|
36
|
+
constructor(locale: Locale, contextItem: AIContextItem, readonly: boolean, isAnimationOnEnterEnabled: boolean, isLoading?: boolean);
|
|
37
|
+
/**
|
|
38
|
+
* @inheritDoc
|
|
39
|
+
*/
|
|
40
|
+
render(): void;
|
|
41
|
+
/**
|
|
42
|
+
* Disables the enter animation for this chip.
|
|
43
|
+
* This is useful when moving chips to overflow areas where animation is not desired.
|
|
44
|
+
*/
|
|
45
|
+
disableAnimationOnEnter(): void;
|
|
46
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, 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
|
+
function _0x3328(_0x1c620d,_0x38b0a4){const _0x36ff93=_0x36ff();return _0x3328=function(_0x332807,_0x299905){_0x332807=_0x332807-0xee;let _0x235f60=_0x36ff93[_0x332807];return _0x235f60;},_0x3328(_0x1c620d,_0x38b0a4);}function _0x36ff(){const _0x399b31=['fire','ck-ai-chat-context-chip','itemType','div','disableAnimationOnEnter','small','removeEventListener','content','_createLabelElement','execute','span','5Qkyiap','_createIconView','addEventListener','ck-ai-chat-context-chip_wide','22131307irkiBw','uiId','extendTemplate','9UVubdt','945366ogxUDL','937308PUgRXf','type','_createLoaderIcon','_initializeProperties','_isAnimationOnEnterEnabled','locale','remove','576nYNBDz','render','tooltip','72140qsHsFo','setTemplate','selection','_createTemplateAttributes','_createTemplateChildren','ck-ai-chat-context-controls__chip-tooltip','webkitAnimationEnd','_setupTemplate','classList','_setupRemoveButtonEvent','slice','set','isVisible','ck-hidden','removeContextItemChip','element','1133100xtccZT','312956AFduMu','isLoading','ck-ai-chat-context-chip_document','_createRemoveButton','length','readonly','32hjvAgo','add','bind','lastIndexOf','ck-ai-chat-context-chip__label','ck-ai-chat-context-chip_new-chip','animationend','_handleAnimationEndOnce','label','bindTemplate','AI_CHAT_CONTEXT_REMOVE_FROM_CONTEXT','document','ck-ai-chat-context-chip__type-icon','607614uZATKB'];_0x36ff=function(){return _0x399b31;};return _0x36ff();}const _0x1c27ad=_0x3328;(function(_0x1ba482,_0x3c750f){const _0x21ed8=_0x3328,_0x569bdc=_0x1ba482();while(!![]){try{const _0x1cb8be=-parseInt(_0x21ed8(0x11e))/0x1+parseInt(_0x21ed8(0x10a))/0x2+parseInt(_0x21ed8(0xee))/0x3*(-parseInt(_0x21ed8(0xf0))/0x4)+parseInt(_0x21ed8(0x12a))/0x5*(-parseInt(_0x21ed8(0xef))/0x6)+parseInt(_0x21ed8(0x10b))/0x7*(-parseInt(_0x21ed8(0x111))/0x8)+-parseInt(_0x21ed8(0xf7))/0x9*(parseInt(_0x21ed8(0xfa))/0xa)+parseInt(_0x21ed8(0x12e))/0xb;if(_0x1cb8be===_0x3c750f)break;else _0x569bdc['push'](_0x569bdc['shift']());}catch(_0x490805){_0x569bdc['push'](_0x569bdc['shift']());}}}(_0x36ff,0x72b2b));import{ButtonView as _0x21b958,IconView as _0x4d9f35}from'ckeditor5/src/ui.js';import{IconClose as _0x42a547,IconDocument as _0x1799db,IconFileUpload as _0x26f933,IconLink as _0x1c4080,IconSelection as _0x1b0a13}from'@ckeditor/ckeditor5-icons';import{getTranslation as _0x26ac6f}from'../../../aicore/utils/common-translations.js';import{AISpinnerView as _0x451ea4}from'../../../aicore/ui/aispinner.js';const mn={'file':_0x26f933,'document':_0x1799db,'web-resource':_0x1c4080,'text':_0x26f933,'selection':_0x1b0a13},dn=_0x1c27ad(0x120),un=_0x1c27ad(0x12d),_n=_0x1c27ad(0x10d),kn=_0x1c27ad(0x115),xn=_0x1c27ad(0x11d),bn=_0x1c27ad(0xff),wn='n';export class AIChatContextItemButtonView extends _0x21b958{constructor(_0xdf7226,_0x1ccb60,_0x541b72,_0xe92e22,_0x54fbe7=!0x1){const _0x581631=_0x1c27ad;super(_0xdf7226),this[_0x581631(0xf4)]=_0xe92e22,this[_0x581631(0xf3)](_0x1ccb60,_0x541b72,_0x54fbe7),this[_0x581631(0x101)]();}[_0x1c27ad(0xf8)](){const _0x3f6308=_0x1c27ad;super[_0x3f6308(0xf8)](),this[_0x3f6308(0xf4)]&&this[_0x3f6308(0x109)]&&(this[_0x3f6308(0x109)][_0x3f6308(0x102)][_0x3f6308(0x112)](_0x3f6308(0x116)),this[_0x3f6308(0x118)](this[_0x3f6308(0x109)],()=>{const _0x317644=_0x3f6308;this[_0x317644(0x109)]&&this[_0x317644(0x109)][_0x317644(0x102)][_0x317644(0xf6)](_0x317644(0x116));}));}[_0x1c27ad(0x123)](){const _0x3fdc29=_0x1c27ad;this[_0x3fdc29(0xf4)]=!0x1,this[_0x3fdc29(0x109)]&&this[_0x3fdc29(0x109)][_0x3fdc29(0x102)][_0x3fdc29(0xf6)](_0x3fdc29(0x116));}[_0x1c27ad(0xf3)](_0x4c8202,_0x2ab55b,_0x25b239){const _0x323afc=_0x1c27ad;this[_0x323afc(0x105)](_0x323afc(0x119),_0x4c8202[_0x323afc(0x119)]),this[_0x323afc(0x105)](_0x323afc(0xf9),!0x0),this[_0x323afc(0x105)](_0x323afc(0x121),_0x4c8202[_0x323afc(0xf1)]),this[_0x323afc(0x105)]('id',_0x4c8202[_0x323afc(0x12f)]),this[_0x323afc(0x105)](_0x323afc(0x110),_0x2ab55b),this[_0x323afc(0x105)](_0x323afc(0x10c),_0x25b239);}[_0x1c27ad(0x101)](){const _0x53039d=_0x1c27ad,_0x47cef4=this[_0x53039d(0x12b)](),_0x280344=this[_0x53039d(0x10e)](),_0x16deec=this[_0x53039d(0x11a)];this[_0x53039d(0xfb)]({'tag':_0x53039d(0x122),'attributes':this[_0x53039d(0xfd)](_0x16deec),'children':this[_0x53039d(0xfe)](_0x47cef4,_0x280344,_0x16deec)});}[_0x1c27ad(0xfd)](_0x76f0be){const _0x133d58=_0x1c27ad;return{'class':[dn,_0x76f0be['if'](_0x133d58(0x121),_n,_0x3f1500=>_0x133d58(0x11c)==_0x3f1500),_0x76f0be['if'](_0x133d58(0x121),un,_0x2b40e7=>_0x133d58(0xfc)==_0x2b40e7)],'data-cke-tooltip-text':_0x76f0be['to'](_0x133d58(0x119),Tn),'data-cke-tooltip-position':wn,'data-cke-tooltip-class':bn};}[_0x1c27ad(0xfe)](_0xa8ae59,_0x621f39,_0x10c5b5){const _0x309a9f=_0x1c27ad,_0x7e044e=this[_0x309a9f(0x127)](_0x10c5b5),_0xef0a94=this[_0x309a9f(0xf2)]();return this[_0x309a9f(0x110)]?[_0xa8ae59,_0x7e044e]:[_0xa8ae59,_0xef0a94,_0x7e044e,_0x621f39];}[_0x1c27ad(0x127)](_0x3a1469){const _0x3bf7a2=_0x1c27ad;return{'tag':_0x3bf7a2(0x129),'attributes':{'class':kn},'children':[{'text':_0x3a1469['to'](_0x3bf7a2(0x119))}]};}[_0x1c27ad(0x10e)](){const _0x5b7cd5=_0x1c27ad,_0x35f91a=new _0x21b958(this[_0x5b7cd5(0xf5)]);return _0x35f91a[_0x5b7cd5(0x105)]({'label':_0x26ac6f(this[_0x5b7cd5(0xf5)],_0x5b7cd5(0x11b)),'icon':_0x42a547}),this[_0x5b7cd5(0x103)](_0x35f91a),_0x35f91a;}[_0x1c27ad(0x103)](_0x57c213){const _0x2c6b7d=_0x1c27ad;_0x57c213['on'](_0x2c6b7d(0x128),()=>{const _0xc1dfdb=_0x2c6b7d;this[_0xc1dfdb(0x11f)](_0xc1dfdb(0x108),this['id']);});}[_0x1c27ad(0x12b)](){const _0x533bb4=_0x1c27ad,_0x3b7529=this[_0x533bb4(0x11a)],_0x4b3238=new _0x4d9f35();return _0x4b3238[_0x533bb4(0x126)]=mn[this[_0x533bb4(0x121)]],_0x4b3238[_0x533bb4(0x130)]({'attributes':{'class':[xn,_0x3b7529['if'](_0x533bb4(0x10c),_0x533bb4(0x107),_0x5d2fc7=>_0x5d2fc7)]}}),_0x4b3238;}[_0x1c27ad(0x118)](_0x4b463b,_0x48bf89){const _0xb3f53b=_0x1c27ad;if(!_0x4b463b)return;const _0x178fff=()=>{const _0x2578a4=_0x3328;_0x48bf89(),_0x4b463b[_0x2578a4(0x125)](_0x2578a4(0x117),_0x178fff),_0x4b463b[_0x2578a4(0x125)](_0x2578a4(0x100),_0x178fff);};_0x4b463b[_0xb3f53b(0x12c)](_0xb3f53b(0x117),_0x178fff),_0x4b463b[_0xb3f53b(0x12c)](_0xb3f53b(0x100),_0x178fff);}[_0x1c27ad(0xf2)](){const _0x5de3a5=_0x1c27ad,_0x593291=new _0x451ea4(_0x5de3a5(0x124));return _0x593291[_0x5de3a5(0x113)](_0x5de3a5(0x106))['to'](this,_0x5de3a5(0x10c),_0x46572e=>_0x46572e),_0x593291;}}function Tn(_0x149648){const _0x1374f3=_0x1c27ad;if(!_0x149648)return _0x149648;if(_0x149648[_0x1374f3(0x10f)]<=0x78)return _0x149648;const _0x383ff6=_0x149648[_0x1374f3(0x104)](0x0,0x78),_0x264e34=_0x383ff6[_0x1374f3(0x114)]('\x20');return(_0x264e34>0x0?_0x383ff6[_0x1374f3(0x104)](0x0,_0x264e34):_0x383ff6)+'…';}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module ai/aichat/ui/controls/aichatcontextpanelurlinputview
|
|
7
|
+
*/
|
|
8
|
+
import { FocusTracker, KeystrokeHandler, type Locale } from 'ckeditor5/src/utils.js';
|
|
9
|
+
import { ButtonView, FocusCycler, LabeledFieldView, View, type InputTextView, type ViewWithFocusCycler } from 'ckeditor5/src/ui.js';
|
|
10
|
+
/**
|
|
11
|
+
* A view for URL input in the AI chat context panel.
|
|
12
|
+
* Provides a form with input field and submit/cancel buttons with proper focus management.
|
|
13
|
+
*/
|
|
14
|
+
export declare class AIChatContextPanelUrlInputView extends View implements ViewWithFocusCycler {
|
|
15
|
+
/**
|
|
16
|
+
* Tracks information about DOM focus in the form.
|
|
17
|
+
*/
|
|
18
|
+
readonly focusTracker: FocusTracker;
|
|
19
|
+
/**
|
|
20
|
+
* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
|
|
21
|
+
*/
|
|
22
|
+
readonly keystrokes: KeystrokeHandler;
|
|
23
|
+
/**
|
|
24
|
+
* Helps cycling over {@link #_focusables} in the form.
|
|
25
|
+
*/
|
|
26
|
+
readonly focusCycler: FocusCycler;
|
|
27
|
+
/**
|
|
28
|
+
* The URL input field.
|
|
29
|
+
*/
|
|
30
|
+
readonly urlInputField: LabeledFieldView<InputTextView>;
|
|
31
|
+
/**
|
|
32
|
+
* The back button.
|
|
33
|
+
*/
|
|
34
|
+
readonly backButton: ButtonView;
|
|
35
|
+
/**
|
|
36
|
+
* The confirm button.
|
|
37
|
+
*/
|
|
38
|
+
readonly confirmButton: ButtonView;
|
|
39
|
+
constructor(locale: Locale);
|
|
40
|
+
/**
|
|
41
|
+
* @inheritDoc
|
|
42
|
+
*/
|
|
43
|
+
render(): void;
|
|
44
|
+
/**
|
|
45
|
+
* @inheritDoc
|
|
46
|
+
*/
|
|
47
|
+
destroy(): void;
|
|
48
|
+
/**
|
|
49
|
+
* Focuses the URL input field.
|
|
50
|
+
*/
|
|
51
|
+
focus(): void;
|
|
52
|
+
/**
|
|
53
|
+
* Gets the current URL value.
|
|
54
|
+
*/
|
|
55
|
+
getValue(): string;
|
|
56
|
+
/**
|
|
57
|
+
* Clears the URL input field.
|
|
58
|
+
*/
|
|
59
|
+
clear(): void;
|
|
60
|
+
/**
|
|
61
|
+
* Sets an error message on the URL input field.
|
|
62
|
+
*/
|
|
63
|
+
setError(message: string): void;
|
|
64
|
+
/**
|
|
65
|
+
* Clears any error on the URL input field.
|
|
66
|
+
*/
|
|
67
|
+
clearError(): void;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Event fired when the URL form is submitted.
|
|
71
|
+
*/
|
|
72
|
+
export type UrlInputSubmitEvent = {
|
|
73
|
+
name: 'submitUrl';
|
|
74
|
+
args: [url: string];
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Event fired when the URL form is cancelled.
|
|
78
|
+
*/
|
|
79
|
+
export type UrlInputCancelEvent = {
|
|
80
|
+
name: 'cancel';
|
|
81
|
+
args: [];
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Event fired when the balloon should be repositioned due to content size changes.
|
|
85
|
+
*/
|
|
86
|
+
export type RefreshBalloonEvent = {
|
|
87
|
+
name: 'refreshBalloon';
|
|
88
|
+
args: [];
|
|
89
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, 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 _0x3d020c=_0x5941;function _0x1f2a(){const _0x54108b=['form','ck-ai-chat-context-controls__url-input-section','errorText','_setupEventHandlers','302247GATVdt','AI_CHAT_CONTEXT_URL_EMPTY_ERROR','input','submit','656fwKVJm','render','ck-labeled-field-view_empty','setTemplate','ck-button-icon\x20ck-button-back','backButton','2061635HZHkpU','keystrokes','fire','esc','focusTracker','_createUrlInputField','31503pbwbZF','refreshBalloon','forEach','91646zmwvPj','destroy','20cXTLiW','cancel','createCollection','_createBackButton','length','ck-ai-header\x20ck-ai-header_small\x20ck-ai-header_context-url','value','AI_CHAT_CONTEXT_URL_LABEL','add','ck-ai-chat-context-controls__url-form','children','clearError','5915cfkXVf','_handleSubmit','clear','AI_CHAT_CONTEXT_URL_INVALID_ERROR','focus','execute','shift+tab','AI_CHAT_CONTEXT_URL_BACK_TO_CONTEXT','_focusables','element','submitUrl','AI_CHAT_CONTEXT_URL_ADD_URL','fieldView','isEnabled','stop','AI_CHAT_CONTEXT_URL_PLACEHOLDER','_createConfirmButton','_updateConfirmButtonState','getValue','12WzozHL','locale','_setupKeystrokes','setError','4065831SmYPHk','trim','focusCycler','_isValidUrl','confirmButton','709482FxJALm','ck-button-icon','div','52OWlWCo','listenTo','tab','set','_setupTemplate','7dqRUil','urlInputField'];_0x1f2a=function(){return _0x54108b;};return _0x1f2a();}(function(_0x172373,_0x36cf3b){const _0x533b3a=_0x5941,_0x44ebad=_0x172373();while(!![]){try{const _0x5c3226=-parseInt(_0x533b3a(0x193))/0x1*(-parseInt(_0x533b3a(0x1ac))/0x2)+parseInt(_0x533b3a(0x1a9))/0x3*(-parseInt(_0x533b3a(0x18e))/0x4)+parseInt(_0x533b3a(0x1a3))/0x5+parseInt(_0x533b3a(0x18b))/0x6+-parseInt(_0x533b3a(0x16f))/0x7*(parseInt(_0x533b3a(0x19d))/0x8)+parseInt(_0x533b3a(0x199))/0x9*(-parseInt(_0x533b3a(0x1ae))/0xa)+-parseInt(_0x533b3a(0x186))/0xb*(parseInt(_0x533b3a(0x182))/0xc);if(_0x5c3226===_0x36cf3b)break;else _0x44ebad['push'](_0x44ebad['shift']());}catch(_0x4a8b91){_0x44ebad['push'](_0x44ebad['shift']());}}}(_0x1f2a,0x32f69));import{FocusTracker as _0xc3821,KeystrokeHandler as _0x46480c}from'ckeditor5/src/utils.js';import{ButtonView as _0x41bf67,FocusCycler as _0x365365,LabeledFieldView as _0xc6e266,View as _0x21d9e9,FormHeaderView as _0x143a69,createLabeledInputText as _0x497e38,submitHandler as _0x204621}from'ckeditor5/src/ui.js';import{IconCheck as _0x39c0f7,IconPreviousArrow as _0x57ec3a}from'@ckeditor/ckeditor5-icons';function _0x5941(_0xa72ae7,_0x11df94){const _0x1f2af1=_0x1f2a();return _0x5941=function(_0x5941a5,_0x2715e5){_0x5941a5=_0x5941a5-0x16a;let _0x2208f6=_0x1f2af1[_0x5941a5];return _0x2208f6;},_0x5941(_0xa72ae7,_0x11df94);}import{getTranslation as _0x21e79e}from'../../../aicore/utils/common-translations.js';const eh=_0x3d020c(0x16c),hh=_0x3d020c(0x196);export class AIChatContextPanelUrlInputView extends _0x21d9e9{[_0x3d020c(0x1a7)];[_0x3d020c(0x1a4)];[_0x3d020c(0x177)];[_0x3d020c(0x188)];[_0x3d020c(0x194)];[_0x3d020c(0x1a2)];[_0x3d020c(0x18a)];constructor(_0x1d9256){const _0x3c14fa=_0x3d020c;super(_0x1d9256),this[_0x3c14fa(0x1a7)]=new _0xc3821(),this[_0x3c14fa(0x1a4)]=new _0x46480c(),this[_0x3c14fa(0x1a2)]=this[_0x3c14fa(0x1b1)](),this[_0x3c14fa(0x194)]=this[_0x3c14fa(0x1a8)](),this[_0x3c14fa(0x18a)]=this[_0x3c14fa(0x17f)](),this[_0x3c14fa(0x177)]=this[_0x3c14fa(0x1b0)]([this[_0x3c14fa(0x1a2)],this[_0x3c14fa(0x194)],this[_0x3c14fa(0x18a)]]),this[_0x3c14fa(0x188)]=new _0x365365({'focusables':this[_0x3c14fa(0x177)],'focusTracker':this[_0x3c14fa(0x1a7)],'keystrokeHandler':this[_0x3c14fa(0x1a4)],'actions':{'focusPrevious':_0x3c14fa(0x175),'focusNext':_0x3c14fa(0x190)}}),this[_0x3c14fa(0x192)](),this[_0x3c14fa(0x198)](),this[_0x3c14fa(0x184)]();}[_0x3d020c(0x19e)](){const _0x32ff8f=_0x3d020c;super[_0x32ff8f(0x19e)](),this[_0x32ff8f(0x177)][_0x32ff8f(0x1ab)](_0xbb337e=>{const _0x3ed3a0=_0x32ff8f;this[_0x3ed3a0(0x1a7)][_0x3ed3a0(0x16b)](_0xbb337e[_0x3ed3a0(0x178)]),this[_0x3ed3a0(0x1a4)][_0x3ed3a0(0x18f)](_0xbb337e[_0x3ed3a0(0x178)]);}),_0x204621({'view':this}),this[_0x32ff8f(0x173)]();}[_0x3d020c(0x1ad)](){const _0xff83e0=_0x3d020c;super[_0xff83e0(0x1ad)](),this[_0xff83e0(0x1a7)][_0xff83e0(0x1ad)](),this[_0xff83e0(0x1a4)][_0xff83e0(0x1ad)]();}[_0x3d020c(0x173)](){const _0x1633e9=_0x3d020c;this[_0x1633e9(0x194)][_0x1633e9(0x173)]();}[_0x3d020c(0x181)](){const _0x3f9cbb=_0x3d020c;return this[_0x3f9cbb(0x194)][_0x3f9cbb(0x17b)][_0x3f9cbb(0x178)]?.[_0x3f9cbb(0x1b4)]?.[_0x3f9cbb(0x187)]()||'';}[_0x3d020c(0x171)](){const _0x3bd353=_0x3d020c;this[_0x3bd353(0x194)][_0x3bd353(0x17b)][_0x3bd353(0x178)][_0x3bd353(0x1b4)]='',this[_0x3bd353(0x194)][_0x3bd353(0x197)]=null,this[_0x3bd353(0x18a)][_0x3bd353(0x17c)]=!0x1;}[_0x3d020c(0x185)](_0x30814a){const _0x50879a=_0x3d020c;this[_0x50879a(0x194)][_0x50879a(0x197)]=_0x30814a,this[_0x50879a(0x180)](),this[_0x50879a(0x1a5)](_0x50879a(0x1aa));}[_0x3d020c(0x16e)](){const _0x4abf77=_0x3d020c;this[_0x4abf77(0x194)][_0x4abf77(0x197)]=null,this[_0x4abf77(0x180)]();}[_0x3d020c(0x1b1)](){const _0x50d447=_0x3d020c,_0x2c0e36=new _0x41bf67(this[_0x50d447(0x183)]);return _0x2c0e36[_0x50d447(0x191)]({'icon':_0x57ec3a,'tooltip':_0x21e79e(this[_0x50d447(0x183)],_0x50d447(0x176)),'tooltipPosition':'n','class':_0x50d447(0x1a1)}),_0x2c0e36;}[_0x3d020c(0x1a8)](){const _0x461138=_0x3d020c,_0x529426=new _0xc6e266(this[_0x461138(0x183)],_0x497e38);return _0x529426[_0x461138(0x191)]({'label':_0x21e79e(this[_0x461138(0x183)],_0x461138(0x16a)),'class':_0x461138(0x19f)}),_0x529426[_0x461138(0x17b)][_0x461138(0x191)]({'placeholder':_0x21e79e(this[_0x461138(0x183)],_0x461138(0x17e))}),_0x529426;}[_0x3d020c(0x17f)](){const _0x50902a=_0x3d020c,_0x492e08=new _0x41bf67(this[_0x50902a(0x183)]);return _0x492e08[_0x50902a(0x191)]({'icon':_0x39c0f7,'tooltip':_0x21e79e(this[_0x50902a(0x183)],_0x50902a(0x17a)),'tooltipPosition':'n','class':_0x50902a(0x18c),'type':_0x50902a(0x19c),'isEnabled':!0x1}),_0x492e08;}[_0x3d020c(0x192)](){const _0x586935=_0x3d020c,_0x5cc035=new _0x143a69(this[_0x586935(0x183)],{'label':_0x21e79e(this[_0x586935(0x183)],_0x586935(0x17a)),'class':_0x586935(0x1b3)});_0x5cc035[_0x586935(0x16d)][_0x586935(0x16b)](this[_0x586935(0x1a2)],0x0),this[_0x586935(0x1a0)]({'tag':_0x586935(0x195),'attributes':{'class':eh,'tabindex':'-1'},'children':[_0x5cc035,{'tag':_0x586935(0x18d),'attributes':{'class':hh},'children':[this[_0x586935(0x194)],this[_0x586935(0x18a)]]}]});}[_0x3d020c(0x198)](){const _0x298775=_0x3d020c;this[_0x298775(0x1a2)]['on'](_0x298775(0x174),()=>{const _0x94d92a=_0x298775;this[_0x94d92a(0x171)](),this[_0x94d92a(0x1a5)](_0x94d92a(0x1af));}),this[_0x298775(0x194)][_0x298775(0x17b)]['on'](_0x298775(0x19b),()=>{const _0x8a49d0=_0x298775;this[_0x8a49d0(0x16e)](),this[_0x8a49d0(0x180)](),this[_0x8a49d0(0x1a5)](_0x8a49d0(0x1aa));}),this['on'](_0x298775(0x19c),_0x237b7d=>{const _0x30502d=_0x298775;_0x237b7d[_0x30502d(0x17d)](),this[_0x30502d(0x170)]();});}[_0x3d020c(0x184)](){const _0x4cd8d5=_0x3d020c;this[_0x4cd8d5(0x1a4)][_0x4cd8d5(0x191)](_0x4cd8d5(0x1a6),(_0x585219,_0x484a44)=>{const _0x4cbb31=_0x4cd8d5;this[_0x4cbb31(0x171)](),this[_0x4cbb31(0x1a5)](_0x4cbb31(0x1af)),_0x484a44();});}[_0x3d020c(0x170)](){const _0x41c24d=_0x3d020c,_0x35ef11=this[_0x41c24d(0x181)]()[_0x41c24d(0x187)]();_0x35ef11?this[_0x41c24d(0x189)](_0x35ef11)?(this[_0x41c24d(0x16e)](),this[_0x41c24d(0x1a5)](_0x41c24d(0x179),_0x35ef11)):this[_0x41c24d(0x185)](_0x21e79e(this[_0x41c24d(0x183)],_0x41c24d(0x172))):this[_0x41c24d(0x185)](_0x21e79e(this[_0x41c24d(0x183)],_0x41c24d(0x19a)));}[_0x3d020c(0x180)](){const _0x52dfa5=_0x3d020c,_0x564c20=this[_0x52dfa5(0x181)]()[_0x52dfa5(0x187)](),_0x2ca0a0=!!this[_0x52dfa5(0x194)][_0x52dfa5(0x197)];this[_0x52dfa5(0x18a)][_0x52dfa5(0x17c)]=_0x564c20[_0x52dfa5(0x1b2)]>0x0&&!_0x2ca0a0;}[_0x3d020c(0x189)](_0x115171){try{return!!new URL(_0x115171);}catch{return!0x1;}}}
|