@ckeditor/ckeditor5-ai 46.1.1 → 47.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +2648 -0
- package/dist/index.css +3047 -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 +162 -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/aiassistant/legacyerrors.js +23 -0
- 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 +82 -31
- 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 +101 -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 +19 -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 +154 -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/legacyerrors.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
|
+
function _0x4737(_0x54711e,_0x47c3bd){const _0x5ead8c=_0x5ead();return _0x4737=function(_0x4737fc,_0x2500fa){_0x4737fc=_0x4737fc-0x112;let _0x509559=_0x5ead8c[_0x4737fc];return _0x509559;},_0x4737(_0x54711e,_0x47c3bd);}const _0x46a822=_0x4737;(function(_0x19540d,_0x593ad7){const _0x1e3cff=_0x4737,_0x5c150b=_0x19540d();while(!![]){try{const _0x4ba439=parseInt(_0x1e3cff(0x130))/0x1+-parseInt(_0x1e3cff(0x13c))/0x2+parseInt(_0x1e3cff(0x159))/0x3+-parseInt(_0x1e3cff(0x129))/0x4*(parseInt(_0x1e3cff(0x125))/0x5)+-parseInt(_0x1e3cff(0x11e))/0x6*(parseInt(_0x1e3cff(0x154))/0x7)+parseInt(_0x1e3cff(0x12a))/0x8+parseInt(_0x1e3cff(0x116))/0x9*(-parseInt(_0x1e3cff(0x11d))/0xa);if(_0x4ba439===_0x593ad7)break;else _0x5c150b['push'](_0x5c150b['shift']());}catch(_0x4d50c1){_0x5c150b['push'](_0x5c150b['shift']());}}}(_0x5ead,0xd36c5));import{CKEditorError as _0x1da49c,logWarning as _0x194603,scrollViewportToShowTarget as _0x356a20}from'ckeditor5/src/utils.js';import{View as _0x31bfd2}from'ckeditor5/src/ui.js';import{AI_CHAT_UI_EVENT_NAMES as _0x8529a2}from'../utils/eventnames.js';import{AIChatFeedSuggestionItemView as _0x4b63b9}from'./feed/aichatfeedsuggestionitemview.js';import{AIChatFeedReplyItemView as _0x299ba5}from'./feed/aichatfeedreplyitemview.js';import{AIChatFeedUserMessageItemView as _0x5ef5b3}from'./feed/aichatfeedusermessageitem.js';import{AIChatFeedErrorItemView as _0x15caea}from'./feed/aichatfeederroritemview.js';import{AIChatFeedInteractionHeaderView as _0x23a6d1}from'./feed/aichatfeedinteractionheaderview.js';import{ScrollManager as _0x5a47a2}from'../utils/scrollmanager.js';import{AISkeletonView as _0x5af346,SKELETON_DEFINITIONS as _0xf9e360}from'../../aicore/ui/aiskeleton.js';function _0x5ead(){const _0x15a99e=['5352nBhrNY','updateSuggestionPartState','updateContent','map','add','_createTemplateChildren','includes','27425LeiOKQ','markItemAsDone','updateSources','addItem','20sHehoQ','7900808pwXDBe','startAutoScroll','ai-chat-feed-view-item-not-a-suggestion-item','start','updateSuggestionItem','updateReplyItem','1367517ngnkCR','ck-hidden','scrollManager','extendTemplate','ai-chat-feed-view-item-not-a-suggestion-or-reply-item','ai-reply','element','ck-ai-chat__feed__items','ck-ai-chat__loader-text','loadingMessage','_bodyCollection','markAsDone','179430UUKzrg','getItemIds','toggleLoadingSkeleton','aiFeed','ai-suggestion-reply','interaction-header','ai-chat-feed-view-item-not-found','stop','delegate','removeItem','createCollection','stopAutoScroll','clear','find','bindTemplate','ck-ai-chat-feed-view-scroll-to-suggestion-part-view-not-found','set','isLoadingSkeletonVisible','_createFeedItems','span','isVisible','_createLoaderChildren','destroy','render','966vWgyez','user-message','setLoadingMessage','isPending','getItemById','2571051YrRmUH','ck-ai-chat__feed','updatePartState','updateWebSources','options','ck-ai-chat__loader','setTemplate','div','_setupTemplate','ck-ai-chat-feed-view-scroll-to-suggestion-invalid-item','children','getPartView','90SlTHmq','_createFeedLoader','remove','locale','scrollToSuggestion','ai-chat-feed-view-item-not-a-reply-item','_createSkeletonLoader','2105910uraoJf'];_0x5ead=function(){return _0x15a99e;};return _0x5ead();}import{AISpinnerView as _0x2f3429}from'../../aicore/ui/aispinner.js';export class AIChatFeedView extends _0x31bfd2{[_0x46a822(0x114)];[_0x46a822(0x132)];[_0x46a822(0x13a)];constructor(_0x307a7c,_0x193eef){const _0x34044d=_0x46a822;super(_0x307a7c),this[_0x34044d(0x13a)]=_0x193eef,this[_0x34044d(0x14c)](_0x34044d(0x157),!0x1),this[_0x34044d(0x14c)](_0x34044d(0x139),''),this[_0x34044d(0x14c)](_0x34044d(0x14d),!0x1),this[_0x34044d(0x114)]=this[_0x34044d(0x146)](),this[_0x34044d(0x114)][_0x34044d(0x144)](..._0x8529a2)['to'](this),this[_0x34044d(0x112)]();}[_0x46a822(0x153)](){const _0x532c95=_0x46a822;super[_0x532c95(0x153)](),this[_0x532c95(0x132)]=new _0x5a47a2(this[_0x532c95(0x136)]);}[_0x46a822(0x152)](){const _0x43b394=_0x46a822;super[_0x43b394(0x152)](),this[_0x43b394(0x132)][_0x43b394(0x152)]();}[_0x46a822(0x148)](){const _0x4269e7=_0x46a822;this[_0x4269e7(0x114)][_0x4269e7(0x148)]();}[_0x46a822(0x128)](_0x2afc54,_0x448dc2){const _0x21aca1=_0x46a822;let _0x208a82;_0x208a82=_0x21aca1(0x135)===_0x2afc54?new _0x299ba5(_0x448dc2):_0x21aca1(0x140)===_0x2afc54?new _0x4b63b9(this[_0x21aca1(0x119)],_0x448dc2):_0x21aca1(0x155)===_0x2afc54?new _0x5ef5b3(this[_0x21aca1(0x119)],_0x448dc2,this[_0x21aca1(0x13a)]):_0x21aca1(0x141)===_0x2afc54?new _0x23a6d1(this[_0x21aca1(0x119)],_0x448dc2):new _0x15caea(_0x448dc2),this[_0x21aca1(0x114)][_0x21aca1(0x122)](_0x208a82);}async[_0x46a822(0x12f)]({id:_0x52ff6a,parsedContent:_0x30449f,renderingStrategy:_0x35b6c3,abortSignal:_0xcc068e}){const _0x5b7735=_0x46a822,_0x5e4ebe=this[_0x5b7735(0x158)](_0x52ff6a);if(!(_0x5e4ebe instanceof _0x299ba5))throw new _0x1da49c(_0x5b7735(0x11b),null,{'itemView':_0x5e4ebe,'id':_0x52ff6a,'parsedContent':_0x30449f});await _0x5e4ebe[_0x5b7735(0x120)]({'parsedContent':_0x30449f,'renderingStrategy':_0x35b6c3,'abortSignal':_0xcc068e});}async[_0x46a822(0x15c)](_0x5aae00,_0x238630){const _0x52705b=_0x46a822,_0x1678ee=this[_0x52705b(0x158)](_0x5aae00);if(_0x1678ee instanceof _0x4b63b9)_0x1678ee[_0x52705b(0x127)](_0x238630);else{if(!(_0x1678ee instanceof _0x299ba5))throw new _0x1da49c(_0x52705b(0x134),null,{'itemView':_0x1678ee,'id':_0x5aae00,'sources':_0x238630});_0x1678ee[_0x52705b(0x127)](_0x238630);}}async[_0x46a822(0x12e)]({id:_0x523113,parts:_0x20b283,renderingStrategy:_0x400d93,abortSignal:_0x58ce9c}){const _0x1f4dc2=_0x46a822,_0x2e92ec=this[_0x1f4dc2(0x158)](_0x523113);if(!(_0x2e92ec instanceof _0x4b63b9))throw new _0x1da49c(_0x1f4dc2(0x12c),null,{'itemView':_0x2e92ec,'id':_0x523113,'parts':_0x20b283});await _0x2e92ec[_0x1f4dc2(0x120)]({'parts':_0x20b283,'renderingStrategy':_0x400d93,'abortSignal':_0x58ce9c});}[_0x46a822(0x11f)]({id:_0x1452be,index:_0xe7bb53,state:_0x599440}){const _0x11c9f0=_0x46a822,_0x2e8624=this[_0x11c9f0(0x158)](_0x1452be);if(!(_0x2e8624 instanceof _0x4b63b9))throw new _0x1da49c(_0x11c9f0(0x12c),this,{'id':_0x1452be});_0x2e8624[_0x11c9f0(0x15b)](_0xe7bb53,_0x599440);}[_0x46a822(0x126)](_0x3b8858){const _0x207d36=_0x46a822;this[_0x207d36(0x158)](_0x3b8858)[_0x207d36(0x13b)]();}[_0x46a822(0x13d)](){const _0x5aa7d6=_0x46a822;return this[_0x5aa7d6(0x114)][_0x5aa7d6(0x121)](_0x165395=>_0x165395[_0x5aa7d6(0x15d)]['id']);}[_0x46a822(0x145)](_0x5a93d0){const _0x34ec1f=_0x46a822;this[_0x34ec1f(0x114)][_0x34ec1f(0x118)](this[_0x34ec1f(0x158)](_0x5a93d0));}[_0x46a822(0x11a)](_0x401436,_0x21d69d){const _0x2f6588=_0x46a822,_0x678b0a=this[_0x2f6588(0x158)](_0x401436);if(!(_0x678b0a instanceof _0x4b63b9))return void _0x194603(_0x2f6588(0x113),{'replyId':_0x401436,'partIndex':_0x21d69d});const _0xf338da=_0x678b0a[_0x2f6588(0x115)](_0x21d69d);_0xf338da?_0x356a20({'target':_0xf338da[_0x2f6588(0x136)],'ancestorOffset':0x14,'alignToTop':!0x0,'forceScroll':!0x0}):_0x194603(_0x2f6588(0x14b),{'replyId':_0x401436,'partIndex':_0x21d69d});}[_0x46a822(0x112)](){const _0x278ecd=_0x46a822;this[_0x278ecd(0x15f)]({'tag':_0x278ecd(0x160),'attributes':{'class':['ck',_0x278ecd(0x15a)]},'children':this[_0x278ecd(0x123)]()});}[_0x46a822(0x123)](){const _0x104e40=_0x46a822,_0x1800cc=this[_0x104e40(0x11c)]();return[this[_0x104e40(0x14e)](),_0x1800cc,this[_0x104e40(0x117)]()];}[_0x46a822(0x11c)](){const _0x2e0dc8=_0x46a822,_0x546d08=new _0x5af346(this[_0x2e0dc8(0x119)],_0xf9e360[_0x2e0dc8(0x13f)]);return _0x546d08[_0x2e0dc8(0x133)]({'attributes':{'class':[this[_0x2e0dc8(0x14a)]['if'](_0x2e0dc8(0x14d),_0x2e0dc8(0x131),_0x19c2d7=>!_0x19c2d7)]}}),_0x546d08;}[_0x46a822(0x14e)](){const _0x1780c6=_0x46a822,_0x3cefde=new _0x31bfd2(this[_0x1780c6(0x119)]);return _0x3cefde[_0x1780c6(0x15f)]({'tag':_0x1780c6(0x160),'attributes':{'class':['ck',_0x1780c6(0x137),this[_0x1780c6(0x14a)]['if'](_0x1780c6(0x14d),_0x1780c6(0x131))]},'children':this[_0x1780c6(0x114)]}),_0x3cefde;}[_0x46a822(0x117)](){const _0x390a88=_0x46a822,_0x432bc1=new _0x31bfd2(this[_0x390a88(0x119)]);return _0x432bc1[_0x390a88(0x15f)]({'tag':_0x390a88(0x160),'attributes':{'class':['ck',_0x390a88(0x15e),this[_0x390a88(0x14a)]['if'](_0x390a88(0x157),_0x390a88(0x131),_0x3f5243=>!_0x3f5243)]},'children':this[_0x390a88(0x151)]()}),_0x432bc1;}[_0x46a822(0x151)](){const _0x40e857=_0x46a822,_0x4489ab=new _0x2f3429();return _0x4489ab[_0x40e857(0x150)]=!0x0,[_0x4489ab,{'tag':_0x40e857(0x14f),'attributes':{'class':['ck',_0x40e857(0x138)]},'children':[{'text':this[_0x40e857(0x14a)]['to'](_0x40e857(0x139))}]}];}[_0x46a822(0x158)](_0x36b535){const _0x1924be=_0x46a822,_0xb4c1f1=this[_0x1924be(0x114)][_0x1924be(0x149)](_0x10b7bb=>_0x10b7bb[_0x1924be(0x15d)]['id'][_0x1924be(0x124)](_0x36b535));if(!_0xb4c1f1)throw new _0x1da49c(_0x1924be(0x142),this,{'id':_0x36b535});return _0xb4c1f1;}[_0x46a822(0x156)](_0x14df50){const _0x131d0b=_0x46a822;this[_0x131d0b(0x14c)](_0x131d0b(0x139),_0x14df50);}[_0x46a822(0x13e)](_0x35b7d1){const _0x29700b=_0x46a822;this[_0x29700b(0x14c)](_0x29700b(0x14d),_0x35b7d1);}[_0x46a822(0x12b)](){const _0x4c9593=_0x46a822;this[_0x4c9593(0x132)][_0x4c9593(0x12d)]();}[_0x46a822(0x147)](){const _0x2acd8d=_0x46a822;this[_0x2acd8d(0x132)][_0x2acd8d(0x143)]();}}
|
|
@@ -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 _0x161b55=_0x1e24;function _0x1e24(_0x277e25,_0x2c5097){const _0x2b9ead=_0x2b9e();return _0x1e24=function(_0x1e2424,_0x44258c){_0x1e2424=_0x1e2424-0xd8;let _0x1243c5=_0x2b9ead[_0x1e2424];return _0x1243c5;},_0x1e24(_0x277e25,_0x2c5097);}(function(_0x4f6b62,_0x9d0037){const _0x9e072a=_0x1e24,_0x12243b=_0x4f6b62();while(!![]){try{const _0x518d7c=-parseInt(_0x9e072a(0xe1))/0x1+-parseInt(_0x9e072a(0xeb))/0x2*(-parseInt(_0x9e072a(0xdd))/0x3)+-parseInt(_0x9e072a(0xda))/0x4*(parseInt(_0x9e072a(0xd8))/0x5)+parseInt(_0x9e072a(0xe5))/0x6+parseInt(_0x9e072a(0xd9))/0x7+parseInt(_0x9e072a(0xed))/0x8+-parseInt(_0x9e072a(0xee))/0x9;if(_0x518d7c===_0x9d0037)break;else _0x12243b['push'](_0x12243b['shift']());}catch(_0x248449){_0x12243b['push'](_0x12243b['shift']());}}}(_0x2b9e,0xee133));import{ButtonView as _0x2a94ed,FormHeaderView as _0xf0ace}from'ckeditor5/src/ui.js';import{IconPlus as _0x1e30eb,IconAIChat as _0x236ec4}from'ckeditor5/src/icons.js';function _0x2b9e(){const _0x303a50=['132976sjARLi','ck-ai-header\x20ck-ai-header_chat','ck-ai-chat__start-conversation','execute','11529744XybrXI','add','isMaximized','children','AI_CHAT_HEADING','resizeButton','604652ALlplk','startConversation','2599800NyNJJA','40371651VmReVW','_createStartConversationButton','120UVuDpT','11897277tzdnef','27716uteADU','locale','fire','18LIRBtK','set','conversationStartButton','AI_CHAT_LABEL_NEW_CHAT'];_0x2b9e=function(){return _0x303a50;};return _0x2b9e();}import{getTranslation as _0x1f0520}from'../../aicore/utils/common-translations.js';import{createResizeButton as _0x5ead87}from'../../aicore/utils/createresizebutton.js';export class AIChatHeaderView extends _0xf0ace{[_0x161b55(0xdf)];[_0x161b55(0xea)];constructor(_0x3d8854,_0x1c31e4){const _0x531ae0=_0x161b55;super(_0x3d8854,{'label':_0x1f0520(_0x3d8854,_0x531ae0(0xe9)),'class':_0x531ae0(0xe2),'icon':_0x236ec4}),this[_0x531ae0(0xde)](_0x531ae0(0xe7),!0x1),this[_0x531ae0(0xdf)]=this[_0x531ae0(0xef)](_0x3d8854),this[_0x531ae0(0xe8)][_0x531ae0(0xe6)](this[_0x531ae0(0xdf)]),_0x1c31e4&&(this[_0x531ae0(0xea)]=_0x5ead87(_0x3d8854,this),this[_0x531ae0(0xe8)][_0x531ae0(0xe6)](this[_0x531ae0(0xea)]));}[_0x161b55(0xef)](_0x2e811f){const _0x5a610=_0x161b55,_0x59f68a=new _0x2a94ed(_0x2e811f);return _0x59f68a[_0x5a610(0xde)]({'label':_0x1f0520(this[_0x5a610(0xdb)],_0x5a610(0xe0)),'withText':!0x0,'icon':_0x1e30eb,'class':_0x5a610(0xe3)}),_0x59f68a['on'](_0x5a610(0xe4),()=>{const _0x100a53=_0x5a610;this[_0x100a53(0xdc)](_0x100a53(0xec));}),_0x59f68a;}}
|
|
@@ -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
|
+
var _0x22eb44=_0x5bd6;(function(_0x7dd357,_0xfef7d7){var _0x33098c=_0x5bd6,_0x2093b2=_0x7dd357();while(!![]){try{var _0x3e4550=-parseInt(_0x33098c(0xa2))/0x1*(-parseInt(_0x33098c(0x95))/0x2)+parseInt(_0x33098c(0x90))/0x3*(-parseInt(_0x33098c(0x93))/0x4)+-parseInt(_0x33098c(0x9e))/0x5+parseInt(_0x33098c(0x8b))/0x6+-parseInt(_0x33098c(0x96))/0x7*(parseInt(_0x33098c(0x9b))/0x8)+parseInt(_0x33098c(0x9c))/0x9+parseInt(_0x33098c(0x8e))/0xa;if(_0x3e4550===_0xfef7d7)break;else _0x2093b2['push'](_0x2093b2['shift']());}catch(_0x923688){_0x2093b2['push'](_0x2093b2['shift']());}}}(_0x1cd3,0x821ce));import{View as _0x31b3b6,BodyCollection as _0x4b8750}from'ckeditor5/src/ui.js';function _0x1cd3(){var _0x1a18b6=['66682UZQFME','36190BKOdOY','ck-rounded-corners','div','ck-ai-chat','chatHeader','1016NojyyG','2966274cJkGJB','uiLanguageDirection','636085bECBxi','chatDisclaimer','_bodyCollection','destroy','29GzSfnd','chatControls','attachToDom','chatFeed','3383328OJfbzS','ck-reset_all','setTemplate','4126030jhSyNV','closeSourceResourceBalloon','3JHCzfO','detachFromDom','populateSourceResourceBalloon','3824868BaYoRf','delegate'];_0x1cd3=function(){return _0x1a18b6;};return _0x1cd3();}import{AI_CHAT_UI_EVENT_NAMES as _0x15a5eb}from'../utils/eventnames.js';function _0x5bd6(_0x10fe4b,_0x313792){var _0x1cd335=_0x1cd3();return _0x5bd6=function(_0x5bd65a,_0x2d5d68){_0x5bd65a=_0x5bd65a-0x89;var _0x3ce662=_0x1cd335[_0x5bd65a];return _0x3ce662;},_0x5bd6(_0x10fe4b,_0x313792);}import{AIChatFeedView as _0x833b79}from'./aichatfeedview.js';import{AIChatControlsView as _0x371674}from'./aichatcontrolsview.js';import{AIChatHeaderView as _0x2a6b42}from'./aichatheaderview.js';import{AIDisclaimerView as _0x317a45}from'../../aicore/ui/aidisclaimerview.js';export class AIChatView extends _0x31b3b6{[_0x22eb44(0x9a)];[_0x22eb44(0x8a)];[_0x22eb44(0xa3)];[_0x22eb44(0x9f)];[_0x22eb44(0xa0)];constructor(_0x2a3118,_0x5af588){var _0x13d6c=_0x22eb44;super(_0x2a3118),this[_0x13d6c(0xa0)]=new _0x4b8750(_0x2a3118),this[_0x13d6c(0xa0)][_0x13d6c(0x89)](),this[_0x13d6c(0x9a)]=new _0x2a6b42(_0x2a3118,_0x5af588),this[_0x13d6c(0x9a)][_0x13d6c(0x94)](..._0x15a5eb)['to'](this),this[_0x13d6c(0x8a)]=new _0x833b79(_0x2a3118,this[_0x13d6c(0xa0)]),this[_0x13d6c(0x8a)][_0x13d6c(0x94)](..._0x15a5eb)['to'](this),this[_0x13d6c(0xa3)]=new _0x371674(_0x2a3118,this[_0x13d6c(0xa0)]),this[_0x13d6c(0xa3)][_0x13d6c(0x94)](..._0x15a5eb)['to'](this),this[_0x13d6c(0x9f)]=new _0x317a45(_0x2a3118),this[_0x13d6c(0x8d)]({'tag':_0x13d6c(0x98),'attributes':{'class':['ck',_0x13d6c(0x8c),_0x13d6c(0x99),_0x13d6c(0x97)],'dir':_0x2a3118[_0x13d6c(0x9d)]},'children':[this[_0x13d6c(0x9a)],this[_0x13d6c(0x8a)],this[_0x13d6c(0xa3)],this[_0x13d6c(0x9f)]]});}[_0x22eb44(0x92)](_0x225a73,_0x4a8292,_0x940d4e,_0x551f31){var _0x2254e5=_0x22eb44;this[_0x2254e5(0xa3)][_0x2254e5(0x92)](_0x225a73,_0x4a8292,_0x940d4e,_0x551f31);}[_0x22eb44(0x8f)](_0x1e2633){var _0x1ee417=_0x22eb44;this[_0x1ee417(0xa3)][_0x1ee417(0x8f)](_0x1e2633);}[_0x22eb44(0xa1)](){var _0x530d9f=_0x22eb44;this[_0x530d9f(0xa0)][_0x530d9f(0x91)](),super[_0x530d9f(0xa1)]();}}
|
|
@@ -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 _0x52093d=_0x30f1;(function(_0x13a249,_0x13a305){const _0x763ce0=_0x30f1,_0x31e9e4=_0x13a249();while(!![]){try{const _0x4a2041=-parseInt(_0x763ce0(0x1e9))/0x1+parseInt(_0x763ce0(0x1cf))/0x2+parseInt(_0x763ce0(0x245))/0x3+parseInt(_0x763ce0(0x22a))/0x4*(parseInt(_0x763ce0(0x23c))/0x5)+-parseInt(_0x763ce0(0x21e))/0x6*(parseInt(_0x763ce0(0x225))/0x7)+-parseInt(_0x763ce0(0x20a))/0x8*(parseInt(_0x763ce0(0x24e))/0x9)+parseInt(_0x763ce0(0x1dc))/0xa;if(_0x4a2041===_0x13a305)break;else _0x31e9e4['push'](_0x31e9e4['shift']());}catch(_0x594798){_0x31e9e4['push'](_0x31e9e4['shift']());}}}(_0x2ced,0x7b6de));function _0x2ced(){const _0x39a80a=['textContent','_calculateContainerWidth','_createShowMoreButton','show','documentElement','element','0px','createElement','from','innerHTML','_createContainerElements','bottom','_createShowMoreButtonView','slice','6936yJYxBu','includes','_renderChipsAndCountRows','_bodyCollection','opacity','none','remove','4711qhMvqx','_restoreAncestorVisibility','zIndex','right','_checkAndHandleOverflow','424FZWGeT','disableAnimationOnEnter','execute','_parentView','block','cloneNode','innerHeight','_handleShowMoreButtonClick','ck-calculation-container','overflowChips','display','set','auto','_calculateOverflowInContainer','_createShowMoreBalloonPanelView','_visibleChips','label','innerWidth','32685ijpjBH','render','_targetContainer','_createMockButton','div','_makeAncestorsVisible','_locale','undefined','position','307221DjPNUz','top','content','maxVisibleRows','body','cssClasses','overflowContainer','block\x20!important','300px','68967yaUpVV','_setupVisibilityObserver','classList','children','length','showMoreButtonView','some','50px','showBalloonPanel','calculationContainer','_distributeChips','_overflowChips','destroy','visible\x20!important','parentElement','className','forEach','width','_config','pop','_intersectionObserver','583610SJAEeD','boxSizing','filter','border-box','style','.ck-ai-chat','_applyCalculationStyles','appendChild','-9999px','abs','_containerElement','_findTargetContainer','reorganizeChips','11183290ePLLhj','getComputedStyle','_updateBalloonContent','_updateOverflowUI','_showMoreButtonView','_ancestorsToRestore','setContainerElement','setTemplate','controlsButton','absolute','observe','left','tagName','439140EKjNMt','isVisible','querySelector','_createCalculationContainer','clientWidth','clear','isIntersecting','_showMoreBalloonPanelView','toLowerCase','_updateShowMoreButtonVisibility','hide','pointerEvents','height','_isContainerVisible','pin','isOn','showMoreLabelPrefix','add','_testButtonFit','visibility','showMoreButton','showMoreBalloon','button','push','isConnected','offsetWidth','+\x201','visible','rowDetectionTolerance','_applyOverflowResults','hideBalloonPanel','clientHeight','hidden','504hIOlbM','_repinBalloonPanel','getBoundingClientRect','_pendingCalculation','extendTemplate','disconnect'];_0x2ced=function(){return _0x39a80a;};return _0x2ced();}import{View as _0x399537,BalloonPanelView as _0x4fec26,ButtonView as _0x2bc9c6,clickOutsideHandler as _0x5a7999}from'ckeditor5/src/ui.js';import{Collection as _0x43f663}from'ckeditor5/src/utils.js';const hn={'maxVisibleRows':0x2,'rowDetectionTolerance':0x5,'showMoreLabelPrefix':'+\x20','viewportOffset':{'top':0x64,'bottom':0xa}},ln=_0x52093d(0x24d);function _0x30f1(_0x1c89ee,_0x48874b){const _0x2ced1=_0x2ced();return _0x30f1=function(_0x30f180,_0xd26c9f){_0x30f180=_0x30f180-0x1c3;let _0x49437e=_0x2ced1[_0x30f180];return _0x49437e;},_0x30f1(_0x1c89ee,_0x48874b);}export class AIChatChipsOverflowManager{[_0x52093d(0x242)];[_0x52093d(0x1cc)];[_0x52093d(0x239)];[_0x52093d(0x1c5)];[_0x52093d(0x1e0)]=null;[_0x52093d(0x1f0)]=null;[_0x52093d(0x1d9)]=null;[_0x52093d(0x221)];[_0x52093d(0x22d)]=null;[_0x52093d(0x1ce)]=null;[_0x52093d(0x20d)]=!0x1;constructor(_0x225cdc,_0x496564,_0x1e288b,_0x572fcc,_0x48b430){const _0x20b6de=_0x52093d;this[_0x20b6de(0x242)]=_0x225cdc,this[_0x20b6de(0x239)]=_0x496564,this[_0x20b6de(0x1cc)]={...hn,..._0x1e288b,'cssClasses':{'controlsButton':'','calculationContainer':_0x20b6de(0x232),..._0x1e288b[_0x20b6de(0x24a)]}},this[_0x20b6de(0x1c5)]=new _0x43f663(),this[_0x20b6de(0x221)]=_0x572fcc,this[_0x20b6de(0x22d)]=_0x48b430||null;}[_0x52093d(0x1e2)](_0x50fdb3){const _0x198cac=_0x52093d;this[_0x198cac(0x1ce)]&&(this[_0x198cac(0x1ce)][_0x198cac(0x20f)](),this[_0x198cac(0x1ce)]=null),this[_0x198cac(0x1d9)]=_0x50fdb3,this[_0x198cac(0x24f)]();}get[_0x52093d(0x253)](){const _0x1fff9c=_0x52093d;return this[_0x1fff9c(0x1e0)];}get[_0x52093d(0x233)](){const _0x4373a3=_0x52093d;return this[_0x4373a3(0x1c5)];}[_0x52093d(0x1db)](){requestAnimationFrame(()=>{const _0x5be6a8=_0x30f1;this[_0x5be6a8(0x229)]();});}[_0x52093d(0x256)](){const _0x59caee=_0x52093d;this[_0x59caee(0x1e0)]&&this[_0x59caee(0x1f0)]&&(this[_0x59caee(0x1de)](),this[_0x59caee(0x1e0)][_0x59caee(0x1f8)]=!0x0,this[_0x59caee(0x1f0)][_0x59caee(0x213)](),this[_0x59caee(0x1f0)][_0x59caee(0x1f7)]({'target':this[_0x59caee(0x1e0)][_0x59caee(0x215)],'limiter':document[_0x59caee(0x1eb)](_0x59caee(0x1d4))}));}[_0x52093d(0x207)](){const _0x5f5a3e=_0x52093d;this[_0x5f5a3e(0x1e0)]&&this[_0x5f5a3e(0x1f0)]&&(this[_0x5f5a3e(0x1e0)][_0x5f5a3e(0x1f8)]=!0x1,this[_0x5f5a3e(0x1f0)][_0x5f5a3e(0x1f3)]());}[_0x52093d(0x1ee)](){const _0x515d51=_0x52093d;this[_0x515d51(0x1c5)][_0x515d51(0x1ee)](),this[_0x515d51(0x207)](),this[_0x515d51(0x1f2)](),this[_0x515d51(0x1e0)]&&(this[_0x515d51(0x1e0)][_0x515d51(0x23a)]=''),this[_0x515d51(0x1f0)]&&this[_0x515d51(0x1f0)][_0x515d51(0x247)][_0x515d51(0x1ee)]();}[_0x52093d(0x1c6)](){const _0x120d59=_0x52093d;this[_0x120d59(0x1ce)]&&(this[_0x120d59(0x1ce)][_0x120d59(0x20f)](),this[_0x120d59(0x1ce)]=null),this[_0x120d59(0x1e0)]&&(this[_0x120d59(0x1e0)][_0x120d59(0x1c6)](),this[_0x120d59(0x1e0)]=null),this[_0x120d59(0x1f0)]&&(this[_0x120d59(0x1f0)][_0x120d59(0x1c6)](),this[_0x120d59(0x1f0)]=null);}[_0x52093d(0x229)](){const _0x1c2b7c=_0x52093d;if(!this[_0x1c2b7c(0x1d9)])return;if(!this[_0x1c2b7c(0x1f6)]())return void(this[_0x1c2b7c(0x20d)]=!0x0);this[_0x1c2b7c(0x20d)]=!0x1;const _0x6e59f=[...this[_0x1c2b7c(0x239)],...this[_0x1c2b7c(0x1c5)]],_0xe3e55f=this[_0x1c2b7c(0x1ec)](),_0x5df374=this[_0x1c2b7c(0x237)](_0xe3e55f,_0x6e59f),_0x15d8f6=_0xe3e55f[_0x1c2b7c(0x1e1)];_0x15d8f6&&this[_0x1c2b7c(0x226)](_0x15d8f6),_0xe3e55f[_0x1c2b7c(0x224)](),this[_0x1c2b7c(0x206)](_0x6e59f,_0x5df374);}[_0x52093d(0x212)](){const _0x44c747=_0x52093d;this[_0x44c747(0x1e0)]=this[_0x44c747(0x21c)](),this[_0x44c747(0x1f0)]=this[_0x44c747(0x238)](),this[_0x44c747(0x1e0)][_0x44c747(0x23d)](),this[_0x44c747(0x1d9)][_0x44c747(0x1d6)](this[_0x44c747(0x1e0)][_0x44c747(0x215)]),this[_0x44c747(0x1e0)]['on'](_0x44c747(0x22c),()=>{const _0x54d195=_0x44c747;this[_0x54d195(0x231)]();}),_0x5a7999({'emitter':this[_0x44c747(0x1f0)],'contextElements':[this[_0x44c747(0x1f0)][_0x44c747(0x215)],this[_0x44c747(0x1e0)][_0x44c747(0x215)]],'callback':()=>this[_0x44c747(0x207)](),'activator':()=>this[_0x44c747(0x1e0)][_0x44c747(0x1f8)]});}[_0x52093d(0x21c)](){const _0x382927=_0x52093d,_0x3443cc=new _0x2bc9c6(this[_0x382927(0x242)]);_0x3443cc[_0x382927(0x235)]({'label':'','withText':!0x0,'isToggleable':!0x0});const _0x17b7b6=[this[_0x382927(0x1cc)][_0x382927(0x24a)][_0x382927(0x1fd)]];return this[_0x382927(0x1cc)][_0x382927(0x24a)][_0x382927(0x1e4)]&&_0x17b7b6[_0x382927(0x200)](this[_0x382927(0x1cc)][_0x382927(0x24a)][_0x382927(0x1e4)]),_0x3443cc[_0x382927(0x20e)]({'attributes':{'class':_0x17b7b6}}),_0x3443cc;}[_0x52093d(0x238)](){const _0x2fb34f=_0x52093d,_0x4a7df3=new _0x4fec26(this[_0x2fb34f(0x242)]);return _0x4a7df3[_0x2fb34f(0x20e)]({'attributes':{'class':this[_0x2fb34f(0x1cc)][_0x2fb34f(0x24a)][_0x2fb34f(0x1fe)]}}),this[_0x2fb34f(0x221)][_0x2fb34f(0x1fa)](_0x4a7df3),_0x4a7df3;}[_0x52093d(0x1de)](){const _0x317793=_0x52093d;if(this[_0x317793(0x1f0)]&&(this[_0x317793(0x1f0)][_0x317793(0x247)][_0x317793(0x1ee)](),this[_0x317793(0x1c5)][_0x317793(0x252)]>0x0)){this[_0x317793(0x1c5)][_0x317793(0x1ca)](_0x5e40fb=>{const _0x30ebb7=_0x317793;_0x5e40fb[_0x30ebb7(0x22b)]();});const _0x1e90f4=new _0x399537(this[_0x317793(0x242)]);_0x1e90f4[_0x317793(0x1e3)]({'tag':_0x317793(0x240),'attributes':{'class':this[_0x317793(0x1cc)][_0x317793(0x24a)][_0x317793(0x24b)]},'children':this[_0x317793(0x1c5)]}),this[_0x317793(0x1f0)][_0x317793(0x247)][_0x317793(0x1fa)](_0x1e90f4);}}[_0x52093d(0x231)](){const _0x56feb6=_0x52093d;this[_0x56feb6(0x1e0)][_0x56feb6(0x1f8)]?this[_0x56feb6(0x207)]():this[_0x56feb6(0x256)]();}[_0x52093d(0x1f2)](){const _0x504d85=_0x52093d,_0x1b04f9=this[_0x504d85(0x1c5)][_0x504d85(0x252)]>0x0;this[_0x504d85(0x1e0)]?.[_0x504d85(0x215)]&&(this[_0x504d85(0x1e0)][_0x504d85(0x215)][_0x504d85(0x1d3)][_0x504d85(0x234)]=_0x1b04f9?'':_0x504d85(0x223));}[_0x52093d(0x20b)](){const _0x34a51c=_0x52093d;this[_0x34a51c(0x1e0)]?.[_0x34a51c(0x1f8)]&&this[_0x34a51c(0x1f0)]?.[_0x34a51c(0x1ea)]&&this[_0x34a51c(0x1e0)][_0x34a51c(0x215)]&&this[_0x34a51c(0x1f0)][_0x34a51c(0x1f7)]({'target':this[_0x34a51c(0x1e0)][_0x34a51c(0x215)],'limiter':document[_0x34a51c(0x1eb)](_0x34a51c(0x1d4))});}[_0x52093d(0x1da)](_0xccd6ad){const _0x3d8c49=_0x52093d,_0x216771=this[_0x3d8c49(0x1d9)]?.[_0x3d8c49(0x1e8)][_0x3d8c49(0x1f1)]()||_0x3d8c49(0x240),_0x4000e9=this[_0x3d8c49(0x1d9)]?.[_0x3d8c49(0x250)];if(_0x4000e9){const _0x4000ee=_0x4000e9[0x0]||'',_0x28bc8c=_0xccd6ad[_0x3d8c49(0x1eb)]('.'+_0x4000ee),_0x1c393b=_0xccd6ad[_0x3d8c49(0x1eb)](_0x216771);return _0x28bc8c||_0x1c393b||_0xccd6ad;}return _0xccd6ad[_0x3d8c49(0x1eb)](_0x216771)||_0xccd6ad;}[_0x52093d(0x211)](){const _0x1686c6=_0x52093d,_0x3df4fa=this[_0x1686c6(0x22d)]?.[_0x1686c6(0x215)]||this[_0x1686c6(0x1d9)];if(!_0x3df4fa)return ln;const _0x5c6663=window[_0x1686c6(0x1dd)](_0x3df4fa)[_0x1686c6(0x1cb)];if(_0x1686c6(0x236)===_0x5c6663||_0x1686c6(0x216)===_0x5c6663||!_0x5c6663){const _0x427a44=_0x3df4fa[_0x1686c6(0x1c8)];if(_0x427a44){const _0x3b865b=window[_0x1686c6(0x1dd)](_0x427a44);return _0x1686c6(0x236)!==_0x3b865b[_0x1686c6(0x1cb)]?_0x3b865b[_0x1686c6(0x1cb)]:ln;}return ln;}return _0x5c6663;}[_0x52093d(0x1d5)](_0x342421,_0x596307){const _0xe2cf49=_0x52093d;this[_0xe2cf49(0x1cc)][_0xe2cf49(0x24a)][_0xe2cf49(0x1c3)]&&_0x342421[_0xe2cf49(0x250)][_0xe2cf49(0x1fa)](this[_0xe2cf49(0x1cc)][_0xe2cf49(0x24a)][_0xe2cf49(0x1c3)]),_0x342421[_0xe2cf49(0x1d3)][_0xe2cf49(0x1cb)]=_0x596307,_0x342421[_0xe2cf49(0x1d3)][_0xe2cf49(0x244)]=_0xe2cf49(0x1e5),_0x342421[_0xe2cf49(0x1d3)][_0xe2cf49(0x246)]=_0xe2cf49(0x1d7),_0x342421[_0xe2cf49(0x1d3)][_0xe2cf49(0x1e7)]=_0xe2cf49(0x1d7),_0x342421[_0xe2cf49(0x1d3)][_0xe2cf49(0x222)]='0',_0x342421[_0xe2cf49(0x1d3)][_0xe2cf49(0x1f4)]=_0xe2cf49(0x223),_0x342421[_0xe2cf49(0x1d3)][_0xe2cf49(0x227)]='-1',_0x342421[_0xe2cf49(0x1d3)][_0xe2cf49(0x1fc)]=_0xe2cf49(0x1c7),_0x342421[_0xe2cf49(0x1d3)][_0xe2cf49(0x234)]=_0xe2cf49(0x24c),_0x342421[_0xe2cf49(0x1d3)][_0xe2cf49(0x1d0)]=_0xe2cf49(0x1d2);}[_0x52093d(0x226)](_0x294d86){const _0x43175f=_0x52093d;_0x294d86[_0x43175f(0x1ca)](({element:_0xfb307c,originalDisplay:_0x4b86a8,originalVisibility:_0x14d3c2})=>{const _0x10d69b=_0x43175f;_0xfb307c[_0x10d69b(0x1d3)][_0x10d69b(0x234)]=_0x4b86a8,_0xfb307c[_0x10d69b(0x1d3)][_0x10d69b(0x1fc)]=_0x14d3c2;});}[_0x52093d(0x241)](_0xb25956){const _0x3ed018=_0x52093d,_0x5043c8=[];let _0xdc40be=_0xb25956;for(;_0xdc40be&&_0xdc40be!==document[_0x3ed018(0x249)];){const _0x3adf0f=window[_0x3ed018(0x1dd)](_0xdc40be);_0x3ed018(0x223)!==_0x3adf0f[_0x3ed018(0x234)]&&_0x3ed018(0x209)!==_0x3adf0f[_0x3ed018(0x1fc)]||(_0x5043c8[_0x3ed018(0x200)]({'element':_0xdc40be,'originalDisplay':_0xdc40be[_0x3ed018(0x1d3)][_0x3ed018(0x234)],'originalVisibility':_0xdc40be[_0x3ed018(0x1d3)][_0x3ed018(0x1fc)]}),_0xdc40be[_0x3ed018(0x1d3)][_0x3ed018(0x234)]=_0x3ed018(0x22e),_0xdc40be[_0x3ed018(0x1d3)][_0x3ed018(0x1fc)]=_0x3ed018(0x204)),_0xdc40be=_0xdc40be[_0x3ed018(0x1c8)];}return _0x5043c8;}[_0x52093d(0x21a)](){const _0x32236e=_0x52093d;let _0x5dbc75,_0x5b90f7;return this[_0x32236e(0x22d)]?.[_0x32236e(0x215)]?(_0x5dbc75=this[_0x32236e(0x22d)][_0x32236e(0x215)][_0x32236e(0x22f)](!0x0),_0x5b90f7=this[_0x32236e(0x1da)](_0x5dbc75)):(_0x5dbc75=document[_0x32236e(0x217)](_0x32236e(0x240)),_0x5b90f7=_0x5dbc75),{'calculationContainer':_0x5dbc75,'targetContainer':_0x5b90f7};}[_0x52093d(0x1ec)](){const _0x3c95c2=_0x52093d,{calculationContainer:_0x37d365,targetContainer:_0x451019}=this[_0x3c95c2(0x21a)](),_0x7bdabe=this[_0x3c95c2(0x211)]();this[_0x3c95c2(0x1d5)](_0x37d365,_0x7bdabe);const _0x96f152=this[_0x3c95c2(0x22d)]?.[_0x3c95c2(0x215)]||this[_0x3c95c2(0x1d9)],_0x420ab4=_0x96f152?.[_0x3c95c2(0x1c8)];_0x420ab4?_0x420ab4[_0x3c95c2(0x1d6)](_0x37d365):document[_0x3c95c2(0x249)][_0x3c95c2(0x1d6)](_0x37d365),_0x37d365[_0x3c95c2(0x23e)]=_0x451019;const _0x3a247a=this[_0x3c95c2(0x241)](_0x420ab4||null);return _0x37d365[_0x3c95c2(0x202)],_0x37d365[_0x3c95c2(0x1e1)]=_0x3a247a,_0x37d365;}[_0x52093d(0x237)](_0x5bddff,_0x334429){const _0x5e931f=_0x52093d,_0x1d08f3=_0x5bddff[_0x5e931f(0x23e)]||_0x5bddff,_0x13e171=[],{rowCount:_0x59bcba}=this[_0x5e931f(0x220)](_0x1d08f3,_0x334429);if(_0x59bcba<=this[_0x5e931f(0x1cc)][_0x5e931f(0x248)])return _0x13e171;const _0x1a8c36=_0x334429[_0x5e931f(0x21d)]();for(;_0x1a8c36[_0x5e931f(0x252)]>0x0;){if(this[_0x5e931f(0x1fb)](_0x5bddff,_0x1d08f3,_0x1a8c36)){const _0x3d10bf=_0x334429[_0x5e931f(0x1d1)](_0x238d23=>!_0x1a8c36[_0x5e931f(0x21f)](_0x238d23));_0x13e171[_0x5e931f(0x200)](..._0x3d10bf);break;}if(!_0x1a8c36[_0x5e931f(0x1cd)]())break;}return _0x13e171;}[_0x52093d(0x220)](_0x6023da,_0x36beb3){const _0x1263ee=_0x52093d;_0x6023da[_0x1263ee(0x219)]='',_0x36beb3[_0x1263ee(0x1ca)](_0x51df27=>{const _0x1b7f41=_0x1263ee;if(_0x51df27[_0x1b7f41(0x215)]){const _0x3a3c53=_0x51df27[_0x1b7f41(0x215)][_0x1b7f41(0x22f)](!0x0);_0x6023da[_0x1b7f41(0x1d6)](_0x3a3c53);}}),_0x6023da[_0x1263ee(0x202)];const _0x5e6fa2=_0x6023da[_0x1263ee(0x251)],_0x52fb9b=[];return Array[_0x1263ee(0x218)](_0x5e6fa2)[_0x1263ee(0x1ca)](_0x17ba88=>{const _0x415f6d=_0x1263ee,_0x582741=_0x17ba88[_0x415f6d(0x20c)]()[_0x415f6d(0x246)];_0x52fb9b[_0x415f6d(0x254)](_0x40e392=>Math[_0x415f6d(0x1d8)](_0x40e392-_0x582741)<this[_0x415f6d(0x1cc)][_0x415f6d(0x205)])||_0x52fb9b[_0x415f6d(0x200)](_0x582741);}),{'rowCount':_0x52fb9b[_0x1263ee(0x252)]};}[_0x52093d(0x23f)](){const _0x58345b=_0x52093d,_0x1b24e8=document[_0x58345b(0x217)](_0x58345b(0x1ff));return _0x1b24e8[_0x58345b(0x1c9)]=this[_0x58345b(0x1cc)][_0x58345b(0x24a)][_0x58345b(0x1fd)],this[_0x58345b(0x1cc)][_0x58345b(0x24a)][_0x58345b(0x1e4)]&&_0x1b24e8[_0x58345b(0x250)][_0x58345b(0x1fa)](this[_0x58345b(0x1cc)][_0x58345b(0x24a)][_0x58345b(0x1e4)]),_0x1b24e8[_0x58345b(0x210)]=_0x58345b(0x203),_0x1b24e8;}[_0x52093d(0x1fb)](_0x354ac0,_0x468a16,_0x2f307c){const _0x5339e2=_0x52093d;this[_0x5339e2(0x220)](_0x468a16,_0x2f307c);const _0x1d8f14=this[_0x5339e2(0x23f)]();_0x354ac0[_0x5339e2(0x1d6)](_0x1d8f14),_0x354ac0[_0x5339e2(0x202)];const _0x2f977b=[..._0x468a16[_0x5339e2(0x251)],_0x1d8f14],_0x5ec0ba=[];_0x2f977b[_0x5339e2(0x1ca)](_0x1415fa=>{const _0x151ade=_0x5339e2,_0x212df2=_0x1415fa[_0x151ade(0x20c)]()[_0x151ade(0x246)];_0x5ec0ba[_0x151ade(0x254)](_0x1a1bb4=>Math[_0x151ade(0x1d8)](_0x1a1bb4-_0x212df2)<this[_0x151ade(0x1cc)][_0x151ade(0x205)])||_0x5ec0ba[_0x151ade(0x200)](_0x212df2);});const _0x20660c=_0x5ec0ba[_0x5339e2(0x252)];return _0x1d8f14[_0x5339e2(0x224)](),_0x20660c<=this[_0x5339e2(0x1cc)][_0x5339e2(0x248)];}[_0x52093d(0x1c4)](_0x3c81a4,_0x46400b){const _0x571f2a=_0x52093d;this[_0x571f2a(0x239)][_0x571f2a(0x1ee)](),this[_0x571f2a(0x1c5)][_0x571f2a(0x1ee)](),_0x3c81a4[_0x571f2a(0x1ca)](_0x466a5d=>{const _0x544ad6=_0x571f2a;_0x46400b[_0x544ad6(0x21f)](_0x466a5d)?this[_0x544ad6(0x1c5)][_0x544ad6(0x1fa)](_0x466a5d):this[_0x544ad6(0x239)][_0x544ad6(0x1fa)](_0x466a5d);});}[_0x52093d(0x1df)](_0x46ba04){const _0x5f0c4e=_0x52093d;if(_0x46ba04>0x0&&!this[_0x5f0c4e(0x1e0)]&&this[_0x5f0c4e(0x212)](),_0x46ba04>0x0&&this[_0x5f0c4e(0x1e0)]){const _0x5610b9=''+this[_0x5f0c4e(0x1cc)][_0x5f0c4e(0x1f9)]+(_0x46ba04<0x63?_0x46ba04:'99');this[_0x5f0c4e(0x1e0)][_0x5f0c4e(0x23a)]=_0x5610b9;}this[_0x5f0c4e(0x1de)](),this[_0x5f0c4e(0x1f2)](),this[_0x5f0c4e(0x20b)]();}[_0x52093d(0x206)](_0x39d5e4,_0x5462a0){const _0x28ae6c=_0x52093d;this[_0x28ae6c(0x1c4)](_0x39d5e4,_0x5462a0),this[_0x28ae6c(0x1df)](_0x5462a0[_0x28ae6c(0x252)]);}[_0x52093d(0x24f)](){const _0x423c5e=_0x52093d;this[_0x423c5e(0x1d9)]&&_0x423c5e(0x243)!=typeof IntersectionObserver&&(this[_0x423c5e(0x1ce)]=new IntersectionObserver(_0x1d38ff=>{const _0x1cb38f=_0x423c5e;_0x1d38ff[0x0][_0x1cb38f(0x1ef)]&&this[_0x1cb38f(0x20d)]&&requestAnimationFrame(()=>{const _0x3526d8=_0x1cb38f;this[_0x3526d8(0x229)]();});},{'threshold':0.01,'rootMargin':_0x423c5e(0x255)}),this[_0x423c5e(0x1ce)][_0x423c5e(0x1e6)](this[_0x423c5e(0x1d9)]));}[_0x52093d(0x1f6)](){const _0x3eaf3c=_0x52093d;if(!this[_0x3eaf3c(0x1d9)])return!0x1;if(!this[_0x3eaf3c(0x1d9)][_0x3eaf3c(0x201)])return!0x1;const _0x265ec4=this[_0x3eaf3c(0x1d9)][_0x3eaf3c(0x20c)]();if(0x0===_0x265ec4[_0x3eaf3c(0x1cb)]||0x0===_0x265ec4[_0x3eaf3c(0x1f5)])return!0x1;const _0x4220c3=window[_0x3eaf3c(0x230)]||document[_0x3eaf3c(0x214)][_0x3eaf3c(0x208)],_0x5bd1c9=window[_0x3eaf3c(0x23b)]||document[_0x3eaf3c(0x214)][_0x3eaf3c(0x1ed)],_0x1417ff=0xc8;return _0x265ec4[_0x3eaf3c(0x21b)]>=-0xc8&&_0x265ec4[_0x3eaf3c(0x246)]<=_0x4220c3+_0x1417ff&&_0x265ec4[_0x3eaf3c(0x228)]>=-0xc8&&_0x265ec4[_0x3eaf3c(0x1e7)]<=_0x5bd1c9+_0x1417ff;}}
|
|
@@ -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
|
+
const _0x4527e6=_0x72a0;function _0x72a0(_0x59fbed,_0x2a6036){const _0x515ac8=_0x515a();return _0x72a0=function(_0x72a08c,_0x152b27){_0x72a08c=_0x72a08c-0x18a;let _0x57fe8a=_0x515ac8[_0x72a08c];return _0x57fe8a;},_0x72a0(_0x59fbed,_0x2a6036);}(function(_0x5c43fa,_0x42fcaa){const _0x29da33=_0x72a0,_0x38d24e=_0x5c43fa();while(!![]){try{const _0x3a2d91=parseInt(_0x29da33(0x1c1))/0x1+-parseInt(_0x29da33(0x1aa))/0x2+-parseInt(_0x29da33(0x1a4))/0x3*(-parseInt(_0x29da33(0x1c7))/0x4)+parseInt(_0x29da33(0x1c0))/0x5*(-parseInt(_0x29da33(0x1a3))/0x6)+-parseInt(_0x29da33(0x1ba))/0x7*(parseInt(_0x29da33(0x1cc))/0x8)+parseInt(_0x29da33(0x1b9))/0x9*(-parseInt(_0x29da33(0x1b5))/0xa)+parseInt(_0x29da33(0x1c9))/0xb;if(_0x3a2d91===_0x42fcaa)break;else _0x38d24e['push'](_0x38d24e['shift']());}catch(_0x41a537){_0x38d24e['push'](_0x38d24e['shift']());}}}(_0x515a,0x20256));import{ButtonView as _0x3b9fe1,IconView as _0x37284d}from'ckeditor5/src/ui.js';import{IconClose as _0x1ff91f,IconDocument as _0x558281,IconFileUpload as _0x126d77,IconLink as _0x1e366f,IconSelection as _0x57b773}from'@ckeditor/ckeditor5-icons';import{getTranslation as _0x22602f}from'../../../aicore/utils/common-translations.js';import{AISpinnerView as _0x1b0a60}from'../../../aicore/ui/aispinner.js';function _0x515a(){const _0x16b2b1=['ck-ai-chat-context-chip_new-chip','ck-ai-chat-context-chip__label','_createTemplateAttributes','fire','small','ck-ai-chat-context-chip__type-icon','execute','addEventListener','locale','length','AI_CHAT_CONTEXT_REMOVE_FROM_CONTEXT','_setupRemoveButtonEvent','397194BlXZxK','2487zFIrox','itemType','content','ck-ai-chat-context-chip','webkitAnimationEnd','_createIconView','373942YHbdLE','ck-ai-chat-context-chip_document','remove','removeEventListener','set','tooltip','disableAnimationOnEnter','add','isVisible','classList','lastIndexOf','1416130iOjnyJ','extendTemplate','uiId','_createLoaderIcon','9DZnXXD','1281gfKTcW','slice','_handleAnimationEndOnce','bindTemplate','ck-ai-chat-context-chip_wide','bind','5YgOnir','9159yUaOWU','isLoading','removeContextItemChip','element','type','render','932TTKVLN','label','5399350RQUNqT','_createLabelElement','animationend','7288aEsPNX','_setupTemplate','document','_createRemoveButton','ck-hidden','_initializeProperties','span','_createTemplateChildren','_isAnimationOnEnterEnabled','setTemplate','selection','readonly','ck-ai-chat-context-controls__chip-tooltip','div'];_0x515a=function(){return _0x16b2b1;};return _0x515a();}const un={'file':_0x126d77,'document':_0x558281,'web-resource':_0x1e366f,'text':_0x126d77,'selection':_0x57b773},_n=_0x4527e6(0x1a7),kn=_0x4527e6(0x1be),xn=_0x4527e6(0x1ab),bn=_0x4527e6(0x198),wn=_0x4527e6(0x19c),Tn=_0x4527e6(0x195),En='n';export class AIChatContextItemButtonView extends _0x3b9fe1{constructor(_0x77d15c,_0x4b142f,_0xf0df0d,_0x17f921,_0x5c7664=!0x1){const _0x377e05=_0x4527e6;super(_0x77d15c),this[_0x377e05(0x191)]=_0x17f921,this[_0x377e05(0x18e)](_0x4b142f,_0xf0df0d,_0x5c7664),this[_0x377e05(0x18a)]();}[_0x4527e6(0x1c6)](){const _0x1e9af3=_0x4527e6;super[_0x1e9af3(0x1c6)](),this[_0x1e9af3(0x191)]&&this[_0x1e9af3(0x1c4)]&&(this[_0x1e9af3(0x1c4)][_0x1e9af3(0x1b3)][_0x1e9af3(0x1b1)](_0x1e9af3(0x197)),this[_0x1e9af3(0x1bc)](this[_0x1e9af3(0x1c4)],()=>{const _0x4a203c=_0x1e9af3;this[_0x4a203c(0x1c4)]&&this[_0x4a203c(0x1c4)][_0x4a203c(0x1b3)][_0x4a203c(0x1ac)](_0x4a203c(0x197));}));}[_0x4527e6(0x1b0)](){const _0x1f4270=_0x4527e6;this[_0x1f4270(0x191)]=!0x1,this[_0x1f4270(0x1c4)]&&this[_0x1f4270(0x1c4)][_0x1f4270(0x1b3)][_0x1f4270(0x1ac)](_0x1f4270(0x197));}[_0x4527e6(0x18e)](_0xbfe6dd,_0x5b5015,_0x1e4dee){const _0x1eef18=_0x4527e6;this[_0x1eef18(0x1ae)](_0x1eef18(0x1c8),_0xbfe6dd[_0x1eef18(0x1c8)]),this[_0x1eef18(0x1ae)](_0x1eef18(0x1af),!0x0),this[_0x1eef18(0x1ae)](_0x1eef18(0x1a5),_0xbfe6dd[_0x1eef18(0x1c5)]),this[_0x1eef18(0x1ae)]('id',_0xbfe6dd[_0x1eef18(0x1b7)]),this[_0x1eef18(0x1ae)](_0x1eef18(0x194),_0x5b5015),this[_0x1eef18(0x1ae)](_0x1eef18(0x1c2),_0x1e4dee);}[_0x4527e6(0x18a)](){const _0x121f20=_0x4527e6,_0x510b1f=this[_0x121f20(0x1a9)](),_0xd2c87c=this[_0x121f20(0x18c)](),_0x3bf6df=this[_0x121f20(0x1bd)];this[_0x121f20(0x192)]({'tag':_0x121f20(0x196),'attributes':this[_0x121f20(0x199)](_0x3bf6df),'children':this[_0x121f20(0x190)](_0x510b1f,_0xd2c87c,_0x3bf6df)});}[_0x4527e6(0x199)](_0x53f6f2){const _0x6e63f2=_0x4527e6;return{'class':[_n,_0x53f6f2['if'](_0x6e63f2(0x1a5),xn,_0x27bbdd=>_0x6e63f2(0x18b)==_0x27bbdd),_0x53f6f2['if'](_0x6e63f2(0x1a5),kn,_0x5b2764=>_0x6e63f2(0x193)==_0x5b2764)],'data-cke-tooltip-text':_0x53f6f2['to'](_0x6e63f2(0x1c8),fn),'data-cke-tooltip-position':En,'data-cke-tooltip-class':Tn};}[_0x4527e6(0x190)](_0x28f83d,_0x2c3b02,_0x4788d4){const _0x495104=_0x4527e6,_0x429e1c=this[_0x495104(0x1ca)](_0x4788d4),_0x26205e=this[_0x495104(0x1b8)]();return this[_0x495104(0x194)]?[_0x28f83d,_0x429e1c]:[_0x28f83d,_0x26205e,_0x429e1c,_0x2c3b02];}[_0x4527e6(0x1ca)](_0x5b44b6){const _0x146f71=_0x4527e6;return{'tag':_0x146f71(0x18f),'attributes':{'class':bn},'children':[{'text':_0x5b44b6['to'](_0x146f71(0x1c8))}]};}[_0x4527e6(0x18c)](){const _0x396388=_0x4527e6,_0x5c818e=new _0x3b9fe1(this[_0x396388(0x19f)]);return _0x5c818e[_0x396388(0x1ae)]({'label':_0x22602f(this[_0x396388(0x19f)],_0x396388(0x1a1)),'icon':_0x1ff91f}),this[_0x396388(0x1a2)](_0x5c818e),_0x5c818e;}[_0x4527e6(0x1a2)](_0x9413ad){const _0x3b331f=_0x4527e6;_0x9413ad['on'](_0x3b331f(0x19d),()=>{const _0x10a31e=_0x3b331f;this[_0x10a31e(0x19a)](_0x10a31e(0x1c3),this['id']);});}[_0x4527e6(0x1a9)](){const _0x3a1087=_0x4527e6,_0xc2253f=this[_0x3a1087(0x1bd)],_0x35da1c=new _0x37284d();return _0x35da1c[_0x3a1087(0x1a6)]=un[this[_0x3a1087(0x1a5)]],_0x35da1c[_0x3a1087(0x1b6)]({'attributes':{'class':[wn,_0xc2253f['if'](_0x3a1087(0x1c2),_0x3a1087(0x18d),_0x19e8a9=>_0x19e8a9)]}}),_0x35da1c;}[_0x4527e6(0x1bc)](_0x179153,_0x432330){const _0x2cf5b2=_0x4527e6;if(!_0x179153)return;const _0x49d8a6=()=>{const _0x252652=_0x72a0;_0x432330(),_0x179153[_0x252652(0x1ad)](_0x252652(0x1cb),_0x49d8a6),_0x179153[_0x252652(0x1ad)](_0x252652(0x1a8),_0x49d8a6);};_0x179153[_0x2cf5b2(0x19e)](_0x2cf5b2(0x1cb),_0x49d8a6),_0x179153[_0x2cf5b2(0x19e)](_0x2cf5b2(0x1a8),_0x49d8a6);}[_0x4527e6(0x1b8)](){const _0x17cccf=_0x4527e6,_0x5b63c8=new _0x1b0a60(_0x17cccf(0x19b));return _0x5b63c8[_0x17cccf(0x1bf)](_0x17cccf(0x1b2))['to'](this,_0x17cccf(0x1c2),_0x1c3742=>_0x1c3742),_0x5b63c8;}}function fn(_0x3ca3a9){const _0xd24bf7=_0x4527e6;if(!_0x3ca3a9)return _0x3ca3a9;if(_0x3ca3a9[_0xd24bf7(0x1a0)]<=0x78)return _0x3ca3a9;const _0x473db7=_0x3ca3a9[_0xd24bf7(0x1bb)](0x0,0x78),_0x292a08=_0x473db7[_0xd24bf7(0x1b4)]('\x20');return(_0x292a08>0x0?_0x473db7[_0xd24bf7(0x1bb)](0x0,_0x292a08):_0x473db7)+'…';}
|
|
@@ -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
|
+
function _0x4c58(_0x3ee35a,_0x72b146){const _0x20256d=_0x2025();return _0x4c58=function(_0x4c5858,_0x5c6bc6){_0x4c5858=_0x4c5858-0x6e;let _0x425a27=_0x20256d[_0x4c5858];return _0x425a27;},_0x4c58(_0x3ee35a,_0x72b146);}function _0x2025(){const _0x57bad8=['ck-ai-header\x20ck-ai-header_small\x20ck-ai-header_context-url','ck-button-icon\x20ck-button-back','children','esc','_setupEventHandlers','forEach','confirmButton','submitUrl','setTemplate','stop','value','div','execute','form','_createConfirmButton','AI_CHAT_CONTEXT_URL_PLACEHOLDER','tab','20ThWNOV','backButton','clearError','_handleSubmit','setError','trim','_setupKeystrokes','431420daFJZG','urlInputField','errorText','ck-button-icon','fire','10286871hXUWOG','_setupTemplate','focus','locale','AI_CHAT_CONTEXT_URL_INVALID_ERROR','AI_CHAT_CONTEXT_URL_LABEL','_createBackButton','listenTo','isEnabled','createCollection','length','_focusables','_isValidUrl','submit','AI_CHAT_CONTEXT_URL_BACK_TO_CONTEXT','AI_CHAT_CONTEXT_URL_EMPTY_ERROR','render','shift+tab','input','406320DjMiOX','focusCycler','set','focusTracker','_updateConfirmButtonState','ck-ai-chat-context-controls__url-input-section','1571788ZLvINP','element','clear','cancel','destroy','5440896JRJYXW','AI_CHAT_CONTEXT_URL_ADD_URL','ck-labeled-field-view_empty','1431942AEdZOo','add','keystrokes','refreshBalloon','_createUrlInputField','getValue','1503592KliHMO','fieldView','ck-ai-chat-context-controls__url-form'];_0x2025=function(){return _0x57bad8;};return _0x2025();}const _0x2d68e9=_0x4c58;(function(_0x495529,_0x487865){const _0x1fa2d4=_0x4c58,_0x2faf44=_0x495529();while(!![]){try{const _0x21c225=-parseInt(_0x1fa2d4(0x97))/0x1+-parseInt(_0x1fa2d4(0xaf))/0x2+-parseInt(_0x1fa2d4(0x76))/0x3+-parseInt(_0x1fa2d4(0x6e))/0x4*(-parseInt(_0x1fa2d4(0x90))/0x5)+-parseInt(_0x1fa2d4(0x73))/0x6+parseInt(_0x1fa2d4(0x9c))/0x7+-parseInt(_0x1fa2d4(0x7c))/0x8;if(_0x21c225===_0x487865)break;else _0x2faf44['push'](_0x2faf44['shift']());}catch(_0x45965a){_0x2faf44['push'](_0x2faf44['shift']());}}}(_0x2025,0xcbc7a));import{FocusTracker as _0x3a611f,KeystrokeHandler as _0x1cb961}from'ckeditor5/src/utils.js';import{ButtonView as _0x574ae2,FocusCycler as _0x1d7729,LabeledFieldView as _0x178ba2,View as _0x39293b,FormHeaderView as _0x14f960,createLabeledInputText as _0x17e705,submitHandler as _0x19ae3d}from'ckeditor5/src/ui.js';import{IconCheck as _0x361e11,IconPreviousArrow as _0x5b2780}from'@ckeditor/ckeditor5-icons';import{getTranslation as _0x36354e}from'../../../aicore/utils/common-translations.js';const eh=_0x2d68e9(0x7e),hh=_0x2d68e9(0xb4);export class AIChatContextPanelUrlInputView extends _0x39293b{[_0x2d68e9(0xb2)];[_0x2d68e9(0x78)];[_0x2d68e9(0xa7)];[_0x2d68e9(0xb0)];[_0x2d68e9(0x98)];[_0x2d68e9(0x91)];[_0x2d68e9(0x85)];constructor(_0x4873f2){const _0x4f86ce=_0x2d68e9;super(_0x4873f2),this[_0x4f86ce(0xb2)]=new _0x3a611f(),this[_0x4f86ce(0x78)]=new _0x1cb961(),this[_0x4f86ce(0x91)]=this[_0x4f86ce(0xa2)](),this[_0x4f86ce(0x98)]=this[_0x4f86ce(0x7a)](),this[_0x4f86ce(0x85)]=this[_0x4f86ce(0x8d)](),this[_0x4f86ce(0xa7)]=this[_0x4f86ce(0xa5)]([this[_0x4f86ce(0x91)],this[_0x4f86ce(0x98)],this[_0x4f86ce(0x85)]]),this[_0x4f86ce(0xb0)]=new _0x1d7729({'focusables':this[_0x4f86ce(0xa7)],'focusTracker':this[_0x4f86ce(0xb2)],'keystrokeHandler':this[_0x4f86ce(0x78)],'actions':{'focusPrevious':_0x4f86ce(0xad),'focusNext':_0x4f86ce(0x8f)}}),this[_0x4f86ce(0x9d)](),this[_0x4f86ce(0x83)](),this[_0x4f86ce(0x96)]();}[_0x2d68e9(0xac)](){const _0x65d571=_0x2d68e9;super[_0x65d571(0xac)](),this[_0x65d571(0xa7)][_0x65d571(0x84)](_0x552c18=>{const _0x10dab2=_0x65d571;this[_0x10dab2(0xb2)][_0x10dab2(0x77)](_0x552c18[_0x10dab2(0x6f)]),this[_0x10dab2(0x78)][_0x10dab2(0xa3)](_0x552c18[_0x10dab2(0x6f)]);}),_0x19ae3d({'view':this}),this[_0x65d571(0x9e)]();}[_0x2d68e9(0x72)](){const _0x443810=_0x2d68e9;super[_0x443810(0x72)](),this[_0x443810(0xb2)][_0x443810(0x72)](),this[_0x443810(0x78)][_0x443810(0x72)]();}[_0x2d68e9(0x9e)](){const _0x49a1aa=_0x2d68e9;this[_0x49a1aa(0x98)][_0x49a1aa(0x9e)]();}[_0x2d68e9(0x7b)](){const _0x31fb51=_0x2d68e9;return this[_0x31fb51(0x98)][_0x31fb51(0x7d)][_0x31fb51(0x6f)]?.[_0x31fb51(0x89)]?.[_0x31fb51(0x95)]()||'';}[_0x2d68e9(0x70)](){const _0x2bc149=_0x2d68e9;this[_0x2bc149(0x98)][_0x2bc149(0x7d)][_0x2bc149(0x6f)][_0x2bc149(0x89)]='',this[_0x2bc149(0x98)][_0x2bc149(0x99)]=null,this[_0x2bc149(0x85)][_0x2bc149(0xa4)]=!0x1;}[_0x2d68e9(0x94)](_0x2172b6){const _0x4bc6a6=_0x2d68e9;this[_0x4bc6a6(0x98)][_0x4bc6a6(0x99)]=_0x2172b6,this[_0x4bc6a6(0xb3)](),this[_0x4bc6a6(0x9b)](_0x4bc6a6(0x79));}[_0x2d68e9(0x92)](){const _0x924205=_0x2d68e9;this[_0x924205(0x98)][_0x924205(0x99)]=null,this[_0x924205(0xb3)]();}[_0x2d68e9(0xa2)](){const _0x21e742=_0x2d68e9,_0x236e1f=new _0x574ae2(this[_0x21e742(0x9f)]);return _0x236e1f[_0x21e742(0xb1)]({'icon':_0x5b2780,'tooltip':_0x36354e(this[_0x21e742(0x9f)],_0x21e742(0xaa)),'tooltipPosition':'n','class':_0x21e742(0x80)}),_0x236e1f;}[_0x2d68e9(0x7a)](){const _0x3f6331=_0x2d68e9,_0x2067d6=new _0x178ba2(this[_0x3f6331(0x9f)],_0x17e705);return _0x2067d6[_0x3f6331(0xb1)]({'label':_0x36354e(this[_0x3f6331(0x9f)],_0x3f6331(0xa1)),'class':_0x3f6331(0x75)}),_0x2067d6[_0x3f6331(0x7d)][_0x3f6331(0xb1)]({'placeholder':_0x36354e(this[_0x3f6331(0x9f)],_0x3f6331(0x8e))}),_0x2067d6;}[_0x2d68e9(0x8d)](){const _0xb08dae=_0x2d68e9,_0x2901be=new _0x574ae2(this[_0xb08dae(0x9f)]);return _0x2901be[_0xb08dae(0xb1)]({'icon':_0x361e11,'tooltip':_0x36354e(this[_0xb08dae(0x9f)],_0xb08dae(0x74)),'tooltipPosition':'n','class':_0xb08dae(0x9a),'type':_0xb08dae(0xa9),'isEnabled':!0x1}),_0x2901be;}[_0x2d68e9(0x9d)](){const _0x37b0ce=_0x2d68e9,_0x37e4a1=new _0x14f960(this[_0x37b0ce(0x9f)],{'label':_0x36354e(this[_0x37b0ce(0x9f)],_0x37b0ce(0x74)),'class':_0x37b0ce(0x7f)});_0x37e4a1[_0x37b0ce(0x81)][_0x37b0ce(0x77)](this[_0x37b0ce(0x91)],0x0),this[_0x37b0ce(0x87)]({'tag':_0x37b0ce(0x8c),'attributes':{'class':eh,'tabindex':'-1'},'children':[_0x37e4a1,{'tag':_0x37b0ce(0x8a),'attributes':{'class':hh},'children':[this[_0x37b0ce(0x98)],this[_0x37b0ce(0x85)]]}]});}[_0x2d68e9(0x83)](){const _0x15e378=_0x2d68e9;this[_0x15e378(0x91)]['on'](_0x15e378(0x8b),()=>{const _0x5777b4=_0x15e378;this[_0x5777b4(0x70)](),this[_0x5777b4(0x9b)](_0x5777b4(0x71));}),this[_0x15e378(0x98)][_0x15e378(0x7d)]['on'](_0x15e378(0xae),()=>{const _0x2e6a1b=_0x15e378;this[_0x2e6a1b(0x92)](),this[_0x2e6a1b(0xb3)](),this[_0x2e6a1b(0x9b)](_0x2e6a1b(0x79));}),this['on'](_0x15e378(0xa9),_0x36cf09=>{const _0x3f3f29=_0x15e378;_0x36cf09[_0x3f3f29(0x88)](),this[_0x3f3f29(0x93)]();});}[_0x2d68e9(0x96)](){const _0x401a17=_0x2d68e9;this[_0x401a17(0x78)][_0x401a17(0xb1)](_0x401a17(0x82),(_0x3086ba,_0x9dbb98)=>{const _0x30db16=_0x401a17;this[_0x30db16(0x70)](),this[_0x30db16(0x9b)](_0x30db16(0x71)),_0x9dbb98();});}[_0x2d68e9(0x93)](){const _0x24d11c=_0x2d68e9,_0x4ac91b=this[_0x24d11c(0x7b)]()[_0x24d11c(0x95)]();_0x4ac91b?this[_0x24d11c(0xa8)](_0x4ac91b)?(this[_0x24d11c(0x92)](),this[_0x24d11c(0x9b)](_0x24d11c(0x86),_0x4ac91b)):this[_0x24d11c(0x94)](_0x36354e(this[_0x24d11c(0x9f)],_0x24d11c(0xa0))):this[_0x24d11c(0x94)](_0x36354e(this[_0x24d11c(0x9f)],_0x24d11c(0xab)));}[_0x2d68e9(0xb3)](){const _0x22688f=_0x2d68e9,_0x3bbd68=this[_0x22688f(0x7b)]()[_0x22688f(0x95)](),_0x2d1111=!!this[_0x22688f(0x98)][_0x22688f(0x99)];this[_0x22688f(0x85)][_0x22688f(0xa4)]=_0x3bbd68[_0x22688f(0xa6)]>0x0&&!_0x2d1111;}[_0x2d68e9(0xa8)](_0x34f3bc){try{return!!new URL(_0x34f3bc);}catch{return!0x1;}}}
|