@geotrekce/geotrek-rando-widget 0.2.4 → 0.2.6
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/cjs/geotrek-rando-widget.cjs.js +2 -2
- package/dist/cjs/geotrek-rando-widget.cjs.js.br +0 -0
- package/dist/cjs/geotrek-rando-widget.cjs.js.gz +0 -0
- package/dist/cjs/grw-app.cjs.entry.js +11 -5
- package/dist/cjs/grw-app.cjs.entry.js.br +0 -0
- package/dist/cjs/grw-app.cjs.entry.js.gz +0 -0
- package/dist/cjs/grw-app.cjs.entry.js.map +1 -1
- package/dist/cjs/grw-filter_7.cjs.entry.js +24 -15
- package/dist/cjs/grw-filter_7.cjs.entry.js.br +0 -0
- package/dist/cjs/grw-filter_7.cjs.entry.js.gz +0 -0
- package/dist/cjs/grw-filter_7.cjs.entry.js.map +1 -1
- package/dist/cjs/grw-information-desk-detail_3.cjs.entry.js +2 -2
- package/dist/cjs/grw-information-desk-detail_3.cjs.entry.js.br +0 -0
- package/dist/cjs/grw-information-desk-detail_3.cjs.entry.js.gz +0 -0
- package/dist/cjs/grw-trek-card.cjs.entry.js +2 -2
- package/dist/cjs/grw-trek-card.cjs.entry.js.br +0 -0
- package/dist/cjs/grw-trek-card.cjs.entry.js.gz +0 -0
- package/dist/cjs/{index-4f1ea0dc.js → index-4965ff38.js} +13 -392
- package/dist/cjs/index-4965ff38.js.br +0 -0
- package/dist/cjs/index-4965ff38.js.gz +0 -0
- package/dist/cjs/index-4965ff38.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js.br +0 -0
- package/dist/cjs/loader.cjs.js.gz +0 -0
- package/dist/cjs/{store-6635208a.js → store-dea1bb76.js} +2 -2
- package/dist/cjs/store-dea1bb76.js.br +0 -0
- package/dist/cjs/store-dea1bb76.js.gz +0 -0
- package/dist/cjs/{store-6635208a.js.map → store-dea1bb76.js.map} +1 -1
- package/dist/collection/components/grw-app/grw-app.css +8 -0
- package/dist/collection/components/grw-app/grw-app.css.br +0 -0
- package/dist/collection/components/grw-app/grw-app.css.gz +0 -0
- package/dist/collection/components/grw-app/grw-app.js +8 -2
- package/dist/collection/components/grw-app/grw-app.js.br +0 -0
- package/dist/collection/components/grw-app/grw-app.js.gz +0 -0
- package/dist/collection/components/grw-app/grw-app.js.map +1 -1
- package/dist/collection/components/grw-map/grw-map.js +20 -10
- package/dist/collection/components/grw-map/grw-map.js.br +0 -0
- package/dist/collection/components/grw-map/grw-map.js.gz +0 -0
- package/dist/collection/components/grw-map/grw-map.js.map +1 -1
- package/dist/collection/components/grw-select-language/grw-select-language.css +8 -0
- package/dist/collection/components/grw-select-language/grw-select-language.css.br +0 -0
- package/dist/collection/components/grw-select-language/grw-select-language.css.gz +0 -0
- package/dist/collection/components/grw-select-language/grw-select-language.js +1 -1
- package/dist/collection/components/grw-select-language/grw-select-language.js.br +0 -0
- package/dist/collection/components/grw-select-language/grw-select-language.js.gz +0 -0
- package/dist/collection/components/grw-select-language/grw-select-language.js.map +1 -1
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.css +3 -2
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.css.br +0 -0
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.css.gz +0 -0
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.js +1 -1
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.js.br +0 -0
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.js.gz +0 -0
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.js.map +1 -1
- package/dist/esm/geotrek-rando-widget.js +3 -3
- package/dist/esm/geotrek-rando-widget.js.br +0 -0
- package/dist/esm/geotrek-rando-widget.js.gz +0 -0
- package/dist/esm/grw-app.entry.js +11 -5
- package/dist/esm/grw-app.entry.js.br +0 -0
- package/dist/esm/grw-app.entry.js.gz +0 -0
- package/dist/esm/grw-app.entry.js.map +1 -1
- package/dist/esm/grw-filter_7.entry.js +24 -15
- package/dist/esm/grw-filter_7.entry.js.br +0 -0
- package/dist/esm/grw-filter_7.entry.js.gz +0 -0
- package/dist/esm/grw-filter_7.entry.js.map +1 -1
- package/dist/esm/grw-information-desk-detail_3.entry.js +2 -2
- package/dist/esm/grw-information-desk-detail_3.entry.js.br +0 -0
- package/dist/esm/grw-information-desk-detail_3.entry.js.gz +0 -0
- package/dist/esm/grw-trek-card.entry.js +2 -2
- package/dist/esm/grw-trek-card.entry.js.br +0 -0
- package/dist/esm/grw-trek-card.entry.js.gz +0 -0
- package/dist/esm/{index-54f82b03.js → index-e3b2b3c7.js} +13 -392
- package/dist/esm/index-e3b2b3c7.js.br +0 -0
- package/dist/esm/index-e3b2b3c7.js.gz +0 -0
- package/dist/esm/index-e3b2b3c7.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/loader.js.br +0 -0
- package/dist/esm/loader.js.gz +0 -0
- package/dist/esm/{store-0fc1faf0.js → store-c65221a3.js} +2 -2
- package/dist/esm/store-c65221a3.js.br +0 -0
- package/dist/esm/store-c65221a3.js.gz +0 -0
- package/dist/esm/{store-0fc1faf0.js.map → store-c65221a3.js.map} +1 -1
- package/dist/esm-es5/geotrek-rando-widget.js +1 -1
- package/dist/esm-es5/geotrek-rando-widget.js.br +0 -0
- package/dist/esm-es5/geotrek-rando-widget.js.gz +0 -0
- package/dist/esm-es5/geotrek-rando-widget.js.map +1 -1
- package/dist/esm-es5/grw-app.entry.js +1 -1
- package/dist/esm-es5/grw-app.entry.js.br +0 -0
- package/dist/esm-es5/grw-app.entry.js.gz +0 -0
- package/dist/esm-es5/grw-app.entry.js.map +1 -1
- package/dist/esm-es5/grw-filter_7.entry.js +2 -2
- package/dist/esm-es5/grw-filter_7.entry.js.br +0 -0
- package/dist/esm-es5/grw-filter_7.entry.js.gz +0 -0
- package/dist/esm-es5/grw-filter_7.entry.js.map +1 -1
- package/dist/esm-es5/grw-information-desk-detail_3.entry.js +1 -1
- package/dist/esm-es5/grw-information-desk-detail_3.entry.js.br +0 -0
- package/dist/esm-es5/grw-information-desk-detail_3.entry.js.gz +0 -0
- package/dist/esm-es5/grw-trek-card.entry.js +1 -1
- package/dist/esm-es5/grw-trek-card.entry.js.br +0 -0
- package/dist/esm-es5/grw-trek-card.entry.js.gz +0 -0
- package/dist/esm-es5/index-e3b2b3c7.js +3 -0
- package/dist/esm-es5/index-e3b2b3c7.js.br +0 -0
- package/dist/esm-es5/index-e3b2b3c7.js.gz +0 -0
- package/dist/esm-es5/index-e3b2b3c7.js.map +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.br +0 -0
- package/dist/esm-es5/loader.js.gz +0 -0
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/esm-es5/{store-0fc1faf0.js → store-c65221a3.js} +2 -2
- package/dist/esm-es5/store-c65221a3.js.br +0 -0
- package/dist/esm-es5/store-c65221a3.js.gz +0 -0
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js +1 -1
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js.br +0 -0
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js.gz +0 -0
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js.map +1 -1
- package/dist/geotrek-rando-widget/geotrek-rando-widget.js +1 -1
- package/dist/geotrek-rando-widget/geotrek-rando-widget.js.br +0 -0
- package/dist/geotrek-rando-widget/geotrek-rando-widget.js.gz +0 -0
- package/dist/geotrek-rando-widget/{p-664e5947.entry.js → p-58780538.entry.js} +2 -2
- package/dist/geotrek-rando-widget/p-58780538.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-58780538.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/{p-756407ef.system.entry.js → p-5d3b30cf.system.entry.js} +2 -2
- package/dist/geotrek-rando-widget/p-5d3b30cf.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-5d3b30cf.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-6d698d25.system.entry.js +2 -0
- package/dist/geotrek-rando-widget/p-6d698d25.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-6d698d25.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-6d698d25.system.entry.js.map +1 -0
- package/dist/geotrek-rando-widget/{p-ce85e24a.entry.js → p-739b3529.entry.js} +2 -2
- package/dist/geotrek-rando-widget/p-739b3529.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-739b3529.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-7505c6d0.entry.js +2 -0
- package/dist/geotrek-rando-widget/p-7505c6d0.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-7505c6d0.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-7505c6d0.entry.js.map +1 -0
- package/dist/geotrek-rando-widget/{p-648e7a24.system.entry.js → p-9347e4aa.system.entry.js} +2 -2
- package/dist/geotrek-rando-widget/p-9347e4aa.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-9347e4aa.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/{p-66b39d3f.system.entry.js → p-94ff5569.system.entry.js} +3 -3
- package/dist/geotrek-rando-widget/p-94ff5569.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-94ff5569.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-94ff5569.system.entry.js.map +1 -0
- package/dist/geotrek-rando-widget/p-b3dbf860.js +3 -0
- package/dist/geotrek-rando-widget/p-b3dbf860.js.br +0 -0
- package/dist/geotrek-rando-widget/p-b3dbf860.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-b3dbf860.js.map +1 -0
- package/dist/geotrek-rando-widget/p-b6f2002a.system.js +3 -0
- package/dist/geotrek-rando-widget/p-b6f2002a.system.js.br +0 -0
- package/dist/geotrek-rando-widget/p-b6f2002a.system.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-b6f2002a.system.js.map +1 -0
- package/dist/geotrek-rando-widget/{p-9330bbdb.entry.js → p-c321886e.entry.js} +3 -3
- package/dist/geotrek-rando-widget/p-c321886e.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-c321886e.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-c321886e.entry.js.map +1 -0
- package/dist/geotrek-rando-widget/{p-b73f1de1.system.js → p-dbc7b7b1.system.js} +2 -2
- package/dist/geotrek-rando-widget/p-dbc7b7b1.system.js.br +0 -0
- package/dist/geotrek-rando-widget/p-dbc7b7b1.system.js.gz +0 -0
- package/dist/geotrek-rando-widget/{p-7ff4047d.js → p-dffaf93c.js} +2 -2
- package/dist/geotrek-rando-widget/p-dffaf93c.js.br +0 -0
- package/dist/geotrek-rando-widget/p-dffaf93c.js.gz +0 -0
- package/dist/geotrek-rando-widget/{p-243113ed.system.js → p-edf31fdc.system.js} +2 -2
- package/dist/geotrek-rando-widget/p-edf31fdc.system.js.br +0 -0
- package/dist/geotrek-rando-widget/p-edf31fdc.system.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-edf31fdc.system.js.map +1 -0
- package/dist/types/components/grw-app/grw-app.d.ts +2 -0
- package/dist/types/components/grw-map/grw-map.d.ts +6 -0
- package/package.json +1 -1
- package/dist/cjs/index-4f1ea0dc.js.br +0 -0
- package/dist/cjs/index-4f1ea0dc.js.gz +0 -0
- package/dist/cjs/index-4f1ea0dc.js.map +0 -1
- package/dist/cjs/store-6635208a.js.br +0 -0
- package/dist/cjs/store-6635208a.js.gz +0 -0
- package/dist/esm/index-54f82b03.js.br +0 -0
- package/dist/esm/index-54f82b03.js.gz +0 -0
- package/dist/esm/index-54f82b03.js.map +0 -1
- package/dist/esm/store-0fc1faf0.js.br +0 -0
- package/dist/esm/store-0fc1faf0.js.gz +0 -0
- package/dist/esm-es5/index-54f82b03.js +0 -3
- package/dist/esm-es5/index-54f82b03.js.br +0 -0
- package/dist/esm-es5/index-54f82b03.js.gz +0 -0
- package/dist/esm-es5/index-54f82b03.js.map +0 -1
- package/dist/esm-es5/store-0fc1faf0.js.br +0 -0
- package/dist/esm-es5/store-0fc1faf0.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-17823624.entry.js +0 -2
- package/dist/geotrek-rando-widget/p-17823624.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-17823624.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-17823624.entry.js.map +0 -1
- package/dist/geotrek-rando-widget/p-243113ed.system.js.br +0 -0
- package/dist/geotrek-rando-widget/p-243113ed.system.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-243113ed.system.js.map +0 -1
- package/dist/geotrek-rando-widget/p-648e7a24.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-648e7a24.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-664e5947.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-664e5947.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-66b39d3f.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-66b39d3f.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-66b39d3f.system.entry.js.map +0 -1
- package/dist/geotrek-rando-widget/p-756407ef.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-756407ef.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-7ff4047d.js.br +0 -0
- package/dist/geotrek-rando-widget/p-7ff4047d.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-9330bbdb.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-9330bbdb.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-9330bbdb.entry.js.map +0 -1
- package/dist/geotrek-rando-widget/p-b3ed849d.system.entry.js +0 -2
- package/dist/geotrek-rando-widget/p-b3ed849d.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-b3ed849d.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-b3ed849d.system.entry.js.map +0 -1
- package/dist/geotrek-rando-widget/p-b73f1de1.system.js.br +0 -0
- package/dist/geotrek-rando-widget/p-b73f1de1.system.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-ce85e24a.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-ce85e24a.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-fb7c407e.system.js +0 -3
- package/dist/geotrek-rando-widget/p-fb7c407e.system.js.br +0 -0
- package/dist/geotrek-rando-widget/p-fb7c407e.system.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-fb7c407e.system.js.map +0 -1
- package/dist/geotrek-rando-widget/p-fc1a08e2.js +0 -3
- package/dist/geotrek-rando-widget/p-fc1a08e2.js.br +0 -0
- package/dist/geotrek-rando-widget/p-fc1a08e2.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-fc1a08e2.js.map +0 -1
- /package/dist/esm-es5/{store-0fc1faf0.js.map → store-c65221a3.js.map} +0 -0
- /package/dist/geotrek-rando-widget/{p-664e5947.entry.js.map → p-58780538.entry.js.map} +0 -0
- /package/dist/geotrek-rando-widget/{p-756407ef.system.entry.js.map → p-5d3b30cf.system.entry.js.map} +0 -0
- /package/dist/geotrek-rando-widget/{p-ce85e24a.entry.js.map → p-739b3529.entry.js.map} +0 -0
- /package/dist/geotrek-rando-widget/{p-648e7a24.system.entry.js.map → p-9347e4aa.system.entry.js.map} +0 -0
- /package/dist/geotrek-rando-widget/{p-b73f1de1.system.js.map → p-dbc7b7b1.system.js.map} +0 -0
- /package/dist/geotrek-rando-widget/{p-7ff4047d.js.map → p-dffaf93c.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerInstance, e as createEvent, h, H as Host, i as getAssetPath } from './index-
|
|
1
|
+
import { r as registerInstance, e as createEvent, h, H as Host, i as getAssetPath } from './index-e3b2b3c7.js';
|
|
2
2
|
import { S as Swiper, N as Navigation, P as Pagination, K as Keyboard } from './pagination-24051620.js';
|
|
3
|
-
import { s as state } from './store-
|
|
3
|
+
import { s as state } from './store-c65221a3.js';
|
|
4
4
|
|
|
5
5
|
const grwInformationDeskDetailCss = ".material-symbols-outlined{font-variation-settings:\"FILL\" 0, \"wght\" 400, \"GRAD\" 0, \"opsz\" 48}:host{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:hidden;border:1px solid gray;border-radius:12px;background-color:var(--color-surface-container-low);color:var(--color-on-surface)}:host a{color:var(--color-primary-app)}.information-desk-img{position:relative}.information-desk-img img{width:100%;height:100%;max-height:200px;-o-object-fit:cover;object-fit:cover}.information-desk-sub-container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding:12px}.information-desk-name{font-size:16px;line-height:24px;font-weight:500}.information-desk-description{font-size:14px;line-height:20px}.information-desk-description-short{font-size:14px;line-height:20px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden}.handle-information-desk-description{cursor:pointer;color:var(--color-primary-app);text-decoration:underline;margin-top:12px}.phone-container,.mail-container,.link-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.phone-container span,.mail-container span,.link-container span{font-family:\"Material Symbols Outlined\";font-size:16px;margin-right:8px}.center-on-map-button{cursor:pointer;background-color:var(--color-primary-container);color:var(--color-on-primary-container);border-radius:8px;padding:8px 16px;-webkit-box-shadow:var(--elevation-1);box-shadow:var(--elevation-1);height:32px;gap:8px;-webkit-box-sizing:border-box;box-sizing:border-box;text-align:start;vertical-align:middle;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;position:relative;border:none;font-size:14px;margin:12px 0px}.center-on-map-button:hover{-webkit-box-shadow:var(--elevation-2);box-shadow:var(--elevation-2)}.center-on-map-button span{font-family:\"Material Symbols Outlined\";font-size:18px}";
|
|
6
6
|
|
|
Binary file
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, e as createEvent, h, H as Host } from './index-
|
|
2
|
-
import { s as state, o as onChange, r as reset } from './store-
|
|
1
|
+
import { r as registerInstance, e as createEvent, h, H as Host } from './index-e3b2b3c7.js';
|
|
2
|
+
import { s as state, o as onChange, r as reset } from './store-c65221a3.js';
|
|
3
3
|
import { f as formatDuration, a as formatLength, b as formatAscent } from './utils-160ec4d0.js';
|
|
4
4
|
|
|
5
5
|
const grwTrekCardCss = ".material-symbols-outlined{font-variation-settings:\"FILL\" 0, \"wght\" 400, \"GRAD\" 0, \"opsz\" 48}.trek-card-container,.trek-card-large-view-container{cursor:pointer;font-family:\"Roboto\";border-radius:12px;-webkit-box-shadow:var(--elevation-1);box-shadow:var(--elevation-1);background-color:var(--color-surface-container-low)}.trek-card-container .image,.trek-card-large-view-container .image{-o-object-fit:cover;object-fit:cover;border-top-left-radius:12px;border-top-right-radius:12px}.trek-card-container .sub-container,.trek-card-large-view-container .sub-container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;padding:8px 16px}.trek-card-container .sub-container .name,.trek-card-large-view-container .sub-container .name{color:var(--color-on-surface);font-size:22px;line-height:28px;font-weight:400;margin-bottom:8px}.trek-card-container .sub-container .departure,.trek-card-large-view-container .sub-container .departure{color:var(--color-on-surface);font-size:16px;line-height:24px;font-weight:500;margin-bottom:4px}.trek-card-container .sub-container .themes-container,.trek-card-large-view-container .sub-container .themes-container{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap}.trek-card-container .sub-container .themes-container .theme,.trek-card-large-view-container .sub-container .themes-container .theme{background-color:var(--color-secondary-container);color:var(--color-on-secondary-container);border-radius:8px;padding:8px 16px;margin:0px 8px 8px 0px;-webkit-box-shadow:var(--elevation-0);box-shadow:var(--elevation-0);border:1px solid var(--color-outline);height:32px;gap:8px;-webkit-box-sizing:border-box;box-sizing:border-box;text-align:start;vertical-align:middle;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;position:relative}.trek-card-container .sub-container .icons-labels-container,.trek-card-large-view-container .sub-container .icons-labels-container{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;color:var(--color-on-surface);font-size:14px;line-height:20px;font-weight:500}.trek-card-container .sub-container .icons-labels-container .row,.trek-card-large-view-container .sub-container .icons-labels-container .row{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.trek-card-container .sub-container .icons-labels-container .row:not(:last-child),.trek-card-large-view-container .sub-container .icons-labels-container .row:not(:last-child){margin-bottom:12px}.trek-card-container .sub-container .icons-labels-container .row .icon-label,.trek-card-large-view-container .sub-container .icons-labels-container .row .icon-label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:50%}.trek-card-container .sub-container .icons-labels-container .row .icon-label:nth-child(2),.trek-card-large-view-container .sub-container .icons-labels-container .row .icon-label:nth-child(2){margin:0px 4px}.trek-card-container .sub-container .icons-labels-container .row .icon-label img,.trek-card-container .sub-container .icons-labels-container .row .icon-label span,.trek-card-large-view-container .sub-container .icons-labels-container .row .icon-label img,.trek-card-large-view-container .sub-container .icons-labels-container .row .icon-label span{font-family:\"Material Symbols Outlined\";font-size:24px;width:24px;height:auto;margin-right:8px}.trek-card-container .sub-container .icons-labels-container .row .practice img,.trek-card-large-view-container .sub-container .icons-labels-container .row .practice img{background-color:var(--color-primary-app)}.trek-card-container{width:350px}.trek-card-container .image{width:100%;max-height:200px}.trek-card-large-view-container{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}.trek-card-large-view-container .image{width:250px}";
|
|
Binary file
|
|
Binary file
|
|
@@ -9,11 +9,7 @@ const NAMESPACE = 'geotrek-rando-widget';
|
|
|
9
9
|
* Modified for Stencil's renderer and slot projection
|
|
10
10
|
*/
|
|
11
11
|
let scopeId;
|
|
12
|
-
let contentRef;
|
|
13
12
|
let hostTagName;
|
|
14
|
-
let useNativeShadowDom = false;
|
|
15
|
-
let checkSlotFallbackVisibility = false;
|
|
16
|
-
let checkSlotRelocate = false;
|
|
17
13
|
let isSvgMode = false;
|
|
18
14
|
let renderingRef = null;
|
|
19
15
|
let queuePending = false;
|
|
@@ -82,7 +78,6 @@ function queryNonceMetaTagContent(doc) {
|
|
|
82
78
|
const h = (nodeName, vnodeData, ...children) => {
|
|
83
79
|
let child = null;
|
|
84
80
|
let key = null;
|
|
85
|
-
let slotName = null;
|
|
86
81
|
let simple = false;
|
|
87
82
|
let lastSimple = false;
|
|
88
83
|
const vNodeChildren = [];
|
|
@@ -114,9 +109,6 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
114
109
|
if (vnodeData.key) {
|
|
115
110
|
key = vnodeData.key;
|
|
116
111
|
}
|
|
117
|
-
if (vnodeData.name) {
|
|
118
|
-
slotName = vnodeData.name;
|
|
119
|
-
}
|
|
120
112
|
{
|
|
121
113
|
const classData = vnodeData.className || vnodeData.class;
|
|
122
114
|
if (classData) {
|
|
@@ -137,9 +129,6 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
137
129
|
{
|
|
138
130
|
vnode.$key$ = key;
|
|
139
131
|
}
|
|
140
|
-
{
|
|
141
|
-
vnode.$name$ = slotName;
|
|
142
|
-
}
|
|
143
132
|
return vnode;
|
|
144
133
|
};
|
|
145
134
|
/**
|
|
@@ -164,9 +153,6 @@ const newVNode = (tag, text) => {
|
|
|
164
153
|
{
|
|
165
154
|
vnode.$key$ = null;
|
|
166
155
|
}
|
|
167
|
-
{
|
|
168
|
-
vnode.$name$ = null;
|
|
169
|
-
}
|
|
170
156
|
return vnode;
|
|
171
157
|
};
|
|
172
158
|
const Host = {};
|
|
@@ -510,36 +496,13 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
510
496
|
let i = 0;
|
|
511
497
|
let elm;
|
|
512
498
|
let childNode;
|
|
513
|
-
let oldVNode;
|
|
514
|
-
if (!useNativeShadowDom) {
|
|
515
|
-
// remember for later we need to check to relocate nodes
|
|
516
|
-
checkSlotRelocate = true;
|
|
517
|
-
if (newVNode.$tag$ === 'slot') {
|
|
518
|
-
if (scopeId) {
|
|
519
|
-
// scoped css needs to add its scoped id to the parent element
|
|
520
|
-
parentElm.classList.add(scopeId + '-s');
|
|
521
|
-
}
|
|
522
|
-
newVNode.$flags$ |= newVNode.$children$
|
|
523
|
-
? // slot element has fallback content
|
|
524
|
-
2 /* VNODE_FLAGS.isSlotFallback */
|
|
525
|
-
: // slot element does not have fallback content
|
|
526
|
-
1 /* VNODE_FLAGS.isSlotReference */;
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
499
|
if (newVNode.$text$ !== null) {
|
|
530
500
|
// create text node
|
|
531
501
|
elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
|
|
532
502
|
}
|
|
533
|
-
else if (newVNode.$flags$ & 1 /* VNODE_FLAGS.isSlotReference */) {
|
|
534
|
-
// create a slot reference node
|
|
535
|
-
elm = newVNode.$elm$ =
|
|
536
|
-
doc.createTextNode('');
|
|
537
|
-
}
|
|
538
503
|
else {
|
|
539
504
|
// create element
|
|
540
|
-
elm = newVNode.$elm$ = (doc.createElement(newVNode.$
|
|
541
|
-
? 'slot-fb'
|
|
542
|
-
: newVNode.$tag$));
|
|
505
|
+
elm = newVNode.$elm$ = (doc.createElement(newVNode.$tag$));
|
|
543
506
|
// add css classes, attrs, props, listeners, etc.
|
|
544
507
|
{
|
|
545
508
|
updateElement(null, newVNode, isSvgMode);
|
|
@@ -552,7 +515,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
552
515
|
if (newVNode.$children$) {
|
|
553
516
|
for (i = 0; i < newVNode.$children$.length; ++i) {
|
|
554
517
|
// create the node
|
|
555
|
-
childNode = createElm(oldParentVNode, newVNode, i
|
|
518
|
+
childNode = createElm(oldParentVNode, newVNode, i);
|
|
556
519
|
// return node could have been null
|
|
557
520
|
if (childNode) {
|
|
558
521
|
// append our new node
|
|
@@ -561,50 +524,8 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
561
524
|
}
|
|
562
525
|
}
|
|
563
526
|
}
|
|
564
|
-
{
|
|
565
|
-
elm['s-hn'] = hostTagName;
|
|
566
|
-
if (newVNode.$flags$ & (2 /* VNODE_FLAGS.isSlotFallback */ | 1 /* VNODE_FLAGS.isSlotReference */)) {
|
|
567
|
-
// remember the content reference comment
|
|
568
|
-
elm['s-sr'] = true;
|
|
569
|
-
// remember the content reference comment
|
|
570
|
-
elm['s-cr'] = contentRef;
|
|
571
|
-
// remember the slot name, or empty string for default slot
|
|
572
|
-
elm['s-sn'] = newVNode.$name$ || '';
|
|
573
|
-
// check if we've got an old vnode for this slot
|
|
574
|
-
oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
|
|
575
|
-
if (oldVNode && oldVNode.$tag$ === newVNode.$tag$ && oldParentVNode.$elm$) {
|
|
576
|
-
// we've got an old slot vnode and the wrapper is being replaced
|
|
577
|
-
// so let's move the old slot content back to it's original location
|
|
578
|
-
putBackInOriginalLocation(oldParentVNode.$elm$, false);
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
527
|
return elm;
|
|
583
528
|
};
|
|
584
|
-
const putBackInOriginalLocation = (parentElm, recursive) => {
|
|
585
|
-
plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
586
|
-
const oldSlotChildNodes = parentElm.childNodes;
|
|
587
|
-
for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {
|
|
588
|
-
const childNode = oldSlotChildNodes[i];
|
|
589
|
-
if (childNode['s-hn'] !== hostTagName && childNode['s-ol']) {
|
|
590
|
-
// // this child node in the old element is from another component
|
|
591
|
-
// // remove this node from the old slot's parent
|
|
592
|
-
// childNode.remove();
|
|
593
|
-
// and relocate it back to it's original location
|
|
594
|
-
parentReferenceNode(childNode).insertBefore(childNode, referenceNode(childNode));
|
|
595
|
-
// remove the old original location comment entirely
|
|
596
|
-
// later on the patch function will know what to do
|
|
597
|
-
// and move this to the correct spot in need be
|
|
598
|
-
childNode['s-ol'].remove();
|
|
599
|
-
childNode['s-ol'] = undefined;
|
|
600
|
-
checkSlotRelocate = true;
|
|
601
|
-
}
|
|
602
|
-
if (recursive) {
|
|
603
|
-
putBackInOriginalLocation(childNode, recursive);
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
607
|
-
};
|
|
608
529
|
/**
|
|
609
530
|
* Create DOM nodes corresponding to a list of {@link d.Vnode} objects and
|
|
610
531
|
* add them to the DOM in the appropriate place.
|
|
@@ -621,17 +542,17 @@ const putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
621
542
|
* creating DOM nodes (inclusive)
|
|
622
543
|
*/
|
|
623
544
|
const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
624
|
-
let containerElm = (
|
|
545
|
+
let containerElm = (parentElm);
|
|
625
546
|
let childNode;
|
|
626
547
|
if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
|
|
627
548
|
containerElm = containerElm.shadowRoot;
|
|
628
549
|
}
|
|
629
550
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
630
551
|
if (vnodes[startIdx]) {
|
|
631
|
-
childNode = createElm(null, parentVNode, startIdx
|
|
552
|
+
childNode = createElm(null, parentVNode, startIdx);
|
|
632
553
|
if (childNode) {
|
|
633
554
|
vnodes[startIdx].$elm$ = childNode;
|
|
634
|
-
containerElm.insertBefore(childNode,
|
|
555
|
+
containerElm.insertBefore(childNode, before);
|
|
635
556
|
}
|
|
636
557
|
}
|
|
637
558
|
}
|
|
@@ -654,20 +575,6 @@ const removeVnodes = (vnodes, startIdx, endIdx) => {
|
|
|
654
575
|
const elm = vnode.$elm$;
|
|
655
576
|
nullifyVNodeRefs(vnode);
|
|
656
577
|
if (elm) {
|
|
657
|
-
{
|
|
658
|
-
// we're removing this element
|
|
659
|
-
// so it's possible we need to show slot fallback content now
|
|
660
|
-
checkSlotFallbackVisibility = true;
|
|
661
|
-
if (elm['s-ol']) {
|
|
662
|
-
// remove the original location comment
|
|
663
|
-
elm['s-ol'].remove();
|
|
664
|
-
}
|
|
665
|
-
else {
|
|
666
|
-
// it's possible that child nodes of the node
|
|
667
|
-
// that's being removed are slot nodes
|
|
668
|
-
putBackInOriginalLocation(elm, true);
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
578
|
// remove the vnode's element from the dom
|
|
672
579
|
elm.remove();
|
|
673
580
|
}
|
|
@@ -787,23 +694,6 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
787
694
|
newEndVnode = newCh[--newEndIdx];
|
|
788
695
|
}
|
|
789
696
|
else if (isSameVnode(oldStartVnode, newEndVnode)) {
|
|
790
|
-
// case: "Vnode moved right"
|
|
791
|
-
//
|
|
792
|
-
// We've found that the last node in our window on the new children is
|
|
793
|
-
// the same VNode as the _first_ node in our window on the old children
|
|
794
|
-
// we're dealing with now. Visually, this is the layout of these two
|
|
795
|
-
// nodes:
|
|
796
|
-
//
|
|
797
|
-
// newCh: [..., newStartVnode , ... , newEndVnode , ...]
|
|
798
|
-
// ^^^^^^^^^^^
|
|
799
|
-
// oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
|
|
800
|
-
// ^^^^^^^^^^^^^
|
|
801
|
-
//
|
|
802
|
-
// In this situation we need to patch `newEndVnode` onto `oldStartVnode`
|
|
803
|
-
// and move the DOM element for `oldStartVnode`.
|
|
804
|
-
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
805
|
-
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
|
|
806
|
-
}
|
|
807
697
|
patch(oldStartVnode, newEndVnode);
|
|
808
698
|
// We need to move the element for `oldStartVnode` into a position which
|
|
809
699
|
// will be appropriate for `newEndVnode`. For this we can use
|
|
@@ -827,24 +717,6 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
827
717
|
newEndVnode = newCh[--newEndIdx];
|
|
828
718
|
}
|
|
829
719
|
else if (isSameVnode(oldEndVnode, newStartVnode)) {
|
|
830
|
-
// case: "Vnode moved left"
|
|
831
|
-
//
|
|
832
|
-
// We've found that the first node in our window on the new children is
|
|
833
|
-
// the same VNode as the _last_ node in our window on the old children.
|
|
834
|
-
// Visually, this is the layout of these two nodes:
|
|
835
|
-
//
|
|
836
|
-
// newCh: [..., newStartVnode , ... , newEndVnode , ...]
|
|
837
|
-
// ^^^^^^^^^^^^^
|
|
838
|
-
// oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
|
|
839
|
-
// ^^^^^^^^^^^
|
|
840
|
-
//
|
|
841
|
-
// In this situation we need to patch `newStartVnode` onto `oldEndVnode`
|
|
842
|
-
// (which will handle updating any changed attributes, reconciling their
|
|
843
|
-
// children etc) but we also need to move the DOM node to which
|
|
844
|
-
// `oldEndVnode` corresponds.
|
|
845
|
-
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
846
|
-
putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
|
|
847
|
-
}
|
|
848
720
|
patch(oldEndVnode, newStartVnode);
|
|
849
721
|
// We've already checked above if `oldStartVnode` and `newStartVnode` are
|
|
850
722
|
// the same node, so since we're here we know that they are not. Thus we
|
|
@@ -879,7 +751,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
879
751
|
elmToMove = oldCh[idxInOld];
|
|
880
752
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
881
753
|
// the tag doesn't match so we'll need a new DOM element
|
|
882
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld
|
|
754
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld);
|
|
883
755
|
}
|
|
884
756
|
else {
|
|
885
757
|
patch(elmToMove, newStartVnode);
|
|
@@ -895,13 +767,13 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
895
767
|
// the key of the first new child OR the build is not using `key`
|
|
896
768
|
// attributes at all. In either case we need to create a new element
|
|
897
769
|
// for the new node.
|
|
898
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx
|
|
770
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx);
|
|
899
771
|
newStartVnode = newCh[++newStartIdx];
|
|
900
772
|
}
|
|
901
773
|
if (node) {
|
|
902
774
|
// if we created a new node then handle inserting it to the DOM
|
|
903
775
|
{
|
|
904
|
-
|
|
776
|
+
oldStartVnode.$elm$.parentNode.insertBefore(node, oldStartVnode.$elm$);
|
|
905
777
|
}
|
|
906
778
|
}
|
|
907
779
|
}
|
|
@@ -939,9 +811,6 @@ const isSameVnode = (leftVNode, rightVNode) => {
|
|
|
939
811
|
// compare if two vnode to see if they're "technically" the same
|
|
940
812
|
// need to have the same element tag, and same key to be the same
|
|
941
813
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
942
|
-
if (leftVNode.$tag$ === 'slot') {
|
|
943
|
-
return leftVNode.$name$ === rightVNode.$name$;
|
|
944
|
-
}
|
|
945
814
|
// this will be set if components in the build have `key` attrs set on them
|
|
946
815
|
{
|
|
947
816
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
@@ -949,14 +818,6 @@ const isSameVnode = (leftVNode, rightVNode) => {
|
|
|
949
818
|
}
|
|
950
819
|
return false;
|
|
951
820
|
};
|
|
952
|
-
const referenceNode = (node) => {
|
|
953
|
-
// this node was relocated to a new location in the dom
|
|
954
|
-
// because of some other component's slot
|
|
955
|
-
// but we still have an html comment in place of where
|
|
956
|
-
// it's original location was according to it's original vdom
|
|
957
|
-
return (node && node['s-ol']) || node;
|
|
958
|
-
};
|
|
959
|
-
const parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).parentNode;
|
|
960
821
|
/**
|
|
961
822
|
* Handle reconciling an outdated VNode with a new one which corresponds to
|
|
962
823
|
* it. This function handles flushing updates to the DOM and reconciling the
|
|
@@ -969,14 +830,10 @@ const patch = (oldVNode, newVNode) => {
|
|
|
969
830
|
const elm = (newVNode.$elm$ = oldVNode.$elm$);
|
|
970
831
|
const oldChildren = oldVNode.$children$;
|
|
971
832
|
const newChildren = newVNode.$children$;
|
|
972
|
-
const tag = newVNode.$tag$;
|
|
973
833
|
const text = newVNode.$text$;
|
|
974
|
-
let defaultHolder;
|
|
975
834
|
if (text === null) {
|
|
976
835
|
{
|
|
977
|
-
|
|
978
|
-
;
|
|
979
|
-
else {
|
|
836
|
+
{
|
|
980
837
|
// either this is the first render of an element OR it's an update
|
|
981
838
|
// AND we already know it's possible it could have changed
|
|
982
839
|
// this updates the element's css classes, attrs, props, listeners, etc.
|
|
@@ -1002,147 +859,12 @@ const patch = (oldVNode, newVNode) => {
|
|
|
1002
859
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
1003
860
|
}
|
|
1004
861
|
}
|
|
1005
|
-
else if ((defaultHolder = elm['s-cr'])) {
|
|
1006
|
-
// this element has slotted content
|
|
1007
|
-
defaultHolder.parentNode.textContent = text;
|
|
1008
|
-
}
|
|
1009
862
|
else if (oldVNode.$text$ !== text) {
|
|
1010
863
|
// update the text content for the text only vnode
|
|
1011
864
|
// and also only if the text is different than before
|
|
1012
865
|
elm.data = text;
|
|
1013
866
|
}
|
|
1014
867
|
};
|
|
1015
|
-
const updateFallbackSlotVisibility = (elm) => {
|
|
1016
|
-
// tslint:disable-next-line: prefer-const
|
|
1017
|
-
const childNodes = elm.childNodes;
|
|
1018
|
-
let childNode;
|
|
1019
|
-
let i;
|
|
1020
|
-
let ilen;
|
|
1021
|
-
let j;
|
|
1022
|
-
let slotNameAttr;
|
|
1023
|
-
let nodeType;
|
|
1024
|
-
for (i = 0, ilen = childNodes.length; i < ilen; i++) {
|
|
1025
|
-
childNode = childNodes[i];
|
|
1026
|
-
if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
1027
|
-
if (childNode['s-sr']) {
|
|
1028
|
-
// this is a slot fallback node
|
|
1029
|
-
// get the slot name for this slot reference node
|
|
1030
|
-
slotNameAttr = childNode['s-sn'];
|
|
1031
|
-
// by default always show a fallback slot node
|
|
1032
|
-
// then hide it if there are other slots in the light dom
|
|
1033
|
-
childNode.hidden = false;
|
|
1034
|
-
for (j = 0; j < ilen; j++) {
|
|
1035
|
-
nodeType = childNodes[j].nodeType;
|
|
1036
|
-
if (childNodes[j]['s-hn'] !== childNode['s-hn'] || slotNameAttr !== '') {
|
|
1037
|
-
// this sibling node is from a different component OR is a named fallback slot node
|
|
1038
|
-
if (nodeType === 1 /* NODE_TYPE.ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
|
|
1039
|
-
childNode.hidden = true;
|
|
1040
|
-
break;
|
|
1041
|
-
}
|
|
1042
|
-
}
|
|
1043
|
-
else {
|
|
1044
|
-
// this is a default fallback slot node
|
|
1045
|
-
// any element or text node (with content)
|
|
1046
|
-
// should hide the default fallback slot node
|
|
1047
|
-
if (nodeType === 1 /* NODE_TYPE.ElementNode */ ||
|
|
1048
|
-
(nodeType === 3 /* NODE_TYPE.TextNode */ && childNodes[j].textContent.trim() !== '')) {
|
|
1049
|
-
childNode.hidden = true;
|
|
1050
|
-
break;
|
|
1051
|
-
}
|
|
1052
|
-
}
|
|
1053
|
-
}
|
|
1054
|
-
}
|
|
1055
|
-
// keep drilling down
|
|
1056
|
-
updateFallbackSlotVisibility(childNode);
|
|
1057
|
-
}
|
|
1058
|
-
}
|
|
1059
|
-
};
|
|
1060
|
-
const relocateNodes = [];
|
|
1061
|
-
const relocateSlotContent = (elm) => {
|
|
1062
|
-
// tslint:disable-next-line: prefer-const
|
|
1063
|
-
let childNode;
|
|
1064
|
-
let node;
|
|
1065
|
-
let hostContentNodes;
|
|
1066
|
-
let slotNameAttr;
|
|
1067
|
-
let relocateNodeData;
|
|
1068
|
-
let j;
|
|
1069
|
-
let i = 0;
|
|
1070
|
-
const childNodes = elm.childNodes;
|
|
1071
|
-
const ilen = childNodes.length;
|
|
1072
|
-
for (; i < ilen; i++) {
|
|
1073
|
-
childNode = childNodes[i];
|
|
1074
|
-
if (childNode['s-sr'] && (node = childNode['s-cr']) && node.parentNode) {
|
|
1075
|
-
// first got the content reference comment node
|
|
1076
|
-
// then we got it's parent, which is where all the host content is in now
|
|
1077
|
-
hostContentNodes = node.parentNode.childNodes;
|
|
1078
|
-
slotNameAttr = childNode['s-sn'];
|
|
1079
|
-
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
1080
|
-
node = hostContentNodes[j];
|
|
1081
|
-
if (!node['s-cn'] && !node['s-nr'] && node['s-hn'] !== childNode['s-hn']) {
|
|
1082
|
-
// let's do some relocating to its new home
|
|
1083
|
-
// but never relocate a content reference node
|
|
1084
|
-
// that is suppose to always represent the original content location
|
|
1085
|
-
if (isNodeLocatedInSlot(node, slotNameAttr)) {
|
|
1086
|
-
// it's possible we've already decided to relocate this node
|
|
1087
|
-
relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
1088
|
-
// made some changes to slots
|
|
1089
|
-
// let's make sure we also double check
|
|
1090
|
-
// fallbacks are correctly hidden or shown
|
|
1091
|
-
checkSlotFallbackVisibility = true;
|
|
1092
|
-
node['s-sn'] = node['s-sn'] || slotNameAttr;
|
|
1093
|
-
if (relocateNodeData) {
|
|
1094
|
-
// previously we never found a slot home for this node
|
|
1095
|
-
// but turns out we did, so let's remember it now
|
|
1096
|
-
relocateNodeData.$slotRefNode$ = childNode;
|
|
1097
|
-
}
|
|
1098
|
-
else {
|
|
1099
|
-
// add to our list of nodes to relocate
|
|
1100
|
-
relocateNodes.push({
|
|
1101
|
-
$slotRefNode$: childNode,
|
|
1102
|
-
$nodeToRelocate$: node,
|
|
1103
|
-
});
|
|
1104
|
-
}
|
|
1105
|
-
if (node['s-sr']) {
|
|
1106
|
-
relocateNodes.map((relocateNode) => {
|
|
1107
|
-
if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node['s-sn'])) {
|
|
1108
|
-
relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
1109
|
-
if (relocateNodeData && !relocateNode.$slotRefNode$) {
|
|
1110
|
-
relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
|
|
1111
|
-
}
|
|
1112
|
-
}
|
|
1113
|
-
});
|
|
1114
|
-
}
|
|
1115
|
-
}
|
|
1116
|
-
else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
|
|
1117
|
-
// so far this element does not have a slot home, not setting slotRefNode on purpose
|
|
1118
|
-
// if we never find a home for this element then we'll need to hide it
|
|
1119
|
-
relocateNodes.push({
|
|
1120
|
-
$nodeToRelocate$: node,
|
|
1121
|
-
});
|
|
1122
|
-
}
|
|
1123
|
-
}
|
|
1124
|
-
}
|
|
1125
|
-
}
|
|
1126
|
-
if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
1127
|
-
relocateSlotContent(childNode);
|
|
1128
|
-
}
|
|
1129
|
-
}
|
|
1130
|
-
};
|
|
1131
|
-
const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
|
|
1132
|
-
if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
1133
|
-
if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {
|
|
1134
|
-
return true;
|
|
1135
|
-
}
|
|
1136
|
-
if (nodeToRelocate.getAttribute('slot') === slotNameAttr) {
|
|
1137
|
-
return true;
|
|
1138
|
-
}
|
|
1139
|
-
return false;
|
|
1140
|
-
}
|
|
1141
|
-
if (nodeToRelocate['s-sn'] === slotNameAttr) {
|
|
1142
|
-
return true;
|
|
1143
|
-
}
|
|
1144
|
-
return slotNameAttr === '';
|
|
1145
|
-
};
|
|
1146
868
|
/**
|
|
1147
869
|
* 'Nullify' any VDom `ref` callbacks on a VDom node or its children by
|
|
1148
870
|
* calling them with `null`. This signals that the DOM element corresponding to
|
|
@@ -1170,7 +892,6 @@ const nullifyVNodeRefs = (vNode) => {
|
|
|
1170
892
|
*/
|
|
1171
893
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
1172
894
|
const hostElm = hostRef.$hostElement$;
|
|
1173
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
1174
895
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
1175
896
|
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
1176
897
|
hostTagName = hostElm.tagName;
|
|
@@ -1181,90 +902,8 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
1181
902
|
{
|
|
1182
903
|
scopeId = hostElm['s-sc'];
|
|
1183
904
|
}
|
|
1184
|
-
{
|
|
1185
|
-
contentRef = hostElm['s-cr'];
|
|
1186
|
-
useNativeShadowDom = supportsShadow && (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) !== 0;
|
|
1187
|
-
// always reset
|
|
1188
|
-
checkSlotFallbackVisibility = false;
|
|
1189
|
-
}
|
|
1190
905
|
// synchronous patch
|
|
1191
906
|
patch(oldVNode, rootVnode);
|
|
1192
|
-
{
|
|
1193
|
-
// while we're moving nodes around existing nodes, temporarily disable
|
|
1194
|
-
// the disconnectCallback from working
|
|
1195
|
-
plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
1196
|
-
if (checkSlotRelocate) {
|
|
1197
|
-
relocateSlotContent(rootVnode.$elm$);
|
|
1198
|
-
let relocateData;
|
|
1199
|
-
let nodeToRelocate;
|
|
1200
|
-
let orgLocationNode;
|
|
1201
|
-
let parentNodeRef;
|
|
1202
|
-
let insertBeforeNode;
|
|
1203
|
-
let refNode;
|
|
1204
|
-
let i = 0;
|
|
1205
|
-
for (; i < relocateNodes.length; i++) {
|
|
1206
|
-
relocateData = relocateNodes[i];
|
|
1207
|
-
nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
1208
|
-
if (!nodeToRelocate['s-ol']) {
|
|
1209
|
-
// add a reference node marking this node's original location
|
|
1210
|
-
// keep a reference to this node for later lookups
|
|
1211
|
-
orgLocationNode =
|
|
1212
|
-
doc.createTextNode('');
|
|
1213
|
-
orgLocationNode['s-nr'] = nodeToRelocate;
|
|
1214
|
-
nodeToRelocate.parentNode.insertBefore((nodeToRelocate['s-ol'] = orgLocationNode), nodeToRelocate);
|
|
1215
|
-
}
|
|
1216
|
-
}
|
|
1217
|
-
for (i = 0; i < relocateNodes.length; i++) {
|
|
1218
|
-
relocateData = relocateNodes[i];
|
|
1219
|
-
nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
1220
|
-
if (relocateData.$slotRefNode$) {
|
|
1221
|
-
// by default we're just going to insert it directly
|
|
1222
|
-
// after the slot reference node
|
|
1223
|
-
parentNodeRef = relocateData.$slotRefNode$.parentNode;
|
|
1224
|
-
insertBeforeNode = relocateData.$slotRefNode$.nextSibling;
|
|
1225
|
-
orgLocationNode = nodeToRelocate['s-ol'];
|
|
1226
|
-
while ((orgLocationNode = orgLocationNode.previousSibling)) {
|
|
1227
|
-
refNode = orgLocationNode['s-nr'];
|
|
1228
|
-
if (refNode && refNode['s-sn'] === nodeToRelocate['s-sn'] && parentNodeRef === refNode.parentNode) {
|
|
1229
|
-
refNode = refNode.nextSibling;
|
|
1230
|
-
if (!refNode || !refNode['s-nr']) {
|
|
1231
|
-
insertBeforeNode = refNode;
|
|
1232
|
-
break;
|
|
1233
|
-
}
|
|
1234
|
-
}
|
|
1235
|
-
}
|
|
1236
|
-
if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) ||
|
|
1237
|
-
nodeToRelocate.nextSibling !== insertBeforeNode) {
|
|
1238
|
-
// we've checked that it's worth while to relocate
|
|
1239
|
-
// since that the node to relocate
|
|
1240
|
-
// has a different next sibling or parent relocated
|
|
1241
|
-
if (nodeToRelocate !== insertBeforeNode) {
|
|
1242
|
-
if (!nodeToRelocate['s-hn'] && nodeToRelocate['s-ol']) {
|
|
1243
|
-
// probably a component in the index.html that doesn't have it's hostname set
|
|
1244
|
-
nodeToRelocate['s-hn'] = nodeToRelocate['s-ol'].parentNode.nodeName;
|
|
1245
|
-
}
|
|
1246
|
-
// add it back to the dom but in its new home
|
|
1247
|
-
parentNodeRef.insertBefore(nodeToRelocate, insertBeforeNode);
|
|
1248
|
-
}
|
|
1249
|
-
}
|
|
1250
|
-
}
|
|
1251
|
-
else {
|
|
1252
|
-
// this node doesn't have a slot home to go to, so let's hide it
|
|
1253
|
-
if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
1254
|
-
nodeToRelocate.hidden = true;
|
|
1255
|
-
}
|
|
1256
|
-
}
|
|
1257
|
-
}
|
|
1258
|
-
}
|
|
1259
|
-
if (checkSlotFallbackVisibility) {
|
|
1260
|
-
updateFallbackSlotVisibility(rootVnode.$elm$);
|
|
1261
|
-
}
|
|
1262
|
-
// done moving nodes around
|
|
1263
|
-
// allow the disconnect callback to work again
|
|
1264
|
-
plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
1265
|
-
// always reset
|
|
1266
|
-
relocateNodes.length = 0;
|
|
1267
|
-
}
|
|
1268
907
|
};
|
|
1269
908
|
const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1270
909
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
|
|
@@ -1435,6 +1074,9 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1435
1074
|
const endPostUpdate = createTime('postUpdate', tagName);
|
|
1436
1075
|
const instance = hostRef.$lazyInstance$ ;
|
|
1437
1076
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1077
|
+
{
|
|
1078
|
+
safeCall(instance, 'componentDidRender');
|
|
1079
|
+
}
|
|
1438
1080
|
if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
|
|
1439
1081
|
hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
|
|
1440
1082
|
{
|
|
@@ -1744,16 +1386,6 @@ const connectedCallback = (elm) => {
|
|
|
1744
1386
|
if (!(hostRef.$flags$ & 1 /* HOST_FLAGS.hasConnected */)) {
|
|
1745
1387
|
// first time this component has connected
|
|
1746
1388
|
hostRef.$flags$ |= 1 /* HOST_FLAGS.hasConnected */;
|
|
1747
|
-
{
|
|
1748
|
-
// initUpdate
|
|
1749
|
-
// if the slot polyfill is required we'll need to put some nodes
|
|
1750
|
-
// in here to act as original content anchors as we move nodes around
|
|
1751
|
-
// host element has been connected to the DOM
|
|
1752
|
-
if ((// TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field
|
|
1753
|
-
cmpMeta.$flags$ & (4 /* CMP_FLAGS.hasSlotRelocation */ | 8 /* CMP_FLAGS.needsShadowDomShim */))) {
|
|
1754
|
-
setContentReference(elm);
|
|
1755
|
-
}
|
|
1756
|
-
}
|
|
1757
1389
|
{
|
|
1758
1390
|
// find the first ancestor component (if there is one) and register
|
|
1759
1391
|
// this component as one of the actively loading child components for its ancestor
|
|
@@ -1795,17 +1427,6 @@ const connectedCallback = (elm) => {
|
|
|
1795
1427
|
endConnected();
|
|
1796
1428
|
}
|
|
1797
1429
|
};
|
|
1798
|
-
const setContentReference = (elm) => {
|
|
1799
|
-
// only required when we're NOT using native shadow dom (slot)
|
|
1800
|
-
// or this browser doesn't support native shadow dom
|
|
1801
|
-
// and this host element was NOT created with SSR
|
|
1802
|
-
// let's pick out the inner content for slot projection
|
|
1803
|
-
// create a node to represent where the original
|
|
1804
|
-
// content was first placed, which is useful later on
|
|
1805
|
-
const contentRefElm = (elm['s-cr'] = doc.createComment(''));
|
|
1806
|
-
contentRefElm['s-cn'] = true;
|
|
1807
|
-
elm.insertBefore(contentRefElm, elm.firstChild);
|
|
1808
|
-
};
|
|
1809
1430
|
const disconnectedCallback = (elm) => {
|
|
1810
1431
|
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
1811
1432
|
const hostRef = getHostRef(elm);
|
|
@@ -2132,4 +1753,4 @@ const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
|
2132
1753
|
|
|
2133
1754
|
export { CSS as C, Host as H, NAMESPACE as N, promiseResolve as a, bootstrapLazy as b, getRenderingRef as c, doc as d, createEvent as e, forceUpdate as f, getElement as g, h, getAssetPath as i, plt as p, registerInstance as r, setNonce as s, win as w };
|
|
2134
1755
|
|
|
2135
|
-
//# sourceMappingURL=index-
|
|
1756
|
+
//# sourceMappingURL=index-e3b2b3c7.js.map
|
|
Binary file
|
|
Binary file
|