@geoscene/common-components 5.0.19
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 -0
- package/README.md +3 -0
- package/dist/cdn/27FRM3HV.js +2 -0
- package/dist/cdn/2D2NKM3O.js +2 -0
- package/dist/cdn/2FQUZGYJ.js +2 -0
- package/dist/cdn/2S7JKSJD.js +2 -0
- package/dist/cdn/3WYIVRKX.js +2 -0
- package/dist/cdn/4GB75ZTF.js +2 -0
- package/dist/cdn/72K7GT6K.js +2 -0
- package/dist/cdn/AN7IRFRK.js +2 -0
- package/dist/cdn/ASOUKSL6.js +2 -0
- package/dist/cdn/BSDNFTJO.js +2 -0
- package/dist/cdn/E4XZNNVC.js +4 -0
- package/dist/cdn/GZUZQYY5.js +2 -0
- package/dist/cdn/H2BVMF74.js +8208 -0
- package/dist/cdn/HP5Y5YVC.js +2 -0
- package/dist/cdn/N7DIUMSU.js +2 -0
- package/dist/cdn/POFRTJBW.js +2 -0
- package/dist/cdn/RZ3OAEZR.js +2 -0
- package/dist/cdn/RZ3WI4EA.js +2 -0
- package/dist/cdn/SNHG3XBB.js +2 -0
- package/dist/cdn/VTZTPXBM.js +2 -0
- package/dist/cdn/XB5G476Y.js +2 -0
- package/dist/cdn/XTTF5WK3.js +2 -0
- package/dist/cdn/Y2JNAEHH.js +2 -0
- package/dist/cdn/YAJOLKIL.js +2 -0
- package/dist/cdn/YOSOOJIA.js +2 -0
- package/dist/cdn/assets/ckeditor5/translations/af.js +112 -0
- package/dist/cdn/assets/ckeditor5/translations/ar.js +321 -0
- package/dist/cdn/assets/ckeditor5/translations/ast.js +171 -0
- package/dist/cdn/assets/ckeditor5/translations/az.js +292 -0
- package/dist/cdn/assets/ckeditor5/translations/bg.js +319 -0
- package/dist/cdn/assets/ckeditor5/translations/bn.js +314 -0
- package/dist/cdn/assets/ckeditor5/translations/bs.js +163 -0
- package/dist/cdn/assets/ckeditor5/translations/ca.js +318 -0
- package/dist/cdn/assets/ckeditor5/translations/cs.js +314 -0
- package/dist/cdn/assets/ckeditor5/translations/da.js +314 -0
- package/dist/cdn/assets/ckeditor5/translations/de-ch.js +295 -0
- package/dist/cdn/assets/ckeditor5/translations/de.js +319 -0
- package/dist/cdn/assets/ckeditor5/translations/el.js +320 -0
- package/dist/cdn/assets/ckeditor5/translations/en-au.js +299 -0
- package/dist/cdn/assets/ckeditor5/translations/en-gb.js +279 -0
- package/dist/cdn/assets/ckeditor5/translations/eo.js +180 -0
- package/dist/cdn/assets/ckeditor5/translations/es-co.js +158 -0
- package/dist/cdn/assets/ckeditor5/translations/es.js +321 -0
- package/dist/cdn/assets/ckeditor5/translations/et.js +311 -0
- package/dist/cdn/assets/ckeditor5/translations/eu.js +181 -0
- package/dist/cdn/assets/ckeditor5/translations/fa.js +293 -0
- package/dist/cdn/assets/ckeditor5/translations/fi.js +316 -0
- package/dist/cdn/assets/ckeditor5/translations/fr.js +323 -0
- package/dist/cdn/assets/ckeditor5/translations/gl.js +300 -0
- package/dist/cdn/assets/ckeditor5/translations/gu.js +48 -0
- package/dist/cdn/assets/ckeditor5/translations/he.js +309 -0
- package/dist/cdn/assets/ckeditor5/translations/hi.js +315 -0
- package/dist/cdn/assets/ckeditor5/translations/hr.js +306 -0
- package/dist/cdn/assets/ckeditor5/translations/hu.js +318 -0
- package/dist/cdn/assets/ckeditor5/translations/hy.js +131 -0
- package/dist/cdn/assets/ckeditor5/translations/id.js +315 -0
- package/dist/cdn/assets/ckeditor5/translations/it.js +322 -0
- package/dist/cdn/assets/ckeditor5/translations/ja.js +319 -0
- package/dist/cdn/assets/ckeditor5/translations/jv.js +194 -0
- package/dist/cdn/assets/ckeditor5/translations/kk.js +14 -0
- package/dist/cdn/assets/ckeditor5/translations/km.js +187 -0
- package/dist/cdn/assets/ckeditor5/translations/kn.js +181 -0
- package/dist/cdn/assets/ckeditor5/translations/ko.js +309 -0
- package/dist/cdn/assets/ckeditor5/translations/ku.js +292 -0
- package/dist/cdn/assets/ckeditor5/translations/lt.js +325 -0
- package/dist/cdn/assets/ckeditor5/translations/lv.js +314 -0
- package/dist/cdn/assets/ckeditor5/translations/ms.js +314 -0
- package/dist/cdn/assets/ckeditor5/translations/nb.js +262 -0
- package/dist/cdn/assets/ckeditor5/translations/ne.js +279 -0
- package/dist/cdn/assets/ckeditor5/translations/nl.js +318 -0
- package/dist/cdn/assets/ckeditor5/translations/no.js +310 -0
- package/dist/cdn/assets/ckeditor5/translations/oc.js +47 -0
- package/dist/cdn/assets/ckeditor5/translations/pl.js +325 -0
- package/dist/cdn/assets/ckeditor5/translations/pt-br.js +317 -0
- package/dist/cdn/assets/ckeditor5/translations/pt.js +322 -0
- package/dist/cdn/assets/ckeditor5/translations/ro.js +321 -0
- package/dist/cdn/assets/ckeditor5/translations/ru.js +325 -0
- package/dist/cdn/assets/ckeditor5/translations/si.js +112 -0
- package/dist/cdn/assets/ckeditor5/translations/sk.js +316 -0
- package/dist/cdn/assets/ckeditor5/translations/sl.js +192 -0
- package/dist/cdn/assets/ckeditor5/translations/sq.js +292 -0
- package/dist/cdn/assets/ckeditor5/translations/sr-latn.js +299 -0
- package/dist/cdn/assets/ckeditor5/translations/sr.js +316 -0
- package/dist/cdn/assets/ckeditor5/translations/sv.js +315 -0
- package/dist/cdn/assets/ckeditor5/translations/th.js +311 -0
- package/dist/cdn/assets/ckeditor5/translations/tk.js +295 -0
- package/dist/cdn/assets/ckeditor5/translations/tr.js +318 -0
- package/dist/cdn/assets/ckeditor5/translations/tt.js +235 -0
- package/dist/cdn/assets/ckeditor5/translations/ug.js +279 -0
- package/dist/cdn/assets/ckeditor5/translations/uk.js +322 -0
- package/dist/cdn/assets/ckeditor5/translations/ur.js +297 -0
- package/dist/cdn/assets/ckeditor5/translations/uz.js +296 -0
- package/dist/cdn/assets/ckeditor5/translations/vi.js +316 -0
- package/dist/cdn/assets/ckeditor5/translations/zh-cn.js +308 -0
- package/dist/cdn/assets/ckeditor5/translations/zh.js +308 -0
- package/dist/cdn/assets/color-input/t9n/messages.ar.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.bg.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.bs.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.ca.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.cs.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.da.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.de.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.el.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.es.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.et.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.fi.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.fr.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.he.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.hr.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.hu.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.id.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.it.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.ja.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.ko.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.lt.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.lv.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.nl.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.no.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.pl.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.pt-BR.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.pt-PT.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.ro.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.ru.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.sk.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.sl.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.sr.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.sv.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.th.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.tr.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.uk.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.vi.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.zh-CN.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.zh-HK.json +1 -0
- package/dist/cdn/assets/color-input/t9n/messages.zh-TW.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.ar.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.bg.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.bs.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.ca.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.cs.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.da.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.de.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.el.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.es.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.et.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.fi.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.fr.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.he.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.hr.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.hu.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.id.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.it.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.ja.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.ko.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.lt.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.lv.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.nl.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.no.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.pl.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.pt-BR.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.pt-PT.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.ro.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.ru.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.sk.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.sl.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.sr.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.sv.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.th.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.tr.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.uk.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.vi.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.zh-CN.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.zh-HK.json +1 -0
- package/dist/cdn/assets/field-info/t9n/messages.zh-TW.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.ar.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.bg.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.bs.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.ca.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.cs.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.da.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.de.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.el.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.es.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.et.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.fi.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.fr.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.he.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.hr.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.hu.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.id.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.it.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.ja.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.ko.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.lt.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.lv.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.nl.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.no.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.pl.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.pt-BR.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.pt-PT.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.ro.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.ru.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.sk.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.sl.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.sr.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.sv.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.th.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.tr.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.uk.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.vi.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.zh-CN.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.zh-HK.json +1 -0
- package/dist/cdn/assets/field-pick-list/t9n/messages.zh-TW.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.ar.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.bg.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.bs.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.ca.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.cs.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.da.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.de.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.el.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.es.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.et.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.fi.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.fr.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.he.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.hr.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.hu.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.id.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.it.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.ja.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.ko.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.lt.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.lv.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.nl.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.no.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.pl.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.pt-BR.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.pt-PT.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.ro.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.ru.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.sk.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.sl.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.sr.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.sv.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.th.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.tr.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.uk.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.vi.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.zh-CN.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.zh-HK.json +1 -0
- package/dist/cdn/assets/histogram/t9n/messages.zh-TW.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.ar.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.bg.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.bs.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.ca.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.cs.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.da.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.de.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.el.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.es.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.et.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.fi.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.fr.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.he.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.hr.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.hu.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.id.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.it.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.ja.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.ko.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.lt.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.lv.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.nl.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.no.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.pl.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.pt-BR.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.pt-PT.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.ro.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.ru.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.sk.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.sl.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.sr.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.sv.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.th.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.tr.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.uk.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.vi.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.zh-CN.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.zh-HK.json +1 -0
- package/dist/cdn/assets/slider/t9n/messages.zh-TW.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.ar.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.bg.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.bs.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.ca.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.cs.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.da.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.de.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.el.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.es.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.et.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.fi.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.fr.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.he.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.hr.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.hu.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.id.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.it.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.ja.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.ko.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.lt.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.lv.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.nl.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.no.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.pl.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.pt-BR.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.pt-PT.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.ro.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.ru.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.sk.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.sl.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.sr.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.sv.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.th.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.tr.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.uk.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.vi.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.zh-CN.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.zh-HK.json +1 -0
- package/dist/cdn/assets/unique-values-list/t9n/messages.zh-TW.json +1 -0
- package/dist/cdn/index.js +2 -0
- package/dist/cdn/main.css +1 -0
- package/dist/chunks/commonFunctions.js +7 -0
- package/dist/chunks/locale.js +12 -0
- package/dist/chunks/resources.js +13 -0
- package/dist/chunks/runtime.js +15 -0
- package/dist/chunks/types.js +8 -0
- package/dist/chunks/useT9n.js +7 -0
- package/dist/components/geoscene-ckeditor5/customElement.d.ts +97 -0
- package/dist/components/geoscene-ckeditor5/customElement.js +35958 -0
- package/dist/components/geoscene-ckeditor5/index.d.ts +1 -0
- package/dist/components/geoscene-ckeditor5/index.js +1 -0
- package/dist/components/geoscene-ckeditor5/types.d.ts +15 -0
- package/dist/components/geoscene-ckeditor5-popover/customElement.d.ts +40 -0
- package/dist/components/geoscene-ckeditor5-popover/customElement.js +58 -0
- package/dist/components/geoscene-ckeditor5-popover/index.d.ts +1 -0
- package/dist/components/geoscene-ckeditor5-popover/index.js +3 -0
- package/dist/components/geoscene-color-input/customElement.d.ts +108 -0
- package/dist/components/geoscene-color-input/customElement.js +135 -0
- package/dist/components/geoscene-color-input/index.d.ts +1 -0
- package/dist/components/geoscene-color-input/index.js +6 -0
- package/dist/components/geoscene-field-info/customElement.d.ts +207 -0
- package/dist/components/geoscene-field-info/customElement.js +691 -0
- package/dist/components/geoscene-field-info/index.d.ts +1 -0
- package/dist/components/geoscene-field-info/index.js +1 -0
- package/dist/components/geoscene-field-info/utils/basic.d.ts +4 -0
- package/dist/components/geoscene-field-pick-list/customElement.d.ts +208 -0
- package/dist/components/geoscene-field-pick-list/customElement.js +263 -0
- package/dist/components/geoscene-field-pick-list/index.d.ts +1 -0
- package/dist/components/geoscene-field-pick-list/index.js +14 -0
- package/dist/components/geoscene-field-pick-list/utils/types.d.ts +8 -0
- package/dist/components/geoscene-histogram/customElement.d.ts +258 -0
- package/dist/components/geoscene-histogram/customElement.js +194 -0
- package/dist/components/geoscene-histogram/index.d.ts +1 -0
- package/dist/components/geoscene-histogram/index.js +1 -0
- package/dist/components/geoscene-histogram/types.d.ts +26 -0
- package/dist/components/geoscene-label-input/customElement.d.ts +48 -0
- package/dist/components/geoscene-label-input/customElement.js +116 -0
- package/dist/components/geoscene-label-input/index.d.ts +1 -0
- package/dist/components/geoscene-label-input/index.js +3 -0
- package/dist/components/geoscene-picker-input/customElement.d.ts +44 -0
- package/dist/components/geoscene-picker-input/customElement.js +57 -0
- package/dist/components/geoscene-picker-input/index.d.ts +1 -0
- package/dist/components/geoscene-picker-input/index.js +5 -0
- package/dist/components/geoscene-ramp-color/customElement.d.ts +21 -0
- package/dist/components/geoscene-ramp-color/customElement.js +82 -0
- package/dist/components/geoscene-ramp-color/index.d.ts +1 -0
- package/dist/components/geoscene-ramp-color/index.js +1 -0
- package/dist/components/geoscene-ramp-color-break/customElement.d.ts +22 -0
- package/dist/components/geoscene-ramp-color-break/customElement.js +38 -0
- package/dist/components/geoscene-ramp-color-break/index.d.ts +1 -0
- package/dist/components/geoscene-ramp-color-break/index.js +2 -0
- package/dist/components/geoscene-ramp-opacity/customElement.d.ts +19 -0
- package/dist/components/geoscene-ramp-opacity/customElement.js +33 -0
- package/dist/components/geoscene-ramp-opacity/index.d.ts +1 -0
- package/dist/components/geoscene-ramp-opacity/index.js +2 -0
- package/dist/components/geoscene-slider/customElement.d.ts +487 -0
- package/dist/components/geoscene-slider/customElement.js +877 -0
- package/dist/components/geoscene-slider/index.d.ts +1 -0
- package/dist/components/geoscene-slider/index.js +3 -0
- package/dist/components/geoscene-slider-input/customElement.d.ts +60 -0
- package/dist/components/geoscene-slider-input/customElement.js +29 -0
- package/dist/components/geoscene-slider-input/index.d.ts +1 -0
- package/dist/components/geoscene-slider-input/index.js +3 -0
- package/dist/components/geoscene-ticks/customElement.d.ts +190 -0
- package/dist/components/geoscene-ticks/customElement.js +141 -0
- package/dist/components/geoscene-ticks/index.d.ts +1 -0
- package/dist/components/geoscene-ticks/index.js +1 -0
- package/dist/components/geoscene-ticks/types.d.ts +23 -0
- package/dist/components/geoscene-unique-values-list/customElement.d.ts +115 -0
- package/dist/components/geoscene-unique-values-list/customElement.js +303 -0
- package/dist/components/geoscene-unique-values-list/index.d.ts +1 -0
- package/dist/components/geoscene-unique-values-list/index.js +8 -0
- package/dist/components/geoscene-unique-values-list/utils/basic.d.ts +4 -0
- package/dist/docs/api.json +1 -0
- package/dist/docs/docs.json +1 -0
- package/dist/docs/vscode.css-custom-data.json +1 -0
- package/dist/docs/vscode.html-custom-data.json +1 -0
- package/dist/docs/web-types.json +1 -0
- package/dist/index.d.ts +166 -0
- package/dist/index.js +6 -0
- package/dist/loader.d.ts +2 -0
- package/dist/loader.js +23 -0
- package/dist/types/components.d.ts +2 -0
- package/dist/types/lumina.d.ts +123 -0
- package/dist/types/preact.d.ts +143 -0
- package/dist/types/react.d.ts +166 -0
- package/dist/types/stencil.d.ts +130 -0
- package/dist/utils/types.d.ts +66 -0
- package/package.json +64 -0
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
/// <reference path="../../index.d.ts" />
|
|
2
|
+
import type { DataLine, HistogramColorStops, HistogramLayout } from "./types.js";
|
|
3
|
+
import type { HistogramBin } from "@geoscene/core/smartMapping/statistics/types.js";
|
|
4
|
+
import type { PublicLitElement as LitElement } from "@geoscene/lumina";
|
|
5
|
+
import type { T9nMeta } from "@geoscene/lumina/controllers";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Renders a histogram to visualize the spread of a dataset based on [bins](https://doc.geoscene.cn/javascript/5.0/references/common-components/components/geoscene-histogram/#bins) representing buckets, or sub-ranges, of
|
|
9
|
+
* data. Each [bin](https://doc.geoscene.cn/javascript/5.0/references/core/smartMapping/statistics/types/#HistogramBin) is defined by a minimum and maximum value and a total count.
|
|
10
|
+
*
|
|
11
|
+
* You can generate the underlying histogram's bins with the [histogram](https://doc.geoscene.cn/javascript/5.0/references/core/smartMapping/statistics/histogram/)
|
|
12
|
+
* module, then apply them to the component, as shown in the example below.
|
|
13
|
+
*
|
|
14
|
+
* ```js
|
|
15
|
+
* const params = {
|
|
16
|
+
* layer: povLayer,
|
|
17
|
+
* field: "POP_POVERTY",
|
|
18
|
+
* normalizationField: "TOTPOP_CY",
|
|
19
|
+
* numBins: 30
|
|
20
|
+
* };
|
|
21
|
+
*
|
|
22
|
+
* const results = await histogram(params);
|
|
23
|
+
* const histogramElement = document.querySelector("geoscene-histogram");
|
|
24
|
+
*
|
|
25
|
+
* histogramElement.bins = results.bins;
|
|
26
|
+
* histogramElement.min = results.minValue;
|
|
27
|
+
* histogramElement.max = results.maxValue;
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* Other properties of this component allow you to display meaningful values on the histogram, such as the [average](https://doc.geoscene.cn/javascript/5.0/references/common-components/components/geoscene-histogram/#average),
|
|
31
|
+
* [standardDeviation](https://doc.geoscene.cn/javascript/5.0/references/common-components/components/geoscene-histogram/#standardDeviation), and the [dataLines](https://doc.geoscene.cn/javascript/5.0/references/common-components/components/geoscene-histogram/#dataLines) properties.
|
|
32
|
+
*
|
|
33
|
+
* The [layout](https://doc.geoscene.cn/javascript/5.0/references/common-components/components/geoscene-histogram/#layout) property allows you to set the orientation of the histogram, and the [colorStops](https://doc.geoscene.cn/javascript/5.0/references/common-components/components/geoscene-histogram/#colorStops)
|
|
34
|
+
* property allows you to set a gradient or color scheme for the histogram bars.
|
|
35
|
+
*
|
|
36
|
+
* See the image below for a summary of the configurable options available on the histogram.
|
|
37
|
+
*
|
|
38
|
+
* 
|
|
39
|
+
*
|
|
40
|
+
* The [colorStops](https://doc.geoscene.cn/javascript/5.0/references/common-components/components/geoscene-histogram/#colorStops) property may be used to define a color scheme for the histogram bars.
|
|
41
|
+
*
|
|
42
|
+
* 
|
|
43
|
+
*
|
|
44
|
+
* @cssproperty [--geoscene-histogram-bar-color] - Specifies the color of the histogram bars when the bin doesn't have a corresponding color stop.
|
|
45
|
+
* @cssproperty [--geoscene-histogram-stop-color] - Specifies the default color for color stops.
|
|
46
|
+
* @see [histogram module](https://doc.geoscene.cn/javascript/5.0/references/core/smartMapping/statistics/histogram/)
|
|
47
|
+
* @see [Sample - Histogram component](https://doc.geoscene.cn/javascript/5.0/sample-code/histogram/)
|
|
48
|
+
* @since 5.0
|
|
49
|
+
*/
|
|
50
|
+
export abstract class GeosceneHistogram extends LitElement {
|
|
51
|
+
/** @internal */
|
|
52
|
+
protected _messages: Partial<{
|
|
53
|
+
componentLabel: string;
|
|
54
|
+
barLabel: string;
|
|
55
|
+
}> & T9nMeta<{
|
|
56
|
+
componentLabel: string;
|
|
57
|
+
barLabel: string;
|
|
58
|
+
}>;
|
|
59
|
+
/**
|
|
60
|
+
* The statistical average of the data in the histogram. You would typically
|
|
61
|
+
* get this value from the `avg` property of
|
|
62
|
+
* [SummaryStatisticsResult](https://doc.geoscene.cn/javascript/5.0/references/core/smartMapping/statistics/summaryStatistics/#SummaryStatisticsResult),
|
|
63
|
+
* which is the result of the
|
|
64
|
+
* [summaryStatistics](https://doc.geoscene.cn/javascript/5.0/references/core/smartMapping/statistics/summaryStatistics/#summaryStatistics) function.
|
|
65
|
+
*
|
|
66
|
+
* When set, this value will render on the histogram with a symbol indicating it is the average.
|
|
67
|
+
*
|
|
68
|
+
* @see [summaryStatistics](https://doc.geoscene.cn/javascript/5.0/references/core/smartMapping/statistics/summaryStatistics/#summaryStatistics)
|
|
69
|
+
* @example
|
|
70
|
+
* ```js
|
|
71
|
+
* // sets result returned from a smart mapping method
|
|
72
|
+
* // to the histogram
|
|
73
|
+
* histogram.average = response.statistics.avg;
|
|
74
|
+
* ```
|
|
75
|
+
* @example
|
|
76
|
+
* ```js
|
|
77
|
+
* histogram.average = 34.5;
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
accessor average: number | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* An array of objects representing each bin in the histogram. This
|
|
83
|
+
* information is typically returned from the
|
|
84
|
+
* [histogram](https://doc.geoscene.cn/javascript/5.0/references/core/smartMapping/statistics/histogram/#histogram) function.
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```js
|
|
88
|
+
* // sets the bins of the histogram from the bins in the histogram() result
|
|
89
|
+
* histogram.bins = histogramResult.bins;
|
|
90
|
+
* ```
|
|
91
|
+
* @example
|
|
92
|
+
* ```js
|
|
93
|
+
* // Creates a histogram with 7 bins.
|
|
94
|
+
* histogram.bins = [
|
|
95
|
+
* { minValue: 0, maxValue: 10, count: 4 },
|
|
96
|
+
* { minValue: 10.1, maxValue: 20, count: 14 },
|
|
97
|
+
* { minValue: 20.1, maxValue: 30, count: 9 },
|
|
98
|
+
* { minValue: 30.1, maxValue: 40, count: 34 },
|
|
99
|
+
* { minValue: 40.1, maxValue: 50, count: 351 },
|
|
100
|
+
* { minValue: 50.1, maxValue: 60, count: 100 },
|
|
101
|
+
* { minValue: 60.1, maxValue: 70, count: 1 }
|
|
102
|
+
* ];
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
accessor bins: HistogramBin[] | undefined;
|
|
106
|
+
/**
|
|
107
|
+
* When set to `true`, overlapping classed color stops will be blended together to create the color of the bar.
|
|
108
|
+
* This allows to show a if a bar representing a bin overlaps with multiple classed color stops.
|
|
109
|
+
*
|
|
110
|
+
* This property is only applicable when the [colorStops](https://doc.geoscene.cn/javascript/5.0/references/common-components/components/geoscene-histogram/#colorStops) property is set to classed color stops.
|
|
111
|
+
*
|
|
112
|
+
* @default false
|
|
113
|
+
*/
|
|
114
|
+
accessor colorBlendingEnabled: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* An array of color stops used to define the color scheme for the histogram bars.
|
|
117
|
+
* There are two types of color stops:
|
|
118
|
+
* - **Continuous color stops**: Each stop is defined by a `color` and a value. The color of the bar is determined by interpolating between the
|
|
119
|
+
* colors of the stops surrounding the value of the bin.
|
|
120
|
+
* - **Classed color stops**: Each stop is defined by a `color` and a `minValue` and `maxValue`. The color of the bar is determined by the color of the stop
|
|
121
|
+
* that contains the value of the bin. If the `color` is omitted, the bar will be colored using the CSS variable `--geoscene-histogram-stop-color`.
|
|
122
|
+
*
|
|
123
|
+
* When a bar is not covered by any color stop, it will be colored using the CSS variable `--geoscene-histogram-bar-color`.
|
|
124
|
+
*
|
|
125
|
+
* @example
|
|
126
|
+
* ```js
|
|
127
|
+
* // Define continuous color stops on the histogram.
|
|
128
|
+
* // The color of the bar is determined by interpolating between the colors of the stops surrounding the value of the bin.
|
|
129
|
+
* histogram.colorStops = [
|
|
130
|
+
* { color: "#ff0000", value: 0 },
|
|
131
|
+
* { color: "#ffff00", value: 50 },
|
|
132
|
+
* { color: "#00ff00", value: 100 }
|
|
133
|
+
* ];
|
|
134
|
+
* ```
|
|
135
|
+
* @example
|
|
136
|
+
* ```js
|
|
137
|
+
* // Define classed color stops on the histogram.
|
|
138
|
+
* // The color of the bar is determined by the color of the stop that contains the value of the bin.
|
|
139
|
+
* histogram.colorStops = [
|
|
140
|
+
* { color: "#ff0000", minValue: 0, maxValue: 50 },
|
|
141
|
+
* { color: "#00ff00", minValue: 50, maxValue: 100 },
|
|
142
|
+
* ];
|
|
143
|
+
* ```
|
|
144
|
+
*/
|
|
145
|
+
accessor colorStops: HistogramColorStops | undefined;
|
|
146
|
+
/**
|
|
147
|
+
* When set, renders lines on the histogram that indicate important or
|
|
148
|
+
* meaningful values to the end user.
|
|
149
|
+
*
|
|
150
|
+
* @example
|
|
151
|
+
* ```js
|
|
152
|
+
* // will render lines at the 25th, 50th, 75th, and 99th percentiles
|
|
153
|
+
* histogram.dataLines = [{
|
|
154
|
+
* value: 30,
|
|
155
|
+
* label: "25 pctl"
|
|
156
|
+
* }, {
|
|
157
|
+
* value: 45,
|
|
158
|
+
* label: "50 pctl"
|
|
159
|
+
* }, {
|
|
160
|
+
* value: 65,
|
|
161
|
+
* label: "75 pctl"
|
|
162
|
+
* }, {
|
|
163
|
+
* value: 89,
|
|
164
|
+
* label: "99 pctl"
|
|
165
|
+
* }];
|
|
166
|
+
* ```
|
|
167
|
+
* @example
|
|
168
|
+
* ```js
|
|
169
|
+
* // calculate standard deviations from mean using stats
|
|
170
|
+
* // returned from smart mapping statistic methods
|
|
171
|
+
* const stddevs = smartMappingUtils.getDeviationValues(stats.stddev, stats.avg, 2);
|
|
172
|
+
* histogram.dataLines = stddevs.map((stddev) => {
|
|
173
|
+
* return {
|
|
174
|
+
* value: stddev
|
|
175
|
+
* };
|
|
176
|
+
* });
|
|
177
|
+
* ```
|
|
178
|
+
* @see [smartMappingUtils.getDeviationValues](https://doc.geoscene.cn/javascript/5.0/references/core/widgets/smartMapping/support/utils/#getDeviationValues)
|
|
179
|
+
*/
|
|
180
|
+
accessor dataLines: DataLine[] | undefined;
|
|
181
|
+
/**
|
|
182
|
+
* Icon which represents the component.
|
|
183
|
+
* Typically used when the component is controlled by another component (e.g. by the Expand component).
|
|
184
|
+
* Search [Calcite Icons](https://doc.geoscene.cn/calcite-design-system/icons/) for possible values.
|
|
185
|
+
*
|
|
186
|
+
* @default "graph-histogram"
|
|
187
|
+
*/
|
|
188
|
+
accessor icon: string | undefined;
|
|
189
|
+
/** The component's default label. */
|
|
190
|
+
accessor label: string | undefined;
|
|
191
|
+
/**
|
|
192
|
+
* Determines the orientation of the histogram.
|
|
193
|
+
*
|
|
194
|
+
* @default "horizontal"
|
|
195
|
+
* @example
|
|
196
|
+
* ```js
|
|
197
|
+
* histogram.layout = "vertical";
|
|
198
|
+
* ```
|
|
199
|
+
*/
|
|
200
|
+
accessor layout: HistogramLayout;
|
|
201
|
+
/**
|
|
202
|
+
* The maximum value or bound of the entire histogram. This
|
|
203
|
+
* should match the maximum bound of the last [bins](https://doc.geoscene.cn/javascript/5.0/references/common-components/components/geoscene-histogram/#bins).
|
|
204
|
+
*
|
|
205
|
+
* @example
|
|
206
|
+
* ```js
|
|
207
|
+
* histogram.max = 100;
|
|
208
|
+
* ```
|
|
209
|
+
* @example
|
|
210
|
+
* ```js
|
|
211
|
+
* // sets result returned from a smart mapping method to the histogram
|
|
212
|
+
* histogram.max = response.statistics.max;
|
|
213
|
+
* ```
|
|
214
|
+
*/
|
|
215
|
+
accessor max: number | undefined;
|
|
216
|
+
/**
|
|
217
|
+
* Replace localized message strings with your own strings.
|
|
218
|
+
*
|
|
219
|
+
* _**Note**: Individual message keys may change between releases._
|
|
220
|
+
*/
|
|
221
|
+
accessor messageOverrides: {
|
|
222
|
+
componentLabel?: string | undefined;
|
|
223
|
+
barLabel?: string | undefined;
|
|
224
|
+
};
|
|
225
|
+
/**
|
|
226
|
+
* The minimum value or bound of the entire histogram. This
|
|
227
|
+
* should match the minimum bound of the first [bins](https://doc.geoscene.cn/javascript/5.0/references/common-components/components/geoscene-histogram/#bins).
|
|
228
|
+
*
|
|
229
|
+
* @example
|
|
230
|
+
* ```js
|
|
231
|
+
* histogram.min = 0;
|
|
232
|
+
* ```
|
|
233
|
+
* @example
|
|
234
|
+
* ```js
|
|
235
|
+
* // sets result returned from a smart mapping method to the histogram
|
|
236
|
+
* histogram.min = response.statistics.min;
|
|
237
|
+
* ```
|
|
238
|
+
*/
|
|
239
|
+
accessor min: number | undefined;
|
|
240
|
+
/**
|
|
241
|
+
* The statistical standard deviation of the data in the histogram. You would typically
|
|
242
|
+
* get this value from the `stddev` property of
|
|
243
|
+
* [SummaryStatisticsResult](https://doc.geoscene.cn/javascript/5.0/references/core/smartMapping/statistics/summaryStatistics/#SummaryStatisticsResult),
|
|
244
|
+
* which is the result of the
|
|
245
|
+
* [summaryStatistics](https://doc.geoscene.cn/javascript/5.0/references/core/smartMapping/statistics/summaryStatistics/#summaryStatistics) function.
|
|
246
|
+
*
|
|
247
|
+
* When set, this value will render on the histogram with symbols indicating standard deviation intervals from the mean.
|
|
248
|
+
*
|
|
249
|
+
* @see [summaryStatistics](https://doc.geoscene.cn/javascript/5.0/references/core/smartMapping/statistics/summaryStatistics/#summaryStatistics)
|
|
250
|
+
* @example
|
|
251
|
+
* ```js
|
|
252
|
+
* // sets result returned from a smart mapping method
|
|
253
|
+
* // to the histogram
|
|
254
|
+
* histogram.standardDeviation = response.statistics.stddev;
|
|
255
|
+
* ```
|
|
256
|
+
*/
|
|
257
|
+
accessor standardDeviation: number | undefined;
|
|
258
|
+
}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
/* COPYRIGHT GeoScene - https://js.geoscene.cn/5.0/LICENSE.txt */
|
|
2
|
+
import { c as I } from "../../chunks/runtime.js";
|
|
3
|
+
import { u as O } from "../../chunks/useT9n.js";
|
|
4
|
+
import { substitute as S } from "@geoscene/core/intl.js";
|
|
5
|
+
import { LitElement as k, safeClassMap as p, nothing as h, safeStyleMap as w } from "@geoscene/lumina";
|
|
6
|
+
import { css as R, html as L, svg as b } from "lit";
|
|
7
|
+
import { g as z } from "../../chunks/locale.js";
|
|
8
|
+
const f = {
|
|
9
|
+
content: "content",
|
|
10
|
+
svg: "svg",
|
|
11
|
+
label: "label",
|
|
12
|
+
dataLine: "data-line",
|
|
13
|
+
averageDataLine: "average-data-line",
|
|
14
|
+
dataLineSymbol: "data-line-symbol"
|
|
15
|
+
}, F = R`:host{display:flex;--geoscene-histogram-bar-color: var(--calcite-color-border-1);--geoscene-histogram-stop-color: color-mix(in srgb, var(--calcite-color-brand) 80%, transparent)}.content{display:flex;flex:1;direction:ltr}.svg{display:inline-block;flex:1;overflow:hidden}.data-line{stroke:#888;stroke-width:1px;shape-rendering:crispEdges}.average-data-line{stroke-width:1px;shape-rendering:crispEdges;stroke:#444}.label,.data-line-symbol{font-size:12px;stroke:#fff;stroke-width:2px;paint-order:stroke;unicode-bidi:plaintext}.data-line-symbol{font-family:"Georgia, serif",sans-serif;font-style:italic}`;
|
|
16
|
+
function B(t, i, n, e, r) {
|
|
17
|
+
const [s, a] = r;
|
|
18
|
+
if (!t || a === 0 || s === 0 || n == null || i == null)
|
|
19
|
+
return null;
|
|
20
|
+
const o = n - i, c = (t.length > 1 ? t[t.length - 1].maxValue - t[0].minValue : 0) / o, [u, g] = e === "vertical" ? [a * c, s] : [a, s * c], x = t ? t.map((m) => m.count) : [], d = Math.max(...x);
|
|
21
|
+
return t.map((m) => {
|
|
22
|
+
const [$, v] = e === "vertical" ? [u / t.length, d !== 0 ? m.count / d * g : 0] : [d !== 0 ? m.count / d * u : 0, g / t.length], { maxValue: C } = m, y = n - C, [M, E] = e === "vertical" ? [0, y * (a / o)] : [s - v - y * (s / o), a - $];
|
|
23
|
+
return [M, E, v, $];
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function N(t, i, n, e, r) {
|
|
27
|
+
const s = [];
|
|
28
|
+
return t != null && s.push({
|
|
29
|
+
value: t,
|
|
30
|
+
symbol: "x̄",
|
|
31
|
+
lineClass: f.averageDataLine
|
|
32
|
+
}), i != null && n != null && e != null && s.push(...Y(n, e, i, t)), r && s.push(...r), s;
|
|
33
|
+
}
|
|
34
|
+
function P(t, i, n, e, r) {
|
|
35
|
+
if (n == null)
|
|
36
|
+
return [0, 0, 0, 0];
|
|
37
|
+
const s = Math.round((r - n) / e * 100) / 100, [a, o] = t;
|
|
38
|
+
if (i === "vertical") {
|
|
39
|
+
let c = o - s * o || 1;
|
|
40
|
+
return c = Math.round(c) + 0.5, [0, "100%", c, c];
|
|
41
|
+
}
|
|
42
|
+
let l = s * a || 1;
|
|
43
|
+
return l = Math.round(l) + 0.5, [l, l, "100%", 0];
|
|
44
|
+
}
|
|
45
|
+
function T(t, i, n, e, r) {
|
|
46
|
+
if (n == null)
|
|
47
|
+
return [0, 0];
|
|
48
|
+
const s = Math.round((r - n) / e * 100) / 100, [a, o] = t;
|
|
49
|
+
return i === "vertical" ? [a, o - s * o] : [0, s * a];
|
|
50
|
+
}
|
|
51
|
+
function A(t, i, n) {
|
|
52
|
+
if (!t || t.length === 0)
|
|
53
|
+
return null;
|
|
54
|
+
if (_(t)) {
|
|
55
|
+
const e = t.map((r) => ({
|
|
56
|
+
...r,
|
|
57
|
+
color: D(r.color ?? n)
|
|
58
|
+
}));
|
|
59
|
+
return e.unshift({
|
|
60
|
+
color: i,
|
|
61
|
+
minValue: Number.NEGATIVE_INFINITY,
|
|
62
|
+
maxValue: e[0].minValue
|
|
63
|
+
}), e.push({
|
|
64
|
+
color: i,
|
|
65
|
+
minValue: e[e.length - 1].maxValue,
|
|
66
|
+
maxValue: Number.POSITIVE_INFINITY
|
|
67
|
+
}), e;
|
|
68
|
+
} else
|
|
69
|
+
return t.map((e) => ({
|
|
70
|
+
...e,
|
|
71
|
+
color: D(e.color ?? n)
|
|
72
|
+
}));
|
|
73
|
+
}
|
|
74
|
+
function H(t, i, n, e) {
|
|
75
|
+
if (!t || t.length === 0)
|
|
76
|
+
return n;
|
|
77
|
+
if (_(t)) {
|
|
78
|
+
const r = W(t, i);
|
|
79
|
+
if (r.length === 0)
|
|
80
|
+
return n;
|
|
81
|
+
if (e) {
|
|
82
|
+
const { color: s = n, weight: a } = r[0], { color: o = n, weight: l } = r[1] ?? r[0], c = a + l;
|
|
83
|
+
return `color-mix(in srgb, ${s} ${a / c * 100}%, ${o} ${l / c * 100}%)`;
|
|
84
|
+
}
|
|
85
|
+
return r[0].color ?? n;
|
|
86
|
+
}
|
|
87
|
+
return G(t, i);
|
|
88
|
+
}
|
|
89
|
+
function W(t, i) {
|
|
90
|
+
const n = [];
|
|
91
|
+
for (const e of t) {
|
|
92
|
+
const r = Math.max(0, Math.min(i.maxValue, e.maxValue) - Math.max(i.minValue, e.minValue));
|
|
93
|
+
r > 0 && n.push({ color: e.color, weight: r });
|
|
94
|
+
}
|
|
95
|
+
return n.sort((e, r) => r.weight - e.weight);
|
|
96
|
+
}
|
|
97
|
+
function G(t, i) {
|
|
98
|
+
const n = (i.maxValue - i.minValue) / 2 + i.minValue;
|
|
99
|
+
if (n > t[t.length - 1].value)
|
|
100
|
+
return t[t.length - 1].color;
|
|
101
|
+
for (let e = 0; e < t.length - 1; e++) {
|
|
102
|
+
const r = t[e], s = t[e + 1];
|
|
103
|
+
if (n <= r.value)
|
|
104
|
+
return r.color;
|
|
105
|
+
if (n < s.value) {
|
|
106
|
+
const a = (n - r.value) / (s.value - r.value) * 100;
|
|
107
|
+
return `color-mix(in srgb, ${r.color}, ${s.color} ${a}%)`;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return t[t.length - 1].color;
|
|
111
|
+
}
|
|
112
|
+
function _(t) {
|
|
113
|
+
return t[0] != null && "minValue" in t[0];
|
|
114
|
+
}
|
|
115
|
+
function D(t) {
|
|
116
|
+
if (typeof t == "string")
|
|
117
|
+
return t;
|
|
118
|
+
if (Array.isArray(t))
|
|
119
|
+
return `rgba(${t[0]}, ${t[1]}, ${t[2]}, ${t[3] ?? 1})`;
|
|
120
|
+
const { r: i, g: n, b: e, a: r = 1 } = t;
|
|
121
|
+
return `rgba(${i}, ${n}, ${e}, ${r})`;
|
|
122
|
+
}
|
|
123
|
+
function Y(t, i, n, e) {
|
|
124
|
+
const r = 0.06 * (i - t);
|
|
125
|
+
return U(n, e).filter((s) => Math.abs(e - s) > r).map((s, a, o) => {
|
|
126
|
+
const l = o.length / 2, c = s > e ? "+" : "-", u = a >= l ? a - l + 1 : l - a;
|
|
127
|
+
return {
|
|
128
|
+
symbol: `${c}${u === 1 ? "" : u}σ`,
|
|
129
|
+
value: s
|
|
130
|
+
};
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
function U(t, i) {
|
|
134
|
+
if (i == null || t == null)
|
|
135
|
+
return [];
|
|
136
|
+
const n = 1, e = [];
|
|
137
|
+
for (let r = n * -1; r <= n; r++)
|
|
138
|
+
r !== 0 && e.push(i + r * t);
|
|
139
|
+
return e;
|
|
140
|
+
}
|
|
141
|
+
const V = "var(--geoscene-histogram-bar-color)", j = "var(--geoscene-histogram-stop-color)";
|
|
142
|
+
class q extends k {
|
|
143
|
+
constructor() {
|
|
144
|
+
super(...arguments), this._messages = O(), this._normalizedStops = null, this._formatLabel = (i) => z(this._messages._lang, this._numberFormatterOptions).format(i), this._numberFormatterOptions = {
|
|
145
|
+
maximumFractionDigits: 2
|
|
146
|
+
}, this.containerDimensions = [0, 0], this.icon = "graph-histogram", this.layout = "horizontal", this.colorBlendingEnabled = !1;
|
|
147
|
+
}
|
|
148
|
+
static {
|
|
149
|
+
this.properties = { containerDimensions: 16, colorStops: 0, icon: 3, average: 11, messageOverrides: 0, standardDeviation: 11, bins: 0, dataLines: 0, label: 1, layout: 3, max: 11, min: 11, colorBlendingEnabled: 5 };
|
|
150
|
+
}
|
|
151
|
+
static {
|
|
152
|
+
this.styles = F;
|
|
153
|
+
}
|
|
154
|
+
loaded() {
|
|
155
|
+
const i = new ResizeObserver((r) => {
|
|
156
|
+
for (const s of r) {
|
|
157
|
+
const { width: a, height: o } = s.contentRect;
|
|
158
|
+
this.containerDimensions = [a, o];
|
|
159
|
+
}
|
|
160
|
+
}), { width: n, height: e } = this.el.getBoundingClientRect();
|
|
161
|
+
this.containerDimensions = [n, e], i.observe(this.el);
|
|
162
|
+
}
|
|
163
|
+
willUpdate(i) {
|
|
164
|
+
i.has("colorStops") && (this._normalizedStops = A(this.colorStops, V, j));
|
|
165
|
+
}
|
|
166
|
+
render() {
|
|
167
|
+
const { label: i } = this;
|
|
168
|
+
return this.containerDimensions ? L`<div role=img .ariaLabel=${i ?? void 0} class=${p(f.content)}>${this._renderContent()}</div>` : null;
|
|
169
|
+
}
|
|
170
|
+
_renderContent() {
|
|
171
|
+
const { containerDimensions: [i, n] } = this, e = "bg-fill";
|
|
172
|
+
return L`<svg class=${p(f.svg)} xmlns=http://www.w3.org/2000/svg>${b`<defs><clipPath id=${e}><rect height=${n ?? h} width=${i ?? h} x=0 y=0 /></clipPath></defs><g style=${w({ clipPath: `url(#${e})` })}><g>${this._renderBars()}</g></g><g>${this._renderLines()}</g>`}</svg>`;
|
|
173
|
+
}
|
|
174
|
+
_renderBars() {
|
|
175
|
+
const { bins: i, _messages: n } = this, e = B(this.bins, this.min, this.max, this.layout, this.containerDimensions);
|
|
176
|
+
return !e || !i ? null : e.map((r, s) => {
|
|
177
|
+
const [a, o, l, c] = r, u = i[s], g = n?.barLabel ? S(n.barLabel, u) : "";
|
|
178
|
+
return b`<rect style=${w({
|
|
179
|
+
fill: H(this._normalizedStops, u, V, this.colorBlendingEnabled)
|
|
180
|
+
})} .ariaLabel=${g} data-index=${s ?? h} height=${c ?? h} role=img shape-rendering=crispEdges stroke-width=0 width=${l ?? h} x=${a ?? h} y=${o ?? h} />`;
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
_renderLines() {
|
|
184
|
+
return N(this.average, this.standardDeviation, this.min, this.max, this.dataLines)?.map((n) => J({ dataLine: n, containerDimensions: this.containerDimensions, layout: this.layout, min: this.min, max: this.max, labelFormatter: this._formatLabel }));
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
const J = (t) => {
|
|
188
|
+
const { containerDimensions: i, layout: n, min: e, max: r, dataLine: s, labelFormatter: a } = t, o = r != null && e != null ? r - e : 0, [l, c, u, g] = P(i, n, e, o, s.value), [x, d] = T(i, n, e, o, s.value), m = "symbol" in s ? [b`<tspan class=${p(f.dataLineSymbol)}>${s.symbol}</tspan>`, b`<tspan>${a(s.value)}</tspan>`] : s.label, $ = "lineClass" in s && s.lineClass ? s.lineClass : f.dataLine;
|
|
189
|
+
return b`<g><title>${s.value}</title><line class=${p($)} shape-rendering=crispEdges x1=${l ?? h} x2=${c ?? h} y1=${u ?? h} y2=${g ?? h} /><text class=${p(f.label)} text-anchor=end transform=${(n === "horizontal" ? "rotate(270)" : void 0) ?? h} x=${x ?? h} y=${d - 2}>${m}</text></g>`;
|
|
190
|
+
};
|
|
191
|
+
I("geoscene-histogram", q);
|
|
192
|
+
export {
|
|
193
|
+
q as GeosceneHistogram
|
|
194
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./customElement.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./customElement.js";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type DataLine = {
|
|
2
|
+
value: number;
|
|
3
|
+
label?: number | string | null;
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
export type HistogramColorStops = HistogramClassedColorStop[] | HistogramContinuousColorStop[];
|
|
7
|
+
|
|
8
|
+
export type HistogramLayout = "horizontal" | "vertical";
|
|
9
|
+
|
|
10
|
+
export type HistogramContinuousColorStop = {
|
|
11
|
+
color: HistogramColor;
|
|
12
|
+
value: number;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export type HistogramClassedColorStop = {
|
|
16
|
+
color?: HistogramColor;
|
|
17
|
+
minValue: number;
|
|
18
|
+
maxValue: number;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export type HistogramColor = number[] | string | {
|
|
22
|
+
r?: number;
|
|
23
|
+
g?: number;
|
|
24
|
+
b?: number;
|
|
25
|
+
a?: number;
|
|
26
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/// <reference path="../../index.d.ts" />
|
|
2
|
+
import type { PublicLitElement as LitElement } from "@geoscene/lumina";
|
|
3
|
+
import type { Button as Button } from "@geoscene/calcite-components/components/calcite-button";
|
|
4
|
+
import type { InputNumber as InputNumber } from "@geoscene/calcite-components/components/calcite-input-number";
|
|
5
|
+
|
|
6
|
+
/** @internal */
|
|
7
|
+
export abstract class GeosceneLabelInput extends LitElement {
|
|
8
|
+
/**
|
|
9
|
+
* Specifies the alignment of the component's text elements.
|
|
10
|
+
*
|
|
11
|
+
* @default "center"
|
|
12
|
+
*/
|
|
13
|
+
accessor alignment: Button["alignment"] & InputNumber["alignment"];
|
|
14
|
+
/**
|
|
15
|
+
* Indicates whether the component is in edit mode.
|
|
16
|
+
* This value changes when user interacts with the component or when [edit()](https://doc.geoscene.cn/javascript/5.0/references/common-components/components/geoscene-label-input/#edit) is called.
|
|
17
|
+
* The value is always `false` when the component is in [readOnly](https://doc.geoscene.cn/javascript/5.0/references/common-components/components/geoscene-label-input/#readOnly) mode.
|
|
18
|
+
*
|
|
19
|
+
* @default false
|
|
20
|
+
* @see [edit()](https://doc.geoscene.cn/javascript/5.0/references/common-components/components/geoscene-label-input/#edit)
|
|
21
|
+
*/
|
|
22
|
+
get editing(): boolean;
|
|
23
|
+
/** A function used to format the value. */
|
|
24
|
+
accessor labelFormatter: (value: number, defaultFormatter: (value: number) => string) => string | null | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Indicates whether the component is in read-only mode.
|
|
27
|
+
*
|
|
28
|
+
* @default false
|
|
29
|
+
*/
|
|
30
|
+
accessor readOnly: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* The value the component displays.
|
|
33
|
+
*
|
|
34
|
+
* @default 0
|
|
35
|
+
*/
|
|
36
|
+
accessor value: number;
|
|
37
|
+
/**
|
|
38
|
+
* Initiates the edit mode for the component.
|
|
39
|
+
*
|
|
40
|
+
* @see [editing](https://doc.geoscene.cn/javascript/5.0/references/common-components/components/geoscene-label-input/#editing)
|
|
41
|
+
*/
|
|
42
|
+
edit(): Promise<void>;
|
|
43
|
+
/** Fires each time a new value is typed and committed. */
|
|
44
|
+
readonly geosceneChange: import("@geoscene/lumina").TargetedEvent<this, void>;
|
|
45
|
+
readonly "@eventTypes": {
|
|
46
|
+
geosceneChange: GeosceneLabelInput["geosceneChange"]["detail"];
|
|
47
|
+
};
|
|
48
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/* COPYRIGHT GeoScene - https://js.geoscene.cn/5.0/LICENSE.txt */
|
|
2
|
+
import { c as o } from "../../chunks/runtime.js";
|
|
3
|
+
import { formatNumber as u } from "@geoscene/core/intl.js";
|
|
4
|
+
import { LitElement as c, createEvent as h, safeClassMap as d } from "@geoscene/lumina";
|
|
5
|
+
import { createRef as s, ref as l } from "lit/directives/ref.js";
|
|
6
|
+
import { css as p, html as n } from "lit";
|
|
7
|
+
const m = p`:host{display:block}:host([hidden]){display:none}.content{display:flex;flex-direction:column}.readOnlyLabel{display:block;font-size:var(--calcite-font-size-sm);font-variant-numeric:tabular-nums;line-height:var(--calcite-font-line-height-sm);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-inline:.5rem;padding-block:3px;border-color:var(--calcite-color-transparent);border-style:solid;border-width:var(--calcite-button-border-size, 1px);color:var(--calcite-color-text-1)}:host(:not([read-only])) .readOnlyLabel{position:absolute;opacity:0}:host([alignment="start"]){.content{align-items:start}.readOnlyLabel{text-align:start}}:host([alignment="end"]){.content{align-items:end}.readOnlyLabel{text-align:end}}:host([alignment="center"]){.content{align-items:center}.readOnlyLabel{text-align:center}}calcite-button{inline-size:100%;--calcite-offset-invert-focus: 1;--calcite-internal-animation-timing-fast: 0}calcite-input-number{inline-size:100%;--calcite-internal-animation-timing-fast: 0}`;
|
|
8
|
+
class f extends c {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments), this._buttonRef = s(), this._inputRef = s(), this._labelRef = s(), this._formatOptions = {
|
|
11
|
+
style: "decimal",
|
|
12
|
+
useGrouping: !0,
|
|
13
|
+
minimumFractionDigits: 0,
|
|
14
|
+
maximumFractionDigits: 2
|
|
15
|
+
}, this._formatValue = (t) => u(t, this._formatOptions), this._pointerDownPosition = null, this._displayedValue = "", this._editing = !1, this.alignment = "center", this.readOnly = !1, this.value = 0, this.geosceneChange = h({ cancelable: !1 });
|
|
16
|
+
}
|
|
17
|
+
static {
|
|
18
|
+
this.properties = { _displayedValue: 16, _editing: 16, alignment: 3, editing: 39, labelFormatter: 0, readOnly: 7, value: 11 };
|
|
19
|
+
}
|
|
20
|
+
static {
|
|
21
|
+
this.styles = m;
|
|
22
|
+
}
|
|
23
|
+
static {
|
|
24
|
+
this.shadowRootOptions = { mode: "open", delegatesFocus: !0 };
|
|
25
|
+
}
|
|
26
|
+
get editing() {
|
|
27
|
+
return this._editing;
|
|
28
|
+
}
|
|
29
|
+
async edit() {
|
|
30
|
+
this._enterEdit();
|
|
31
|
+
}
|
|
32
|
+
getLabelBoundingClientRect() {
|
|
33
|
+
return this._labelRef.value ? this._labelRef.value.getBoundingClientRect() : this.el.getBoundingClientRect();
|
|
34
|
+
}
|
|
35
|
+
willUpdate(t) {
|
|
36
|
+
if (t.has("value") || t.has("labelFormatter")) {
|
|
37
|
+
const e = this.value;
|
|
38
|
+
this._displayedValue = this._internalLabelFormatter(e);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
updated(t) {
|
|
42
|
+
const e = this._inputRef.value, i = this._buttonRef.value, a = this.renderRoot.querySelector(".readOnlyLabel");
|
|
43
|
+
if (e && i && a) {
|
|
44
|
+
const r = a.offsetWidth;
|
|
45
|
+
i.style.width = `${r}px`, e.style.width = `${r}px`;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
_enterEdit() {
|
|
49
|
+
this._editing || this.readOnly || (this._editing = !0, this.requestUpdate("editing", !1), this.updateComplete.then(async () => {
|
|
50
|
+
const t = this._inputRef.value;
|
|
51
|
+
await t?.setFocus(), await t?.selectText();
|
|
52
|
+
}));
|
|
53
|
+
}
|
|
54
|
+
_exitEdit(t, e = !1) {
|
|
55
|
+
this._editing && (t && this._commitValue(this._inputRef.value), this._displayedValue = this._internalLabelFormatter(this.value), this._inputRef.value && (this._inputRef.value.value = `${this.value}`), this._editing = !1, this.requestUpdate("editing", !0), e || this.updateComplete.then(async () => {
|
|
56
|
+
await this._buttonRef.value?.setFocus();
|
|
57
|
+
}));
|
|
58
|
+
}
|
|
59
|
+
_commitValue(t) {
|
|
60
|
+
const e = this._parseNumber(t?.value ?? "");
|
|
61
|
+
e !== null && this.value !== e && (this.value = e, this.geosceneChange.emit());
|
|
62
|
+
}
|
|
63
|
+
_parseNumber(t) {
|
|
64
|
+
if (t.trim() === "")
|
|
65
|
+
return null;
|
|
66
|
+
const e = Number(t);
|
|
67
|
+
return Number.isFinite(e) ? e : this.value ?? null;
|
|
68
|
+
}
|
|
69
|
+
_internalLabelFormatter(t) {
|
|
70
|
+
const e = this.labelFormatter;
|
|
71
|
+
if (!e)
|
|
72
|
+
return this._formatValue(t);
|
|
73
|
+
const i = e(t, this._formatValue);
|
|
74
|
+
return i ?? this._formatValue(t);
|
|
75
|
+
}
|
|
76
|
+
_onBlur() {
|
|
77
|
+
this._exitEdit(!0, !0);
|
|
78
|
+
}
|
|
79
|
+
_onValueChange(t) {
|
|
80
|
+
this._commitValue(t.currentTarget);
|
|
81
|
+
}
|
|
82
|
+
_onKeyDown(t) {
|
|
83
|
+
t.key === "Enter" ? (this._exitEdit(!0), t.stopPropagation(), t.preventDefault()) : t.key === "Escape" && (this._exitEdit(!1), t.stopPropagation(), t.preventDefault());
|
|
84
|
+
}
|
|
85
|
+
_onPointerDown(t) {
|
|
86
|
+
this._pointerDownPosition = { x: t.clientX, y: t.clientY };
|
|
87
|
+
}
|
|
88
|
+
_onClick(t) {
|
|
89
|
+
if (this._pointerDownPosition) {
|
|
90
|
+
const e = t.clientX - this._pointerDownPosition.x, i = t.clientY - this._pointerDownPosition.y;
|
|
91
|
+
if (Math.sqrt(e * e + i * i) > 2)
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
this._enterEdit(), this._pointerDownPosition = null;
|
|
95
|
+
}
|
|
96
|
+
_onInput(t) {
|
|
97
|
+
const e = this._parseNumber(t.currentTarget.value ?? "");
|
|
98
|
+
if (e === null) {
|
|
99
|
+
this._displayedValue = "";
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
this._displayedValue = this._internalLabelFormatter(e);
|
|
103
|
+
}
|
|
104
|
+
render() {
|
|
105
|
+
const { alignment: t, _displayedValue: e } = this, i = [
|
|
106
|
+
n`<span class="readOnlyLabel"><span ${l(this._labelRef)}>${e}</span></span>`
|
|
107
|
+
];
|
|
108
|
+
return this.readOnly || i.push(n`<calcite-button .alignment=${t} appearance=transparent .hidden=${this._editing} kind=neutral @pointerdown=${this._onPointerDown} @click=${this._onClick} scale=s width=full ${l(this._buttonRef)}>${e}</calcite-button>`, n`<calcite-input-number .alignment=${t} group-separator .hidden=${!this._editing} number-button-type=none @calciteInputNumberChange=${this._onValueChange} @keydown=${this._onKeyDown} @blur=${this._onBlur} @input=${this._onInput} scale=s status=idle .value=${`${this.value}`} ${l(this._inputRef)}></calcite-input-number>`), n`<div class=${d({
|
|
109
|
+
content: !0
|
|
110
|
+
})}>${i}</div>`;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
o("geoscene-label-input", f);
|
|
114
|
+
export {
|
|
115
|
+
f as GeosceneLabelInput
|
|
116
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./customElement.js";
|