@arcgis/map-components 4.30.0 → 4.31.0-next.10
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/dist/arcgis-map-components/arcgis-map-components.esm.js +3 -3
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.ar.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.bg.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.bs.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.ca.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.cs.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.da.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.de.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.el.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.en.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.es.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.et.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.fi.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.fr.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.he.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.hr.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.hu.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.id.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.it.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.ja.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.ko.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.lt.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.lv.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.nb.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.nl.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.pl.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.pt-BR.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.pt-PT.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.ro.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.ru.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.sk.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.sl.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.sr.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.sv.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.th.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.tr.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.uk.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.vi.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.zh-CN.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.zh-HK.json +4 -0
- package/dist/arcgis-map-components/assets/basemap-toggle/t9n/basemap-toggle.t9n.zh-TW.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.ar.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.bg.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.bs.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.ca.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.cs.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.da.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.de.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.el.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.en.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.es.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.et.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.fi.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.fr.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.he.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.hr.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.hu.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.id.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.it.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.ja.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.ko.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.lt.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.lv.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.nb.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.nl.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.pl.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.pt-BR.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.pt-PT.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.ro.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.ru.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.sk.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.sl.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.sr.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.sv.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.th.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.tr.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.uk.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.vi.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.zh-CN.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.zh-HK.json +4 -0
- package/dist/arcgis-map-components/assets/compass/t9n/compass.t9n.zh-TW.json +4 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.ar.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.bg.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.bs.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.ca.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.cs.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.da.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.de.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.el.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.en.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.es.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.et.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.fi.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.fr.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.he.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.hr.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.hu.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.id.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.it.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.ja.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.ko.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.lt.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.lv.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.nb.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.nl.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.pl.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.pt-BR.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.pt-PT.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.ro.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.ru.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.sk.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.sl.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.sr.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.sv.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.th.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.tr.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.uk.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.vi.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.zh-CN.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.zh-HK.json +5 -0
- package/dist/arcgis-map-components/assets/fullscreen/t9n/fullscreen.t9n.zh-TW.json +5 -0
- package/dist/arcgis-map-components/assets/locate/t9n/locate.t9n.en.json +17 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.ar.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.bg.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.bs.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.ca.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.cs.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.da.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.de.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.el.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.en.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.es.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.et.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.fi.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.fr.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.he.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.hr.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.hu.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.id.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.it.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.ja.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.ko.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.lt.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.lv.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.nb.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.nl.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.pl.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.pt-BR.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.pt-PT.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.ro.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.ru.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.sk.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.sl.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.sr.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.sv.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.th.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.tr.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.uk.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.vi.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.zh-CN.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.zh-HK.json +8 -0
- package/dist/arcgis-map-components/assets/track/t9n/track.t9n.zh-TW.json +8 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.ar.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.bg.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.bs.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.ca.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.cs.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.da.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.de.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.el.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.en.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.es.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.et.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.fi.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.fr.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.he.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.hr.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.hu.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.id.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.it.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.ja.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.ko.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.lt.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.lv.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.nb.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.nl.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.pl.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.pt-BR.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.pt-PT.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.ro.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.ru.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.sk.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.sl.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.sr.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.sv.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.th.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.tr.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.uk.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.vi.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.zh-CN.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.zh-HK.json +5 -0
- package/dist/arcgis-map-components/assets/zoom/t9n/zoom.t9n.zh-TW.json +5 -0
- package/dist/arcgis-map-components/index.esm.js +2 -2
- package/dist/arcgis-map-components/{p-15de7199.entry.js → p-0ef00336.entry.js} +3 -3
- package/dist/arcgis-map-components/p-114e3266.entry.js +6 -0
- package/dist/arcgis-map-components/{p-aa5c3b57.entry.js → p-142c6780.entry.js} +3 -3
- package/dist/arcgis-map-components/p-193ac44f.js +6 -0
- package/dist/arcgis-map-components/{p-83d750fb.entry.js → p-1babd12e.entry.js} +3 -3
- package/dist/arcgis-map-components/p-22c28232.entry.js +6 -0
- package/dist/arcgis-map-components/{p-4a04853c.entry.js → p-27e19a23.entry.js} +3 -3
- package/dist/arcgis-map-components/p-28fa5bcc.entry.js +6 -0
- package/dist/arcgis-map-components/p-2986e371.entry.js +6 -0
- package/dist/arcgis-map-components/{p-babdc07d.entry.js → p-2d473a01.entry.js} +3 -3
- package/dist/arcgis-map-components/p-3045c9bb.js +6 -0
- package/dist/arcgis-map-components/p-312ebeac.entry.js +6 -0
- package/dist/arcgis-map-components/{p-5c5afdb6.entry.js → p-3172b05b.entry.js} +3 -3
- package/dist/arcgis-map-components/p-329536db.entry.js +6 -0
- package/dist/arcgis-map-components/p-3a4750a0.entry.js +6 -0
- package/dist/arcgis-map-components/p-408a932e.js +6 -0
- package/dist/arcgis-map-components/{p-8d33a858.entry.js → p-48543a6e.entry.js} +3 -3
- package/dist/arcgis-map-components/{p-9fe675f8.entry.js → p-49fe1e15.entry.js} +3 -3
- package/dist/arcgis-map-components/{p-a4cb93dc.entry.js → p-4e7d9b65.entry.js} +3 -3
- package/dist/arcgis-map-components/{p-64ce2787.entry.js → p-50fa0b86.entry.js} +3 -3
- package/dist/arcgis-map-components/{p-f2f71c66.entry.js → p-5a296e1a.entry.js} +3 -3
- package/dist/arcgis-map-components/p-5d403189.entry.js +6 -0
- package/dist/arcgis-map-components/p-60ff4c84.js +6 -0
- package/dist/arcgis-map-components/p-61fb54cb.entry.js +6 -0
- package/dist/arcgis-map-components/p-64dc35d3.entry.js +6 -0
- package/dist/arcgis-map-components/{p-f92c6511.entry.js → p-66451f2f.entry.js} +3 -3
- package/dist/arcgis-map-components/p-664ccac2.entry.js +6 -0
- package/dist/arcgis-map-components/p-66f423a7.js +6 -0
- package/dist/arcgis-map-components/p-6bec198d.entry.js +6 -0
- package/dist/arcgis-map-components/p-722935f9.entry.js +6 -0
- package/dist/arcgis-map-components/{p-89471120.entry.js → p-73b27ba5.entry.js} +3 -3
- package/dist/arcgis-map-components/p-73e3a456.js +6 -0
- package/dist/arcgis-map-components/p-8b1467f8.entry.js +6 -0
- package/dist/arcgis-map-components/{p-bdce9c0c.entry.js → p-8feb3f73.entry.js} +3 -3
- package/dist/arcgis-map-components/p-9008db20.entry.js +6 -0
- package/dist/arcgis-map-components/p-97d977ee.js +6 -0
- package/dist/arcgis-map-components/{p-0be7ad8e.entry.js → p-984487fb.entry.js} +3 -3
- package/dist/arcgis-map-components/p-9b4f11e8.js +7 -0
- package/dist/arcgis-map-components/{p-724591d0.entry.js → p-9e4335fa.entry.js} +3 -3
- package/dist/arcgis-map-components/p-9eb57e19.entry.js +6 -0
- package/dist/arcgis-map-components/{p-b5468ec7.entry.js → p-a73a45e2.entry.js} +3 -3
- package/dist/arcgis-map-components/{p-35dceaf7.entry.js → p-adfbabfc.entry.js} +3 -3
- package/dist/arcgis-map-components/{p-59de0e0c.entry.js → p-b1224aad.entry.js} +3 -3
- package/dist/arcgis-map-components/{p-6c646022.js → p-b2f17170.js} +3 -3
- package/dist/arcgis-map-components/p-b38314cb.entry.js +6 -0
- package/dist/arcgis-map-components/p-b463bc4e.entry.js +6 -0
- package/dist/arcgis-map-components/{p-bdf18ef6.entry.js → p-b4f3f563.entry.js} +3 -3
- package/dist/arcgis-map-components/{p-58736db8.entry.js → p-b87d2f8f.entry.js} +3 -3
- package/dist/arcgis-map-components/{p-5fb231fd.entry.js → p-b89a61cf.entry.js} +3 -3
- package/dist/arcgis-map-components/p-bb19e202.entry.js +6 -0
- package/dist/arcgis-map-components/p-bbded273.js +6 -0
- package/dist/arcgis-map-components/{p-95f20b58.entry.js → p-c1e68ecd.entry.js} +3 -3
- package/dist/arcgis-map-components/{p-87f53bdb.entry.js → p-c2a39353.entry.js} +3 -3
- package/dist/arcgis-map-components/{p-521b7610.entry.js → p-c35cf6b5.entry.js} +3 -3
- package/dist/arcgis-map-components/{p-ac2f6e62.entry.js → p-ce14ba2d.entry.js} +3 -3
- package/dist/arcgis-map-components/{p-600c653f.entry.js → p-cff67ab5.entry.js} +3 -3
- package/dist/arcgis-map-components/{p-bee0b338.entry.js → p-d082d3ae.entry.js} +3 -3
- package/dist/arcgis-map-components/p-d2eb11ab.entry.js +6 -0
- package/dist/arcgis-map-components/p-d835236a.entry.js +6 -0
- package/dist/arcgis-map-components/{p-09f1f89e.entry.js → p-e141908d.entry.js} +3 -3
- package/dist/arcgis-map-components/{p-cf464b50.entry.js → p-e61b88c6.entry.js} +3 -3
- package/dist/arcgis-map-components/{p-5df5f493.entry.js → p-e71dcd3e.entry.js} +3 -3
- package/dist/arcgis-map-components/{p-44160e73.entry.js → p-f1f356a9.entry.js} +3 -3
- package/dist/arcgis-map-components/{p-0fcf328d.entry.js → p-f287f1fd.entry.js} +3 -3
- package/dist/arcgis-map-components/{p-bf01fd9f.entry.js → p-f3215d39.entry.js} +3 -3
- package/dist/arcgis-map-components/{p-e2464940.entry.js → p-f5942f0e.entry.js} +3 -3
- package/dist/arcgis-map-components/{p-6ea9a7b6.entry.js → p-f86356e8.entry.js} +3 -3
- package/dist/arcgis-map-components/p-fcf1f5d5.entry.js +6 -0
- package/dist/cjs/{app-globals-18ba6880.js → app-globals-bade840e.js} +2 -2
- package/dist/cjs/arcgis-area-measurement-2d.cjs.entry.js +9 -9
- package/dist/cjs/arcgis-area-measurement-3d.cjs.entry.js +9 -9
- package/dist/cjs/arcgis-attachments.cjs.entry.js +9 -9
- package/dist/cjs/arcgis-basemap-gallery.cjs.entry.js +9 -9
- package/dist/cjs/arcgis-basemap-layer-list.cjs.entry.js +9 -10
- package/dist/cjs/{arcgis-features_2.cjs.entry.js → arcgis-basemap-toggle_2.cjs.entry.js} +96 -82
- package/dist/cjs/arcgis-bookmarks.cjs.entry.js +9 -9
- package/dist/cjs/arcgis-building-explorer.cjs.entry.js +9 -9
- package/dist/cjs/arcgis-compass.cjs.entry.js +56 -25
- package/dist/cjs/arcgis-coordinate-conversion.cjs.entry.js +9 -9
- package/dist/cjs/arcgis-daylight.cjs.entry.js +7 -7
- package/dist/cjs/arcgis-directional-pad.cjs.entry.js +9 -9
- package/dist/cjs/arcgis-directions.cjs.entry.js +11 -11
- package/dist/cjs/arcgis-directline-measurement-3d.cjs.entry.js +9 -9
- package/dist/cjs/arcgis-distance-measurement-2d.cjs.entry.js +9 -9
- package/dist/cjs/arcgis-editor.cjs.entry.js +9 -9
- package/dist/cjs/arcgis-elevation-profile.cjs.entry.js +9 -9
- package/dist/cjs/arcgis-expand.cjs.entry.js +7 -7
- package/dist/cjs/arcgis-feature-form.cjs.entry.js +9 -9
- package/dist/cjs/arcgis-feature-table.cjs.entry.js +11 -11
- package/dist/cjs/arcgis-feature-templates.cjs.entry.js +9 -9
- package/dist/cjs/arcgis-feature.cjs.entry.js +9 -9
- package/dist/cjs/arcgis-features.cjs.entry.js +96 -0
- package/dist/cjs/arcgis-floor-filter.cjs.entry.js +7 -7
- package/dist/cjs/arcgis-fullscreen.cjs.entry.js +53 -23
- package/dist/cjs/arcgis-histogram-range-slider.cjs.entry.js +9 -9
- package/dist/cjs/arcgis-histogram.cjs.entry.js +9 -9
- package/dist/cjs/arcgis-home.cjs.entry.js +14 -56
- package/dist/cjs/arcgis-layer-list.cjs.entry.js +9 -11
- package/dist/cjs/arcgis-legend.cjs.entry.js +9 -9
- package/dist/cjs/arcgis-line-of-sight.cjs.entry.js +9 -9
- package/dist/cjs/arcgis-locate.cjs.entry.js +189 -32
- package/dist/cjs/arcgis-map-components.cjs.js +5 -5
- package/dist/cjs/arcgis-measurement.cjs.entry.js +9 -9
- package/dist/cjs/arcgis-navigation-toggle.cjs.entry.js +9 -9
- package/dist/cjs/arcgis-oriented-imagery-viewer.cjs.entry.js +9 -9
- package/dist/cjs/arcgis-placement.cjs.entry.js +5 -5
- package/dist/cjs/arcgis-print.cjs.entry.js +11 -11
- package/dist/cjs/arcgis-scale-bar.cjs.entry.js +7 -7
- package/dist/cjs/arcgis-scale-range-slider.cjs.entry.js +9 -9
- package/dist/cjs/arcgis-scene.cjs.entry.js +28 -28
- package/dist/cjs/arcgis-search.cjs.entry.js +9 -9
- package/dist/cjs/arcgis-shadow-cast.cjs.entry.js +9 -9
- package/dist/cjs/arcgis-sketch.cjs.entry.js +9 -9
- package/dist/cjs/arcgis-slice.cjs.entry.js +9 -9
- package/dist/cjs/arcgis-slider.cjs.entry.js +11 -11
- package/dist/cjs/arcgis-swipe.cjs.entry.js +9 -9
- package/dist/cjs/arcgis-table-list.cjs.entry.js +9 -9
- package/dist/cjs/arcgis-time-slider.cjs.entry.js +9 -9
- package/dist/cjs/arcgis-track.cjs.entry.js +87 -32
- package/dist/cjs/arcgis-utility-network-associations.cjs.entry.js +7 -7
- package/dist/cjs/arcgis-utility-network-trace.cjs.entry.js +7 -7
- package/dist/cjs/arcgis-utility-network-validate-topology.cjs.entry.js +7 -7
- package/dist/cjs/arcgis-value-picker.cjs.entry.js +9 -9
- package/dist/cjs/arcgis-version-management-service-item_2.cjs.entry.js +13 -13
- package/dist/cjs/arcgis-version-management-version-item_2.cjs.entry.js +7 -7
- package/dist/cjs/arcgis-version-management.cjs.entry.js +14 -13
- package/dist/cjs/arcgis-weather.cjs.entry.js +9 -9
- package/dist/cjs/arcgis-zoom.cjs.entry.js +53 -24
- package/dist/cjs/chunk-UO3C4VZH-69551832.js +100 -0
- package/dist/cjs/{component-utils-22cd5970.js → component-utils-e18ab772.js} +40 -13
- package/dist/cjs/{disconnected-2fbf1248.js → disconnected-f1cd1b5e.js} +3 -3
- package/dist/cjs/globalCss-028deb6c.js +52 -0
- package/dist/cjs/{index-99ee7e64.js → index-9fae8bf6.js} +77 -59
- package/dist/cjs/{index-aed895fe.js → index-c198c829.js} +30 -9
- package/dist/cjs/{index-c9205ffd.js → index-d537d30f.js} +507 -694
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +5 -5
- package/dist/cjs/{useT9n-f0c18067.js → useViewModel-1f361c59.js} +19 -20
- package/dist/cjs/{useWidget-34e425f5.js → useWidget-acadf493.js} +13 -17
- package/dist/components/arcgis-area-measurement-2d.js +3 -3
- package/dist/components/arcgis-area-measurement-3d.js +3 -3
- package/dist/components/arcgis-assets.d.ts +2 -2
- package/dist/components/arcgis-assets.js +3 -3
- package/dist/components/arcgis-attachments.js +3 -3
- package/dist/components/arcgis-basemap-gallery.js +3 -3
- package/dist/components/arcgis-basemap-layer-list.js +4 -5
- package/dist/components/arcgis-basemap-toggle.js +80 -23
- package/dist/components/arcgis-bookmarks.js +4 -4
- package/dist/components/arcgis-building-explorer.js +4 -4
- package/dist/components/arcgis-compass.js +58 -25
- package/dist/components/arcgis-coordinate-conversion.js +4 -4
- package/dist/components/arcgis-daylight.js +3 -3
- package/dist/components/arcgis-directional-pad.js +4 -4
- package/dist/components/arcgis-directions.js +7 -7
- package/dist/components/arcgis-directline-measurement-3d.js +4 -4
- package/dist/components/arcgis-distance-measurement-2d.js +4 -4
- package/dist/components/arcgis-editor.js +4 -4
- package/dist/components/arcgis-elevation-profile.js +4 -4
- package/dist/components/arcgis-expand.js +3 -3
- package/dist/components/arcgis-feature-form.js +4 -4
- package/dist/components/arcgis-feature-table.js +7 -7
- package/dist/components/arcgis-feature-templates.js +4 -4
- package/dist/components/arcgis-feature.js +4 -4
- package/dist/components/arcgis-features.js +4 -4
- package/dist/components/arcgis-floor-filter.js +3 -3
- package/dist/components/arcgis-fullscreen.js +52 -21
- package/dist/components/arcgis-histogram-range-slider.js +4 -4
- package/dist/components/arcgis-histogram.js +4 -4
- package/dist/components/arcgis-home.js +9 -51
- package/dist/components/arcgis-layer-list.js +5 -7
- package/dist/components/arcgis-legend.js +4 -4
- package/dist/components/arcgis-line-of-sight.js +4 -4
- package/dist/components/arcgis-locate.js +190 -30
- package/dist/components/arcgis-map.js +20 -20
- package/dist/components/arcgis-measurement.js +4 -4
- package/dist/components/arcgis-navigation-toggle.js +4 -4
- package/dist/components/arcgis-oriented-imagery-viewer.js +4 -4
- package/dist/components/arcgis-placement.js +3 -3
- package/dist/components/arcgis-print.js +7 -7
- package/dist/components/arcgis-scale-bar.js +3 -3
- package/dist/components/arcgis-scale-range-slider.js +4 -4
- package/dist/components/arcgis-scene.js +26 -26
- package/dist/components/arcgis-search.js +4 -4
- package/dist/components/arcgis-shadow-cast.js +4 -4
- package/dist/components/arcgis-sketch.js +4 -4
- package/dist/components/arcgis-slice.js +4 -4
- package/dist/components/arcgis-slider.js +7 -7
- package/dist/components/arcgis-swipe.js +4 -4
- package/dist/components/arcgis-table-list.js +4 -4
- package/dist/components/arcgis-time-slider.js +4 -4
- package/dist/components/arcgis-track.js +87 -30
- package/dist/components/arcgis-utility-network-associations.js +4 -4
- package/dist/components/arcgis-utility-network-trace.js +4 -4
- package/dist/components/arcgis-utility-network-validate-topology.js +4 -4
- package/dist/components/arcgis-value-picker.js +4 -4
- package/dist/components/arcgis-version-management-service-item.js +2 -2
- package/dist/components/arcgis-version-management-version-item.js +2 -2
- package/dist/components/arcgis-version-management-version-list.js +2 -2
- package/dist/components/arcgis-version-management-version-properties.js +2 -2
- package/dist/components/arcgis-version-management.js +10 -9
- package/dist/components/arcgis-weather.js +4 -4
- package/dist/components/arcgis-zoom.js +52 -22
- package/dist/components/chunk-UO3C4VZH.js +96 -0
- package/dist/components/component-utils.js +40 -13
- package/dist/components/disconnected.js +2 -2
- package/dist/components/globalCss.js +50 -0
- package/dist/components/index.js +2 -2
- package/dist/components/index2.js +71 -54
- package/dist/components/index3.js +504 -695
- package/dist/components/{useT9n.js → useViewModel.js} +14 -15
- package/dist/components/useWidget.js +12 -16
- package/dist/components/version-management-service-item.js +6 -6
- package/dist/components/version-management-version-item.js +6 -6
- package/dist/components/version-management-version-list.js +2 -2
- package/dist/components/version-management-version-properties.js +8 -8
- package/dist/esm/{app-globals-2a0e9afb.js → app-globals-ed47e16d.js} +2 -2
- package/dist/esm/arcgis-area-measurement-2d.entry.js +8 -8
- package/dist/esm/arcgis-area-measurement-3d.entry.js +8 -8
- package/dist/esm/arcgis-attachments.entry.js +8 -8
- package/dist/esm/arcgis-basemap-gallery.entry.js +8 -8
- package/dist/esm/arcgis-basemap-layer-list.entry.js +8 -9
- package/dist/esm/{arcgis-features_2.entry.js → arcgis-basemap-toggle_2.entry.js} +95 -81
- package/dist/esm/arcgis-bookmarks.entry.js +8 -8
- package/dist/esm/arcgis-building-explorer.entry.js +8 -8
- package/dist/esm/arcgis-compass.entry.js +56 -25
- package/dist/esm/arcgis-coordinate-conversion.entry.js +8 -8
- package/dist/esm/arcgis-daylight.entry.js +7 -7
- package/dist/esm/arcgis-directional-pad.entry.js +8 -8
- package/dist/esm/arcgis-directions.entry.js +10 -10
- package/dist/esm/arcgis-directline-measurement-3d.entry.js +8 -8
- package/dist/esm/arcgis-distance-measurement-2d.entry.js +8 -8
- package/dist/esm/arcgis-editor.entry.js +8 -8
- package/dist/esm/arcgis-elevation-profile.entry.js +8 -8
- package/dist/esm/arcgis-expand.entry.js +7 -7
- package/dist/esm/arcgis-feature-form.entry.js +8 -8
- package/dist/esm/arcgis-feature-table.entry.js +10 -10
- package/dist/esm/arcgis-feature-templates.entry.js +8 -8
- package/dist/esm/arcgis-feature.entry.js +8 -8
- package/dist/esm/arcgis-features.entry.js +92 -0
- package/dist/esm/arcgis-floor-filter.entry.js +7 -7
- package/dist/esm/arcgis-fullscreen.entry.js +52 -22
- package/dist/esm/arcgis-histogram-range-slider.entry.js +8 -8
- package/dist/esm/arcgis-histogram.entry.js +8 -8
- package/dist/esm/arcgis-home.entry.js +11 -53
- package/dist/esm/arcgis-layer-list.entry.js +8 -10
- package/dist/esm/arcgis-legend.entry.js +8 -8
- package/dist/esm/arcgis-line-of-sight.entry.js +8 -8
- package/dist/esm/arcgis-locate.entry.js +188 -31
- package/dist/esm/arcgis-map-components.js +6 -6
- package/dist/esm/arcgis-measurement.entry.js +8 -8
- package/dist/esm/arcgis-navigation-toggle.entry.js +8 -8
- package/dist/esm/arcgis-oriented-imagery-viewer.entry.js +8 -8
- package/dist/esm/arcgis-placement.entry.js +5 -5
- package/dist/esm/arcgis-print.entry.js +10 -10
- package/dist/esm/arcgis-scale-bar.entry.js +7 -7
- package/dist/esm/arcgis-scale-range-slider.entry.js +8 -8
- package/dist/esm/arcgis-scene.entry.js +27 -27
- package/dist/esm/arcgis-search.entry.js +8 -8
- package/dist/esm/arcgis-shadow-cast.entry.js +8 -8
- package/dist/esm/arcgis-sketch.entry.js +8 -8
- package/dist/esm/arcgis-slice.entry.js +8 -8
- package/dist/esm/arcgis-slider.entry.js +10 -10
- package/dist/esm/arcgis-swipe.entry.js +8 -8
- package/dist/esm/arcgis-table-list.entry.js +8 -8
- package/dist/esm/arcgis-time-slider.entry.js +8 -8
- package/dist/esm/arcgis-track.entry.js +86 -31
- package/dist/esm/arcgis-utility-network-associations.entry.js +7 -7
- package/dist/esm/arcgis-utility-network-trace.entry.js +7 -7
- package/dist/esm/arcgis-utility-network-validate-topology.entry.js +7 -7
- package/dist/esm/arcgis-value-picker.entry.js +8 -8
- package/dist/esm/arcgis-version-management-service-item_2.entry.js +13 -13
- package/dist/esm/arcgis-version-management-version-item_2.entry.js +7 -7
- package/dist/esm/arcgis-version-management.entry.js +12 -11
- package/dist/esm/arcgis-weather.entry.js +8 -8
- package/dist/esm/arcgis-zoom.entry.js +52 -23
- package/dist/esm/chunk-UO3C4VZH-bf0ab73d.js +96 -0
- package/dist/esm/{component-utils-d7a21069.js → component-utils-dd8ec824.js} +40 -13
- package/dist/esm/{disconnected-ee112c72.js → disconnected-069a0707.js} +3 -3
- package/dist/esm/globalCss-526c6b3c.js +50 -0
- package/dist/esm/{index-8552f550.js → index-184537f4.js} +504 -695
- package/dist/esm/{index-782d6c13.js → index-223264ee.js} +71 -54
- package/dist/esm/{index-703918f6.js → index-c0f05a18.js} +30 -9
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +6 -6
- package/dist/esm/{useT9n-2b559f0f.js → useViewModel-6f6dba39.js} +16 -17
- package/dist/esm/{useWidget-32976bb1.js → useWidget-9512028a.js} +13 -17
- package/dist/loader/cdn.js +2 -2
- package/dist/loader/index.cjs.js +2 -2
- package/dist/loader/index.es2017.js +2 -2
- package/dist/loader/index.js +2 -2
- package/dist/types/components/area-measurement-2d/area-measurement-2d.d.ts +1 -1
- package/dist/types/components/basemap-layer-list/basemap-layer-list.d.ts +1 -9
- package/dist/types/components/basemap-toggle/basemap-toggle.d.ts +68 -31
- package/dist/types/components/basemap-toggle/css.d.ts +10 -0
- package/dist/types/components/bookmarks/bookmarks.d.ts +7 -0
- package/dist/types/components/compass/compass.d.ts +33 -22
- package/dist/types/components/compass/t9n-types.d.ts +4 -0
- package/dist/types/components/coordinate-conversion/coordinate-conversion.d.ts +0 -7
- package/dist/types/components/daylight/daylight.d.ts +0 -7
- package/dist/types/components/directions/directions.d.ts +0 -14
- package/dist/types/components/distance-measurement-2d/distance-measurement-2d.d.ts +9 -1
- package/dist/types/components/editor/editor.d.ts +0 -7
- package/dist/types/components/expand/expand.d.ts +0 -1
- package/dist/types/components/feature-form/feature-form.d.ts +0 -7
- package/dist/types/components/feature-table/feature-table.d.ts +7 -0
- package/dist/types/components/features/features.d.ts +1 -1
- package/dist/types/components/fullscreen/fullscreen.d.ts +56 -32
- package/dist/types/components/histogram-range-slider/histogram-range-slider.d.ts +9 -1
- package/dist/types/components/home/home.d.ts +19 -4
- package/dist/types/components/layer-list/layer-list.d.ts +8 -3
- package/dist/types/components/legend/legend.d.ts +0 -7
- package/dist/types/components/line-of-sight/line-of-sight.d.ts +0 -7
- package/dist/types/components/locate/locate.d.ts +62 -34
- package/dist/types/components/locate/t9n-types.d.ts +17 -0
- package/dist/types/components/map/map.d.ts +2 -2
- package/dist/types/components/navigation-toggle/navigation-toggle.d.ts +1 -7
- package/dist/types/components/scale-range-slider/scale-range-slider.d.ts +1 -7
- package/dist/types/components/scene/scene.d.ts +2 -2
- package/dist/types/components/shadow-cast/shadow-cast.d.ts +7 -0
- package/dist/types/components/sketch/sketch.d.ts +1 -1
- package/dist/types/components/slider/slider.d.ts +0 -7
- package/dist/types/components/table-list/table-list.d.ts +1 -7
- package/dist/types/components/time-slider/time-slider.d.ts +3 -3
- package/dist/types/components/track/t9n-types.d.ts +8 -0
- package/dist/types/components/track/track.d.ts +48 -33
- package/dist/types/components/value-picker/value-picker.d.ts +8 -1
- package/dist/types/components/version-management/components/version-management-service-item/version-management-service-item.d.ts +2 -2
- package/dist/types/components/version-management/components/version-management-version-item/version-management-version-item.d.ts +2 -2
- package/dist/types/components/version-management/components/version-management-version-list/version-management-version-list.d.ts +2 -2
- package/dist/types/components/version-management/components/version-management-version-properties/version-management-version-properties.d.ts +2 -2
- package/dist/types/components/version-management/version-management.d.ts +123 -6
- package/dist/types/components/weather/weather.d.ts +0 -7
- package/dist/types/components/zoom/css.d.ts +4 -0
- package/dist/types/components/zoom/zoom.d.ts +75 -29
- package/dist/types/components.d.ts +138 -200
- package/dist/types/controllers/Handles.d.ts +116 -0
- package/dist/types/controllers/useHandles.d.ts +114 -0
- package/dist/types/controllers/useViewModel.d.ts +0 -1
- package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/map-components/.stencil/stories/reference/stories/Locate.stories.d.ts +2 -2
- package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/map-components/.stencil/stories/reference/stories-utils.d.ts +3 -14
- package/dist/types/dependencies.d.ts +21 -0
- package/dist/types/utils/component-utils.d.ts +7 -0
- package/package.json +14 -14
- package/dist/arcgis-map-components/p-146ed61a.js +0 -6
- package/dist/arcgis-map-components/p-1697b946.entry.js +0 -6
- package/dist/arcgis-map-components/p-16a96da5.entry.js +0 -6
- package/dist/arcgis-map-components/p-171506bb.entry.js +0 -6
- package/dist/arcgis-map-components/p-1779884a.entry.js +0 -6
- package/dist/arcgis-map-components/p-19a58e9f.entry.js +0 -6
- package/dist/arcgis-map-components/p-1bf6ecf7.entry.js +0 -6
- package/dist/arcgis-map-components/p-206ddea1.entry.js +0 -6
- package/dist/arcgis-map-components/p-29189384.entry.js +0 -6
- package/dist/arcgis-map-components/p-2f40c0c4.entry.js +0 -6
- package/dist/arcgis-map-components/p-2fcad002.js +0 -6
- package/dist/arcgis-map-components/p-6f7a84ff.entry.js +0 -6
- package/dist/arcgis-map-components/p-74da56b4.entry.js +0 -6
- package/dist/arcgis-map-components/p-8420dd5c.js +0 -6
- package/dist/arcgis-map-components/p-87f0f1ac.js +0 -6
- package/dist/arcgis-map-components/p-8ec1ca0f.js +0 -6
- package/dist/arcgis-map-components/p-992c914d.js +0 -6
- package/dist/arcgis-map-components/p-aa0a71ca.entry.js +0 -6
- package/dist/arcgis-map-components/p-b7a333b1.entry.js +0 -6
- package/dist/arcgis-map-components/p-bca9c3e7.entry.js +0 -6
- package/dist/arcgis-map-components/p-c1b22cee.entry.js +0 -6
- package/dist/arcgis-map-components/p-c6700b40.entry.js +0 -6
- package/dist/arcgis-map-components/p-c8fb0ddc.entry.js +0 -6
- package/dist/arcgis-map-components/p-d61c2316.entry.js +0 -6
- package/dist/arcgis-map-components/p-e53b9535.entry.js +0 -6
- package/dist/arcgis-map-components/p-ebdf4ed3.entry.js +0 -6
- package/dist/arcgis-map-components/p-ed52a6c6.entry.js +0 -6
- package/dist/arcgis-map-components/p-f4e57a35.entry.js +0 -6
- package/dist/arcgis-map-components/p-f602fc86.js +0 -6
- package/dist/arcgis-map-components/p-fe8c3a58.js +0 -7
- package/dist/cjs/arcgis-basemap-toggle.cjs.entry.js +0 -56
- package/dist/cjs/chunk-PVEVZB4O-c098f55a.js +0 -68
- package/dist/components/chunk-PVEVZB4O.js +0 -64
- package/dist/esm/arcgis-basemap-toggle.entry.js +0 -52
- package/dist/esm/chunk-PVEVZB4O-de851bbe.js +0 -64
- package/dist/types/components/home/t9n-types.d.ts +0 -5
- package/dist/types/components/version-management/t9n-types.d.ts +0 -45
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
-
* See https://js.arcgis.com/4.
|
|
4
|
-
* v4.
|
|
3
|
+
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
+
* v4.31.0-next.10
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
6
|
+
import { e as isNotUndefined, f as safeCall, D as Deferred, h as safeAsyncCall, j as devToolsAwareTimeout, k as importCoreAccessor, l as importCoreAccessorSupportDecorators, m as camelToKebab, a as importCoreReactiveUtils } from './index-223264ee.js';
|
|
7
7
|
|
|
8
8
|
// src/framework.ts
|
|
9
9
|
function retrieveComponentMembers(component, isLit) {
|
|
10
10
|
if (isLit) {
|
|
11
|
-
const elementProperties =
|
|
11
|
+
const elementProperties = component.constructor.elementProperties;
|
|
12
12
|
component.manager.internals.members = Object.fromEntries(
|
|
13
|
-
Array.from(
|
|
14
|
-
|
|
15
|
-
[
|
|
16
|
-
|
|
13
|
+
Array.from(
|
|
14
|
+
elementProperties,
|
|
15
|
+
([name, descriptor]) => descriptor.noAccessor ? void 0 : [
|
|
16
|
+
name,
|
|
17
|
+
[
|
|
18
|
+
(descriptor.readOnly ? 2048 /* ReadOnly */ : 0) | (descriptor.state ? 32 /* State */ : descriptor.type === Number ? 2 /* Number */ : descriptor.type === Boolean ? 4 /* Boolean */ : 1 /* String */)
|
|
19
|
+
]
|
|
17
20
|
]
|
|
18
|
-
|
|
21
|
+
).filter(isNotUndefined)
|
|
19
22
|
);
|
|
20
23
|
} else {
|
|
21
24
|
const constructor = component.constructor;
|
|
@@ -23,13 +26,14 @@ function retrieveComponentMembers(component, isLit) {
|
|
|
23
26
|
constructor.__registerControllers = void 0;
|
|
24
27
|
if (typeof members !== "object") {
|
|
25
28
|
throw new Error(
|
|
26
|
-
"Failed to retrieve
|
|
29
|
+
"Failed to retrieve component meta"
|
|
27
30
|
);
|
|
28
31
|
}
|
|
29
|
-
component.manager.internals.members =
|
|
32
|
+
component.manager.internals.members = Object.fromEntries(
|
|
33
|
+
Object.entries(members).filter(([_name, [propType]]) => (propType & 63 /* PropLike */) !== 0)
|
|
34
|
+
);
|
|
30
35
|
}
|
|
31
36
|
}
|
|
32
|
-
var getLitProperties = (component) => component.constructor.elementProperties;
|
|
33
37
|
function parsePropertyValue(value, type = 8 /* Any */) {
|
|
34
38
|
const isComplex = value == null || typeof value === "object" || typeof value === "function";
|
|
35
39
|
if (isComplex) {
|
|
@@ -45,177 +49,103 @@ function parsePropertyValue(value, type = 8 /* Any */) {
|
|
|
45
49
|
return value;
|
|
46
50
|
}
|
|
47
51
|
}
|
|
48
|
-
var makeMemberFilter = (filter) => (component) => {
|
|
49
|
-
const members = component.manager.internals.members;
|
|
50
|
-
return Object.entries(members ?? {}).filter(([_name, [propType]]) => (propType & filter) !== 0).map(([name]) => name);
|
|
51
|
-
};
|
|
52
|
-
var getPropLikeMembers = makeMemberFilter(63 /* PropLike */);
|
|
53
52
|
var getMemberType = (component, name) => component.manager.internals.members?.[name]?.[0];
|
|
54
|
-
function getPropType(component, name) {
|
|
55
|
-
const type = getMemberType(component, name);
|
|
56
|
-
if (type === void 0) {
|
|
57
|
-
return void 0;
|
|
58
|
-
} else if (type & 32 /* State */) {
|
|
59
|
-
return "state";
|
|
60
|
-
} else {
|
|
61
|
-
return "prop";
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
53
|
|
|
65
54
|
// src/types.ts
|
|
66
|
-
var controllerSymbol = Symbol("controller");
|
|
55
|
+
var controllerSymbol = Symbol.for("controller");
|
|
67
56
|
|
|
68
57
|
// src/utils.ts
|
|
69
58
|
var isController = (value) => typeof value === "object" && value !== null && (controllerSymbol in value || "hostConnected" in value || "hostDisconnected" in value || "hostUpdate" in value || "hostUpdated" in value);
|
|
70
59
|
|
|
71
60
|
// src/ControllerInternals.ts
|
|
72
|
-
var
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
* The type definition has to be duplicated due to the
|
|
77
|
-
* "'use' is referenced directly or indirectly in its own type annotation."
|
|
78
|
-
* error
|
|
79
|
-
*/
|
|
80
|
-
this.use = async (value, watchExports) => {
|
|
81
|
-
const controller = this.useRefSync(value);
|
|
82
|
-
if (controller === void 0) {
|
|
83
|
-
if (typeof watchExports === "function") {
|
|
84
|
-
const error = new Error(
|
|
85
|
-
`Unable to resolve a controller from the provided value, so can't watch it's exports. ${unresolvableExports}`
|
|
86
|
-
);
|
|
87
|
-
{
|
|
88
|
-
console.error(error);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
return value;
|
|
92
|
-
}
|
|
93
|
-
await controller.ready;
|
|
94
|
-
if (typeof watchExports === "function") {
|
|
95
|
-
if (controller.watchExports === void 0) {
|
|
96
|
-
throw new Error(`The controller must implement watchExports method to support watching exports`);
|
|
97
|
-
}
|
|
98
|
-
const unsubscribe = controller.watchExports(
|
|
99
|
-
(exports) => watchExports(exports, unsubscribe)
|
|
100
|
-
);
|
|
101
|
-
}
|
|
102
|
-
return controller.exports;
|
|
103
|
-
};
|
|
104
|
-
this.useRef = async (value) => {
|
|
105
|
-
const controller = this.useRefSync(value);
|
|
106
|
-
if (controller === void 0) {
|
|
107
|
-
throw new Error(`Unable to resolve a controller from the provided value. ${unresolvableExports}`);
|
|
108
|
-
}
|
|
109
|
-
await controller.ready;
|
|
110
|
-
return controller;
|
|
111
|
-
};
|
|
112
|
-
this.useRefSync = (value) => {
|
|
113
|
-
const ambientChildController = this.retrieveAmbientChildController();
|
|
114
|
-
if (ambientChildController !== void 0) {
|
|
115
|
-
return ambientChildController;
|
|
116
|
-
}
|
|
117
|
-
const component = Controller.internals.retrieveComponent();
|
|
118
|
-
const controller = component.manager.internals.resolveExports(value);
|
|
119
|
-
if (controller !== void 0) {
|
|
120
|
-
return controller;
|
|
121
|
-
}
|
|
122
|
-
if (isController(value)) {
|
|
123
|
-
return value;
|
|
124
|
-
}
|
|
125
|
-
return void 0;
|
|
126
|
-
};
|
|
127
|
-
this.shouldBypassSetter = false;
|
|
128
|
-
this.shouldBypassGetter = false;
|
|
129
|
-
this.shouldBypassReadonly = false;
|
|
130
|
-
/**
|
|
131
|
-
* A map from component instance or component element to component instance.
|
|
132
|
-
* To get from component instance or component element to component element,
|
|
133
|
-
* you can just use the .el property
|
|
134
|
-
*/
|
|
135
|
-
this.elementToInstance = /* @__PURE__ */ new WeakMap();
|
|
61
|
+
var ambientComponent;
|
|
62
|
+
function setAmbientComponent(component) {
|
|
63
|
+
if (ambientComponent === component) {
|
|
64
|
+
return;
|
|
136
65
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
setAmbientComponent(component) {
|
|
142
|
-
if (this._ambientComponent === component) {
|
|
143
|
-
return;
|
|
66
|
+
ambientComponent = component;
|
|
67
|
+
queueMicrotask(() => {
|
|
68
|
+
if (ambientComponent === component) {
|
|
69
|
+
ambientComponent = void 0;
|
|
144
70
|
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function retrieveComponent(name2) {
|
|
74
|
+
return ambientComponent;
|
|
75
|
+
}
|
|
76
|
+
var ambientControllers = [];
|
|
77
|
+
function setParentController(controller) {
|
|
78
|
+
if (controller === void 0) {
|
|
79
|
+
ambientControllers = [];
|
|
80
|
+
return;
|
|
151
81
|
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
"make sure you are using controller.use.\n",
|
|
166
|
-
"You might also have multiple instances of Controllers loaded"
|
|
167
|
-
].join("\n")
|
|
168
|
-
);
|
|
169
|
-
}
|
|
170
|
-
return this._ambientComponent;
|
|
82
|
+
const index = ambientControllers.indexOf(controller);
|
|
83
|
+
ambientControllers = index === -1 ? [...ambientControllers, controller] : ambientControllers.slice(0, index + 1);
|
|
84
|
+
queueMicrotask(() => {
|
|
85
|
+
ambientControllers = [];
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
function retrieveParentControllers() {
|
|
89
|
+
return ambientControllers;
|
|
90
|
+
}
|
|
91
|
+
var ambientChildController;
|
|
92
|
+
function setAmbientChildController(controller) {
|
|
93
|
+
if (ambientChildController === controller) {
|
|
94
|
+
return;
|
|
171
95
|
}
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
if (controller === void 0) {
|
|
177
|
-
this._ambientControllers = [];
|
|
178
|
-
return;
|
|
96
|
+
ambientChildController = controller;
|
|
97
|
+
queueMicrotask(() => {
|
|
98
|
+
if (ambientChildController === controller) {
|
|
99
|
+
ambientChildController = void 0;
|
|
179
100
|
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
function retrieveAmbientChildController() {
|
|
104
|
+
const controller = ambientChildController;
|
|
105
|
+
ambientChildController = void 0;
|
|
106
|
+
return controller;
|
|
107
|
+
}
|
|
108
|
+
var use = async (value, watchExports) => {
|
|
109
|
+
const controller = useRefSync(value);
|
|
110
|
+
if (controller === void 0) {
|
|
111
|
+
return value;
|
|
188
112
|
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
if (this._ambientChildController === controller) {
|
|
195
|
-
return;
|
|
196
|
-
}
|
|
197
|
-
this._ambientChildController = controller;
|
|
198
|
-
queueMicrotask(() => {
|
|
199
|
-
if (this._ambientChildController === controller) {
|
|
200
|
-
this._ambientChildController = void 0;
|
|
201
|
-
}
|
|
202
|
-
});
|
|
113
|
+
await controller.ready;
|
|
114
|
+
if (typeof watchExports === "function") {
|
|
115
|
+
const unsubscribe = controller.watchExports(
|
|
116
|
+
(exports) => watchExports(exports, unsubscribe)
|
|
117
|
+
);
|
|
203
118
|
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
119
|
+
return controller.exports;
|
|
120
|
+
};
|
|
121
|
+
var useRef = async (value) => {
|
|
122
|
+
const controller = useRefSync(value);
|
|
123
|
+
await controller.ready;
|
|
124
|
+
return controller;
|
|
125
|
+
};
|
|
126
|
+
var useRefSync = (value) => {
|
|
127
|
+
const ambientChildController2 = retrieveAmbientChildController();
|
|
128
|
+
if (ambientChildController2 !== void 0) {
|
|
129
|
+
return ambientChildController2;
|
|
130
|
+
}
|
|
131
|
+
const component = retrieveComponent();
|
|
132
|
+
const controller = component.manager.internals.resolveExports(value);
|
|
133
|
+
if (controller !== void 0) {
|
|
207
134
|
return controller;
|
|
208
135
|
}
|
|
136
|
+
if (isController(value)) {
|
|
137
|
+
return value;
|
|
138
|
+
}
|
|
139
|
+
return void 0;
|
|
209
140
|
};
|
|
210
|
-
var
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
// src/Controller.ts
|
|
141
|
+
var shouldBypass = {
|
|
142
|
+
setter: false,
|
|
143
|
+
getter: false,
|
|
144
|
+
readOnly: false
|
|
145
|
+
};
|
|
146
|
+
var elementToInstance = /* @__PURE__ */ new WeakMap();
|
|
217
147
|
var _a;
|
|
218
|
-
var
|
|
148
|
+
var Controller = class {
|
|
219
149
|
constructor(component) {
|
|
220
150
|
this._callbacks = {
|
|
221
151
|
hostConnected: [],
|
|
@@ -228,7 +158,7 @@ var _Controller = class _Controller {
|
|
|
228
158
|
hostLifecycle: []
|
|
229
159
|
};
|
|
230
160
|
this._ready = new Deferred();
|
|
231
|
-
this.
|
|
161
|
+
this._lifecycleCleanups = [];
|
|
232
162
|
this.connectedCalled = false;
|
|
233
163
|
this.willLoadCalled = false;
|
|
234
164
|
this.didLoadCalled = false;
|
|
@@ -241,20 +171,12 @@ var _Controller = class _Controller {
|
|
|
241
171
|
*/
|
|
242
172
|
this._exports = makeProvisionalValue(this);
|
|
243
173
|
this._exportWatchers = /* @__PURE__ */ new Set();
|
|
244
|
-
const resolvedComponent = toControllerHost(
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
Object.defineProperty(this, "component", {
|
|
248
|
-
writable: false,
|
|
249
|
-
enumerable: false,
|
|
250
|
-
configurable: true,
|
|
251
|
-
value: resolvedComponent
|
|
252
|
-
});
|
|
253
|
-
this.component.addController(this);
|
|
254
|
-
_Controller.internals.setParentController(this);
|
|
255
|
-
if ("hostDestroy" in this) {
|
|
256
|
-
this.component.manager.ensureHasDestroy();
|
|
174
|
+
const resolvedComponent = toControllerHost(component ?? retrieveComponent());
|
|
175
|
+
{
|
|
176
|
+
this.component = resolvedComponent;
|
|
257
177
|
}
|
|
178
|
+
this.component.addController(this);
|
|
179
|
+
setParentController(this);
|
|
258
180
|
const manager = this.component.manager;
|
|
259
181
|
const isInControllerManager = manager === void 0;
|
|
260
182
|
if (!isInControllerManager) {
|
|
@@ -292,12 +214,13 @@ var _Controller = class _Controller {
|
|
|
292
214
|
* re-render of the component
|
|
293
215
|
*/
|
|
294
216
|
set exports(exports) {
|
|
295
|
-
|
|
217
|
+
const oldExports = this._exports;
|
|
218
|
+
if (oldExports !== exports) {
|
|
296
219
|
this._exports = exports;
|
|
297
|
-
if (this.connectedCalled) {
|
|
298
|
-
this.component.requestUpdate();
|
|
299
|
-
}
|
|
300
220
|
this._exportWatchers.forEach(safeCall);
|
|
221
|
+
if (this.connectedCalled && this.assignedProperty !== false) {
|
|
222
|
+
this.component.requestUpdate(this.assignedProperty, oldExports);
|
|
223
|
+
}
|
|
301
224
|
}
|
|
302
225
|
this._ready.resolve(exports);
|
|
303
226
|
}
|
|
@@ -331,8 +254,8 @@ var _Controller = class _Controller {
|
|
|
331
254
|
* require awaiting them as they are guaranteed to be loaded by then.
|
|
332
255
|
*/
|
|
333
256
|
get use() {
|
|
334
|
-
|
|
335
|
-
return
|
|
257
|
+
setAmbientComponent(this.component);
|
|
258
|
+
return use;
|
|
336
259
|
}
|
|
337
260
|
/**
|
|
338
261
|
* Just like controller.use, but returns the controller itself, rather than it's
|
|
@@ -348,127 +271,17 @@ var _Controller = class _Controller {
|
|
|
348
271
|
* some other method on the controller
|
|
349
272
|
*/
|
|
350
273
|
get useRef() {
|
|
351
|
-
|
|
352
|
-
return
|
|
274
|
+
setAmbientComponent(this.component);
|
|
275
|
+
return useRef;
|
|
353
276
|
}
|
|
354
277
|
/**
|
|
355
278
|
* Like useRef, but doesn't wait for the controller to get ready
|
|
356
|
-
*/
|
|
357
|
-
get useRefSync() {
|
|
358
|
-
_Controller.internals.setAmbientComponent(this.component);
|
|
359
|
-
return _Controller.internals.useRefSync;
|
|
360
|
-
}
|
|
361
|
-
/**
|
|
362
|
-
* If you need to set a prop/state without triggering the custom setter you
|
|
363
|
-
* defined with getSet()/dynamicGetSet()/readonly(), set the value inside
|
|
364
|
-
* of this function
|
|
365
|
-
*
|
|
366
|
-
* @example
|
|
367
|
-
* @Prop() readOnly = this.manager.readOnly(true);
|
|
368
|
-
*
|
|
369
|
-
* someAction(): void {
|
|
370
|
-
* this.manager.bypassSetter(()=>{
|
|
371
|
-
* this.readOnly = false;
|
|
372
|
-
* });
|
|
373
|
-
* }
|
|
374
|
-
*
|
|
375
|
-
*/
|
|
376
|
-
bypassSetter(callback) {
|
|
377
|
-
_Controller.internals.shouldBypassSetter = true;
|
|
378
|
-
try {
|
|
379
|
-
return callback();
|
|
380
|
-
} finally {
|
|
381
|
-
_Controller.internals.shouldBypassSetter = false;
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
/**
|
|
385
|
-
* Like bypassSetter, but only bypasses this.manager.readonly(), rather that
|
|
386
|
-
* all setters set using this.manager.getSet()
|
|
387
|
-
*/
|
|
388
|
-
bypassReadonly(callback) {
|
|
389
|
-
_Controller.internals.shouldBypassReadonly = true;
|
|
390
|
-
try {
|
|
391
|
-
return callback();
|
|
392
|
-
} finally {
|
|
393
|
-
_Controller.internals.shouldBypassReadonly = false;
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
/**
|
|
397
|
-
* Property reads inside of this function will bypass any custom getter you
|
|
398
|
-
* may have, and read the value directly from what's stored in Stencil/Lit.
|
|
399
279
|
*
|
|
400
|
-
*
|
|
401
|
-
* bypassGetter won't make that property tracked.
|
|
402
|
-
*
|
|
403
|
-
* @example
|
|
404
|
-
* reactiveUtils.watch(
|
|
405
|
-
* ()=>{
|
|
406
|
-
* this.manager.bypassGetter(()=>{
|
|
407
|
-
* console.log(this.someProp);
|
|
408
|
-
* });
|
|
409
|
-
* return this.prop;
|
|
410
|
-
* },
|
|
411
|
-
* console.log
|
|
412
|
-
* )
|
|
280
|
+
* @internal
|
|
413
281
|
*/
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
return callback();
|
|
418
|
-
} finally {
|
|
419
|
-
_Controller.internals.shouldBypassGetter = false;
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
/**
|
|
423
|
-
* Like this.manager.getSet(), but can be called on any component's
|
|
424
|
-
* state/prop from anywhere, rather than just from the default value
|
|
425
|
-
*/
|
|
426
|
-
dynamicGetSet(name, getSet) {
|
|
427
|
-
this.genericGetSet(name, getSet);
|
|
428
|
-
}
|
|
429
|
-
/**
|
|
430
|
-
* Like dynamicGetSet, but less type-safe. Useful in cases when trying to set
|
|
431
|
-
* getters/setters in place where property names & types are not known
|
|
432
|
-
* statically
|
|
433
|
-
*/
|
|
434
|
-
genericGetSet(property, getSet) {
|
|
435
|
-
var _a2, _b;
|
|
436
|
-
const genericGetSet = getSet;
|
|
437
|
-
const internals = this.component.manager.internals;
|
|
438
|
-
if (typeof genericGetSet.get === "function") {
|
|
439
|
-
(_a2 = internals.getters)[property] ?? (_a2[property] = []);
|
|
440
|
-
internals.getters[property].unshift(genericGetSet.get);
|
|
441
|
-
}
|
|
442
|
-
const set = genericGetSet.set === "ignore" ? ignoreSet : genericGetSet.set;
|
|
443
|
-
if (set) {
|
|
444
|
-
(_b = internals.setters)[property] ?? (_b[property] = []);
|
|
445
|
-
internals.setters[property].unshift(set);
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
// FEATURE: improve typings
|
|
449
|
-
/**
|
|
450
|
-
* Dynamically set a watcher for any reactive property
|
|
451
|
-
*/
|
|
452
|
-
watch(property, callback) {
|
|
453
|
-
var _a2;
|
|
454
|
-
const type = getMemberType(this.component, property);
|
|
455
|
-
if (type === void 0) {
|
|
456
|
-
throw new Error(
|
|
457
|
-
`Trying to watch a non-@property, non-@state property "${property}". Either convert it into a @state() or use get/set syntax`
|
|
458
|
-
);
|
|
459
|
-
}
|
|
460
|
-
const internals = this.component.manager.internals;
|
|
461
|
-
(_a2 = internals.allWatchers)[property] ?? (_a2[property] = []);
|
|
462
|
-
const watchers = internals.allWatchers[property];
|
|
463
|
-
const genericCallback = callback;
|
|
464
|
-
const safeCallback = (newValue, oldValue, propertyName) => safeCall(genericCallback, null, newValue, oldValue, propertyName);
|
|
465
|
-
watchers.push(safeCallback);
|
|
466
|
-
return () => {
|
|
467
|
-
const index = watchers.indexOf(safeCallback);
|
|
468
|
-
if (index !== -1) {
|
|
469
|
-
watchers.splice(index, 1);
|
|
470
|
-
}
|
|
471
|
-
};
|
|
282
|
+
get useRefSync() {
|
|
283
|
+
setAmbientComponent(this.component);
|
|
284
|
+
return useRefSync;
|
|
472
285
|
}
|
|
473
286
|
controllerRemoved() {
|
|
474
287
|
if (this.component.el.isConnected) {
|
|
@@ -496,7 +309,6 @@ var _Controller = class _Controller {
|
|
|
496
309
|
this._callbacks.hostUpdated.push(callback);
|
|
497
310
|
}
|
|
498
311
|
onDestroy(callback) {
|
|
499
|
-
this.component.manager.ensureHasDestroy();
|
|
500
312
|
this._callbacks.hostDestroy.push(callback);
|
|
501
313
|
}
|
|
502
314
|
onLifecycle(callback) {
|
|
@@ -506,6 +318,7 @@ var _Controller = class _Controller {
|
|
|
506
318
|
}
|
|
507
319
|
}
|
|
508
320
|
// Call each lifecycle hook
|
|
321
|
+
/** @internal */
|
|
509
322
|
triggerConnected() {
|
|
510
323
|
const genericController = this;
|
|
511
324
|
if (genericController.hostConnected) {
|
|
@@ -515,15 +328,17 @@ var _Controller = class _Controller {
|
|
|
515
328
|
this.triggerLifecycle();
|
|
516
329
|
this.connectedCalled = true;
|
|
517
330
|
}
|
|
331
|
+
/** @internal */
|
|
518
332
|
triggerDisconnected() {
|
|
519
333
|
const genericController = this;
|
|
520
334
|
if (genericController.hostDisconnected) {
|
|
521
335
|
safeCall(genericController.hostDisconnected, genericController);
|
|
522
336
|
}
|
|
523
337
|
this._callbacks.hostDisconnected.forEach(safeCall);
|
|
524
|
-
this.
|
|
525
|
-
this.
|
|
338
|
+
this._lifecycleCleanups.forEach(safeCall);
|
|
339
|
+
this._lifecycleCleanups = [];
|
|
526
340
|
}
|
|
341
|
+
/** @internal */
|
|
527
342
|
async triggerLoad() {
|
|
528
343
|
if (this.willLoadCalled) {
|
|
529
344
|
return;
|
|
@@ -538,6 +353,7 @@ var _Controller = class _Controller {
|
|
|
538
353
|
}
|
|
539
354
|
this._ready.resolve(this._exports);
|
|
540
355
|
}
|
|
356
|
+
/** @internal */
|
|
541
357
|
triggerLoaded() {
|
|
542
358
|
if (this.didLoadCalled) {
|
|
543
359
|
return;
|
|
@@ -549,20 +365,23 @@ var _Controller = class _Controller {
|
|
|
549
365
|
this._callbacks.hostLoaded.forEach(safeCall);
|
|
550
366
|
this.didLoadCalled = true;
|
|
551
367
|
}
|
|
552
|
-
|
|
368
|
+
/** @internal */
|
|
369
|
+
triggerUpdate(changedProperties) {
|
|
553
370
|
const genericController = this;
|
|
554
371
|
if (genericController.hostUpdate) {
|
|
555
|
-
safeCall(genericController.hostUpdate, genericController);
|
|
372
|
+
safeCall(genericController.hostUpdate, genericController, changedProperties);
|
|
556
373
|
}
|
|
557
|
-
this._callbacks.hostUpdate.forEach(
|
|
374
|
+
this._callbacks.hostUpdate.forEach(callUpdate, changedProperties);
|
|
558
375
|
}
|
|
559
|
-
|
|
376
|
+
/** @internal */
|
|
377
|
+
triggerUpdated(changedProperties) {
|
|
560
378
|
const genericController = this;
|
|
561
379
|
if (genericController.hostUpdated) {
|
|
562
|
-
safeCall(genericController.hostUpdated, genericController);
|
|
380
|
+
safeCall(genericController.hostUpdated, genericController, changedProperties);
|
|
563
381
|
}
|
|
564
|
-
this._callbacks.hostUpdated.forEach(
|
|
382
|
+
this._callbacks.hostUpdated.forEach(callUpdate, changedProperties);
|
|
565
383
|
}
|
|
384
|
+
/** @internal */
|
|
566
385
|
triggerDestroy() {
|
|
567
386
|
const genericController = this;
|
|
568
387
|
if (genericController.hostDestroy) {
|
|
@@ -570,45 +389,32 @@ var _Controller = class _Controller {
|
|
|
570
389
|
}
|
|
571
390
|
this._callbacks.hostDestroy.forEach(safeCall);
|
|
572
391
|
}
|
|
392
|
+
/** @internal */
|
|
573
393
|
triggerLifecycle() {
|
|
574
394
|
const genericController = this;
|
|
575
395
|
if (genericController.hostLifecycle) {
|
|
576
396
|
this._callLifecycle(() => genericController.hostLifecycle());
|
|
577
397
|
}
|
|
578
|
-
this._callbacks.hostLifecycle.forEach(
|
|
398
|
+
this._callbacks.hostLifecycle.forEach(this._callLifecycle, this);
|
|
579
399
|
}
|
|
580
400
|
_callLifecycle(callback) {
|
|
581
|
-
|
|
401
|
+
setAmbientComponent(this.component);
|
|
582
402
|
const cleanupRaw = safeCall(callback);
|
|
583
403
|
const cleanup = Array.isArray(cleanupRaw) ? cleanupRaw : [cleanupRaw];
|
|
584
404
|
cleanup.forEach((cleanup2) => {
|
|
585
405
|
if (typeof cleanup2 === "function") {
|
|
586
|
-
this.
|
|
406
|
+
this._lifecycleCleanups.push(cleanup2);
|
|
587
407
|
} else if (typeof cleanup2 === "object" && typeof cleanup2.remove === "function") {
|
|
588
|
-
this.
|
|
408
|
+
this._lifecycleCleanups.push(cleanup2.remove);
|
|
589
409
|
}
|
|
590
410
|
});
|
|
591
411
|
}
|
|
592
412
|
};
|
|
593
413
|
_a = controllerSymbol;
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
constructor(component) {
|
|
599
|
-
super(component);
|
|
600
|
-
}
|
|
601
|
-
// Overriding super's watch only to improve typing
|
|
602
|
-
watch(property, callback) {
|
|
603
|
-
return super.watch(
|
|
604
|
-
property,
|
|
605
|
-
callback
|
|
606
|
-
);
|
|
607
|
-
}
|
|
608
|
-
dynamicGetSet(property, getSet) {
|
|
609
|
-
super.genericGetSet(property, getSet);
|
|
610
|
-
}
|
|
611
|
-
};
|
|
414
|
+
function callUpdate(callback) {
|
|
415
|
+
safeCall(callback, void 0, this);
|
|
416
|
+
}
|
|
417
|
+
var GenericController = Controller;
|
|
612
418
|
function makeProvisionalValue(base) {
|
|
613
419
|
if (typeof base !== "object" && typeof base !== "function" || base === null) {
|
|
614
420
|
return base;
|
|
@@ -621,28 +427,20 @@ function makeProvisionalValue(base) {
|
|
|
621
427
|
if (prop in target || prop in Promise.prototype || typeof prop === "symbol") {
|
|
622
428
|
return typeof target === "function" ? target[prop] : Reflect.get(target, prop, receiver);
|
|
623
429
|
}
|
|
624
|
-
console.error(`Trying to access "${prop.toString()}" on the controller before it's loaded. ${accessBeforeLoad}`);
|
|
625
430
|
return void 0;
|
|
626
431
|
},
|
|
627
|
-
set(target, prop, newValue, receiver) {
|
|
628
|
-
console.error(`Trying to set "${prop.toString()}" on the controller before it's loaded. ${accessBeforeLoad}`);
|
|
432
|
+
set: (target, prop, newValue, receiver) => {
|
|
629
433
|
return Reflect.set(target, prop, newValue, receiver);
|
|
630
434
|
}
|
|
631
435
|
});
|
|
632
436
|
return proxy2;
|
|
633
437
|
}
|
|
634
438
|
var cyclical = /* @__PURE__ */ new Set(["exports", "_exports"]);
|
|
635
|
-
var accessBeforeLoad = "" ;
|
|
636
439
|
function toControllerHost(component) {
|
|
637
|
-
|
|
440
|
+
{
|
|
638
441
|
return component;
|
|
639
|
-
} else {
|
|
640
|
-
throw new Error(
|
|
641
|
-
"Component does not implement ControllerHost. This might be because you forgot to add 'manager: Controller<this> = useControllerManager(this);' in your component, or you tried to use some controller before that line"
|
|
642
|
-
);
|
|
643
442
|
}
|
|
644
443
|
}
|
|
645
|
-
var ignoreSet = (_, value) => value;
|
|
646
444
|
function trackPropertyKey(object, onResolved, defaultValue) {
|
|
647
445
|
const keys = Object.keys(object);
|
|
648
446
|
const keyCount = keys.length;
|
|
@@ -681,6 +479,24 @@ function keyTrackResolve() {
|
|
|
681
479
|
});
|
|
682
480
|
keyTrackMap = void 0;
|
|
683
481
|
}
|
|
482
|
+
function watch(component, property, callback) {
|
|
483
|
+
var _a2;
|
|
484
|
+
const genericProperty = property;
|
|
485
|
+
const internals = component.manager.internals;
|
|
486
|
+
(_a2 = internals.allWatchers)[genericProperty] ?? (_a2[genericProperty] = []);
|
|
487
|
+
const watchers = internals.allWatchers[genericProperty];
|
|
488
|
+
const genericCallback = callback;
|
|
489
|
+
const safeCallback = (newValue, oldValue, propertyName) => safeCall(genericCallback, null, newValue, oldValue, propertyName);
|
|
490
|
+
watchers.push(safeCallback);
|
|
491
|
+
return () => {
|
|
492
|
+
const index = watchers.indexOf(safeCallback);
|
|
493
|
+
if (index !== -1) {
|
|
494
|
+
watchers.splice(index, 1);
|
|
495
|
+
}
|
|
496
|
+
};
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
// src/ComponentInternals.ts
|
|
684
500
|
var ComponentInternals = class {
|
|
685
501
|
constructor(component) {
|
|
686
502
|
/**
|
|
@@ -695,79 +511,56 @@ var ComponentInternals = class {
|
|
|
695
511
|
*/
|
|
696
512
|
this.enabledWatchers = {};
|
|
697
513
|
this.allWatchers = {};
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
}
|
|
709
|
-
};
|
|
710
|
-
candidateHosts.forEach(
|
|
711
|
-
(host) => this.component.manager.trackPropertyKey(
|
|
712
|
-
host,
|
|
713
|
-
(key) => resolved(
|
|
714
|
-
key === void 0 ? void 0 : {
|
|
715
|
-
key,
|
|
716
|
-
host,
|
|
717
|
-
type: "property",
|
|
718
|
-
domValue: void 0
|
|
719
|
-
}
|
|
720
|
-
),
|
|
721
|
-
defaultValue
|
|
722
|
-
)
|
|
723
|
-
);
|
|
724
|
-
this.component.manager.trackPropKey((key, domValue) => {
|
|
725
|
-
const propType = key === void 0 ? void 0 : getPropType(this.component, key);
|
|
726
|
-
resolved(
|
|
727
|
-
key === void 0 ? void 0 : {
|
|
728
|
-
key,
|
|
729
|
-
host: this.component,
|
|
730
|
-
type: propType ?? "prop",
|
|
731
|
-
domValue: propType === "prop" ? domValue : void 0
|
|
732
|
-
}
|
|
733
|
-
);
|
|
734
|
-
}, defaultValue);
|
|
735
|
-
return defaultValue;
|
|
736
|
-
};
|
|
737
|
-
this.trackPropKey = (onResolved, defaultValue) => {
|
|
738
|
-
if (this._trackedValue !== nothing && this._trackedValue !== defaultValue) {
|
|
739
|
-
this._firePropertyTrackers(void 0, void 0, void 0);
|
|
740
|
-
}
|
|
741
|
-
if (this._keyTrackers.length === 0) {
|
|
742
|
-
queueMicrotask(() => this._firePropertyTrackers(void 0, void 0, void 0));
|
|
514
|
+
/**
|
|
515
|
+
* "readOnly" is not enabled initially since we need to allow to set property
|
|
516
|
+
* default values in the constructor.
|
|
517
|
+
* For Stencil, readonly is enabled by the `readonly()` controller.
|
|
518
|
+
* For Lit, we have the following logic:
|
|
519
|
+
*/
|
|
520
|
+
this.enableReadonly = () => {
|
|
521
|
+
this.enableReadonly = void 0;
|
|
522
|
+
if (!this.component.manager.isLit) {
|
|
523
|
+
return;
|
|
743
524
|
}
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
525
|
+
const internals = this.component.manager.internals;
|
|
526
|
+
Object.entries(internals.members).forEach(([name2, [type]]) => {
|
|
527
|
+
var _a2;
|
|
528
|
+
const isReadOnly = type & 2048 /* ReadOnly */;
|
|
529
|
+
if (isReadOnly) {
|
|
530
|
+
(_a2 = internals.setters)[name2] ?? (_a2[name2] = []);
|
|
531
|
+
internals.setters[name2].push(internals.readonlySetter);
|
|
532
|
+
}
|
|
533
|
+
});
|
|
749
534
|
};
|
|
750
|
-
this.
|
|
751
|
-
this.
|
|
535
|
+
this.trackedValue = nothing;
|
|
536
|
+
this.keyTrackers = [];
|
|
752
537
|
this.getters = {};
|
|
753
538
|
this.setters = {};
|
|
754
539
|
this.accessorGetter = {};
|
|
755
540
|
this.accessorSetter = {};
|
|
756
541
|
this.reactiveUtilsIntegrations = /* @__PURE__ */ new Set();
|
|
757
542
|
this._exports = /* @__PURE__ */ new WeakMap();
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
543
|
+
this.readonlySetter = (newValue, _oldValue, property) => {
|
|
544
|
+
if (shouldBypass.readOnly) {
|
|
545
|
+
return newValue;
|
|
546
|
+
}
|
|
547
|
+
throw new Error(
|
|
548
|
+
`Cannot assign to read-only property "${property}" of ${this.component.el.tagName.toLowerCase()}. Trying to assign "${String(
|
|
549
|
+
newValue
|
|
550
|
+
)}"`
|
|
551
|
+
);
|
|
552
|
+
};
|
|
553
|
+
{
|
|
554
|
+
this.component = component;
|
|
555
|
+
}
|
|
764
556
|
}
|
|
765
|
-
|
|
766
|
-
const trackers = this.
|
|
767
|
-
this.
|
|
768
|
-
this.
|
|
769
|
-
trackers.forEach((tracker) => tracker(key, value
|
|
557
|
+
firePropTrackers(key, value) {
|
|
558
|
+
const trackers = this.keyTrackers;
|
|
559
|
+
this.trackedValue = nothing;
|
|
560
|
+
this.keyTrackers = [];
|
|
561
|
+
trackers.forEach((tracker) => tracker(key, value));
|
|
770
562
|
}
|
|
563
|
+
// REFACTOR: once Stencil is no longer supported, simplify this with Lit's getPropertyDescriptor(), or https://github.com/shoelace-style/shoelace/issues/1990
|
|
771
564
|
/**
|
|
772
565
|
* Configure a getter or setter for a given \@Prop/\@State
|
|
773
566
|
*
|
|
@@ -777,59 +570,51 @@ var ComponentInternals = class {
|
|
|
777
570
|
* ComponentInternals.getters/setters properties, and then call getSetProxy
|
|
778
571
|
* to apply the changes to the prototype
|
|
779
572
|
*/
|
|
780
|
-
getSetProxy(property
|
|
573
|
+
getSetProxy(property) {
|
|
781
574
|
const component = this.component;
|
|
782
575
|
const classPrototype = component.constructor.prototype;
|
|
783
|
-
this._getSetProxy(classPrototype, property,
|
|
576
|
+
this._getSetProxy(classPrototype, property, "class");
|
|
784
577
|
if (component.manager.isLit) {
|
|
785
578
|
return;
|
|
786
579
|
}
|
|
787
580
|
const htmlPrototype = component.el.constructor.prototype;
|
|
788
581
|
if (classPrototype !== htmlPrototype) {
|
|
789
|
-
this._getSetProxy(htmlPrototype, property,
|
|
582
|
+
this._getSetProxy(htmlPrototype, property, "html");
|
|
790
583
|
}
|
|
791
584
|
}
|
|
792
|
-
_getSetProxy(prototype,
|
|
585
|
+
_getSetProxy(prototype, name2, type) {
|
|
793
586
|
const component = this.component;
|
|
794
|
-
const propType = getMemberType(component,
|
|
795
|
-
const descriptor = Object.getOwnPropertyDescriptor(prototype,
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
if (descriptor !== void 0 && "value" in descriptor) {
|
|
799
|
-
throw new Error(
|
|
800
|
-
`getSet() should only be used on @Prop/@property/@State/@state properties. For internal component properties, use regular get/set syntax. Tried to use it on "${name}" in ${component.el.tagName}`
|
|
801
|
-
);
|
|
802
|
-
} else if (tolerateNotFound) {
|
|
803
|
-
return;
|
|
804
|
-
} else {
|
|
805
|
-
throw new Error(`Unable to find "${name}" property on the ${component.el.tagName} component`);
|
|
806
|
-
}
|
|
587
|
+
const propType = getMemberType(component, name2);
|
|
588
|
+
const descriptor = Object.getOwnPropertyDescriptor(prototype, name2);
|
|
589
|
+
if (!descriptor) {
|
|
590
|
+
return void 0;
|
|
807
591
|
}
|
|
808
|
-
const
|
|
592
|
+
const originalGet = descriptor.get;
|
|
593
|
+
const originalSet = descriptor.set;
|
|
809
594
|
const isGetterAlreadyOverwritten = customAccessor in originalGet;
|
|
810
595
|
const isSetterAlreadyOverwritten = customAccessor in originalSet;
|
|
811
|
-
const shouldOverwriteGet = !isGetterAlreadyOverwritten
|
|
812
|
-
const shouldOverwriteSet = !isSetterAlreadyOverwritten
|
|
596
|
+
const shouldOverwriteGet = !isGetterAlreadyOverwritten;
|
|
597
|
+
const shouldOverwriteSet = !isSetterAlreadyOverwritten;
|
|
813
598
|
if (!shouldOverwriteGet && !shouldOverwriteSet) {
|
|
814
599
|
return;
|
|
815
600
|
}
|
|
816
601
|
const finalGetter = shouldOverwriteGet ? function getter() {
|
|
817
602
|
let value = originalGet.call(this);
|
|
818
|
-
const component2 =
|
|
819
|
-
if (
|
|
603
|
+
const component2 = elementToInstance.get(this);
|
|
604
|
+
if (shouldBypass.getter || component2 === void 0) {
|
|
820
605
|
return value;
|
|
821
606
|
}
|
|
822
607
|
const internals = component2.manager.internals;
|
|
823
|
-
value = internals.accessorGetter[
|
|
824
|
-
const getters = internals.getters[
|
|
608
|
+
value = internals.accessorGetter[name2](value, name2);
|
|
609
|
+
const getters = internals.getters[name2] ?? emptyArray;
|
|
825
610
|
for (let i = 0; i < getters.length; i++) {
|
|
826
|
-
value = getters[i](value,
|
|
611
|
+
value = getters[i](value, name2);
|
|
827
612
|
}
|
|
828
613
|
return value;
|
|
829
614
|
} : originalGet;
|
|
830
615
|
const finalSetter = shouldOverwriteSet ? function setter(rawNewValue) {
|
|
831
616
|
const oldValue = originalGet.call(this);
|
|
832
|
-
const component2 =
|
|
617
|
+
const component2 = elementToInstance.get(this);
|
|
833
618
|
if (component2 === void 0) {
|
|
834
619
|
originalSet.call(this, rawNewValue);
|
|
835
620
|
return;
|
|
@@ -839,30 +624,30 @@ var ComponentInternals = class {
|
|
|
839
624
|
if (newValue === oldValue) {
|
|
840
625
|
originalSet.call(this, rawNewValue);
|
|
841
626
|
} else {
|
|
842
|
-
const setters =
|
|
627
|
+
const setters = shouldBypass.setter ? emptyArray : internals.setters[name2] ?? emptyArray;
|
|
843
628
|
for (let i = 0; i < setters.length; i++) {
|
|
844
|
-
newValue = setters[i](newValue, oldValue,
|
|
629
|
+
newValue = setters[i](newValue, oldValue, name2);
|
|
845
630
|
if (newValue === oldValue) {
|
|
846
631
|
break;
|
|
847
632
|
}
|
|
848
633
|
}
|
|
849
|
-
newValue = internals.accessorSetter[
|
|
634
|
+
newValue = internals.accessorSetter[name2](newValue, oldValue, name2);
|
|
850
635
|
originalSet.call(this, newValue);
|
|
851
636
|
if (newValue !== oldValue) {
|
|
852
|
-
internals.enabledWatchers[
|
|
637
|
+
internals.enabledWatchers[name2]?.forEach((watcher) => watcher(newValue, oldValue, name2));
|
|
853
638
|
}
|
|
854
639
|
}
|
|
855
|
-
if (internals.
|
|
856
|
-
internals?.
|
|
640
|
+
if (internals.keyTrackers.length > 0) {
|
|
641
|
+
internals?.firePropTrackers(name2, rawNewValue);
|
|
857
642
|
}
|
|
858
643
|
} : originalSet;
|
|
859
644
|
if (shouldOverwriteGet) {
|
|
860
|
-
|
|
645
|
+
finalGetter[customAccessor] = true;
|
|
861
646
|
}
|
|
862
647
|
if (shouldOverwriteSet) {
|
|
863
|
-
|
|
648
|
+
finalSetter[customAccessor] = true;
|
|
864
649
|
}
|
|
865
|
-
Object.defineProperty(prototype,
|
|
650
|
+
Object.defineProperty(prototype, name2, {
|
|
866
651
|
...descriptor,
|
|
867
652
|
get: finalGetter,
|
|
868
653
|
set: finalSetter
|
|
@@ -886,8 +671,11 @@ var ComponentInternals = class {
|
|
|
886
671
|
}
|
|
887
672
|
};
|
|
888
673
|
var emptyArray = [];
|
|
889
|
-
var customAccessor = Symbol(
|
|
890
|
-
var nothing =
|
|
674
|
+
var customAccessor = Symbol();
|
|
675
|
+
var nothing = (
|
|
676
|
+
// eslint-disable-next-line symbol-description
|
|
677
|
+
Symbol()
|
|
678
|
+
) ;
|
|
891
679
|
var useControllerManager = (component, forceUpdate) => new ControllerManager(component, forceUpdate);
|
|
892
680
|
var ControllerManager = class extends GenericController {
|
|
893
681
|
constructor(component, forceUpdate) {
|
|
@@ -911,113 +699,37 @@ var ControllerManager = class extends GenericController {
|
|
|
911
699
|
controllerHost.requestUpdate = () => update(component);
|
|
912
700
|
}
|
|
913
701
|
super(component);
|
|
702
|
+
/** @internal */
|
|
914
703
|
this.internals = new ComponentInternals(this.component);
|
|
915
704
|
this.destroyed = false;
|
|
916
705
|
this._updatePromise = new Deferred();
|
|
917
706
|
this._originalLifecycles = {};
|
|
918
|
-
/**
|
|
919
|
-
* A magical solution to finding out what property name a given controller
|
|
920
|
-
* on a given object was assigned to. Note, this does not work for properties
|
|
921
|
-
* that have \@Prop() or \@State() decorator - for those, use
|
|
922
|
-
* manager.trackPropKey() instead.
|
|
923
|
-
*
|
|
924
|
-
* @example
|
|
925
|
-
* function trackMe<T>(defaultValue:T, component:BaseComponent):T {
|
|
926
|
-
* component.manager.trackPropertyKey(component, (key)=>console.log(key), defaultValue);
|
|
927
|
-
* return defaultValue;
|
|
928
|
-
* }
|
|
929
|
-
*
|
|
930
|
-
* class MyComponent extends BaseComponent {
|
|
931
|
-
* // Will console log "myProp"
|
|
932
|
-
* myProp = trackMe('a', this);
|
|
933
|
-
* }
|
|
934
|
-
*
|
|
935
|
-
*/
|
|
936
|
-
this.trackPropertyKey = trackPropertyKey;
|
|
937
|
-
/**
|
|
938
|
-
* Like manager.trackPropertyKey(), but for props that have \@State() or \@Prop()
|
|
939
|
-
* decorator
|
|
940
|
-
*
|
|
941
|
-
* @example
|
|
942
|
-
* function trackMe(component:BaseComponent) {
|
|
943
|
-
* component.manager.trackPropKey((key)=>console.log(key));
|
|
944
|
-
* }
|
|
945
|
-
*
|
|
946
|
-
* class MyComponent extends BaseComponent {
|
|
947
|
-
* // Will console log "myProp"
|
|
948
|
-
* @Prop() myProp = trackMe(this);
|
|
949
|
-
*
|
|
950
|
-
* // Will console log "myState"
|
|
951
|
-
* @State() myState = trackMe(this);
|
|
952
|
-
* }
|
|
953
|
-
*/
|
|
954
|
-
this.trackPropKey = this.internals.trackPropKey;
|
|
955
|
-
/**
|
|
956
|
-
* A combination of trackPropertyKey() and trackPropKey(). For usage when
|
|
957
|
-
* you want to track a property, but don't know if it will be defined with the
|
|
958
|
-
* \@Prop() decorator or not
|
|
959
|
-
*/
|
|
960
|
-
this.trackKey = this.internals.trackKey;
|
|
961
|
-
this._readonlySetter = (newValue, oldValue, property) => {
|
|
962
|
-
if (Controller.internals.shouldBypassReadonly) {
|
|
963
|
-
return newValue;
|
|
964
|
-
}
|
|
965
|
-
const component = this.component;
|
|
966
|
-
const isProp = getPropType(component, property) === "prop";
|
|
967
|
-
if (isProp) {
|
|
968
|
-
if (this.isLit) {
|
|
969
|
-
const details = getLitProperties(component).get(property);
|
|
970
|
-
if (details && details?.attribute !== false) {
|
|
971
|
-
component.el.setAttribute(
|
|
972
|
-
typeof details.attribute === "string" ? details.attribute : camelToKebab(property),
|
|
973
|
-
// Not using converter.toAttribute to keep this unlikely case simpler
|
|
974
|
-
String(oldValue)
|
|
975
|
-
);
|
|
976
|
-
}
|
|
977
|
-
} else {
|
|
978
|
-
component.requestUpdate();
|
|
979
|
-
}
|
|
980
|
-
}
|
|
981
|
-
throw new Error(
|
|
982
|
-
`Cannot assign to read-only property "${property}" of ${component.el.tagName.toLowerCase()}. Trying to assign "${String(
|
|
983
|
-
newValue
|
|
984
|
-
)}"`
|
|
985
|
-
);
|
|
986
|
-
};
|
|
987
|
-
/**
|
|
988
|
-
* In development, on hot module reload, controller would be re-initialized
|
|
989
|
-
* with all Props and State values persistent, but properties lost. This unsafe
|
|
990
|
-
* development-only API lets you set or get data for a controller that would
|
|
991
|
-
* persist across hot reloads.
|
|
992
|
-
*/
|
|
993
|
-
this.devOnlySetPersistentControllerData = void 0 ;
|
|
994
|
-
this.devOnlyGetPersistentControllerData = void 0 ;
|
|
995
707
|
this.isLit = isLit;
|
|
996
708
|
this.component.manager = this;
|
|
997
709
|
retrieveComponentMembers(component, isLit);
|
|
998
710
|
this._controllers = controllers;
|
|
999
711
|
this.exports = void 0;
|
|
1000
|
-
this.hasDestroy =
|
|
712
|
+
this.hasDestroy = autoDestroyDisabledPropName in this.component && typeof this.component.destroy === "function";
|
|
1001
713
|
if (this.hasDestroy) {
|
|
1002
|
-
|
|
714
|
+
watch(component, autoDestroyDisabledPropName, () => this._setAutoDestroyTimeout());
|
|
1003
715
|
}
|
|
1004
716
|
this._bindLifecycleMethods();
|
|
717
|
+
const internals = this.internals;
|
|
718
|
+
Object.keys(internals.members).forEach((name2) => {
|
|
719
|
+
internals.accessorGetter[name2] = defaultGetterSetter;
|
|
720
|
+
internals.accessorSetter[name2] = defaultGetterSetter;
|
|
721
|
+
internals.getSetProxy(name2);
|
|
722
|
+
});
|
|
1005
723
|
if (!isLit) {
|
|
1006
724
|
Object.defineProperty(component, "updateComplete", {
|
|
1007
725
|
get: async () => await this._updatePromise.promise
|
|
1008
726
|
});
|
|
1009
727
|
}
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
internals.getSetProxy(name, true, true);
|
|
1016
|
-
});
|
|
1017
|
-
Controller.internals.setParentController(void 0);
|
|
1018
|
-
Controller.internals.setAmbientComponent(component);
|
|
1019
|
-
Controller.internals.elementToInstance.set(component.el, component);
|
|
1020
|
-
Controller.internals.elementToInstance.set(component, component);
|
|
728
|
+
queueMicrotask(internals.enableReadonly);
|
|
729
|
+
setParentController(void 0);
|
|
730
|
+
setAmbientComponent(component);
|
|
731
|
+
elementToInstance.set(component.el, component);
|
|
732
|
+
elementToInstance.set(component, component);
|
|
1021
733
|
}
|
|
1022
734
|
_bindLifecycleMethods() {
|
|
1023
735
|
const component = this.component;
|
|
@@ -1057,50 +769,43 @@ var ControllerManager = class extends GenericController {
|
|
|
1057
769
|
component.destroy = this.destroy.bind(this);
|
|
1058
770
|
}
|
|
1059
771
|
}
|
|
1060
|
-
/**
|
|
1061
|
-
* Throws an error if component does not implement destroy() lifecycle, but
|
|
1062
|
-
* tries to use it.
|
|
1063
|
-
*/
|
|
1064
|
-
ensureHasDestroy() {
|
|
1065
|
-
if (!this.hasDestroy) {
|
|
1066
|
-
throw new Error(destroyErrorMessage);
|
|
1067
|
-
}
|
|
1068
|
-
}
|
|
1069
772
|
/**
|
|
1070
773
|
* Private because this is not supposed to be called by Component directly.
|
|
1071
774
|
* Instead, _bindLifecycleMethods will take care of that. Otherwise, you risk
|
|
1072
775
|
* calling lifecycle methods twice.
|
|
776
|
+
*
|
|
777
|
+
* @internal
|
|
1073
778
|
*/
|
|
1074
779
|
_connectedCallback() {
|
|
1075
780
|
if (this.destroyed) {
|
|
1076
781
|
const tagName = this.component.el.tagName.toLowerCase();
|
|
1077
782
|
this.component.el.remove();
|
|
1078
783
|
throw new Error(
|
|
1079
|
-
`The ${tagName} component has already been destroyed. It can not be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the
|
|
784
|
+
`The ${tagName} component has already been destroyed. It can not be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${autoDestroyDisabledPropName} prop.`
|
|
1080
785
|
);
|
|
1081
786
|
}
|
|
1082
787
|
if (this._autoDestroyTimeout !== void 0) {
|
|
1083
788
|
clearTimeout(this._autoDestroyTimeout);
|
|
1084
789
|
}
|
|
1085
|
-
|
|
790
|
+
const internals = this.internals;
|
|
791
|
+
internals.enabledWatchers = internals.allWatchers;
|
|
1086
792
|
keyTrackResolve();
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
);
|
|
793
|
+
internals.enableReadonly?.();
|
|
794
|
+
this._controllers.forEach(callConnected);
|
|
1090
795
|
this._originalLifecycles.connectedCallback?.call(this.component);
|
|
1091
796
|
}
|
|
797
|
+
/** @internal */
|
|
1092
798
|
_disconnectedCallback() {
|
|
1093
799
|
if (this.destroyed) {
|
|
1094
800
|
return;
|
|
1095
801
|
}
|
|
1096
|
-
this._controllers.forEach(
|
|
1097
|
-
(controller) => "triggerDisconnected" in controller ? controller.triggerDisconnected() : safeCall(controller.hostDisconnected, controller)
|
|
1098
|
-
);
|
|
802
|
+
this._controllers.forEach(callDisconnected);
|
|
1099
803
|
this._originalLifecycles.disconnectedCallback?.call(this.component);
|
|
1100
804
|
if (this.hasDestroy) {
|
|
1101
|
-
this.
|
|
805
|
+
this._setAutoDestroyTimeout();
|
|
1102
806
|
}
|
|
1103
807
|
}
|
|
808
|
+
/** @internal */
|
|
1104
809
|
async _load() {
|
|
1105
810
|
const integrations = this.internals.reactiveUtilsIntegrations;
|
|
1106
811
|
if (integrations.size > 0) {
|
|
@@ -1112,39 +817,32 @@ var ControllerManager = class extends GenericController {
|
|
|
1112
817
|
}
|
|
1113
818
|
}
|
|
1114
819
|
}
|
|
1115
|
-
await Promise.allSettled(
|
|
1116
|
-
Array.from(
|
|
1117
|
-
this._controllers,
|
|
1118
|
-
async (controller) => integrations.has(controller) ? void 0 : "triggerLoad" in controller ? await controller.triggerLoad() : await safeAsyncCall(controller.hostLoad, controller)
|
|
1119
|
-
)
|
|
1120
|
-
);
|
|
820
|
+
await Promise.allSettled(Array.from(this._controllers, callLoad, integrations));
|
|
1121
821
|
await this._originalLifecycles.componentWillLoad?.call(this.component);
|
|
1122
822
|
}
|
|
823
|
+
/** @internal */
|
|
1123
824
|
_loaded() {
|
|
1124
|
-
this._controllers.forEach(
|
|
1125
|
-
(controller) => "triggerLoaded" in controller ? controller.triggerLoaded() : safeCall(controller.hostLoaded, controller)
|
|
1126
|
-
);
|
|
825
|
+
this._controllers.forEach(callLoaded);
|
|
1127
826
|
this._originalLifecycles.componentDidLoad?.call(this.component);
|
|
1128
827
|
}
|
|
1129
828
|
_update() {
|
|
1130
|
-
this.
|
|
1131
|
-
|
|
1132
|
-
);
|
|
829
|
+
const changedProperties = this.component.changedProperties;
|
|
830
|
+
this._controllers.forEach(callUpdate2, changedProperties);
|
|
1133
831
|
void this._originalLifecycles.componentWillUpdate?.call(this.component);
|
|
1134
832
|
}
|
|
1135
833
|
_updated() {
|
|
1136
|
-
this.
|
|
1137
|
-
|
|
1138
|
-
);
|
|
834
|
+
const maybeLitComponent = this.component;
|
|
835
|
+
this._controllers.forEach(callUpdated, maybeLitComponent.changedProperties);
|
|
1139
836
|
this._originalLifecycles.componentDidUpdate?.call(this.component);
|
|
1140
|
-
if (
|
|
837
|
+
if (this.isLit) {
|
|
838
|
+
maybeLitComponent.changedProperties = /* @__PURE__ */ new Map();
|
|
839
|
+
} else {
|
|
1141
840
|
const updatePromise = this._updatePromise;
|
|
1142
841
|
this._updatePromise = new Deferred();
|
|
1143
842
|
updatePromise.resolve(true);
|
|
1144
843
|
}
|
|
1145
844
|
}
|
|
1146
845
|
async destroy() {
|
|
1147
|
-
this.ensureHasDestroy();
|
|
1148
846
|
if (this.destroyed) {
|
|
1149
847
|
return;
|
|
1150
848
|
}
|
|
@@ -1158,13 +856,11 @@ var ControllerManager = class extends GenericController {
|
|
|
1158
856
|
}
|
|
1159
857
|
this._autoDestroyTimeout = void 0;
|
|
1160
858
|
this.destroyed = true;
|
|
1161
|
-
this._controllers.forEach(
|
|
1162
|
-
(controller) => "triggerDestroy" in controller ? controller.triggerDestroy() : safeCall(controller.hostDestroy, controller)
|
|
1163
|
-
);
|
|
859
|
+
this._controllers.forEach(callDestroy);
|
|
1164
860
|
this._controllers.clear();
|
|
1165
861
|
await this._originalLifecycles.destroy?.call(this.component);
|
|
1166
862
|
}
|
|
1167
|
-
|
|
863
|
+
_setAutoDestroyTimeout() {
|
|
1168
864
|
if (!this.component.el.isConnected && !this.component.autoDestroyDisabled) {
|
|
1169
865
|
if (this._autoDestroyTimeout !== void 0) {
|
|
1170
866
|
clearTimeout(this._autoDestroyTimeout);
|
|
@@ -1175,117 +871,222 @@ var ControllerManager = class extends GenericController {
|
|
|
1175
871
|
}
|
|
1176
872
|
}
|
|
1177
873
|
}
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
*
|
|
1188
|
-
* @example
|
|
1189
|
-
* // Overwriting readonly prop internally
|
|
1190
|
-
* this.manager.bypassReadonly(()=>{
|
|
1191
|
-
* this.prop = 'b';
|
|
1192
|
-
* });
|
|
1193
|
-
*
|
|
1194
|
-
*/
|
|
1195
|
-
readonly(value) {
|
|
1196
|
-
return this.getSet(value, { set: this._readonlySetter });
|
|
874
|
+
};
|
|
875
|
+
var autoDestroyDisabledPropName = "autoDestroyDisabled";
|
|
876
|
+
var autoDestroyOnDisconnectTimeout = 1e3;
|
|
877
|
+
var defaultGetterSetter = (value) => value;
|
|
878
|
+
function callConnected(controller) {
|
|
879
|
+
if ("triggerConnected" in controller) {
|
|
880
|
+
controller.triggerConnected();
|
|
881
|
+
} else {
|
|
882
|
+
safeCall(controller.hostConnected, controller);
|
|
1197
883
|
}
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
884
|
+
}
|
|
885
|
+
function callDisconnected(controller) {
|
|
886
|
+
if ("triggerDisconnected" in controller) {
|
|
887
|
+
controller.triggerDisconnected();
|
|
888
|
+
} else {
|
|
889
|
+
safeCall(controller.hostDisconnected, controller);
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
async function callLoad(controller) {
|
|
893
|
+
if (!this.has(controller)) {
|
|
894
|
+
if ("triggerLoad" in controller) {
|
|
895
|
+
await controller.triggerLoad();
|
|
896
|
+
} else {
|
|
897
|
+
await safeAsyncCall(controller.hostLoad, controller);
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
function callLoaded(controller) {
|
|
902
|
+
if ("triggerLoaded" in controller) {
|
|
903
|
+
controller.triggerLoaded();
|
|
904
|
+
} else {
|
|
905
|
+
safeCall(controller.hostLoaded, controller);
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
function callUpdate2(controller) {
|
|
909
|
+
if ("triggerUpdate" in controller) {
|
|
910
|
+
controller.triggerUpdate(this);
|
|
911
|
+
} else {
|
|
912
|
+
safeCall(controller.hostUpdate, controller, this);
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
function callUpdated(controller) {
|
|
916
|
+
if ("triggerUpdated" in controller) {
|
|
917
|
+
controller.triggerUpdated(this);
|
|
918
|
+
} else {
|
|
919
|
+
safeCall(controller.hostUpdated, controller, this);
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
function callDestroy(controller) {
|
|
923
|
+
if ("triggerDestroy" in controller) {
|
|
924
|
+
controller.triggerDestroy();
|
|
925
|
+
} else {
|
|
926
|
+
safeCall(controller.hostDestroy, controller);
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
function trackPropKey(component, onResolved, defaultValue) {
|
|
930
|
+
const internals = component.manager.internals;
|
|
931
|
+
if (internals.trackedValue !== nothing && internals.trackedValue !== defaultValue) {
|
|
932
|
+
internals.firePropTrackers(void 0, void 0);
|
|
933
|
+
}
|
|
934
|
+
if (internals.keyTrackers.length === 0) {
|
|
935
|
+
queueMicrotask(() => internals.firePropTrackers(void 0, void 0));
|
|
936
|
+
}
|
|
937
|
+
internals.trackedValue = defaultValue;
|
|
938
|
+
internals.keyTrackers.push((key, value) => safeCall(onResolved, void 0, defaultValue === value ? key : void 0));
|
|
939
|
+
return defaultValue;
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
// src/trackKey.ts
|
|
943
|
+
function trackKey(hostsCandidates, onResolved, defaultValue) {
|
|
944
|
+
const candidateHosts = Array.isArray(hostsCandidates) ? hostsCandidates : [hostsCandidates];
|
|
945
|
+
let leftToResolve = candidateHosts.length + 1;
|
|
946
|
+
const resolved = (resolution) => {
|
|
947
|
+
leftToResolve -= 1;
|
|
948
|
+
if (resolution !== void 0) {
|
|
949
|
+
leftToResolve = 0;
|
|
950
|
+
}
|
|
951
|
+
if (leftToResolve === 0) {
|
|
952
|
+
onResolved(resolution);
|
|
953
|
+
}
|
|
954
|
+
};
|
|
955
|
+
candidateHosts.forEach(
|
|
956
|
+
(host) => trackPropertyKey(
|
|
957
|
+
host,
|
|
958
|
+
(key) => resolved(
|
|
959
|
+
key === void 0 ? void 0 : {
|
|
960
|
+
key,
|
|
961
|
+
host,
|
|
962
|
+
isReactive: false
|
|
963
|
+
}
|
|
964
|
+
),
|
|
965
|
+
defaultValue
|
|
966
|
+
)
|
|
967
|
+
);
|
|
968
|
+
const component = candidateHosts.find(
|
|
969
|
+
(host) => "manager" in host && typeof host.manager === "object" && host.manager.component === host
|
|
970
|
+
);
|
|
971
|
+
if (component) {
|
|
972
|
+
trackPropKey(
|
|
973
|
+
component,
|
|
974
|
+
(key) => resolved(
|
|
975
|
+
key === void 0 ? void 0 : {
|
|
976
|
+
key,
|
|
977
|
+
host: component,
|
|
978
|
+
isReactive: getMemberType(component, key) !== void 0
|
|
979
|
+
}
|
|
980
|
+
),
|
|
981
|
+
defaultValue
|
|
982
|
+
);
|
|
983
|
+
}
|
|
984
|
+
return defaultValue;
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
// src/getSet.ts
|
|
988
|
+
function getSet(defaultValue, getSet2) {
|
|
989
|
+
const component = retrieveComponent();
|
|
990
|
+
return trackPropKey(
|
|
991
|
+
component,
|
|
992
|
+
(rawName) => {
|
|
993
|
+
const name2 = rawName;
|
|
994
|
+
const manager = component.manager;
|
|
995
|
+
const genericComponent = component;
|
|
996
|
+
const value = genericComponent[name2];
|
|
1237
997
|
const isStencilHotReload = "production" !== "production" ;
|
|
1238
|
-
const initialSet =
|
|
1239
|
-
if (value != null && value !== defaultValue && typeof
|
|
1240
|
-
const newValue =
|
|
998
|
+
const initialSet = getSet2.initialSet ?? true;
|
|
999
|
+
if (value != null && value !== defaultValue && typeof getSet2.set === "function" && initialSet && !isStencilHotReload) {
|
|
1000
|
+
const newValue = getSet2.set(value, defaultValue, name2);
|
|
1241
1001
|
if (newValue !== value) {
|
|
1242
|
-
if (
|
|
1243
|
-
genericComponent[
|
|
1002
|
+
if (manager.isLit) {
|
|
1003
|
+
genericComponent[name2] = newValue;
|
|
1244
1004
|
} else {
|
|
1245
1005
|
let firstConnected = true;
|
|
1246
|
-
|
|
1006
|
+
manager.onConnected(() => {
|
|
1247
1007
|
if (!firstConnected) {
|
|
1248
1008
|
return;
|
|
1249
1009
|
}
|
|
1250
1010
|
firstConnected = true;
|
|
1251
|
-
|
|
1252
|
-
genericComponent[
|
|
1011
|
+
bypassSetter(() => {
|
|
1012
|
+
genericComponent[name2] = newValue;
|
|
1253
1013
|
});
|
|
1254
1014
|
});
|
|
1255
1015
|
}
|
|
1256
1016
|
}
|
|
1257
1017
|
}
|
|
1258
|
-
|
|
1259
|
-
},
|
|
1018
|
+
genericGetSet(component, name2, getSet2);
|
|
1019
|
+
},
|
|
1020
|
+
defaultValue
|
|
1021
|
+
);
|
|
1022
|
+
}
|
|
1023
|
+
function bypassSetter(callback) {
|
|
1024
|
+
shouldBypass.setter = true;
|
|
1025
|
+
try {
|
|
1026
|
+
return callback();
|
|
1027
|
+
} finally {
|
|
1028
|
+
shouldBypass.setter = false;
|
|
1260
1029
|
}
|
|
1261
|
-
}
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1030
|
+
}
|
|
1031
|
+
function bypassGetter(callback) {
|
|
1032
|
+
shouldBypass.getter = true;
|
|
1033
|
+
try {
|
|
1034
|
+
return callback();
|
|
1035
|
+
} finally {
|
|
1036
|
+
shouldBypass.getter = false;
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
function genericGetSet(component, property, getSet2) {
|
|
1040
|
+
var _a2, _b;
|
|
1041
|
+
const genericGetSet2 = getSet2;
|
|
1042
|
+
const internals = component.manager.internals;
|
|
1043
|
+
const get = typeof genericGetSet2.get === "function" ? genericGetSet2.get : void 0;
|
|
1044
|
+
if (get) {
|
|
1045
|
+
(_a2 = internals.getters)[property] ?? (_a2[property] = []);
|
|
1046
|
+
internals.getters[property].unshift(get);
|
|
1047
|
+
}
|
|
1048
|
+
const set = genericGetSet2.set === "ignore" ? ignoreSet : genericGetSet2.set;
|
|
1049
|
+
if (set) {
|
|
1050
|
+
(_b = internals.setters)[property] ?? (_b[property] = []);
|
|
1051
|
+
internals.setters[property].unshift(
|
|
1052
|
+
set
|
|
1053
|
+
);
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
var ignoreSet = (_, value) => value;
|
|
1057
|
+
|
|
1058
|
+
// src/readonly.ts
|
|
1059
|
+
function readonly(value) {
|
|
1060
|
+
const component = retrieveComponent();
|
|
1061
|
+
return getSet(value, { set: component.manager.internals.readonlySetter });
|
|
1062
|
+
}
|
|
1063
|
+
function bypassReadOnly(callback) {
|
|
1064
|
+
shouldBypass.readOnly = true;
|
|
1065
|
+
try {
|
|
1066
|
+
return callback();
|
|
1067
|
+
} finally {
|
|
1068
|
+
shouldBypass.readOnly = false;
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1270
1071
|
|
|
1271
1072
|
// src/proxyExports.ts
|
|
1272
1073
|
var proxyExports = (Class) => (...args) => {
|
|
1273
|
-
const
|
|
1074
|
+
const ambientControllers2 = retrieveParentControllers();
|
|
1274
1075
|
const instance = new Class(...args);
|
|
1275
1076
|
const initialExports = instance.exports;
|
|
1276
|
-
|
|
1077
|
+
setParentController(ambientControllers2.at(-1));
|
|
1277
1078
|
const internals = instance.component.manager.internals;
|
|
1278
1079
|
internals.markExports(instance, initialExports);
|
|
1279
1080
|
instance.watchExports((exports) => internals.markExports(instance, exports));
|
|
1280
|
-
|
|
1281
|
-
const hostCandidates = [instance.component, ...
|
|
1282
|
-
return
|
|
1081
|
+
setAmbientChildController(instance);
|
|
1082
|
+
const hostCandidates = [instance.component, ...ambientControllers2].reverse();
|
|
1083
|
+
return trackKey(
|
|
1283
1084
|
hostCandidates,
|
|
1284
1085
|
(resolution) => resolution === void 0 ? void 0 : setProxy(instance, resolution, initialExports),
|
|
1285
1086
|
initialExports
|
|
1286
1087
|
);
|
|
1287
1088
|
};
|
|
1288
|
-
function setProxy(controller, { host, key,
|
|
1089
|
+
function setProxy(controller, { host, key, isReactive: assignedToProp }, initialExports) {
|
|
1289
1090
|
const genericHost = host;
|
|
1290
1091
|
const controllerValueChanged = genericHost[key] !== controller.exports;
|
|
1291
1092
|
const hostValueChanged = genericHost[key] !== initialExports;
|
|
@@ -1294,25 +1095,28 @@ function setProxy(controller, { host, key, type }, initialExports) {
|
|
|
1294
1095
|
genericHost[key] = controller.exports;
|
|
1295
1096
|
}
|
|
1296
1097
|
const isProxyExportsOnComponent = host === controller.component;
|
|
1297
|
-
if (isProxyExportsOnComponent
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
controller.component.manager.watch(key, (value) => {
|
|
1303
|
-
if (value !== controller.exports) {
|
|
1304
|
-
internals.markExports(controller, value);
|
|
1098
|
+
if (isProxyExportsOnComponent) {
|
|
1099
|
+
if (assignedToProp) {
|
|
1100
|
+
const internals = controller.component.manager.internals;
|
|
1101
|
+
if (hostValueChanged) {
|
|
1102
|
+
internals.markExports(controller, genericHost[key]);
|
|
1305
1103
|
}
|
|
1306
|
-
|
|
1104
|
+
watch(controller.component, key, (value) => {
|
|
1105
|
+
if (value !== controller.exports) {
|
|
1106
|
+
internals.markExports(controller, value);
|
|
1107
|
+
}
|
|
1108
|
+
});
|
|
1109
|
+
}
|
|
1110
|
+
controller.assignedProperty = assignedToProp ? void 0 : key;
|
|
1307
1111
|
}
|
|
1308
1112
|
controller.watchExports(() => {
|
|
1309
1113
|
if (genericHost[key] === controller.exports) {
|
|
1310
1114
|
return;
|
|
1311
1115
|
}
|
|
1312
1116
|
const manager = controller.component.manager;
|
|
1313
|
-
const isReadOnly = manager.internals.
|
|
1117
|
+
const isReadOnly = manager.internals.setters[key]?.includes(manager.internals.readonlySetter);
|
|
1314
1118
|
if (isReadOnly) {
|
|
1315
|
-
|
|
1119
|
+
bypassReadOnly(() => {
|
|
1316
1120
|
genericHost[key] = controller.exports;
|
|
1317
1121
|
});
|
|
1318
1122
|
} else {
|
|
@@ -1328,7 +1132,7 @@ var FunctionalController = class extends Controller {
|
|
|
1328
1132
|
super(component);
|
|
1329
1133
|
const originalExports = this.exports;
|
|
1330
1134
|
try {
|
|
1331
|
-
|
|
1135
|
+
setAmbientComponent(this.component);
|
|
1332
1136
|
const value = constructor(this.component, this);
|
|
1333
1137
|
const constructorChangedExports = this.exports !== originalExports;
|
|
1334
1138
|
if (value instanceof Promise) {
|
|
@@ -1361,13 +1165,17 @@ var FunctionalController = class extends Controller {
|
|
|
1361
1165
|
};
|
|
1362
1166
|
var proxy$1 = proxyExports(FunctionalController);
|
|
1363
1167
|
|
|
1168
|
+
var reactiveUtils;
|
|
1169
|
+
async function loadReactiveUtils() {
|
|
1170
|
+
reactiveUtils ?? (reactiveUtils = importCoreReactiveUtils());
|
|
1171
|
+
return await reactiveUtils;
|
|
1172
|
+
}
|
|
1364
1173
|
var makeAccessorController = (loadAccessor, _options) => (component, options) => proxy(component, loadAccessor, options);
|
|
1365
1174
|
var AccessorController = class extends GenericController {
|
|
1366
1175
|
constructor(component, _loadAccessor, _options) {
|
|
1367
1176
|
super(component);
|
|
1368
1177
|
this._loadAccessor = _loadAccessor;
|
|
1369
1178
|
this._options = _options;
|
|
1370
|
-
this.reactiveUtils = this.component.reactiveUtils;
|
|
1371
1179
|
// A mapping from bound component's "prop" name to Accessor instance's "property"
|
|
1372
1180
|
this._watchedProperties = /* @__PURE__ */ new Map();
|
|
1373
1181
|
this._isBinding = { value: true };
|
|
@@ -1388,23 +1196,23 @@ var AccessorController = class extends GenericController {
|
|
|
1388
1196
|
integrations.delete(reactiveUtilsIntegration);
|
|
1389
1197
|
}
|
|
1390
1198
|
integrations.add(reactiveUtilsIntegration ?? new ReactiveUtilsIntegration(this.component));
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1199
|
+
trackPropKey(
|
|
1200
|
+
component,
|
|
1201
|
+
(resolved) => {
|
|
1202
|
+
if (resolved) {
|
|
1203
|
+
this._instancePropName = resolved;
|
|
1204
|
+
}
|
|
1205
|
+
},
|
|
1206
|
+
this.exports
|
|
1207
|
+
);
|
|
1396
1208
|
}
|
|
1397
1209
|
hostConnected() {
|
|
1398
1210
|
this._isBinding.value = false;
|
|
1399
1211
|
}
|
|
1400
1212
|
async hostLoad() {
|
|
1213
|
+
this.reactiveUtils = await loadReactiveUtils();
|
|
1401
1214
|
const component = this.component;
|
|
1402
|
-
|
|
1403
|
-
this.reactiveUtils = await importCoreReactiveUtils();
|
|
1404
|
-
} else {
|
|
1405
|
-
this.reactiveUtils = await this.use(component.reactiveUtils);
|
|
1406
|
-
}
|
|
1407
|
-
const parameters = accessorSupport.gatherParameters(this, this._watchedProperties);
|
|
1215
|
+
const parameters = this._gatherParameters();
|
|
1408
1216
|
const finalParameters = this._options?.editConstructorProperties?.call(component, parameters) ?? parameters;
|
|
1409
1217
|
const awaitedParameters = finalParameters instanceof Promise ? await finalParameters : finalParameters;
|
|
1410
1218
|
const genericComponent = component;
|
|
@@ -1423,6 +1231,16 @@ var AccessorController = class extends GenericController {
|
|
|
1423
1231
|
accessorSupport.watchAccessorUpdates(this, this._instance, this._watchedProperties);
|
|
1424
1232
|
this.exports = this._instance;
|
|
1425
1233
|
}
|
|
1234
|
+
_gatherParameters() {
|
|
1235
|
+
const data = Object.fromEntries(
|
|
1236
|
+
Array.from(
|
|
1237
|
+
this._watchedProperties,
|
|
1238
|
+
([prop, property]) => [property, this.component[prop]]
|
|
1239
|
+
).filter(([, value]) => value !== void 0)
|
|
1240
|
+
);
|
|
1241
|
+
const props = data ;
|
|
1242
|
+
return props;
|
|
1243
|
+
}
|
|
1426
1244
|
async _createInstance(parameters) {
|
|
1427
1245
|
if (this._isAccessorConstructor(this._loadAccessor)) {
|
|
1428
1246
|
return new this._loadAccessor(parameters);
|
|
@@ -1463,7 +1281,7 @@ var accessorSupport = {
|
|
|
1463
1281
|
if (hasProp || !doBinding) {
|
|
1464
1282
|
return value;
|
|
1465
1283
|
}
|
|
1466
|
-
return
|
|
1284
|
+
return trackKey(
|
|
1467
1285
|
component,
|
|
1468
1286
|
(resolved) => {
|
|
1469
1287
|
if (resolved !== void 0) {
|
|
@@ -1508,7 +1326,7 @@ var accessorSupport = {
|
|
|
1508
1326
|
const genericComponent = component;
|
|
1509
1327
|
const genericInstance = instance;
|
|
1510
1328
|
const readonlyProps = findReadOnlyAccessorProps(instance);
|
|
1511
|
-
|
|
1329
|
+
bypassGetter(
|
|
1512
1330
|
() => (
|
|
1513
1331
|
// Careful: Map's forEach callback arguments are (value, key), not (key, value)
|
|
1514
1332
|
watchedProperties.forEach((propertyName, propName) => {
|
|
@@ -1537,7 +1355,7 @@ var accessorSupport = {
|
|
|
1537
1355
|
const newValue = genericInstance[propertyName];
|
|
1538
1356
|
const flipBoolean = typeof newValue === "boolean" && propertyName !== propName && propName.toLowerCase().includes("disable");
|
|
1539
1357
|
const resolvedNewValue = flipBoolean ? !newValue : newValue;
|
|
1540
|
-
|
|
1358
|
+
bypassSetter(() => {
|
|
1541
1359
|
genericComponent[propName] = resolvedNewValue;
|
|
1542
1360
|
});
|
|
1543
1361
|
},
|
|
@@ -1546,16 +1364,8 @@ var accessorSupport = {
|
|
|
1546
1364
|
);
|
|
1547
1365
|
});
|
|
1548
1366
|
},
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
const data = Object.fromEntries(
|
|
1552
|
-
Array.from(watchedProperties, ([prop, property]) => [property, component[prop]]).filter(
|
|
1553
|
-
([, value]) => value !== void 0
|
|
1554
|
-
)
|
|
1555
|
-
);
|
|
1556
|
-
return data ;
|
|
1557
|
-
},
|
|
1558
|
-
reEmitAccessorEvents(controller, instance, reactiveUtils, prefix) {
|
|
1367
|
+
// REFACTOR: remove this once Stencil is no longer supported
|
|
1368
|
+
reEmitAccessorEvents(controller, instance, reactiveUtils2, prefix) {
|
|
1559
1369
|
const isEvented = "on" in instance && typeof instance.on === "function";
|
|
1560
1370
|
if (!isEvented) {
|
|
1561
1371
|
return;
|
|
@@ -1580,7 +1390,7 @@ var accessorSupport = {
|
|
|
1580
1390
|
if (instance.destroyed) {
|
|
1581
1391
|
return;
|
|
1582
1392
|
}
|
|
1583
|
-
return toListen.map(([eventName, emit]) =>
|
|
1393
|
+
return toListen.map(([eventName, emit]) => reactiveUtils2.on(getEventTarget, eventName, emit));
|
|
1584
1394
|
});
|
|
1585
1395
|
},
|
|
1586
1396
|
async reCreate(instance, component) {
|
|
@@ -1614,9 +1424,8 @@ var ReactiveUtilsIntegration = class extends GenericController {
|
|
|
1614
1424
|
const component = this.component;
|
|
1615
1425
|
const internals = component.manager.internals;
|
|
1616
1426
|
const enabledMembers = [];
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
() => allMembers.forEach((name) => {
|
|
1427
|
+
bypassGetter(
|
|
1428
|
+
() => Object.keys(internals.members).forEach((name) => {
|
|
1620
1429
|
const alreadyIntegrated = internals.accessorSetter[name] !== defaultGetterSetter;
|
|
1621
1430
|
if (alreadyIntegrated) {
|
|
1622
1431
|
return;
|
|
@@ -1648,4 +1457,4 @@ var ReactiveUtilsIntegration = class extends GenericController {
|
|
|
1648
1457
|
}
|
|
1649
1458
|
};
|
|
1650
1459
|
|
|
1651
|
-
export { AccessorController as A, accessorSupport as a, makeController as b, makeAccessorController as m, proxyExports as p, useControllerManager as u };
|
|
1460
|
+
export { AccessorController as A, accessorSupport as a, makeController as b, getSet as g, makeAccessorController as m, proxyExports as p, readonly as r, trackPropKey as t, useControllerManager as u, watch as w };
|