@ionic/core 8.8.14-dev.11784216165.1ecbf364 → 8.8.14-dev.11784222473.142aed23
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/components/index.js +1 -1
- package/components/ion-action-sheet.js +1 -1
- package/components/ion-alert.js +1 -1
- package/components/ion-back-button.js +1 -1
- package/components/ion-button.js +1 -1
- package/components/ion-card.js +1 -1
- package/components/ion-chip.js +1 -1
- package/components/ion-datetime-button.js +1 -1
- package/components/ion-datetime.js +1 -1
- package/components/ion-fab-button.js +1 -1
- package/components/ion-img.js +1 -1
- package/components/ion-infinite-scroll-content.js +1 -1
- package/components/ion-input-password-toggle.js +1 -1
- package/components/ion-input.js +1 -1
- package/components/ion-item-option.js +1 -1
- package/components/ion-item.js +1 -1
- package/components/ion-loading.js +1 -1
- package/components/ion-menu-button.js +1 -1
- package/components/ion-menu.js +1 -1
- package/components/ion-modal.js +1 -1
- package/components/ion-nav.js +1 -1
- package/components/ion-picker-legacy-column.d.ts +11 -0
- package/components/ion-picker-legacy-column.js +4 -0
- package/components/ion-picker-legacy.d.ts +11 -0
- package/components/ion-picker-legacy.js +4 -0
- package/components/ion-popover.js +1 -1
- package/components/ion-progress-bar.js +1 -1
- package/components/ion-radio.js +1 -1
- package/components/ion-range.js +1 -1
- package/components/ion-refresher-content.js +1 -1
- package/components/ion-refresher.js +1 -1
- package/components/ion-reorder-group.js +1 -1
- package/components/ion-reorder.js +1 -1
- package/components/ion-ripple-effect.js +1 -1
- package/components/ion-router-link.js +1 -1
- package/components/ion-router-outlet.js +1 -1
- package/components/ion-router.js +1 -1
- package/components/ion-row.js +1 -1
- package/components/ion-searchbar.js +1 -1
- package/components/ion-segment-button.js +1 -1
- package/components/ion-segment-content.js +1 -1
- package/components/ion-segment-view.js +1 -1
- package/components/ion-segment.js +1 -1
- package/components/ion-select-modal.js +1 -1
- package/components/ion-select-option.js +1 -1
- package/components/ion-select-popover.js +1 -1
- package/components/ion-select.js +1 -1
- package/components/ion-skeleton-text.js +1 -1
- package/components/ion-spinner.js +1 -1
- package/components/ion-split-pane.js +1 -1
- package/components/ion-tab-bar.js +1 -1
- package/components/ion-tab-button.js +1 -1
- package/components/ion-tab.js +1 -1
- package/components/ion-tabs.js +1 -1
- package/components/ion-text.js +1 -1
- package/components/ion-textarea.js +1 -1
- package/components/ion-thumbnail.js +1 -1
- package/components/ion-title.js +1 -1
- package/components/ion-toast.js +1 -1
- package/components/ion-toggle.js +1 -1
- package/components/ion-toolbar.js +1 -1
- package/components/p-3hGiN2uq.js +4 -0
- package/components/{p-DpV-p5Xs.js → p-5bE_Wz4Y.js} +1 -1
- package/components/{p-r0aq7dpt.js → p-B60hm8Qv.js} +1 -1
- package/components/{p-Buf_7zcy.js → p-BHrrc-3d.js} +1 -1
- package/components/p-BIPPbW0M.js +4 -0
- package/components/{p-XJWMAP8m.js → p-BLmJ0zRm.js} +1 -1
- package/components/{p-DhkITZ-y.js → p-BSEgsdFI.js} +1 -1
- package/components/p-BUYFy35a.js +4 -0
- package/components/p-BWEZufiK.js +4 -0
- package/components/p-BqpciLfi.js +4 -0
- package/components/p-BsQPAqo9.js +4 -0
- package/components/p-CU5rbWAW.js +4 -0
- package/components/{p-Dz74mwlk.js → p-Cfx4M1Bn.js} +1 -1
- package/components/p-k_E4tX5Z.js +4 -0
- package/components/p-nyXeHk23.js +4 -0
- package/components/{p-wk2QqrAo.js → p-rCa2eL0j.js} +1 -1
- package/dist/cjs/config-xninhj0J.js +201 -0
- package/dist/cjs/index.cjs.js +6 -6
- package/dist/cjs/ion-action-sheet.cjs.entry.js +7 -27
- package/dist/cjs/ion-alert.cjs.entry.js +25 -64
- package/dist/cjs/ion-app_8.cjs.entry.js +9 -23
- package/dist/cjs/ion-avatar_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-col_3.cjs.entry.js +1 -1
- package/dist/cjs/{ion-datetime.cjs.entry.js → ion-datetime_3.cjs.entry.js} +639 -1
- package/dist/cjs/ion-img.cjs.entry.js +1 -3
- package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +2 -3
- package/dist/cjs/ion-input.cjs.entry.js +4 -4
- package/dist/cjs/ion-item_8.cjs.entry.js +2 -2
- package/dist/cjs/ion-loading.cjs.entry.js +5 -10
- package/dist/cjs/ion-menu_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-modal.cjs.entry.js +18 -23
- package/dist/cjs/ion-nav_2.cjs.entry.js +115 -2
- package/dist/cjs/ion-popover.cjs.entry.js +5 -9
- package/dist/cjs/ion-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/ion-radio_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-range.cjs.entry.js +3 -3
- package/dist/cjs/ion-refresher_2.cjs.entry.js +5 -6
- package/dist/cjs/ion-reorder_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-ripple-effect.cjs.entry.js +1 -1
- package/dist/cjs/ion-route_4.cjs.entry.js +4 -18
- package/dist/cjs/ion-searchbar.cjs.entry.js +5 -5
- package/dist/cjs/ion-segment-content.cjs.entry.js +1 -1
- package/dist/cjs/ion-segment-view.cjs.entry.js +2 -2
- package/dist/cjs/ion-segment_2.cjs.entry.js +4 -4
- package/dist/cjs/ion-select-modal.cjs.entry.js +30 -84
- package/dist/cjs/ion-select_3.cjs.entry.js +49 -407
- package/dist/cjs/ion-spinner.cjs.entry.js +1 -1
- package/dist/cjs/ion-split-pane.cjs.entry.js +2 -2
- package/dist/cjs/ion-tab-bar_2.cjs.entry.js +4 -4
- package/dist/cjs/ion-tab_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-text.cjs.entry.js +2 -2
- package/dist/cjs/ion-textarea.cjs.entry.js +2 -2
- package/dist/cjs/ion-toast.cjs.entry.js +5 -6
- package/dist/cjs/ion-toggle.cjs.entry.js +3 -3
- package/dist/cjs/ionic.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{overlays-DSmSrd_4.js → overlays-DdtIYQUH.js} +31 -27
- package/dist/collection/collection-manifest.json +10 -6
- package/dist/collection/components/action-sheet/action-sheet.ios.css +2 -229
- package/dist/collection/components/action-sheet/action-sheet.js +5 -24
- package/dist/collection/components/action-sheet/action-sheet.md.css +2 -175
- package/dist/collection/components/alert/alert.ios.css +10 -280
- package/dist/collection/components/alert/alert.js +21 -59
- package/dist/collection/components/alert/alert.md.css +20 -269
- package/dist/collection/components/img/img.js +1 -6
- package/dist/collection/components/input/input.js +8 -8
- package/dist/collection/components/loading/loading.js +3 -7
- package/dist/collection/components/modal/modal.ios.css +8 -0
- package/dist/collection/components/modal/modal.js +18 -23
- package/dist/collection/components/modal/modal.md.css +8 -0
- package/dist/collection/components/nav/nav.js +219 -4
- package/dist/collection/components/picker-legacy/animations/ios.enter.js +27 -0
- package/dist/collection/components/picker-legacy/animations/ios.leave.js +23 -0
- package/dist/collection/components/picker-legacy/picker-interface.js +1 -0
- package/dist/collection/components/picker-legacy/picker.ios.css +300 -0
- package/dist/collection/components/picker-legacy/picker.js +890 -0
- package/dist/collection/components/picker-legacy/picker.md.css +287 -0
- package/dist/collection/components/picker-legacy-column/picker-column.ios.css +231 -0
- package/dist/collection/components/picker-legacy-column/picker-column.js +422 -0
- package/dist/collection/components/picker-legacy-column/picker-column.md.css +222 -0
- package/dist/collection/components/picker-legacy-column/test/test.utils.js +43 -0
- package/dist/collection/components/popover/popover.ios.css +0 -15
- package/dist/collection/components/popover/popover.js +3 -7
- package/dist/collection/components/popover/popover.md.css +0 -15
- package/dist/collection/components/progress-bar/progress-bar.js +1 -1
- package/dist/collection/components/radio/radio.js +4 -4
- package/dist/collection/components/range/range.js +3 -3
- package/dist/collection/components/refresher/refresher.js +1 -1
- package/dist/collection/components/refresher-content/refresher-content.js +1 -1
- package/dist/collection/components/reorder/reorder.js +1 -1
- package/dist/collection/components/reorder-group/reorder-group.js +1 -1
- package/dist/collection/components/ripple-effect/ripple-effect.js +1 -1
- package/dist/collection/components/route/route.js +1 -1
- package/dist/collection/components/router/utils/dom.js +3 -22
- package/dist/collection/components/router-link/router-link.js +2 -2
- package/dist/collection/components/router-outlet/router-outlet.js +5 -38
- package/dist/collection/components/row/row.js +1 -1
- package/dist/collection/components/searchbar/searchbar.js +9 -9
- package/dist/collection/components/segment/segment.js +2 -2
- package/dist/collection/components/segment-button/segment-button.js +2 -2
- package/dist/collection/components/segment-content/segment-content.js +1 -1
- package/dist/collection/components/segment-view/segment-view.js +2 -2
- package/dist/collection/components/select/select.ios.css +0 -33
- package/dist/collection/components/select/select.js +16 -323
- package/dist/collection/components/select/select.md.css +0 -33
- package/dist/collection/components/select-modal/select-modal.ios.css +0 -219
- package/dist/collection/components/select-modal/select-modal.js +26 -79
- package/dist/collection/components/select-modal/select-modal.md.css +0 -165
- package/dist/collection/components/select-option/select-option.js +3 -67
- package/dist/collection/components/select-popover/select-popover.ios.css +0 -219
- package/dist/collection/components/select-popover/select-popover.js +26 -78
- package/dist/collection/components/select-popover/select-popover.md.css +0 -165
- package/dist/collection/components/skeleton-text/skeleton-text.js +2 -2
- package/dist/collection/components/spinner/spinner.js +1 -1
- package/dist/collection/components/split-pane/split-pane.js +2 -2
- package/dist/collection/components/tab/tab.js +2 -2
- package/dist/collection/components/tab-bar/tab-bar.js +2 -2
- package/dist/collection/components/tab-button/tab-button.js +2 -2
- package/dist/collection/components/tabs/tabs.js +1 -1
- package/dist/collection/components/text/text.js +2 -2
- package/dist/collection/components/textarea/textarea.js +2 -2
- package/dist/collection/components/thumbnail/thumbnail.js +1 -1
- package/dist/collection/components/title/title.js +2 -2
- package/dist/collection/components/toast/toast.js +2 -2
- package/dist/collection/components/toggle/toggle.js +3 -3
- package/dist/collection/components/toolbar/toolbar.js +2 -2
- package/dist/collection/index.js +1 -1
- package/dist/collection/utils/overlays.js +30 -26
- package/dist/collection/utils/sanitization/index.js +18 -274
- package/dist/docs.json +1189 -497
- package/dist/esm/config-DQCONYYp.js +195 -0
- package/dist/esm/{index-AlrZKoWR.js → index-DV3sJJW8.js} +1 -1
- package/dist/esm/index.js +2 -3
- package/dist/esm/ion-accordion_2.entry.js +1 -1
- package/dist/esm/ion-action-sheet.entry.js +7 -27
- package/dist/esm/ion-alert.entry.js +24 -63
- package/dist/esm/ion-app_8.entry.js +9 -23
- package/dist/esm/ion-avatar_3.entry.js +1 -1
- package/dist/esm/ion-back-button.entry.js +1 -1
- package/dist/esm/ion-breadcrumb_2.entry.js +1 -1
- package/dist/esm/ion-col_3.entry.js +1 -1
- package/dist/esm/{ion-datetime.entry.js → ion-datetime_3.entry.js} +641 -5
- package/dist/esm/ion-fab_3.entry.js +1 -1
- package/dist/esm/ion-img.entry.js +2 -4
- package/dist/esm/ion-infinite-scroll_2.entry.js +1 -2
- package/dist/esm/ion-input-password-toggle.entry.js +1 -1
- package/dist/esm/ion-input.entry.js +5 -5
- package/dist/esm/ion-item_8.entry.js +3 -3
- package/dist/esm/ion-loading.entry.js +4 -9
- package/dist/esm/ion-menu_3.entry.js +2 -2
- package/dist/esm/ion-modal.entry.js +18 -23
- package/dist/esm/ion-nav_2.entry.js +116 -3
- package/dist/esm/ion-popover.entry.js +5 -9
- package/dist/esm/ion-progress-bar.entry.js +1 -1
- package/dist/esm/ion-radio_2.entry.js +3 -3
- package/dist/esm/ion-range.entry.js +3 -3
- package/dist/esm/ion-refresher_2.entry.js +4 -5
- package/dist/esm/ion-reorder_2.entry.js +3 -3
- package/dist/esm/ion-ripple-effect.entry.js +1 -1
- package/dist/esm/ion-route_4.entry.js +4 -18
- package/dist/esm/ion-searchbar.entry.js +6 -6
- package/dist/esm/ion-segment-content.entry.js +1 -1
- package/dist/esm/ion-segment-view.entry.js +2 -2
- package/dist/esm/ion-segment_2.entry.js +4 -4
- package/dist/esm/ion-select-modal.entry.js +30 -84
- package/dist/esm/ion-select_3.entry.js +52 -410
- package/dist/esm/ion-spinner.entry.js +1 -1
- package/dist/esm/ion-split-pane.entry.js +2 -2
- package/dist/esm/ion-tab-bar_2.entry.js +4 -4
- package/dist/esm/ion-tab_2.entry.js +3 -3
- package/dist/esm/ion-text.entry.js +2 -2
- package/dist/esm/ion-textarea.entry.js +2 -2
- package/dist/esm/ion-toast.entry.js +4 -5
- package/dist/esm/ion-toggle.entry.js +4 -4
- package/dist/esm/ionic.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{overlays-DLNOHWNc.js → overlays-Dg0q2_tJ.js} +32 -28
- package/dist/html.html-data.json +80 -52
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-01f81ea5.entry.js +4 -0
- package/dist/ionic/p-0cc11f99.entry.js +4 -0
- package/dist/ionic/p-0dc33652.entry.js +4 -0
- package/dist/ionic/{p-fe4aa1db.entry.js → p-0fa9c382.entry.js} +1 -1
- package/dist/ionic/p-20b1a044.entry.js +4 -0
- package/dist/ionic/p-21eb76d5.entry.js +4 -0
- package/dist/ionic/p-27d30585.entry.js +4 -0
- package/dist/ionic/p-2a05aa64.entry.js +4 -0
- package/dist/ionic/p-2bb2cb18.entry.js +4 -0
- package/dist/ionic/{p-80b44b3c.entry.js → p-3353c229.entry.js} +1 -1
- package/dist/ionic/{p-c93553d2.entry.js → p-34586ead.entry.js} +1 -1
- package/dist/ionic/{p-a7628bc7.entry.js → p-37e720da.entry.js} +1 -1
- package/dist/ionic/{p-9177f4ac.entry.js → p-390ca786.entry.js} +1 -1
- package/dist/ionic/{p-259d0d98.entry.js → p-3a126bca.entry.js} +1 -1
- package/dist/ionic/{p-4502a274.entry.js → p-3a7d1e91.entry.js} +1 -1
- package/dist/ionic/{p-627fabd9.entry.js → p-3ae5f277.entry.js} +1 -1
- package/dist/ionic/{p-a5213260.entry.js → p-4858af1f.entry.js} +1 -1
- package/dist/ionic/p-485fda23.entry.js +4 -0
- package/dist/ionic/p-4baa5b82.entry.js +4 -0
- package/dist/ionic/p-5018dfc8.entry.js +4 -0
- package/dist/ionic/p-50e1194a.entry.js +4 -0
- package/dist/ionic/{p-76e92a84.entry.js → p-5d1da0a2.entry.js} +1 -1
- package/dist/ionic/p-5eb8e86d.entry.js +4 -0
- package/dist/ionic/p-65ebdf1b.entry.js +4 -0
- package/dist/ionic/p-6ebdbebe.entry.js +4 -0
- package/dist/ionic/{p-d2c7f046.entry.js → p-75dc25ba.entry.js} +1 -1
- package/dist/ionic/{p-b9ac1fe0.entry.js → p-84d5ce05.entry.js} +1 -1
- package/dist/ionic/{p-51cd1643.entry.js → p-874b4bd8.entry.js} +1 -1
- package/dist/ionic/{p-ef93ca92.entry.js → p-8eb8ee76.entry.js} +1 -1
- package/dist/ionic/p-8fce95d5.entry.js +4 -0
- package/dist/ionic/{p-db1b6738.entry.js → p-9a65ac7f.entry.js} +1 -1
- package/dist/ionic/{p-7a37b3ce.entry.js → p-9f1103ce.entry.js} +1 -1
- package/dist/ionic/p-9f9db3a2.entry.js +4 -0
- package/dist/ionic/p-D-3ycHmd.js +4 -0
- package/dist/ionic/{p-AlrZKoWR.js → p-DV3sJJW8.js} +1 -1
- package/dist/ionic/p-DzWaWHGc.js +4 -0
- package/dist/ionic/p-a21add2f.entry.js +4 -0
- package/dist/ionic/{p-d8387b99.entry.js → p-c4d8641b.entry.js} +1 -1
- package/dist/ionic/p-ca2ab74d.entry.js +4 -0
- package/dist/ionic/{p-629e4703.entry.js → p-e0be05c5.entry.js} +1 -1
- package/dist/ionic/p-ec090e0a.entry.js +4 -0
- package/dist/ionic/{p-b1599fca.entry.js → p-ef4c3bee.entry.js} +1 -1
- package/dist/ionic/p-f386f6ae.entry.js +4 -0
- package/dist/ionic/{p-341032b3.entry.js → p-fabcce6c.entry.js} +1 -1
- package/dist/types/components/img/img.d.ts +0 -2
- package/dist/types/components/input/input.d.ts +1 -1
- package/dist/types/components/modal/modal.d.ts +4 -11
- package/dist/types/components/nav/nav-interface.d.ts +1 -0
- package/dist/types/components/nav/nav.d.ts +22 -2
- package/dist/types/components/picker-legacy/animations/ios.enter.d.ts +5 -0
- package/dist/types/components/picker-legacy/animations/ios.leave.d.ts +5 -0
- package/dist/types/components/picker-legacy/picker-interface.d.ts +52 -0
- package/dist/types/components/picker-legacy/picker.d.ts +158 -0
- package/dist/types/components/picker-legacy-column/picker-column.d.ts +46 -0
- package/dist/types/components/picker-legacy-column/test/test.utils.d.ts +9 -0
- package/dist/types/components/route/route.d.ts +1 -1
- package/dist/types/components/router-outlet/router-outlet.d.ts +0 -7
- package/dist/types/components/searchbar/searchbar.d.ts +1 -1
- package/dist/types/components/select/select-interface.d.ts +0 -31
- package/dist/types/components/select/select.d.ts +0 -18
- package/dist/types/components/select-option/select-option.d.ts +1 -42
- package/dist/types/components.d.ts +303 -74
- package/dist/types/index.d.ts +1 -1
- package/dist/types/interface.d.ts +1 -0
- package/dist/types/utils/config.d.ts +8 -0
- package/dist/types/utils/overlays.d.ts +9 -11
- package/dist/types/utils/sanitization/index.d.ts +2 -58
- package/hydrate/index.js +1268 -1400
- package/hydrate/index.mjs +1268 -1400
- package/package.json +5 -37
- package/components/p-279dFMvg.js +0 -4
- package/components/p-BSQPZ79H.js +0 -4
- package/components/p-BwKpO3Is.js +0 -4
- package/components/p-C-Rx1zny.js +0 -4
- package/components/p-CHzfYZbv.js +0 -4
- package/components/p-D4h1H_hh.js +0 -4
- package/components/p-LMGfIvTf.js +0 -4
- package/components/p-_lHSumhG.js +0 -4
- package/components/p-j9Da6cYO.js +0 -4
- package/components/p-jOtMJMv8.js +0 -4
- package/components/p-uTR_dEqg.js +0 -4
- package/dist/cjs/config-DWdFbSNK.js +0 -35
- package/dist/cjs/index-Cueg3U4w.js +0 -429
- package/dist/cjs/overlay-control-label-D2sdL2O8.js +0 -50
- package/dist/cjs/select-option-render-DTF50t5r.js +0 -124
- package/dist/collection/utils/overlay-control-label.js +0 -45
- package/dist/collection/utils/select-option-render.js +0 -119
- package/dist/esm/config-BwKpO3Is.js +0 -31
- package/dist/esm/index-DQSkZyOJ.js +0 -424
- package/dist/esm/overlay-control-label-BSQPZ79H.js +0 -47
- package/dist/esm/select-option-render-B8nWZRnd.js +0 -122
- package/dist/ionic/p-038eb991.entry.js +0 -4
- package/dist/ionic/p-4621c387.entry.js +0 -4
- package/dist/ionic/p-4ace7762.entry.js +0 -4
- package/dist/ionic/p-4bb3eb60.entry.js +0 -4
- package/dist/ionic/p-4e9ec5c5.entry.js +0 -4
- package/dist/ionic/p-5c3ec490.entry.js +0 -4
- package/dist/ionic/p-5d1ac2c7.entry.js +0 -4
- package/dist/ionic/p-700795f6.entry.js +0 -4
- package/dist/ionic/p-79a36078.entry.js +0 -4
- package/dist/ionic/p-913b218a.entry.js +0 -4
- package/dist/ionic/p-BDtODLZ4.js +0 -4
- package/dist/ionic/p-BSQPZ79H.js +0 -4
- package/dist/ionic/p-BwKpO3Is.js +0 -4
- package/dist/ionic/p-Cg5-OQYy.js +0 -4
- package/dist/ionic/p-DCOvXkOm.js +0 -4
- package/dist/ionic/p-a18dcb3c.entry.js +0 -4
- package/dist/ionic/p-a9a33367.entry.js +0 -4
- package/dist/ionic/p-ad728198.entry.js +0 -4
- package/dist/ionic/p-bfc8c629.entry.js +0 -4
- package/dist/ionic/p-c08e666a.entry.js +0 -4
- package/dist/ionic/p-c474f471.entry.js +0 -4
- package/dist/ionic/p-ce7992c4.entry.js +0 -4
- package/dist/ionic/p-ed797c72.entry.js +0 -4
- package/dist/ionic/p-f09f9642.entry.js +0 -4
- package/dist/ionic/p-f1c06f82.entry.js +0 -4
- package/dist/ionic/p-f718fccb.entry.js +0 -4
- package/dist/types/utils/overlay-control-label.d.ts +0 -32
- package/dist/types/utils/select-option-render.d.ts +0 -53
|
@@ -5,7 +5,7 @@ import { Host, h } from "@stencil/core";
|
|
|
5
5
|
import { getIonMode } from "../../global/ionic-global";
|
|
6
6
|
export class Thumbnail {
|
|
7
7
|
render() {
|
|
8
|
-
return (h(Host, { key: '
|
|
8
|
+
return (h(Host, { key: 'b250e01664238f1dca8f9757b15bc3d5d9387ffa', class: getIonMode(this) }, h("slot", { key: '72cb568bccabc983c5186a7596ef6c6d4ebf5ad9' })));
|
|
9
9
|
}
|
|
10
10
|
static get is() { return "ion-thumbnail"; }
|
|
11
11
|
static get encapsulation() { return "shadow"; }
|
|
@@ -23,11 +23,11 @@ export class ToolbarTitle {
|
|
|
23
23
|
render() {
|
|
24
24
|
const mode = getIonMode(this);
|
|
25
25
|
const size = this.getSize();
|
|
26
|
-
return (h(Host, { key: '
|
|
26
|
+
return (h(Host, { key: '44e63f8439df64c470692904427b417e19406476', class: createColorClasses(this.color, {
|
|
27
27
|
[mode]: true,
|
|
28
28
|
[`title-${size}`]: true,
|
|
29
29
|
'title-rtl': document.dir === 'rtl',
|
|
30
|
-
}) }, h("div", { key: '
|
|
30
|
+
}) }, h("div", { key: '784cf60a0db16045391891cc8fad0c7dbeba4039', class: "toolbar-title" }, h("slot", { key: '0c720a50479ba257e8756337aeb9b0ab7516a227' }))));
|
|
31
31
|
}
|
|
32
32
|
static get is() { return "ion-title"; }
|
|
33
33
|
static get encapsulation() { return "shadow"; }
|
|
@@ -417,9 +417,9 @@ export class Toast {
|
|
|
417
417
|
if (layout === 'stacked' && startButtons.length > 0 && endButtons.length > 0) {
|
|
418
418
|
printIonWarning('[ion-toast] - This toast is using start and end buttons with the stacked toast layout. We recommend following the best practice of using either start or end buttons with the stacked toast layout.', el);
|
|
419
419
|
}
|
|
420
|
-
return (h(Host, Object.assign({ key: '
|
|
420
|
+
return (h(Host, Object.assign({ key: 'b5256edcf33d0ef51e6c5080c84e1ca58abe2ae0', tabindex: "-1" }, this.htmlAttributes, { style: {
|
|
421
421
|
zIndex: `${60000 + this.overlayIndex}`,
|
|
422
|
-
}, class: createColorClasses(this.color, Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), h("div", { key: '
|
|
422
|
+
}, class: createColorClasses(this.color, Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), h("div", { key: '0860f7e895d8bc66e44c4d924ca569f4cbb1a749', class: wrapperClass, part: "wrapper" }, h("div", { key: '28784199c880a3f664677c8f5560b7caa8903251', class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (h("ion-icon", { key: '0a63ba1336ad43d2aec14e49055eb46c112359c2', class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), h("div", { key: 'ecec8107af582dc55d4b3828dd7f3054a29f26b1', class: "toast-content", part: "content", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !revealContentToScreenReader && header !== undefined && this.renderHeader('oldHeader', 'true'), !revealContentToScreenReader && message !== undefined && this.renderToastMessage('oldMessage', 'true'), revealContentToScreenReader && header !== undefined && this.renderHeader('header'), revealContentToScreenReader && message !== undefined && this.renderToastMessage('header')), this.renderButtons(endButtons, 'end')))));
|
|
423
423
|
}
|
|
424
424
|
static get is() { return "ion-toast"; }
|
|
425
425
|
static get encapsulation() { return "shadow"; }
|
|
@@ -287,7 +287,7 @@ export class Toggle {
|
|
|
287
287
|
const value = this.getValue();
|
|
288
288
|
const rtl = isRTL(el) ? 'rtl' : 'ltr';
|
|
289
289
|
renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
290
|
-
return (h(Host, { key: '
|
|
290
|
+
return (h(Host, { key: '736e1dcfca34fd41f6f0632652e7f86d6996a232', role: "switch", "aria-checked": `${checked}`, "aria-describedby": this.hintTextId, "aria-invalid": this.isInvalid ? 'true' : undefined, onClick: this.onClick, "aria-labelledby": hasLabel ? inputLabelId : null, "aria-label": inheritedAttributes['aria-label'] || null, "aria-disabled": disabled ? 'true' : null, "aria-required": required ? 'true' : undefined, tabindex: disabled ? undefined : 0, onKeyDown: this.onKeyDown, onFocus: this.onFocus, onBlur: this.onBlur, class: createColorClasses(color, {
|
|
291
291
|
[mode]: true,
|
|
292
292
|
'in-item': hostContext('ion-item', el),
|
|
293
293
|
'toggle-activated': activated,
|
|
@@ -297,10 +297,10 @@ export class Toggle {
|
|
|
297
297
|
[`toggle-alignment-${alignment}`]: alignment !== undefined,
|
|
298
298
|
[`toggle-label-placement-${labelPlacement}`]: true,
|
|
299
299
|
[`toggle-${rtl}`]: true,
|
|
300
|
-
}) }, h("label", { key: '
|
|
300
|
+
}) }, h("label", { key: 'e697739fd3964c1c6c23331cf7e38a9841c46a6a', class: "toggle-wrapper", htmlFor: inputId }, h("input", Object.assign({ key: '3d500b8c1bc879591249d183c1abb3f5f26aff6b', type: "checkbox", role: "switch", "aria-checked": `${checked}`, checked: checked, disabled: disabled, id: inputId, required: required }, inheritedAttributes)), h("div", { key: 'e38f3fe0e66b4ca434fd81514f5ef771c2960841', class: {
|
|
301
301
|
'label-text-wrapper': true,
|
|
302
302
|
'label-text-wrapper-hidden': !hasLabel,
|
|
303
|
-
}, part: "label", id: inputLabelId, onClick: this.onDivLabelClick }, h("slot", { key: '
|
|
303
|
+
}, part: "label", id: inputLabelId, onClick: this.onDivLabelClick }, h("slot", { key: '006dd3558264d69ab020c07005b348adc4ecdd5b' }), this.renderHintText()), h("div", { key: 'dd4e52de31caabee41ec1bc58efecd1e213368c9', class: "native-wrapper" }, this.renderToggleControl()))));
|
|
304
304
|
}
|
|
305
305
|
static get is() { return "ion-toggle"; }
|
|
306
306
|
static get encapsulation() { return "shadow"; }
|
|
@@ -65,10 +65,10 @@ export class Toolbar {
|
|
|
65
65
|
this.childrenStyles.forEach((value) => {
|
|
66
66
|
Object.assign(childStyles, value);
|
|
67
67
|
});
|
|
68
|
-
return (h(Host, { key: '
|
|
68
|
+
return (h(Host, { key: 'b849db2863778dee6c5a251bffa1b3a657aeb036', class: Object.assign(Object.assign({}, childStyles), createColorClasses(this.color, {
|
|
69
69
|
[mode]: true,
|
|
70
70
|
'in-toolbar': hostContext('ion-toolbar', this.el),
|
|
71
|
-
})) }, h("div", { key: '
|
|
71
|
+
})) }, h("div", { key: '67f5bba9c4f527c3f35bfe1313a2b85741f9b246', class: "toolbar-background", part: "background" }), h("div", { key: '085e8c68f056e5b0deb9d1606431fbeb45dae8e5', class: "toolbar-container", part: "container" }, h("slot", { key: '15227c79c3baf883fd8c43fdb7e1313453933c79', name: "start" }), h("slot", { key: '0b8a7f7e685aa31c80d9bc03446ccc3a9d07e0e8', name: "secondary" }), h("div", { key: '57e4628c1fa89df79dd80456259db961bb691404', class: "toolbar-content", part: "content" }, h("slot", { key: '82c2f6e1acf8d96db259bd8baf295881801edbd5' })), h("slot", { key: 'b2d4afb15214199f206c0a5e08b581e4c9c2f58a', name: "primary" }), h("slot", { key: 'bfb909a0c472f8834046c2ea23bef2f562167ad3', name: "end" }))));
|
|
72
72
|
}
|
|
73
73
|
static get is() { return "ion-toolbar"; }
|
|
74
74
|
static get encapsulation() { return "shadow"; }
|
package/dist/collection/index.js
CHANGED
|
@@ -17,5 +17,5 @@ export { getMode, setupConfig } from './utils/config';
|
|
|
17
17
|
export { openURL } from './utils/theme';
|
|
18
18
|
export { LIFECYCLE_WILL_ENTER, LIFECYCLE_DID_ENTER, LIFECYCLE_WILL_LEAVE, LIFECYCLE_DID_LEAVE, LIFECYCLE_WILL_UNLOAD, } from './components/nav/constants';
|
|
19
19
|
export { menuController } from './utils/menu-controller';
|
|
20
|
-
export { alertController, actionSheetController, modalController, loadingController, popoverController, toastController, } from './utils/overlays';
|
|
20
|
+
export { alertController, actionSheetController, modalController, loadingController, pickerController, popoverController, toastController, } from './utils/overlays';
|
|
21
21
|
export { IonicSlides } from './components/slides/IonicSlides';
|
|
@@ -39,6 +39,10 @@ export const alertController = /*@__PURE__*/ createController('ion-alert');
|
|
|
39
39
|
export const actionSheetController = /*@__PURE__*/ createController('ion-action-sheet');
|
|
40
40
|
export const loadingController = /*@__PURE__*/ createController('ion-loading');
|
|
41
41
|
export const modalController = /*@__PURE__*/ createController('ion-modal');
|
|
42
|
+
/**
|
|
43
|
+
* @deprecated Use the inline ion-picker component instead.
|
|
44
|
+
*/
|
|
45
|
+
export const pickerController = /*@__PURE__*/ createController('ion-picker-legacy');
|
|
42
46
|
export const popoverController = /*@__PURE__*/ createController('ion-popover');
|
|
43
47
|
export const toastController = /*@__PURE__*/ createController('ion-toast');
|
|
44
48
|
/**
|
|
@@ -132,7 +136,7 @@ const focusElementInOverlay = (hostToFocus, overlay) => {
|
|
|
132
136
|
* Should NOT include: Toast
|
|
133
137
|
*/
|
|
134
138
|
const trapKeyboardFocus = (ev, doc) => {
|
|
135
|
-
const lastOverlay = getPresentedOverlay(doc, 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-popover');
|
|
139
|
+
const lastOverlay = getPresentedOverlay(doc, 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker-legacy,ion-popover');
|
|
136
140
|
const target = ev.target;
|
|
137
141
|
/**
|
|
138
142
|
* If no active overlay, ignore this event.
|
|
@@ -366,7 +370,7 @@ export const dismissOverlay = (doc, data, role, overlayTag, id) => {
|
|
|
366
370
|
*/
|
|
367
371
|
export const getOverlays = (doc, selector) => {
|
|
368
372
|
if (selector === undefined) {
|
|
369
|
-
selector = 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-popover,ion-toast';
|
|
373
|
+
selector = 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker-legacy,ion-popover,ion-toast';
|
|
370
374
|
}
|
|
371
375
|
return Array.from(doc.querySelectorAll(selector)).filter((c) => c.overlayIndex > 0);
|
|
372
376
|
};
|
|
@@ -428,29 +432,6 @@ export const setRootAriaHidden = (hidden = false) => {
|
|
|
428
432
|
viewContainer.removeAttribute('aria-hidden');
|
|
429
433
|
}
|
|
430
434
|
};
|
|
431
|
-
/**
|
|
432
|
-
* Cleans up root `aria-hidden` and `backdrop-no-scroll` when
|
|
433
|
-
* an overlay is removed from the DOM without going through
|
|
434
|
-
* the `dismiss()` flow (e.g., when a framework unmounts the
|
|
435
|
-
* overlay during a route change).
|
|
436
|
-
*
|
|
437
|
-
* Should be called from an overlay's `disconnectedCallback`
|
|
438
|
-
* when the overlay was still presented at the time of removal.
|
|
439
|
-
*/
|
|
440
|
-
export const cleanupRootFocusTrapAccessibility = () => {
|
|
441
|
-
if (typeof document === 'undefined') {
|
|
442
|
-
return;
|
|
443
|
-
}
|
|
444
|
-
const remainingOverlays = getPresentedOverlays(document);
|
|
445
|
-
const hasRemainingLocking = remainingOverlays.some((o) => {
|
|
446
|
-
const el = o;
|
|
447
|
-
return el.tagName !== 'ION-TOAST' && el.focusTrap !== false && isBackdropAlwaysBlocking(el);
|
|
448
|
-
});
|
|
449
|
-
if (!hasRemainingLocking) {
|
|
450
|
-
setRootAriaHidden(false);
|
|
451
|
-
document.body.classList.remove(BACKDROP_NO_SCROLL);
|
|
452
|
-
}
|
|
453
|
-
};
|
|
454
435
|
export const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts) => {
|
|
455
436
|
var _a, _b;
|
|
456
437
|
if (overlay.presented) {
|
|
@@ -516,7 +497,30 @@ export const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation
|
|
|
516
497
|
* to the overlay container.
|
|
517
498
|
*/
|
|
518
499
|
if (overlay.keyboardClose && (document.activeElement === null || !overlay.el.contains(document.activeElement))) {
|
|
519
|
-
|
|
500
|
+
/**
|
|
501
|
+
* Some overlays (e.g. modal) put the dialog role and accessible label
|
|
502
|
+
* on the `.ion-overlay-wrapper` instead of the host. Screen readers
|
|
503
|
+
* need focus on the element with `role="dialog"` to properly announce
|
|
504
|
+
* and navigate the dialog.
|
|
505
|
+
*
|
|
506
|
+
* We only target wrappers with `tabindex`, since `role="dialog"` alone
|
|
507
|
+
* does not make an element focusable. If no focusable dialog wrapper
|
|
508
|
+
* exists (e.g. picker-legacy), we fall back to the host.
|
|
509
|
+
*/
|
|
510
|
+
const overlayWrapper = getElementRoot(overlay.el).querySelector('[role="dialog"][tabindex]');
|
|
511
|
+
const focusTarget = overlayWrapper !== null && overlayWrapper !== void 0 ? overlayWrapper : overlay.el;
|
|
512
|
+
/**
|
|
513
|
+
* `preventScroll` keeps this a pure focus move so the viewport does not
|
|
514
|
+
* jump when the wrapper is partially off-screen (e.g. a sheet modal).
|
|
515
|
+
* Guard the options call so an older engine that mishandles it can never
|
|
516
|
+
* reject present(); we fall back to a plain focus() in that case.
|
|
517
|
+
*/
|
|
518
|
+
try {
|
|
519
|
+
focusTarget.focus({ preventScroll: true });
|
|
520
|
+
}
|
|
521
|
+
catch (_c) {
|
|
522
|
+
focusTarget.focus();
|
|
523
|
+
}
|
|
520
524
|
}
|
|
521
525
|
/**
|
|
522
526
|
* If this overlay was previously dismissed without being
|
|
@@ -3,26 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { printIonError } from "../logging/index";
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* Parses the string into a detached DOM, removes blocked tags, strips
|
|
9
|
-
* attributes outside the narrow `domStringAllowedAttributes` list (refer
|
|
10
|
-
* `sanitizeElement`), and scrubs script-scheme URLs. Returns the sanitized
|
|
11
|
-
* HTML string.
|
|
12
|
-
*
|
|
13
|
-
* Use this when you have an HTML string from an unknown source and need to
|
|
14
|
-
* render it via `innerHTML`. Use `sanitizeDOMTree` instead when you already
|
|
15
|
-
* have a DOM tree and want to sanitize it in place without a string round
|
|
16
|
-
* trip. The two apply the same dangerous-vector scrubbing but different
|
|
17
|
-
* attribute allowlists: this path stays narrow so existing consumers
|
|
18
|
-
* (toast, loading, alert message, etc.) are unaffected, while
|
|
19
|
-
* `sanitizeDOMTree` uses the wider rich-content allowlist.
|
|
20
|
-
*
|
|
21
|
-
* @param untrustedString - The HTML string to sanitize. Pass an
|
|
22
|
-
* `IonicSafeString` to bypass sanitization, or `undefined` to short-circuit.
|
|
23
|
-
* @returns The sanitized HTML string, or `undefined` if the input was
|
|
24
|
-
* `undefined`. Returns `''` if sanitization fails or the input contains
|
|
25
|
-
* an inline `onload=` handler.
|
|
6
|
+
* Does a simple sanitization of all elements
|
|
7
|
+
* in an untrusted string
|
|
26
8
|
*/
|
|
27
9
|
export const sanitizeDOMString = (untrustedString) => {
|
|
28
10
|
try {
|
|
@@ -72,7 +54,7 @@ export const sanitizeDOMString = (untrustedString) => {
|
|
|
72
54
|
const childElements = getElementChildren(element);
|
|
73
55
|
/* eslint-disable-next-line */
|
|
74
56
|
for (let childIndex = 0; childIndex < childElements.length; childIndex++) {
|
|
75
|
-
sanitizeElement(childElements[childIndex]
|
|
57
|
+
sanitizeElement(childElements[childIndex]);
|
|
76
58
|
}
|
|
77
59
|
}
|
|
78
60
|
});
|
|
@@ -84,7 +66,7 @@ export const sanitizeDOMString = (untrustedString) => {
|
|
|
84
66
|
const dfChildren = getElementChildren(documentFragment);
|
|
85
67
|
/* eslint-disable-next-line */
|
|
86
68
|
for (let childIndex = 0; childIndex < dfChildren.length; childIndex++) {
|
|
87
|
-
sanitizeElement(dfChildren[childIndex]
|
|
69
|
+
sanitizeElement(dfChildren[childIndex]);
|
|
88
70
|
}
|
|
89
71
|
// Append document fragment to div
|
|
90
72
|
const fragmentDiv = document.createElement('div');
|
|
@@ -98,43 +80,13 @@ export const sanitizeDOMString = (untrustedString) => {
|
|
|
98
80
|
return '';
|
|
99
81
|
}
|
|
100
82
|
};
|
|
101
|
-
/**
|
|
102
|
-
* Sanitize an entire trusted DOM tree in place.
|
|
103
|
-
*
|
|
104
|
-
* Removes blocked tags (`script`, `iframe`, etc.) from the subtree and
|
|
105
|
-
* then sanitizes attributes on every remaining element using the wider
|
|
106
|
-
* `richContentAllowedAttributes` allowlist (refer `sanitizeElement`).
|
|
107
|
-
* Component presentational attributes (`size`, `color`, `shape`, inline
|
|
108
|
-
* SVG, `aria-*`, `data-*`) are preserved; `style`, event handlers (`on*`),
|
|
109
|
-
* form/navigation-hijack attributes, script-scheme URLs, and non-image
|
|
110
|
-
* `data:` URLs are stripped.
|
|
111
|
-
*
|
|
112
|
-
* Use this when you have a DOM tree the developer controls (e.g.
|
|
113
|
-
* cloned slot content from a component) and you need to render it
|
|
114
|
-
* elsewhere safely.
|
|
115
|
-
*
|
|
116
|
-
* @param root - The root element whose subtree will be sanitized in
|
|
117
|
-
* place. No-op when the sanitizer is disabled via `Ionic.config`.
|
|
118
|
-
*/
|
|
119
|
-
export const sanitizeDOMTree = (root) => {
|
|
120
|
-
if (!isSanitizerEnabled()) {
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
123
|
-
blockedTags.forEach((tag) => {
|
|
124
|
-
const matches = root.querySelectorAll(tag);
|
|
125
|
-
for (let i = matches.length - 1; i >= 0; i--) {
|
|
126
|
-
matches[i].remove();
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
sanitizeElement(root, richContentAllowedAttributes, richContentAllowedAttributePrefixes);
|
|
130
|
-
};
|
|
131
83
|
/**
|
|
132
84
|
* Clean up current element based on allowed attributes
|
|
133
85
|
* and then recursively dig down into any child elements to
|
|
134
86
|
* clean those up as well
|
|
135
87
|
*/
|
|
136
88
|
// TODO(FW-2832): type (using Element triggers other type errors as well)
|
|
137
|
-
const sanitizeElement = (element
|
|
89
|
+
const sanitizeElement = (element) => {
|
|
138
90
|
// IE uses childNodes, so ignore nodes that are not elements
|
|
139
91
|
if (element.nodeType && element.nodeType !== 1) {
|
|
140
92
|
return;
|
|
@@ -149,60 +101,29 @@ const sanitizeElement = (element, allowedAttributes, allowedAttributePrefixes =
|
|
|
149
101
|
element.remove();
|
|
150
102
|
return;
|
|
151
103
|
}
|
|
152
|
-
/**
|
|
153
|
-
* Always strip `style` (CSS injection, `background:url()` beaconing, UI
|
|
154
|
-
* spoofing). It is never on the allowlist, but it is removed explicitly
|
|
155
|
-
* here because some engines (e.g. jsdom) don't enumerate the CSSOM-backed
|
|
156
|
-
* `style` attribute in `element.attributes`, which would let the loop
|
|
157
|
-
* below skip over it.
|
|
158
|
-
*/
|
|
159
|
-
element.removeAttribute('style');
|
|
160
104
|
for (let i = element.attributes.length - 1; i >= 0; i--) {
|
|
161
105
|
const attribute = element.attributes.item(i);
|
|
162
106
|
const attributeName = attribute.name;
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
* Remove any attribute that is not on the allowlist. This drops event
|
|
166
|
-
* handlers (`on*`), `style`, the form/navigation-hijack attributes
|
|
167
|
-
* (`formaction`, `action`, `target`), namespaced attributes like
|
|
168
|
-
* `xlink:href`, and anything else not explicitly known to be safe.
|
|
169
|
-
*/
|
|
170
|
-
if (!isAttributeAllowed(lowerName, allowedAttributes, allowedAttributePrefixes)) {
|
|
107
|
+
// remove non-allowed attribs
|
|
108
|
+
if (!allowedAttributes.includes(attributeName.toLowerCase())) {
|
|
171
109
|
element.removeAttribute(attributeName);
|
|
172
110
|
continue;
|
|
173
111
|
}
|
|
174
112
|
// clean up any allowed attribs
|
|
175
113
|
// that attempt to do any JS funny-business
|
|
176
114
|
const attributeValue = attribute.value;
|
|
177
|
-
if (attributeValue == null) {
|
|
178
|
-
continue;
|
|
179
|
-
}
|
|
180
115
|
/**
|
|
181
|
-
*
|
|
182
|
-
*
|
|
183
|
-
*
|
|
184
|
-
* `java\tscript:`, are still caught. Normalizing the value also covers
|
|
185
|
-
* namespaced attributes, where the previous `element[attributeName]`
|
|
186
|
-
* property reflection returned `undefined` and let them slip through.
|
|
116
|
+
* We also need to check the property value
|
|
117
|
+
* as javascript: can allow special characters
|
|
118
|
+
* such as 	 and still be valid (i.e. java	script)
|
|
187
119
|
*/
|
|
188
|
-
const
|
|
189
|
-
|
|
190
|
-
if (
|
|
191
|
-
|
|
192
|
-
continue;
|
|
193
|
-
}
|
|
194
|
-
/**
|
|
195
|
-
* For URL-bearing attributes, allow `data:` URIs only for raster
|
|
196
|
-
* images. Document-bearing types (`text/html`, `image/svg+xml`,
|
|
197
|
-
* `application/*`, etc.) can carry markup or script when navigated to
|
|
198
|
-
* or rendered, so they are stripped, while safe image types are kept so
|
|
199
|
-
* inline images keep working.
|
|
200
|
-
*/
|
|
201
|
-
if (urlAttributes.includes(lowerName) &&
|
|
202
|
-
normalizedValue.startsWith('data:') &&
|
|
203
|
-
!safeDataImageUri.test(normalizedValue)) {
|
|
120
|
+
const propertyValue = element[attributeName];
|
|
121
|
+
/* eslint-disable */
|
|
122
|
+
if ((attributeValue != null && attributeValue.toLowerCase().includes('javascript:')) ||
|
|
123
|
+
(propertyValue != null && propertyValue.toLowerCase().includes('javascript:'))) {
|
|
204
124
|
element.removeAttribute(attributeName);
|
|
205
125
|
}
|
|
126
|
+
/* eslint-enable */
|
|
206
127
|
}
|
|
207
128
|
/**
|
|
208
129
|
* Sanitize any nested children
|
|
@@ -210,7 +131,7 @@ const sanitizeElement = (element, allowedAttributes, allowedAttributePrefixes =
|
|
|
210
131
|
const childElements = getElementChildren(element);
|
|
211
132
|
/* eslint-disable-next-line */
|
|
212
133
|
for (let i = 0; i < childElements.length; i++) {
|
|
213
|
-
sanitizeElement(childElements[i]
|
|
134
|
+
sanitizeElement(childElements[i]);
|
|
214
135
|
}
|
|
215
136
|
};
|
|
216
137
|
/**
|
|
@@ -235,185 +156,8 @@ const isSanitizerEnabled = () => {
|
|
|
235
156
|
}
|
|
236
157
|
return true;
|
|
237
158
|
};
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
* survive `cloneNode`. Call this on a DOM subtree before cloning it for
|
|
241
|
-
* rendering elsewhere (e.g. cloning slotted option content into an
|
|
242
|
-
* overlay).
|
|
243
|
-
*
|
|
244
|
-
* Only sets the attribute when the property holds a non-empty string
|
|
245
|
-
* and the attribute isn't already present, so existing attributes
|
|
246
|
-
* take precedence.
|
|
247
|
-
*
|
|
248
|
-
* @param root - The root element whose subtree (and itself) will be
|
|
249
|
-
* inspected.
|
|
250
|
-
*/
|
|
251
|
-
export const reflectPropertiesToAttributes = (root) => {
|
|
252
|
-
const candidates = [];
|
|
253
|
-
if (root.tagName in elementPropsToReflect) {
|
|
254
|
-
candidates.push(root);
|
|
255
|
-
}
|
|
256
|
-
for (const tagName of Object.keys(elementPropsToReflect)) {
|
|
257
|
-
candidates.push(...Array.from(root.querySelectorAll(tagName.toLowerCase())));
|
|
258
|
-
}
|
|
259
|
-
for (const el of candidates) {
|
|
260
|
-
if (!(el.tagName in elementPropsToReflect)) {
|
|
261
|
-
continue;
|
|
262
|
-
}
|
|
263
|
-
const props = elementPropsToReflect[el.tagName];
|
|
264
|
-
for (const prop of props) {
|
|
265
|
-
const value = el[prop];
|
|
266
|
-
if (typeof value === 'string' && value.length > 0 && !el.hasAttribute(prop)) {
|
|
267
|
-
el.setAttribute(prop, value);
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
};
|
|
272
|
-
/**
|
|
273
|
-
* Attribute allowlist for `sanitizeDOMString`. Intentionally narrow: this
|
|
274
|
-
* path sanitizes developer HTML strings rendered via `innerHTML` by
|
|
275
|
-
* `ion-toast`, `ion-loading`, the `ion-alert` message,
|
|
276
|
-
* `ion-refresher-content`, and `ion-infinite-scroll-content`, so the list
|
|
277
|
-
* is kept to the minimum those have always needed. Broadening it here would
|
|
278
|
-
* change sanitization output for all of those consumers, so the wider
|
|
279
|
-
* rich-content allowlist below is deliberately scoped to `sanitizeDOMTree`
|
|
280
|
-
* instead.
|
|
281
|
-
*/
|
|
282
|
-
const domStringAllowedAttributes = ['class', 'id', 'href', 'src', 'name', 'slot'];
|
|
283
|
-
/**
|
|
284
|
-
* Attribute allowlist for `sanitizeDOMTree` (the select rich-content path).
|
|
285
|
-
* Covers global HTML attributes, the Ionic component presentational props
|
|
286
|
-
* that cloned rich content (e.g. `ion-select-option` markup) relies on, and
|
|
287
|
-
* the inert SVG presentation attributes used by inline icons.
|
|
288
|
-
*
|
|
289
|
-
* `aria-*` and `data-*` are allowed separately by prefix (refer
|
|
290
|
-
* `richContentAllowedAttributePrefixes`) since they are inert and not worth
|
|
291
|
-
* enumerating. URL-bearing names (`href`, `src`) are allowed here, but
|
|
292
|
-
* their values are still scrubbed for script schemes in `sanitizeElement`.
|
|
293
|
-
*
|
|
294
|
-
* Notably absent: `style`, event handlers (`on*`), and the
|
|
295
|
-
* form/navigation-hijack attributes (`formaction`, `action`, `target`),
|
|
296
|
-
* which are therefore stripped.
|
|
297
|
-
*/
|
|
298
|
-
const richContentAllowedAttributes = [
|
|
299
|
-
// Global / structural
|
|
300
|
-
'class',
|
|
301
|
-
'id',
|
|
302
|
-
'slot',
|
|
303
|
-
'name',
|
|
304
|
-
'title',
|
|
305
|
-
'alt',
|
|
306
|
-
'lang',
|
|
307
|
-
'dir',
|
|
308
|
-
'role',
|
|
309
|
-
'type',
|
|
310
|
-
'value',
|
|
311
|
-
'disabled',
|
|
312
|
-
'width',
|
|
313
|
-
'height',
|
|
314
|
-
'href',
|
|
315
|
-
'src',
|
|
316
|
-
// Ionic component presentational props
|
|
317
|
-
'color',
|
|
318
|
-
'size',
|
|
319
|
-
'shape',
|
|
320
|
-
'fill',
|
|
321
|
-
'expand',
|
|
322
|
-
'mode',
|
|
323
|
-
'theme',
|
|
324
|
-
'icon',
|
|
325
|
-
'label',
|
|
326
|
-
'label-placement',
|
|
327
|
-
'justify',
|
|
328
|
-
'inset',
|
|
329
|
-
'lines',
|
|
330
|
-
'ios',
|
|
331
|
-
'md',
|
|
332
|
-
// SVG presentation attributes (compared lowercased, e.g. `viewBox`)
|
|
333
|
-
'xmlns',
|
|
334
|
-
'viewbox',
|
|
335
|
-
'preserveaspectratio',
|
|
336
|
-
'stroke',
|
|
337
|
-
'stroke-width',
|
|
338
|
-
'stroke-linecap',
|
|
339
|
-
'stroke-linejoin',
|
|
340
|
-
'stroke-opacity',
|
|
341
|
-
'stroke-dasharray',
|
|
342
|
-
'fill-rule',
|
|
343
|
-
'fill-opacity',
|
|
344
|
-
'clip-rule',
|
|
345
|
-
'd',
|
|
346
|
-
'points',
|
|
347
|
-
'cx',
|
|
348
|
-
'cy',
|
|
349
|
-
'r',
|
|
350
|
-
'rx',
|
|
351
|
-
'ry',
|
|
352
|
-
'x',
|
|
353
|
-
'y',
|
|
354
|
-
'x1',
|
|
355
|
-
'y1',
|
|
356
|
-
'x2',
|
|
357
|
-
'y2',
|
|
358
|
-
'transform',
|
|
359
|
-
'opacity',
|
|
360
|
-
];
|
|
361
|
-
/**
|
|
362
|
-
* Attribute-name prefixes that are always safe to keep in the rich-content
|
|
363
|
-
* path. `aria-*` and `data-*` attributes cannot execute script or load
|
|
364
|
-
* resources, so they are allowed wholesale rather than enumerated by name.
|
|
365
|
-
*/
|
|
366
|
-
const richContentAllowedAttributePrefixes = ['aria-', 'data-'];
|
|
367
|
-
/**
|
|
368
|
-
* Whether an attribute name (already lowercased) is safe to keep, by exact
|
|
369
|
-
* match or by an allowed prefix.
|
|
370
|
-
*/
|
|
371
|
-
const isAttributeAllowed = (lowerName, allowedAttributes, allowedAttributePrefixes) => {
|
|
372
|
-
if (allowedAttributes.includes(lowerName)) {
|
|
373
|
-
return true;
|
|
374
|
-
}
|
|
375
|
-
return allowedAttributePrefixes.some((prefix) => lowerName.startsWith(prefix));
|
|
376
|
-
};
|
|
377
|
-
/**
|
|
378
|
-
* Matches ASCII control characters and whitespace (including the
|
|
379
|
-
* non-breaking space). Used to normalize attribute values before matching
|
|
380
|
-
* a URL scheme so entity-obfuscated payloads such as `java	script:`
|
|
381
|
-
* (decoded by the parser to `java\tscript:`) can't smuggle a scheme past
|
|
382
|
-
* the check.
|
|
383
|
-
*/
|
|
384
|
-
// eslint-disable-next-line no-control-regex -- matching control characters is the point
|
|
385
|
-
const controlCharactersAndWhitespace = /[\u0000-\u0020\u007f-\u00a0]/g;
|
|
386
|
-
/**
|
|
387
|
-
* Attributes whose values are URLs. Their values are scheme-checked in
|
|
388
|
-
* `sanitizeElement` (e.g. `data:` filtering) beyond the script-scheme scrub
|
|
389
|
-
* applied to every attribute.
|
|
390
|
-
*/
|
|
391
|
-
const urlAttributes = ['href', 'src'];
|
|
392
|
-
/**
|
|
393
|
-
* Matches a `data:` URI for a raster image type that cannot carry script.
|
|
394
|
-
* `image/svg+xml` is deliberately excluded (SVG can execute script), as are
|
|
395
|
-
* document types like `text/html` and `application/*`. The value is already
|
|
396
|
-
* lowercased and whitespace-stripped before this is tested.
|
|
397
|
-
*/
|
|
398
|
-
const safeDataImageUri = /^data:image\/(?:png|jpe?g|gif|webp|bmp|avif|x-icon|vnd\.microsoft\.icon)[;,]/;
|
|
399
|
-
/**
|
|
400
|
-
* Tags removed entirely (with their subtree) before attribute sanitization.
|
|
401
|
-
* Exported so tests can assert the set without hardcoding it.
|
|
402
|
-
*/
|
|
403
|
-
export const blockedTags = ['script', 'style', 'iframe', 'meta', 'link', 'object', 'embed', 'base'];
|
|
404
|
-
/**
|
|
405
|
-
* Properties on custom elements that frameworks (Vue, Angular) often
|
|
406
|
-
* set as DOM properties rather than attributes. `cloneNode` only copies
|
|
407
|
-
* attributes, so these values are lost when slotted content is cloned
|
|
408
|
-
* into an overlay. For each known custom element, we mirror the listed
|
|
409
|
-
* properties onto attributes so the cloned copy still has the data it
|
|
410
|
-
* needs to render.
|
|
411
|
-
*
|
|
412
|
-
* Keyed by uppercased tagName so the lookup matches `Element.tagName`.
|
|
413
|
-
*/
|
|
414
|
-
const elementPropsToReflect = {
|
|
415
|
-
'ION-ICON': ['icon', 'name', 'src', 'ios', 'md'],
|
|
416
|
-
};
|
|
159
|
+
const allowedAttributes = ['class', 'id', 'href', 'src', 'name', 'slot'];
|
|
160
|
+
const blockedTags = ['script', 'style', 'iframe', 'meta', 'link', 'object', 'embed'];
|
|
417
161
|
export class IonicSafeString {
|
|
418
162
|
constructor(value) {
|
|
419
163
|
this.value = value;
|