@ckeditor/ckeditor5-list 0.0.0-internal-20241017.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/CHANGELOG.md +4 -0
- package/LICENSE.md +17 -0
- package/README.md +26 -0
- package/build/list.js +5 -0
- package/build/translations/ar.js +1 -0
- package/build/translations/ast.js +1 -0
- package/build/translations/az.js +1 -0
- package/build/translations/bg.js +1 -0
- package/build/translations/bn.js +1 -0
- package/build/translations/ca.js +1 -0
- package/build/translations/cs.js +1 -0
- package/build/translations/da.js +1 -0
- package/build/translations/de-ch.js +1 -0
- package/build/translations/de.js +1 -0
- package/build/translations/el.js +1 -0
- package/build/translations/en-au.js +1 -0
- package/build/translations/en-gb.js +1 -0
- package/build/translations/eo.js +1 -0
- package/build/translations/es.js +1 -0
- package/build/translations/et.js +1 -0
- package/build/translations/eu.js +1 -0
- package/build/translations/fa.js +1 -0
- package/build/translations/fi.js +1 -0
- package/build/translations/fr.js +1 -0
- package/build/translations/gl.js +1 -0
- package/build/translations/he.js +1 -0
- package/build/translations/hi.js +1 -0
- package/build/translations/hr.js +1 -0
- package/build/translations/hu.js +1 -0
- package/build/translations/id.js +1 -0
- package/build/translations/it.js +1 -0
- package/build/translations/ja.js +1 -0
- package/build/translations/jv.js +1 -0
- package/build/translations/km.js +1 -0
- package/build/translations/kn.js +1 -0
- package/build/translations/ko.js +1 -0
- package/build/translations/ku.js +1 -0
- package/build/translations/lt.js +1 -0
- package/build/translations/lv.js +1 -0
- package/build/translations/ms.js +1 -0
- package/build/translations/nb.js +1 -0
- package/build/translations/ne.js +1 -0
- package/build/translations/nl.js +1 -0
- package/build/translations/no.js +1 -0
- package/build/translations/pl.js +1 -0
- package/build/translations/pt-br.js +1 -0
- package/build/translations/pt.js +1 -0
- package/build/translations/ro.js +1 -0
- package/build/translations/ru.js +1 -0
- package/build/translations/si.js +1 -0
- package/build/translations/sk.js +1 -0
- package/build/translations/sq.js +1 -0
- package/build/translations/sr-latn.js +1 -0
- package/build/translations/sr.js +1 -0
- package/build/translations/sv.js +1 -0
- package/build/translations/th.js +1 -0
- package/build/translations/ti.js +1 -0
- package/build/translations/tk.js +1 -0
- package/build/translations/tr.js +1 -0
- package/build/translations/tt.js +1 -0
- package/build/translations/ug.js +1 -0
- package/build/translations/uk.js +1 -0
- package/build/translations/ur.js +1 -0
- package/build/translations/uz.js +1 -0
- package/build/translations/vi.js +1 -0
- package/build/translations/zh-cn.js +1 -0
- package/build/translations/zh.js +1 -0
- package/ckeditor5-metadata.json +193 -0
- package/dist/augmentation.d.ts +57 -0
- package/dist/documentlist.d.ts +36 -0
- package/dist/documentlistproperties.d.ts +36 -0
- package/dist/index-content.css +116 -0
- package/dist/index-editor.css +82 -0
- package/dist/index.css +238 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.ts +49 -0
- package/dist/index.js +7994 -0
- package/dist/index.js.map +1 -0
- package/dist/legacylist/legacyconverters.d.ts +200 -0
- package/dist/legacylist/legacyindentcommand.d.ts +41 -0
- package/dist/legacylist/legacylistcommand.d.ts +60 -0
- package/dist/legacylist/legacylistediting.d.ts +40 -0
- package/dist/legacylist/legacylistutils.d.ts +49 -0
- package/dist/legacylist/legacyutils.d.ts +105 -0
- package/dist/legacylist.d.ts +34 -0
- package/dist/legacylistproperties/legacylistpropertiesediting.d.ts +80 -0
- package/dist/legacylistproperties/legacylistreversedcommand.d.ts +42 -0
- package/dist/legacylistproperties/legacyliststartcommand.d.ts +41 -0
- package/dist/legacylistproperties/legacyliststylecommand.d.ts +71 -0
- package/dist/legacylistproperties.d.ts +35 -0
- package/dist/legacytodolist/legacychecktodolistcommand.d.ts +56 -0
- package/dist/legacytodolist/legacytodolistconverters.d.ts +87 -0
- package/dist/legacytodolist/legacytodolistediting.d.ts +54 -0
- package/dist/legacytodolist.d.ts +35 -0
- package/dist/list/adjacentlistssupport.d.ts +23 -0
- package/dist/list/converters.d.ts +69 -0
- package/dist/list/listcommand.d.ts +96 -0
- package/dist/list/listediting.d.ts +230 -0
- package/dist/list/listindentcommand.d.ts +66 -0
- package/dist/list/listmergecommand.d.ts +80 -0
- package/dist/list/listsplitcommand.d.ts +71 -0
- package/dist/list/listui.d.ts +27 -0
- package/dist/list/listutils.d.ts +60 -0
- package/dist/list/utils/listwalker.d.ts +146 -0
- package/dist/list/utils/model.d.ts +213 -0
- package/dist/list/utils/postfixers.d.ts +41 -0
- package/dist/list/utils/view.d.ts +86 -0
- package/dist/list/utils.d.ts +22 -0
- package/dist/list.d.ts +34 -0
- package/dist/listconfig.d.ts +164 -0
- package/dist/listproperties/converters.d.ts +23 -0
- package/dist/listproperties/listpropertiesediting.d.ts +96 -0
- package/dist/listproperties/listpropertiesui.d.ts +31 -0
- package/dist/listproperties/listpropertiesutils.d.ts +41 -0
- package/dist/listproperties/listreversedcommand.d.ts +40 -0
- package/dist/listproperties/liststartcommand.d.ts +42 -0
- package/dist/listproperties/liststylecommand.d.ts +76 -0
- package/dist/listproperties/ui/listpropertiesview.d.ts +160 -0
- package/dist/listproperties/utils/config.d.ts +39 -0
- package/dist/listproperties/utils/style.d.ts +24 -0
- package/dist/listproperties.d.ts +35 -0
- package/dist/tododocumentlist.d.ts +36 -0
- package/dist/todolist/checktodolistcommand.d.ts +53 -0
- package/dist/todolist/todocheckboxchangeobserver.d.ts +45 -0
- package/dist/todolist/todolistediting.d.ts +53 -0
- package/dist/todolist/todolistui.d.ts +27 -0
- package/dist/todolist.d.ts +35 -0
- package/dist/translations/ar.d.ts +8 -0
- package/dist/translations/ar.js +5 -0
- package/dist/translations/ar.umd.js +11 -0
- package/dist/translations/ast.d.ts +8 -0
- package/dist/translations/ast.js +5 -0
- package/dist/translations/ast.umd.js +11 -0
- package/dist/translations/az.d.ts +8 -0
- package/dist/translations/az.js +5 -0
- package/dist/translations/az.umd.js +11 -0
- package/dist/translations/bg.d.ts +8 -0
- package/dist/translations/bg.js +5 -0
- package/dist/translations/bg.umd.js +11 -0
- package/dist/translations/bn.d.ts +8 -0
- package/dist/translations/bn.js +5 -0
- package/dist/translations/bn.umd.js +11 -0
- package/dist/translations/ca.d.ts +8 -0
- package/dist/translations/ca.js +5 -0
- package/dist/translations/ca.umd.js +11 -0
- package/dist/translations/cs.d.ts +8 -0
- package/dist/translations/cs.js +5 -0
- package/dist/translations/cs.umd.js +11 -0
- package/dist/translations/da.d.ts +8 -0
- package/dist/translations/da.js +5 -0
- package/dist/translations/da.umd.js +11 -0
- package/dist/translations/de-ch.d.ts +8 -0
- package/dist/translations/de-ch.js +5 -0
- package/dist/translations/de-ch.umd.js +11 -0
- package/dist/translations/de.d.ts +8 -0
- package/dist/translations/de.js +5 -0
- package/dist/translations/de.umd.js +11 -0
- package/dist/translations/el.d.ts +8 -0
- package/dist/translations/el.js +5 -0
- package/dist/translations/el.umd.js +11 -0
- package/dist/translations/en-au.d.ts +8 -0
- package/dist/translations/en-au.js +5 -0
- package/dist/translations/en-au.umd.js +11 -0
- package/dist/translations/en-gb.d.ts +8 -0
- package/dist/translations/en-gb.js +5 -0
- package/dist/translations/en-gb.umd.js +11 -0
- package/dist/translations/en.d.ts +8 -0
- package/dist/translations/en.js +5 -0
- package/dist/translations/en.umd.js +11 -0
- package/dist/translations/eo.d.ts +8 -0
- package/dist/translations/eo.js +5 -0
- package/dist/translations/eo.umd.js +11 -0
- package/dist/translations/es.d.ts +8 -0
- package/dist/translations/es.js +5 -0
- package/dist/translations/es.umd.js +11 -0
- package/dist/translations/et.d.ts +8 -0
- package/dist/translations/et.js +5 -0
- package/dist/translations/et.umd.js +11 -0
- package/dist/translations/eu.d.ts +8 -0
- package/dist/translations/eu.js +5 -0
- package/dist/translations/eu.umd.js +11 -0
- package/dist/translations/fa.d.ts +8 -0
- package/dist/translations/fa.js +5 -0
- package/dist/translations/fa.umd.js +11 -0
- package/dist/translations/fi.d.ts +8 -0
- package/dist/translations/fi.js +5 -0
- package/dist/translations/fi.umd.js +11 -0
- package/dist/translations/fr.d.ts +8 -0
- package/dist/translations/fr.js +5 -0
- package/dist/translations/fr.umd.js +11 -0
- package/dist/translations/gl.d.ts +8 -0
- package/dist/translations/gl.js +5 -0
- package/dist/translations/gl.umd.js +11 -0
- package/dist/translations/he.d.ts +8 -0
- package/dist/translations/he.js +5 -0
- package/dist/translations/he.umd.js +11 -0
- package/dist/translations/hi.d.ts +8 -0
- package/dist/translations/hi.js +5 -0
- package/dist/translations/hi.umd.js +11 -0
- package/dist/translations/hr.d.ts +8 -0
- package/dist/translations/hr.js +5 -0
- package/dist/translations/hr.umd.js +11 -0
- package/dist/translations/hu.d.ts +8 -0
- package/dist/translations/hu.js +5 -0
- package/dist/translations/hu.umd.js +11 -0
- package/dist/translations/id.d.ts +8 -0
- package/dist/translations/id.js +5 -0
- package/dist/translations/id.umd.js +11 -0
- package/dist/translations/it.d.ts +8 -0
- package/dist/translations/it.js +5 -0
- package/dist/translations/it.umd.js +11 -0
- package/dist/translations/ja.d.ts +8 -0
- package/dist/translations/ja.js +5 -0
- package/dist/translations/ja.umd.js +11 -0
- package/dist/translations/jv.d.ts +8 -0
- package/dist/translations/jv.js +5 -0
- package/dist/translations/jv.umd.js +11 -0
- package/dist/translations/km.d.ts +8 -0
- package/dist/translations/km.js +5 -0
- package/dist/translations/km.umd.js +11 -0
- package/dist/translations/kn.d.ts +8 -0
- package/dist/translations/kn.js +5 -0
- package/dist/translations/kn.umd.js +11 -0
- package/dist/translations/ko.d.ts +8 -0
- package/dist/translations/ko.js +5 -0
- package/dist/translations/ko.umd.js +11 -0
- package/dist/translations/ku.d.ts +8 -0
- package/dist/translations/ku.js +5 -0
- package/dist/translations/ku.umd.js +11 -0
- package/dist/translations/lt.d.ts +8 -0
- package/dist/translations/lt.js +5 -0
- package/dist/translations/lt.umd.js +11 -0
- package/dist/translations/lv.d.ts +8 -0
- package/dist/translations/lv.js +5 -0
- package/dist/translations/lv.umd.js +11 -0
- package/dist/translations/ms.d.ts +8 -0
- package/dist/translations/ms.js +5 -0
- package/dist/translations/ms.umd.js +11 -0
- package/dist/translations/nb.d.ts +8 -0
- package/dist/translations/nb.js +5 -0
- package/dist/translations/nb.umd.js +11 -0
- package/dist/translations/ne.d.ts +8 -0
- package/dist/translations/ne.js +5 -0
- package/dist/translations/ne.umd.js +11 -0
- package/dist/translations/nl.d.ts +8 -0
- package/dist/translations/nl.js +5 -0
- package/dist/translations/nl.umd.js +11 -0
- package/dist/translations/no.d.ts +8 -0
- package/dist/translations/no.js +5 -0
- package/dist/translations/no.umd.js +11 -0
- package/dist/translations/pl.d.ts +8 -0
- package/dist/translations/pl.js +5 -0
- package/dist/translations/pl.umd.js +11 -0
- package/dist/translations/pt-br.d.ts +8 -0
- package/dist/translations/pt-br.js +5 -0
- package/dist/translations/pt-br.umd.js +11 -0
- package/dist/translations/pt.d.ts +8 -0
- package/dist/translations/pt.js +5 -0
- package/dist/translations/pt.umd.js +11 -0
- package/dist/translations/ro.d.ts +8 -0
- package/dist/translations/ro.js +5 -0
- package/dist/translations/ro.umd.js +11 -0
- package/dist/translations/ru.d.ts +8 -0
- package/dist/translations/ru.js +5 -0
- package/dist/translations/ru.umd.js +11 -0
- package/dist/translations/si.d.ts +8 -0
- package/dist/translations/si.js +5 -0
- package/dist/translations/si.umd.js +11 -0
- package/dist/translations/sk.d.ts +8 -0
- package/dist/translations/sk.js +5 -0
- package/dist/translations/sk.umd.js +11 -0
- package/dist/translations/sq.d.ts +8 -0
- package/dist/translations/sq.js +5 -0
- package/dist/translations/sq.umd.js +11 -0
- package/dist/translations/sr-latn.d.ts +8 -0
- package/dist/translations/sr-latn.js +5 -0
- package/dist/translations/sr-latn.umd.js +11 -0
- package/dist/translations/sr.d.ts +8 -0
- package/dist/translations/sr.js +5 -0
- package/dist/translations/sr.umd.js +11 -0
- package/dist/translations/sv.d.ts +8 -0
- package/dist/translations/sv.js +5 -0
- package/dist/translations/sv.umd.js +11 -0
- package/dist/translations/th.d.ts +8 -0
- package/dist/translations/th.js +5 -0
- package/dist/translations/th.umd.js +11 -0
- package/dist/translations/ti.d.ts +8 -0
- package/dist/translations/ti.js +5 -0
- package/dist/translations/ti.umd.js +11 -0
- package/dist/translations/tk.d.ts +8 -0
- package/dist/translations/tk.js +5 -0
- package/dist/translations/tk.umd.js +11 -0
- package/dist/translations/tr.d.ts +8 -0
- package/dist/translations/tr.js +5 -0
- package/dist/translations/tr.umd.js +11 -0
- package/dist/translations/tt.d.ts +8 -0
- package/dist/translations/tt.js +5 -0
- package/dist/translations/tt.umd.js +11 -0
- package/dist/translations/ug.d.ts +8 -0
- package/dist/translations/ug.js +5 -0
- package/dist/translations/ug.umd.js +11 -0
- package/dist/translations/uk.d.ts +8 -0
- package/dist/translations/uk.js +5 -0
- package/dist/translations/uk.umd.js +11 -0
- package/dist/translations/ur.d.ts +8 -0
- package/dist/translations/ur.js +5 -0
- package/dist/translations/ur.umd.js +11 -0
- package/dist/translations/uz.d.ts +8 -0
- package/dist/translations/uz.js +5 -0
- package/dist/translations/uz.umd.js +11 -0
- package/dist/translations/vi.d.ts +8 -0
- package/dist/translations/vi.js +5 -0
- package/dist/translations/vi.umd.js +11 -0
- package/dist/translations/zh-cn.d.ts +8 -0
- package/dist/translations/zh-cn.js +5 -0
- package/dist/translations/zh-cn.umd.js +11 -0
- package/dist/translations/zh.d.ts +8 -0
- package/dist/translations/zh.js +5 -0
- package/dist/translations/zh.umd.js +11 -0
- package/lang/contexts.json +35 -0
- package/lang/translations/ar.po +150 -0
- package/lang/translations/ast.po +150 -0
- package/lang/translations/az.po +150 -0
- package/lang/translations/bg.po +150 -0
- package/lang/translations/bn.po +150 -0
- package/lang/translations/ca.po +150 -0
- package/lang/translations/cs.po +150 -0
- package/lang/translations/da.po +150 -0
- package/lang/translations/de-ch.po +150 -0
- package/lang/translations/de.po +150 -0
- package/lang/translations/el.po +150 -0
- package/lang/translations/en-au.po +150 -0
- package/lang/translations/en-gb.po +150 -0
- package/lang/translations/en.po +150 -0
- package/lang/translations/eo.po +150 -0
- package/lang/translations/es.po +150 -0
- package/lang/translations/et.po +150 -0
- package/lang/translations/eu.po +150 -0
- package/lang/translations/fa.po +150 -0
- package/lang/translations/fi.po +150 -0
- package/lang/translations/fr.po +150 -0
- package/lang/translations/gl.po +150 -0
- package/lang/translations/he.po +150 -0
- package/lang/translations/hi.po +150 -0
- package/lang/translations/hr.po +150 -0
- package/lang/translations/hu.po +150 -0
- package/lang/translations/id.po +150 -0
- package/lang/translations/it.po +150 -0
- package/lang/translations/ja.po +150 -0
- package/lang/translations/jv.po +150 -0
- package/lang/translations/km.po +150 -0
- package/lang/translations/kn.po +150 -0
- package/lang/translations/ko.po +150 -0
- package/lang/translations/ku.po +150 -0
- package/lang/translations/lt.po +150 -0
- package/lang/translations/lv.po +150 -0
- package/lang/translations/ms.po +150 -0
- package/lang/translations/nb.po +150 -0
- package/lang/translations/ne.po +150 -0
- package/lang/translations/nl.po +150 -0
- package/lang/translations/no.po +150 -0
- package/lang/translations/pl.po +150 -0
- package/lang/translations/pt-br.po +150 -0
- package/lang/translations/pt.po +150 -0
- package/lang/translations/ro.po +150 -0
- package/lang/translations/ru.po +150 -0
- package/lang/translations/si.po +150 -0
- package/lang/translations/sk.po +150 -0
- package/lang/translations/sq.po +150 -0
- package/lang/translations/sr-latn.po +150 -0
- package/lang/translations/sr.po +150 -0
- package/lang/translations/sv.po +150 -0
- package/lang/translations/th.po +150 -0
- package/lang/translations/ti.po +150 -0
- package/lang/translations/tk.po +150 -0
- package/lang/translations/tr.po +150 -0
- package/lang/translations/tt.po +150 -0
- package/lang/translations/ug.po +150 -0
- package/lang/translations/uk.po +150 -0
- package/lang/translations/ur.po +150 -0
- package/lang/translations/uz.po +150 -0
- package/lang/translations/vi.po +150 -0
- package/lang/translations/zh-cn.po +150 -0
- package/lang/translations/zh.po +150 -0
- package/package.json +45 -0
- package/src/augmentation.d.ts +53 -0
- package/src/augmentation.js +5 -0
- package/src/documentlist.d.ts +32 -0
- package/src/documentlist.js +47 -0
- package/src/documentlistproperties.d.ts +32 -0
- package/src/documentlistproperties.js +47 -0
- package/src/index.d.ts +45 -0
- package/src/index.js +39 -0
- package/src/legacylist/legacyconverters.d.ts +196 -0
- package/src/legacylist/legacyconverters.js +905 -0
- package/src/legacylist/legacyindentcommand.d.ts +37 -0
- package/src/legacylist/legacyindentcommand.js +107 -0
- package/src/legacylist/legacylistcommand.d.ts +56 -0
- package/src/legacylist/legacylistcommand.js +274 -0
- package/src/legacylist/legacylistediting.d.ts +36 -0
- package/src/legacylist/legacylistediting.js +167 -0
- package/src/legacylist/legacylistutils.d.ts +45 -0
- package/src/legacylist/legacylistutils.js +52 -0
- package/src/legacylist/legacyutils.d.ts +101 -0
- package/src/legacylist/legacyutils.js +347 -0
- package/src/legacylist.d.ts +30 -0
- package/src/legacylist.js +36 -0
- package/src/legacylistproperties/legacylistpropertiesediting.d.ts +76 -0
- package/src/legacylistproperties/legacylistpropertiesediting.js +702 -0
- package/src/legacylistproperties/legacylistreversedcommand.d.ts +38 -0
- package/src/legacylistproperties/legacylistreversedcommand.js +52 -0
- package/src/legacylistproperties/legacyliststartcommand.d.ts +37 -0
- package/src/legacylistproperties/legacyliststartcommand.js +51 -0
- package/src/legacylistproperties/legacyliststylecommand.d.ts +67 -0
- package/src/legacylistproperties/legacyliststylecommand.js +100 -0
- package/src/legacylistproperties.d.ts +31 -0
- package/src/legacylistproperties.js +37 -0
- package/src/legacytodolist/legacychecktodolistcommand.d.ts +52 -0
- package/src/legacytodolist/legacychecktodolistcommand.js +76 -0
- package/src/legacytodolist/legacytodolistconverters.d.ts +83 -0
- package/src/legacytodolist/legacytodolistconverters.js +261 -0
- package/src/legacytodolist/legacytodolistediting.d.ts +50 -0
- package/src/legacytodolist/legacytodolistediting.js +199 -0
- package/src/legacytodolist.d.ts +31 -0
- package/src/legacytodolist.js +37 -0
- package/src/list/adjacentlistssupport.d.ts +19 -0
- package/src/list/adjacentlistssupport.js +87 -0
- package/src/list/converters.d.ts +65 -0
- package/src/list/converters.js +491 -0
- package/src/list/listcommand.d.ts +92 -0
- package/src/list/listcommand.js +163 -0
- package/src/list/listediting.d.ts +226 -0
- package/src/list/listediting.js +678 -0
- package/src/list/listindentcommand.d.ts +62 -0
- package/src/list/listindentcommand.js +129 -0
- package/src/list/listmergecommand.d.ts +76 -0
- package/src/list/listmergecommand.js +174 -0
- package/src/list/listsplitcommand.d.ts +67 -0
- package/src/list/listsplitcommand.js +70 -0
- package/src/list/listui.d.ts +23 -0
- package/src/list/listui.js +41 -0
- package/src/list/listutils.d.ts +56 -0
- package/src/list/listutils.js +62 -0
- package/src/list/utils/listwalker.d.ts +142 -0
- package/src/list/utils/listwalker.js +182 -0
- package/src/list/utils/model.d.ts +209 -0
- package/src/list/utils/model.js +464 -0
- package/src/list/utils/postfixers.d.ts +37 -0
- package/src/list/utils/postfixers.js +126 -0
- package/src/list/utils/view.d.ts +82 -0
- package/src/list/utils/view.js +117 -0
- package/src/list/utils.d.ts +18 -0
- package/src/list/utils.js +51 -0
- package/src/list.d.ts +30 -0
- package/src/list.js +36 -0
- package/src/listconfig.d.ts +160 -0
- package/src/listconfig.js +5 -0
- package/src/listproperties/converters.d.ts +19 -0
- package/src/listproperties/converters.js +43 -0
- package/src/listproperties/listpropertiesediting.d.ts +92 -0
- package/src/listproperties/listpropertiesediting.js +275 -0
- package/src/listproperties/listpropertiesui.d.ts +27 -0
- package/src/listproperties/listpropertiesui.js +371 -0
- package/src/listproperties/listpropertiesutils.d.ts +37 -0
- package/src/listproperties/listpropertiesutils.js +50 -0
- package/src/listproperties/listreversedcommand.d.ts +36 -0
- package/src/listproperties/listreversedcommand.js +55 -0
- package/src/listproperties/liststartcommand.d.ts +38 -0
- package/src/listproperties/liststartcommand.js +60 -0
- package/src/listproperties/liststylecommand.d.ts +72 -0
- package/src/listproperties/liststylecommand.js +113 -0
- package/src/listproperties/ui/listpropertiesview.d.ts +156 -0
- package/src/listproperties/ui/listpropertiesview.js +301 -0
- package/src/listproperties/utils/config.d.ts +35 -0
- package/src/listproperties/utils/config.js +70 -0
- package/src/listproperties/utils/style.d.ts +20 -0
- package/src/listproperties/utils/style.js +54 -0
- package/src/listproperties.d.ts +31 -0
- package/src/listproperties.js +37 -0
- package/src/tododocumentlist.d.ts +32 -0
- package/src/tododocumentlist.js +47 -0
- package/src/todolist/checktodolistcommand.d.ts +49 -0
- package/src/todolist/checktodolistcommand.js +82 -0
- package/src/todolist/todocheckboxchangeobserver.d.ts +41 -0
- package/src/todolist/todocheckboxchangeobserver.js +37 -0
- package/src/todolist/todolistediting.d.ts +49 -0
- package/src/todolist/todolistediting.js +470 -0
- package/src/todolist/todolistui.d.ts +23 -0
- package/src/todolist/todolistui.js +34 -0
- package/src/todolist.d.ts +31 -0
- package/src/todolist.js +37 -0
- package/theme/documentlist.css +8 -0
- package/theme/icons/liststylecircle.svg +1 -0
- package/theme/icons/liststyledecimal.svg +1 -0
- package/theme/icons/liststyledecimalleadingzero.svg +1 -0
- package/theme/icons/liststyledisc.svg +1 -0
- package/theme/icons/liststylelowerlatin.svg +1 -0
- package/theme/icons/liststylelowerroman.svg +1 -0
- package/theme/icons/liststylesquare.svg +1 -0
- package/theme/icons/liststyleupperlatin.svg +1 -0
- package/theme/icons/liststyleupperroman.svg +1 -0
- package/theme/list.css +40 -0
- package/theme/listproperties.css +10 -0
- package/theme/liststyles.css +8 -0
- package/theme/todolist.css +140 -0
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module list/listproperties/ui/listpropertiesview
|
|
7
|
+
*/
|
|
8
|
+
import { View, ViewCollection, FocusCycler, SwitchButtonView, LabeledFieldView, createLabeledInputNumber, addKeyboardHandlingForGrid, CollapsibleView } from 'ckeditor5/src/ui.js';
|
|
9
|
+
import { FocusTracker, KeystrokeHandler, global } from 'ckeditor5/src/utils.js';
|
|
10
|
+
import '../../../theme/listproperties.css';
|
|
11
|
+
/**
|
|
12
|
+
* The list properties view to be displayed in the list dropdown.
|
|
13
|
+
*
|
|
14
|
+
* Contains a grid of available list styles and, for numbered list, also the list start index and reversed fields.
|
|
15
|
+
*
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export default class ListPropertiesView extends View {
|
|
19
|
+
/**
|
|
20
|
+
* Creates an instance of the list properties view.
|
|
21
|
+
*
|
|
22
|
+
* @param locale The {@link module:core/editor/editor~Editor#locale} instance.
|
|
23
|
+
* @param options Options of the view.
|
|
24
|
+
* @param options.enabledProperties An object containing the configuration of enabled list property names.
|
|
25
|
+
* Allows conditional rendering the sub-components of the properties view.
|
|
26
|
+
* @param options.styleButtonViews A list of style buttons to be rendered
|
|
27
|
+
* inside the styles grid. The grid will not be rendered when `enabledProperties` does not include the `'styles'` key.
|
|
28
|
+
* @param options.styleGridAriaLabel An assistive technologies label set on the grid of styles (if the grid is rendered).
|
|
29
|
+
*/
|
|
30
|
+
constructor(locale, { enabledProperties, styleButtonViews, styleGridAriaLabel }) {
|
|
31
|
+
super(locale);
|
|
32
|
+
/**
|
|
33
|
+
* A view that renders the grid of list styles.
|
|
34
|
+
*/
|
|
35
|
+
this.stylesView = null;
|
|
36
|
+
/**
|
|
37
|
+
* A collapsible view that hosts additional list property fields ({@link #startIndexFieldView} and
|
|
38
|
+
* {@link #reversedSwitchButtonView}) to visually separate them from the {@link #stylesView grid of styles}.
|
|
39
|
+
*
|
|
40
|
+
* **Note**: Only present when:
|
|
41
|
+
* * the view represents **numbered** list properties,
|
|
42
|
+
* * and the {@link #stylesView} is rendered,
|
|
43
|
+
* * and either {@link #startIndexFieldView} or {@link #reversedSwitchButtonView} is rendered.
|
|
44
|
+
*
|
|
45
|
+
* @readonly
|
|
46
|
+
*/
|
|
47
|
+
this.additionalPropertiesCollapsibleView = null;
|
|
48
|
+
/**
|
|
49
|
+
* A labeled number field allowing the user to set the start index of the list.
|
|
50
|
+
*
|
|
51
|
+
* **Note**: Only present when the view represents **numbered** list properties.
|
|
52
|
+
*
|
|
53
|
+
* @readonly
|
|
54
|
+
*/
|
|
55
|
+
this.startIndexFieldView = null;
|
|
56
|
+
/**
|
|
57
|
+
* A switch button allowing the user to make the edited list reversed.
|
|
58
|
+
*
|
|
59
|
+
* **Note**: Only present when the view represents **numbered** list properties.
|
|
60
|
+
*
|
|
61
|
+
* @readonly
|
|
62
|
+
*/
|
|
63
|
+
this.reversedSwitchButtonView = null;
|
|
64
|
+
/**
|
|
65
|
+
* Tracks information about the DOM focus in the view.
|
|
66
|
+
*/
|
|
67
|
+
this.focusTracker = new FocusTracker();
|
|
68
|
+
/**
|
|
69
|
+
* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
|
|
70
|
+
*/
|
|
71
|
+
this.keystrokes = new KeystrokeHandler();
|
|
72
|
+
/**
|
|
73
|
+
* A collection of views that can be focused in the properties view.
|
|
74
|
+
*/
|
|
75
|
+
this.focusables = new ViewCollection();
|
|
76
|
+
const elementCssClasses = [
|
|
77
|
+
'ck',
|
|
78
|
+
'ck-list-properties'
|
|
79
|
+
];
|
|
80
|
+
this.children = this.createCollection();
|
|
81
|
+
this.focusCycler = new FocusCycler({
|
|
82
|
+
focusables: this.focusables,
|
|
83
|
+
focusTracker: this.focusTracker,
|
|
84
|
+
keystrokeHandler: this.keystrokes,
|
|
85
|
+
actions: {
|
|
86
|
+
// Navigate #children backwards using the <kbd>Shift</kbd> + <kbd>Tab</kbd> keystroke.
|
|
87
|
+
focusPrevious: 'shift + tab',
|
|
88
|
+
// Navigate #children forwards using the <kbd>Tab</kbd> key.
|
|
89
|
+
focusNext: 'tab'
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
// The rendering of the styles grid is conditional. When there is no styles grid, the view will render without collapsible
|
|
93
|
+
// for numbered list properties, hence simplifying the layout.
|
|
94
|
+
if (styleButtonViews && styleButtonViews.length) {
|
|
95
|
+
this.stylesView = this._createStylesView(styleButtonViews, styleGridAriaLabel);
|
|
96
|
+
this.children.add(this.stylesView);
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
elementCssClasses.push('ck-list-properties_without-styles');
|
|
100
|
+
}
|
|
101
|
+
// The rendering of the numbered list property views is also conditional. It only makes sense for the numbered list
|
|
102
|
+
// dropdown. The unordered list does not have such properties.
|
|
103
|
+
if (enabledProperties.startIndex || enabledProperties.reversed) {
|
|
104
|
+
this._addNumberedListPropertyViews(enabledProperties);
|
|
105
|
+
elementCssClasses.push('ck-list-properties_with-numbered-properties');
|
|
106
|
+
}
|
|
107
|
+
this.setTemplate({
|
|
108
|
+
tag: 'div',
|
|
109
|
+
attributes: {
|
|
110
|
+
class: elementCssClasses
|
|
111
|
+
},
|
|
112
|
+
children: this.children
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* @inheritDoc
|
|
117
|
+
*/
|
|
118
|
+
render() {
|
|
119
|
+
super.render();
|
|
120
|
+
if (this.stylesView) {
|
|
121
|
+
this.focusables.add(this.stylesView);
|
|
122
|
+
this.focusTracker.add(this.stylesView.element);
|
|
123
|
+
// Register the collapsible toggle button to the focus system.
|
|
124
|
+
if (this.startIndexFieldView || this.reversedSwitchButtonView) {
|
|
125
|
+
this.focusables.add(this.children.last.buttonView);
|
|
126
|
+
this.focusTracker.add(this.children.last.buttonView.element);
|
|
127
|
+
}
|
|
128
|
+
for (const item of this.stylesView.children) {
|
|
129
|
+
this.stylesView.focusTracker.add(item.element);
|
|
130
|
+
}
|
|
131
|
+
addKeyboardHandlingForGrid({
|
|
132
|
+
keystrokeHandler: this.stylesView.keystrokes,
|
|
133
|
+
focusTracker: this.stylesView.focusTracker,
|
|
134
|
+
gridItems: this.stylesView.children,
|
|
135
|
+
// Note: The styles view has a different number of columns depending on whether the other properties
|
|
136
|
+
// are enabled in the dropdown or not (https://github.com/ckeditor/ckeditor5/issues/12340)
|
|
137
|
+
numberOfColumns: () => global.window
|
|
138
|
+
.getComputedStyle(this.stylesView.element)
|
|
139
|
+
.getPropertyValue('grid-template-columns')
|
|
140
|
+
.split(' ')
|
|
141
|
+
.length,
|
|
142
|
+
uiLanguageDirection: this.locale && this.locale.uiLanguageDirection
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
if (this.startIndexFieldView) {
|
|
146
|
+
this.focusables.add(this.startIndexFieldView);
|
|
147
|
+
this.focusTracker.add(this.startIndexFieldView.element);
|
|
148
|
+
const stopPropagation = (data) => data.stopPropagation();
|
|
149
|
+
// Since the form is in the dropdown panel which is a child of the toolbar, the toolbar's
|
|
150
|
+
// keystroke handler would take over the key management in the input. We need to prevent
|
|
151
|
+
// this ASAP. Otherwise, the basic caret movement using the arrow keys will be impossible.
|
|
152
|
+
this.keystrokes.set('arrowright', stopPropagation);
|
|
153
|
+
this.keystrokes.set('arrowleft', stopPropagation);
|
|
154
|
+
this.keystrokes.set('arrowup', stopPropagation);
|
|
155
|
+
this.keystrokes.set('arrowdown', stopPropagation);
|
|
156
|
+
}
|
|
157
|
+
if (this.reversedSwitchButtonView) {
|
|
158
|
+
this.focusables.add(this.reversedSwitchButtonView);
|
|
159
|
+
this.focusTracker.add(this.reversedSwitchButtonView.element);
|
|
160
|
+
}
|
|
161
|
+
// Start listening for the keystrokes coming from #element.
|
|
162
|
+
this.keystrokes.listenTo(this.element);
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* @inheritDoc
|
|
166
|
+
*/
|
|
167
|
+
focus() {
|
|
168
|
+
this.focusCycler.focusFirst();
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* @inheritDoc
|
|
172
|
+
*/
|
|
173
|
+
focusLast() {
|
|
174
|
+
this.focusCycler.focusLast();
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* @inheritDoc
|
|
178
|
+
*/
|
|
179
|
+
destroy() {
|
|
180
|
+
super.destroy();
|
|
181
|
+
this.focusTracker.destroy();
|
|
182
|
+
this.keystrokes.destroy();
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Creates the list styles grid.
|
|
186
|
+
*
|
|
187
|
+
* @param styleButtons Buttons to be placed in the grid.
|
|
188
|
+
* @param styleGridAriaLabel The assistive technology label of the grid.
|
|
189
|
+
*/
|
|
190
|
+
_createStylesView(styleButtons, styleGridAriaLabel) {
|
|
191
|
+
const stylesView = new View(this.locale);
|
|
192
|
+
stylesView.children = stylesView.createCollection();
|
|
193
|
+
stylesView.children.addMany(styleButtons);
|
|
194
|
+
stylesView.setTemplate({
|
|
195
|
+
tag: 'div',
|
|
196
|
+
attributes: {
|
|
197
|
+
'aria-label': styleGridAriaLabel,
|
|
198
|
+
class: [
|
|
199
|
+
'ck',
|
|
200
|
+
'ck-list-styles-list'
|
|
201
|
+
]
|
|
202
|
+
},
|
|
203
|
+
children: stylesView.children
|
|
204
|
+
});
|
|
205
|
+
stylesView.children.delegate('execute').to(this);
|
|
206
|
+
stylesView.focus = function () {
|
|
207
|
+
this.children.first.focus();
|
|
208
|
+
};
|
|
209
|
+
stylesView.focusTracker = new FocusTracker();
|
|
210
|
+
stylesView.keystrokes = new KeystrokeHandler();
|
|
211
|
+
stylesView.render();
|
|
212
|
+
stylesView.keystrokes.listenTo(stylesView.element);
|
|
213
|
+
return stylesView;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Renders {@link #startIndexFieldView} and/or {@link #reversedSwitchButtonView} depending on the configuration of the properties view.
|
|
217
|
+
*
|
|
218
|
+
* @param enabledProperties An object containing the configuration of enabled list property names
|
|
219
|
+
* (see {@link #constructor}).
|
|
220
|
+
*/
|
|
221
|
+
_addNumberedListPropertyViews(enabledProperties) {
|
|
222
|
+
const t = this.locale.t;
|
|
223
|
+
const numberedPropertyViews = [];
|
|
224
|
+
if (enabledProperties.startIndex) {
|
|
225
|
+
this.startIndexFieldView = this._createStartIndexField();
|
|
226
|
+
numberedPropertyViews.push(this.startIndexFieldView);
|
|
227
|
+
}
|
|
228
|
+
if (enabledProperties.reversed) {
|
|
229
|
+
this.reversedSwitchButtonView = this._createReversedSwitchButton();
|
|
230
|
+
numberedPropertyViews.push(this.reversedSwitchButtonView);
|
|
231
|
+
}
|
|
232
|
+
// When there are some style buttons, pack the numbered list properties into a collapsible to separate them.
|
|
233
|
+
if (this.stylesView) {
|
|
234
|
+
this.additionalPropertiesCollapsibleView = new CollapsibleView(this.locale, numberedPropertyViews);
|
|
235
|
+
this.additionalPropertiesCollapsibleView.set({
|
|
236
|
+
label: t('List properties'),
|
|
237
|
+
isCollapsed: true
|
|
238
|
+
});
|
|
239
|
+
// Don't enable the collapsible view unless either start index or reversed field is enabled (e.g. when no list is selected).
|
|
240
|
+
this.additionalPropertiesCollapsibleView.buttonView.bind('isEnabled').toMany(numberedPropertyViews, 'isEnabled', (...areEnabled) => areEnabled.some(isEnabled => isEnabled));
|
|
241
|
+
// Automatically collapse the additional properties collapsible when either start index or reversed field gets disabled.
|
|
242
|
+
this.additionalPropertiesCollapsibleView.buttonView.on('change:isEnabled', (evt, data, isEnabled) => {
|
|
243
|
+
if (!isEnabled) {
|
|
244
|
+
this.additionalPropertiesCollapsibleView.isCollapsed = true;
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
this.children.add(this.additionalPropertiesCollapsibleView);
|
|
248
|
+
}
|
|
249
|
+
else {
|
|
250
|
+
this.children.addMany(numberedPropertyViews);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Creates the list start index labeled field.
|
|
255
|
+
*/
|
|
256
|
+
_createStartIndexField() {
|
|
257
|
+
const t = this.locale.t;
|
|
258
|
+
const startIndexFieldView = new LabeledFieldView(this.locale, createLabeledInputNumber);
|
|
259
|
+
startIndexFieldView.set({
|
|
260
|
+
label: t('Start at'),
|
|
261
|
+
class: 'ck-numbered-list-properties__start-index'
|
|
262
|
+
});
|
|
263
|
+
startIndexFieldView.fieldView.set({
|
|
264
|
+
min: 0,
|
|
265
|
+
step: 1,
|
|
266
|
+
value: 1,
|
|
267
|
+
inputMode: 'numeric'
|
|
268
|
+
});
|
|
269
|
+
startIndexFieldView.fieldView.on('input', () => {
|
|
270
|
+
const inputElement = startIndexFieldView.fieldView.element;
|
|
271
|
+
const startIndex = inputElement.valueAsNumber;
|
|
272
|
+
if (Number.isNaN(startIndex)) {
|
|
273
|
+
// Number inputs allow for the entry of characters that may result in NaN,
|
|
274
|
+
// such as 'e', '+', '123e', '2-'.
|
|
275
|
+
startIndexFieldView.errorText = t('Invalid start index value.');
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
if (!inputElement.checkValidity()) {
|
|
279
|
+
startIndexFieldView.errorText = t('Start index must be greater than 0.');
|
|
280
|
+
}
|
|
281
|
+
else {
|
|
282
|
+
this.fire('listStart', { startIndex });
|
|
283
|
+
}
|
|
284
|
+
});
|
|
285
|
+
return startIndexFieldView;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Creates the reversed list switch button.
|
|
289
|
+
*/
|
|
290
|
+
_createReversedSwitchButton() {
|
|
291
|
+
const t = this.locale.t;
|
|
292
|
+
const reversedButtonView = new SwitchButtonView(this.locale);
|
|
293
|
+
reversedButtonView.set({
|
|
294
|
+
withText: true,
|
|
295
|
+
label: t('Reversed order'),
|
|
296
|
+
class: 'ck-numbered-list-properties__reversed-order'
|
|
297
|
+
});
|
|
298
|
+
reversedButtonView.delegate('execute').to(this, 'listReversed');
|
|
299
|
+
return reversedButtonView;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
import type { ListPropertiesConfig, ListPropertiesStyleListType } from '../../listconfig.js';
|
|
6
|
+
/**
|
|
7
|
+
* Normalizes {@link module:list/listconfig~ListPropertiesConfig} in the configuration of the list properties feature.
|
|
8
|
+
* The structure of normalized list properties options looks as follows:
|
|
9
|
+
*
|
|
10
|
+
* ```ts
|
|
11
|
+
* {
|
|
12
|
+
* styles: {
|
|
13
|
+
* listTypes: [ 'bulleted', 'numbered' ],
|
|
14
|
+
* useAttribute: false
|
|
15
|
+
* },
|
|
16
|
+
* startIndex: true,
|
|
17
|
+
* reversed: true
|
|
18
|
+
* }
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* @param config The list properties {@link module:list/listconfig~ListPropertiesConfig config}.
|
|
22
|
+
* @returns An object with normalized list properties options.
|
|
23
|
+
*/
|
|
24
|
+
export declare function getNormalizedConfig(config: ListPropertiesConfig): NormalizedListPropertiesConfig;
|
|
25
|
+
/**
|
|
26
|
+
* Normalized list properties config.
|
|
27
|
+
*/
|
|
28
|
+
export type NormalizedListPropertiesConfig = {
|
|
29
|
+
styles: {
|
|
30
|
+
listTypes: Array<ListPropertiesStyleListType>;
|
|
31
|
+
useAttribute: boolean;
|
|
32
|
+
};
|
|
33
|
+
startIndex: boolean;
|
|
34
|
+
reversed: boolean;
|
|
35
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module list/listproperties/utils/config
|
|
7
|
+
*/
|
|
8
|
+
import { toArray } from 'ckeditor5/src/utils.js';
|
|
9
|
+
/**
|
|
10
|
+
* Normalizes {@link module:list/listconfig~ListPropertiesConfig} in the configuration of the list properties feature.
|
|
11
|
+
* The structure of normalized list properties options looks as follows:
|
|
12
|
+
*
|
|
13
|
+
* ```ts
|
|
14
|
+
* {
|
|
15
|
+
* styles: {
|
|
16
|
+
* listTypes: [ 'bulleted', 'numbered' ],
|
|
17
|
+
* useAttribute: false
|
|
18
|
+
* },
|
|
19
|
+
* startIndex: true,
|
|
20
|
+
* reversed: true
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @param config The list properties {@link module:list/listconfig~ListPropertiesConfig config}.
|
|
25
|
+
* @returns An object with normalized list properties options.
|
|
26
|
+
*/
|
|
27
|
+
export function getNormalizedConfig(config) {
|
|
28
|
+
const { startIndex, reversed, styles } = config;
|
|
29
|
+
return {
|
|
30
|
+
styles: getNormalizedStylesConfig(styles),
|
|
31
|
+
startIndex: startIndex || false,
|
|
32
|
+
reversed: reversed || false
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Normalizes styles in the configuration of the list properties feature.
|
|
37
|
+
* The structure of normalized list properties options looks as follows:
|
|
38
|
+
*
|
|
39
|
+
* ```ts
|
|
40
|
+
* {
|
|
41
|
+
* listTypes: [ 'bulleted', 'numbered' ],
|
|
42
|
+
* useAttribute: false
|
|
43
|
+
* }
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* @param styles The list properties styles.
|
|
47
|
+
* @returns An object with normalized list properties styles.
|
|
48
|
+
*/
|
|
49
|
+
function getNormalizedStylesConfig(styles) {
|
|
50
|
+
const normalizedConfig = {
|
|
51
|
+
listTypes: ['bulleted', 'numbered'],
|
|
52
|
+
useAttribute: false
|
|
53
|
+
};
|
|
54
|
+
if (styles === true) {
|
|
55
|
+
return normalizedConfig;
|
|
56
|
+
}
|
|
57
|
+
if (!styles) {
|
|
58
|
+
normalizedConfig.listTypes = [];
|
|
59
|
+
}
|
|
60
|
+
else if (Array.isArray(styles) || typeof styles == 'string') {
|
|
61
|
+
normalizedConfig.listTypes = toArray(styles);
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
normalizedConfig.listTypes = styles.listTypes ?
|
|
65
|
+
toArray(styles.listTypes) :
|
|
66
|
+
normalizedConfig.listTypes;
|
|
67
|
+
normalizedConfig.useAttribute = !!styles.useAttribute;
|
|
68
|
+
}
|
|
69
|
+
return normalizedConfig;
|
|
70
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Gets all the style types supported by given list type.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getAllSupportedStyleTypes(): Array<string>;
|
|
9
|
+
/**
|
|
10
|
+
* Checks whether the given list-style-type is supported by numbered or bulleted list.
|
|
11
|
+
*/
|
|
12
|
+
export declare function getListTypeFromListStyleType(listStyleType: string): 'bulleted' | 'numbered' | null;
|
|
13
|
+
/**
|
|
14
|
+
* Converts `type` attribute of `<ul>` or `<ol>` elements to `list-style-type` equivalent.
|
|
15
|
+
*/
|
|
16
|
+
export declare function getListStyleTypeFromTypeAttribute(value: string): string | null;
|
|
17
|
+
/**
|
|
18
|
+
* Converts `list-style-type` style to `type` attribute of `<ul>` or `<ol>` elements.
|
|
19
|
+
*/
|
|
20
|
+
export declare function getTypeAttributeFromListStyleType(value: string): string | null;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module list/listproperties/utils/style
|
|
7
|
+
*/
|
|
8
|
+
const LIST_STYLE_TO_LIST_TYPE = {};
|
|
9
|
+
const LIST_STYLE_TO_TYPE_ATTRIBUTE = {};
|
|
10
|
+
const TYPE_ATTRIBUTE_TO_LIST_STYLE = {};
|
|
11
|
+
const LIST_STYLE_TYPES = [
|
|
12
|
+
{ listStyle: 'disc', typeAttribute: 'disc', listType: 'bulleted' },
|
|
13
|
+
{ listStyle: 'circle', typeAttribute: 'circle', listType: 'bulleted' },
|
|
14
|
+
{ listStyle: 'square', typeAttribute: 'square', listType: 'bulleted' },
|
|
15
|
+
{ listStyle: 'decimal', typeAttribute: '1', listType: 'numbered' },
|
|
16
|
+
{ listStyle: 'decimal-leading-zero', typeAttribute: null, listType: 'numbered' },
|
|
17
|
+
{ listStyle: 'lower-roman', typeAttribute: 'i', listType: 'numbered' },
|
|
18
|
+
{ listStyle: 'upper-roman', typeAttribute: 'I', listType: 'numbered' },
|
|
19
|
+
{ listStyle: 'lower-alpha', typeAttribute: 'a', listType: 'numbered' },
|
|
20
|
+
{ listStyle: 'upper-alpha', typeAttribute: 'A', listType: 'numbered' },
|
|
21
|
+
{ listStyle: 'lower-latin', typeAttribute: 'a', listType: 'numbered' },
|
|
22
|
+
{ listStyle: 'upper-latin', typeAttribute: 'A', listType: 'numbered' }
|
|
23
|
+
];
|
|
24
|
+
for (const { listStyle, typeAttribute, listType } of LIST_STYLE_TYPES) {
|
|
25
|
+
LIST_STYLE_TO_LIST_TYPE[listStyle] = listType;
|
|
26
|
+
LIST_STYLE_TO_TYPE_ATTRIBUTE[listStyle] = typeAttribute;
|
|
27
|
+
if (typeAttribute) {
|
|
28
|
+
TYPE_ATTRIBUTE_TO_LIST_STYLE[typeAttribute] = listStyle;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Gets all the style types supported by given list type.
|
|
33
|
+
*/
|
|
34
|
+
export function getAllSupportedStyleTypes() {
|
|
35
|
+
return LIST_STYLE_TYPES.map(x => x.listStyle);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Checks whether the given list-style-type is supported by numbered or bulleted list.
|
|
39
|
+
*/
|
|
40
|
+
export function getListTypeFromListStyleType(listStyleType) {
|
|
41
|
+
return LIST_STYLE_TO_LIST_TYPE[listStyleType] || null;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Converts `type` attribute of `<ul>` or `<ol>` elements to `list-style-type` equivalent.
|
|
45
|
+
*/
|
|
46
|
+
export function getListStyleTypeFromTypeAttribute(value) {
|
|
47
|
+
return TYPE_ATTRIBUTE_TO_LIST_STYLE[value] || null;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Converts `list-style-type` style to `type` attribute of `<ul>` or `<ol>` elements.
|
|
51
|
+
*/
|
|
52
|
+
export function getTypeAttributeFromListStyleType(value) {
|
|
53
|
+
return LIST_STYLE_TO_TYPE_ATTRIBUTE[value] || null;
|
|
54
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module list/listproperties
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import ListPropertiesEditing from './listproperties/listpropertiesediting.js';
|
|
10
|
+
import ListPropertiesUI from './listproperties/listpropertiesui.js';
|
|
11
|
+
/**
|
|
12
|
+
* The list properties feature.
|
|
13
|
+
*
|
|
14
|
+
* This is a "glue" plugin that loads the
|
|
15
|
+
* {@link module:list/listproperties/listpropertiesediting~ListPropertiesEditing list properties
|
|
16
|
+
* editing feature} and the {@link module:list/listproperties/listpropertiesui~ListPropertiesUI list properties UI feature}.
|
|
17
|
+
*/
|
|
18
|
+
export default class ListProperties extends Plugin {
|
|
19
|
+
/**
|
|
20
|
+
* @inheritDoc
|
|
21
|
+
*/
|
|
22
|
+
static get requires(): readonly [typeof ListPropertiesEditing, typeof ListPropertiesUI];
|
|
23
|
+
/**
|
|
24
|
+
* @inheritDoc
|
|
25
|
+
*/
|
|
26
|
+
static get pluginName(): "ListProperties";
|
|
27
|
+
/**
|
|
28
|
+
* @inheritDoc
|
|
29
|
+
*/
|
|
30
|
+
static get isOfficialPlugin(): true;
|
|
31
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module list/listproperties
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import ListPropertiesEditing from './listproperties/listpropertiesediting.js';
|
|
10
|
+
import ListPropertiesUI from './listproperties/listpropertiesui.js';
|
|
11
|
+
/**
|
|
12
|
+
* The list properties feature.
|
|
13
|
+
*
|
|
14
|
+
* This is a "glue" plugin that loads the
|
|
15
|
+
* {@link module:list/listproperties/listpropertiesediting~ListPropertiesEditing list properties
|
|
16
|
+
* editing feature} and the {@link module:list/listproperties/listpropertiesui~ListPropertiesUI list properties UI feature}.
|
|
17
|
+
*/
|
|
18
|
+
export default class ListProperties extends Plugin {
|
|
19
|
+
/**
|
|
20
|
+
* @inheritDoc
|
|
21
|
+
*/
|
|
22
|
+
static get requires() {
|
|
23
|
+
return [ListPropertiesEditing, ListPropertiesUI];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @inheritDoc
|
|
27
|
+
*/
|
|
28
|
+
static get pluginName() {
|
|
29
|
+
return 'ListProperties';
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @inheritDoc
|
|
33
|
+
*/
|
|
34
|
+
static get isOfficialPlugin() {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module list/tododocumentlist
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
9
|
+
import TodoList from './todolist.js';
|
|
10
|
+
/**
|
|
11
|
+
* The to-do list feature.
|
|
12
|
+
*
|
|
13
|
+
* This is an obsolete plugin that exists for backward compatibility only.
|
|
14
|
+
* Use the {@link module:list/todolist~TodoList `TodoList`} instead.
|
|
15
|
+
*
|
|
16
|
+
* @deprecated
|
|
17
|
+
*/
|
|
18
|
+
export default class TodoDocumentList extends Plugin {
|
|
19
|
+
/**
|
|
20
|
+
* @inheritDoc
|
|
21
|
+
*/
|
|
22
|
+
static get requires(): readonly [typeof TodoList];
|
|
23
|
+
/**
|
|
24
|
+
* @inheritDoc
|
|
25
|
+
*/
|
|
26
|
+
static get pluginName(): "TodoDocumentList";
|
|
27
|
+
/**
|
|
28
|
+
* @inheritDoc
|
|
29
|
+
*/
|
|
30
|
+
static get isOfficialPlugin(): true;
|
|
31
|
+
constructor(editor: Editor);
|
|
32
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module list/tododocumentlist
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import { logWarning } from 'ckeditor5/src/utils.js';
|
|
10
|
+
import TodoList from './todolist.js';
|
|
11
|
+
/**
|
|
12
|
+
* The to-do list feature.
|
|
13
|
+
*
|
|
14
|
+
* This is an obsolete plugin that exists for backward compatibility only.
|
|
15
|
+
* Use the {@link module:list/todolist~TodoList `TodoList`} instead.
|
|
16
|
+
*
|
|
17
|
+
* @deprecated
|
|
18
|
+
*/
|
|
19
|
+
export default class TodoDocumentList extends Plugin {
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
static get requires() {
|
|
24
|
+
return [TodoList];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* @inheritDoc
|
|
28
|
+
*/
|
|
29
|
+
static get pluginName() {
|
|
30
|
+
return 'TodoDocumentList';
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* @inheritDoc
|
|
34
|
+
*/
|
|
35
|
+
static get isOfficialPlugin() {
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
constructor(editor) {
|
|
39
|
+
super(editor);
|
|
40
|
+
/**
|
|
41
|
+
* The `TodoDocumentList` plugin is obsolete. Use `TodoList` instead.
|
|
42
|
+
*
|
|
43
|
+
* @error plugin-obsolete-tododocumentlist
|
|
44
|
+
*/
|
|
45
|
+
logWarning('plugin-obsolete-tododocumentlist', { pluginName: 'TodoDocumentList' });
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module list/todolist/checktodolistcommand
|
|
7
|
+
*/
|
|
8
|
+
import { Command, type Editor } from 'ckeditor5/src/core.js';
|
|
9
|
+
/**
|
|
10
|
+
* The check to-do command.
|
|
11
|
+
*
|
|
12
|
+
* The command is registered by the {@link module:list/todolist/todolistediting~TodoListEditing} as
|
|
13
|
+
* the `checkTodoList` editor command.
|
|
14
|
+
*/
|
|
15
|
+
export default class CheckTodoListCommand extends Command {
|
|
16
|
+
/**
|
|
17
|
+
* A list of to-do list items selected by the {@link module:engine/model/selection~Selection}.
|
|
18
|
+
*
|
|
19
|
+
* @observable
|
|
20
|
+
* @readonly
|
|
21
|
+
*/
|
|
22
|
+
value: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* @inheritDoc
|
|
25
|
+
*/
|
|
26
|
+
constructor(editor: Editor);
|
|
27
|
+
/**
|
|
28
|
+
* Updates the command's {@link #value} and {@link #isEnabled} properties based on the current selection.
|
|
29
|
+
*/
|
|
30
|
+
refresh(): void;
|
|
31
|
+
/**
|
|
32
|
+
* Executes the command.
|
|
33
|
+
*
|
|
34
|
+
* @param options.forceValue If set, it will force the command behavior. If `true`, the command will apply
|
|
35
|
+
* the attribute. Otherwise, the command will remove the attribute. If not set, the command will look for its current
|
|
36
|
+
* value to decide what it should do.
|
|
37
|
+
*/
|
|
38
|
+
execute(options?: {
|
|
39
|
+
forceValue?: boolean;
|
|
40
|
+
}): void;
|
|
41
|
+
/**
|
|
42
|
+
* Returns a value for the command.
|
|
43
|
+
*/
|
|
44
|
+
private _getValue;
|
|
45
|
+
/**
|
|
46
|
+
* Gets all to-do list items selected by the {@link module:engine/model/selection~Selection}.
|
|
47
|
+
*/
|
|
48
|
+
private _getSelectedItems;
|
|
49
|
+
}
|