@watermarkinsights/ripple 3.8.0-2 → 3.8.0-5
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/README.md +3 -3
- package/dist/cjs/{functions-edfdd03f.js → functions-83193a8d.js} +508 -509
- package/dist/cjs/{global-ffd0392c.js → global-2f521eb7.js} +65 -65
- package/dist/cjs/{http-service-9e8c4dd5.js → http-service-494d81de.js} +49 -49
- package/dist/cjs/{index-0e7e3668.js → index-cd179539.js} +64 -96
- package/dist/cjs/{interfaces-30a74c1f.js → interfaces-a3338581.js} +29 -29
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/priv-chart-popover.cjs.entry.js +79 -79
- package/dist/cjs/priv-datepicker.cjs.entry.js +674 -674
- package/dist/cjs/priv-navigator-button.cjs.entry.js +19 -19
- package/dist/cjs/priv-navigator-item.cjs.entry.js +24 -24
- package/dist/cjs/ripple.cjs.js +4 -4
- package/dist/cjs/wm-action-menu_2.cjs.entry.js +342 -342
- package/dist/cjs/wm-button.cjs.entry.js +228 -238
- package/dist/cjs/wm-chart-slice.cjs.entry.js +14 -14
- package/dist/cjs/wm-chart.cjs.entry.js +475 -475
- package/dist/cjs/wm-datepicker.cjs.entry.js +273 -273
- package/dist/cjs/wm-input.cjs.entry.js +136 -136
- package/dist/cjs/wm-modal-footer.cjs.entry.js +32 -32
- package/dist/cjs/wm-modal-header.cjs.entry.js +35 -35
- package/dist/cjs/wm-modal.cjs.entry.js +164 -164
- package/dist/cjs/wm-navigation_3.cjs.entry.js +239 -0
- package/dist/cjs/wm-navigator.cjs.entry.js +269 -269
- package/dist/cjs/wm-network-uploader.cjs.entry.js +422 -422
- package/dist/cjs/wm-option_2.cjs.entry.js +497 -497
- package/dist/cjs/wm-pagination.cjs.entry.js +168 -168
- package/dist/cjs/wm-search.cjs.entry.js +233 -233
- package/dist/cjs/wm-snackbar.cjs.entry.js +172 -172
- package/dist/cjs/wm-tab-item_3.cjs.entry.js +298 -298
- package/dist/cjs/wm-tag-input.cjs.entry.js +581 -581
- package/dist/cjs/wm-timepicker.cjs.entry.js +385 -385
- package/dist/cjs/wm-toggletip.cjs.entry.js +126 -126
- package/dist/cjs/wm-uploader.cjs.entry.js +348 -348
- package/dist/cjs/wm-wrapper.cjs.entry.js +13 -13
- package/dist/collection/collection-manifest.json +9 -7
- package/dist/collection/components/wm-action-menu/wm-action-menu.js +460 -460
- package/dist/collection/components/wm-button/wm-button.css +6 -1
- package/dist/collection/components/wm-button/wm-button.js +491 -503
- package/dist/collection/components/wm-chart/priv-chart-popover/priv-chart-popover.js +232 -232
- package/dist/collection/components/wm-chart/wm-chart-slice.js +115 -115
- package/dist/collection/components/wm-chart/wm-chart.js +718 -718
- package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.css +4 -3
- package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js +1039 -1039
- package/dist/collection/components/wm-datepicker/wm-datepicker.css +2 -1
- package/dist/collection/components/wm-datepicker/wm-datepicker.js +483 -483
- package/dist/collection/components/wm-input/wm-input.css +2 -1
- package/dist/collection/components/wm-input/wm-input.js +423 -423
- package/dist/collection/components/wm-menuitem/wm-menuitem.js +444 -444
- package/dist/collection/components/wm-modal/wm-modal-footer.js +141 -141
- package/dist/collection/components/wm-modal/wm-modal-header.js +92 -92
- package/dist/collection/components/wm-modal/wm-modal.js +461 -461
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.css +5 -3
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +152 -96
- package/dist/collection/components/wm-navigation/wm-navigation-item.js +105 -101
- package/dist/collection/components/wm-navigation/wm-navigation.css +8 -3
- package/dist/collection/components/wm-navigation/wm-navigation.js +193 -142
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +97 -97
- package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +114 -114
- package/dist/collection/components/wm-navigator/wm-navigator.js +468 -468
- package/dist/collection/components/wm-option/wm-option.css +3 -2
- package/dist/collection/components/wm-option/wm-option.js +422 -422
- package/dist/collection/components/wm-pagination/wm-pagination.js +368 -368
- package/dist/collection/components/wm-search/wm-search.js +480 -480
- package/dist/collection/components/wm-select/wm-select.css +3 -2
- package/dist/collection/components/wm-select/wm-select.js +720 -720
- package/dist/collection/components/wm-snackbar/wm-snackbar.css +3 -2
- package/dist/collection/components/wm-snackbar/wm-snackbar.js +297 -297
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.css +2 -2
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +216 -216
- package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +330 -330
- package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +104 -104
- package/dist/collection/components/wm-tag-input/wm-tag-input.css +3 -2
- package/dist/collection/components/wm-tag-input/wm-tag-input.js +810 -810
- package/dist/collection/components/wm-timepicker/wm-timepicker.css +3 -2
- package/dist/collection/components/wm-timepicker/wm-timepicker.js +583 -583
- package/dist/collection/components/wm-toggletip/wm-toggletip.css +2 -1
- package/dist/collection/components/wm-toggletip/wm-toggletip.js +241 -241
- package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.css +2 -1
- package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.js +753 -753
- package/dist/collection/components/wm-uploader/wm-uploader.css +2 -1
- package/dist/collection/components/wm-uploader/wm-uploader.js +748 -748
- package/dist/collection/components/wm-wrapper/wm-wrapper.js +27 -27
- package/dist/collection/dev/scripts.js +20 -20
- package/dist/collection/global/__mocks__/functions.js +6 -6
- package/dist/collection/global/functions.js +468 -445
- package/dist/collection/global/global.js +72 -72
- package/dist/collection/global/interfaces.js +49 -49
- package/dist/collection/global/services/__mocks__/http-service.js +130 -130
- package/dist/collection/global/services/http-service.js +50 -50
- package/dist/collection/lang/lang.js +5 -5
- package/dist/collection/lang/missing.js +39 -39
- package/dist/collection/lang/piglatin.js +93 -93
- package/dist/esm/{functions-6cd52dcf.js → functions-7eebdc16.js} +507 -510
- package/dist/esm/{global-51d6ea5f.js → global-0dc2eb57.js} +65 -65
- package/dist/esm/{http-service-5d037e16.js → http-service-3dc3b3e7.js} +49 -49
- package/dist/esm/{index-cd8f9ae2.js → index-66f8130e.js} +64 -96
- package/dist/esm/{interfaces-61c6305b.js → interfaces-2b97fab2.js} +29 -29
- package/dist/esm/loader.js +4 -4
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/esm/priv-chart-popover.entry.js +79 -79
- package/dist/esm/priv-datepicker.entry.js +674 -674
- package/dist/esm/priv-navigator-button.entry.js +19 -19
- package/dist/esm/priv-navigator-item.entry.js +24 -24
- package/dist/esm/ripple.js +4 -4
- package/dist/esm/wm-action-menu_2.entry.js +342 -342
- package/dist/esm/wm-button.entry.js +228 -238
- package/dist/esm/wm-chart-slice.entry.js +14 -14
- package/dist/esm/wm-chart.entry.js +475 -475
- package/dist/esm/wm-datepicker.entry.js +273 -273
- package/dist/esm/wm-input.entry.js +136 -136
- package/dist/esm/wm-modal-footer.entry.js +32 -32
- package/dist/esm/wm-modal-header.entry.js +35 -35
- package/dist/esm/wm-modal.entry.js +164 -164
- package/dist/esm/wm-navigation_3.entry.js +233 -0
- package/dist/esm/wm-navigator.entry.js +269 -269
- package/dist/esm/wm-network-uploader.entry.js +422 -422
- package/dist/esm/wm-option_2.entry.js +497 -497
- package/dist/esm/wm-pagination.entry.js +168 -168
- package/dist/esm/wm-search.entry.js +233 -233
- package/dist/esm/wm-snackbar.entry.js +172 -172
- package/dist/esm/wm-tab-item_3.entry.js +298 -298
- package/dist/esm/wm-tag-input.entry.js +581 -581
- package/dist/esm/wm-timepicker.entry.js +385 -385
- package/dist/esm/wm-toggletip.entry.js +126 -126
- package/dist/esm/wm-uploader.entry.js +348 -348
- package/dist/esm/wm-wrapper.entry.js +13 -13
- package/dist/esm-es5/functions-7eebdc16.js +15 -0
- package/dist/esm-es5/{global-51d6ea5f.js → global-0dc2eb57.js} +1 -1
- package/dist/esm-es5/{http-service-5d037e16.js → http-service-3dc3b3e7.js} +1 -1
- package/dist/esm-es5/index-66f8130e.js +1 -0
- package/dist/esm-es5/{interfaces-61c6305b.js → interfaces-2b97fab2.js} +0 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
- package/dist/esm-es5/priv-datepicker.entry.js +1 -1
- package/dist/esm-es5/priv-navigator-button.entry.js +1 -1
- package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
- package/dist/esm-es5/ripple.js +1 -1
- package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
- package/dist/esm-es5/wm-button.entry.js +1 -1
- package/dist/esm-es5/wm-chart-slice.entry.js +1 -1
- package/dist/esm-es5/wm-chart.entry.js +1 -1
- package/dist/esm-es5/wm-datepicker.entry.js +1 -1
- package/dist/esm-es5/wm-input.entry.js +1 -1
- package/dist/esm-es5/wm-modal-footer.entry.js +1 -1
- package/dist/esm-es5/wm-modal-header.entry.js +1 -1
- package/dist/esm-es5/wm-modal.entry.js +1 -1
- package/dist/esm-es5/wm-navigation_3.entry.js +1 -0
- package/dist/esm-es5/wm-navigator.entry.js +1 -1
- package/dist/esm-es5/wm-network-uploader.entry.js +1 -1
- package/dist/esm-es5/wm-option_2.entry.js +1 -1
- package/dist/esm-es5/wm-pagination.entry.js +1 -1
- package/dist/esm-es5/wm-search.entry.js +1 -1
- package/dist/esm-es5/wm-snackbar.entry.js +1 -1
- package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
- package/dist/esm-es5/wm-tag-input.entry.js +1 -1
- package/dist/esm-es5/wm-timepicker.entry.js +1 -1
- package/dist/esm-es5/wm-toggletip.entry.js +1 -1
- package/dist/esm-es5/wm-uploader.entry.js +1 -1
- package/dist/esm-es5/wm-wrapper.entry.js +1 -1
- package/dist/loader/index.d.ts +1 -0
- package/dist/ripple/p-00e0bf57.system.js +1 -0
- package/dist/ripple/p-061a0f47.entry.js +1 -0
- package/dist/ripple/p-0b345e33.system.entry.js +1 -0
- package/dist/ripple/p-0b746618.entry.js +1 -0
- package/dist/ripple/p-0c58f50d.entry.js +1 -0
- package/dist/ripple/p-0d8bd4ee.entry.js +1 -0
- package/dist/ripple/p-0f8d7b58.system.entry.js +1 -0
- package/dist/ripple/p-119a14c1.entry.js +1 -0
- package/dist/ripple/{p-aedd95e6.system.js → p-149db379.system.js} +1 -1
- package/dist/ripple/{p-4ed98fb1.system.entry.js → p-18af6ca6.system.entry.js} +1 -1
- package/dist/ripple/{p-45ee5b9d.system.entry.js → p-1ec7130b.system.entry.js} +1 -1
- package/dist/ripple/{p-c19298a5.system.entry.js → p-261ea633.system.entry.js} +1 -1
- package/dist/ripple/{p-9a9743f5.system.entry.js → p-2d49a016.system.entry.js} +1 -1
- package/dist/ripple/p-312f22ca.entry.js +1 -0
- package/dist/ripple/p-37907055.entry.js +1 -0
- package/dist/ripple/p-3c592c3b.entry.js +1 -0
- package/dist/ripple/{p-888bec42.js → p-43f1298b.js} +0 -0
- package/dist/ripple/p-48b385e6.entry.js +1 -0
- package/dist/ripple/p-501404ff.entry.js +1 -0
- package/dist/ripple/p-593e891e.entry.js +1 -0
- package/dist/ripple/p-5a08d74b.entry.js +1 -0
- package/dist/ripple/p-5a87e7d6.entry.js +1 -0
- package/dist/ripple/p-62a0f6a4.system.entry.js +1 -0
- package/dist/ripple/{p-83028f2c.js → p-6b6643f9.js} +1 -1
- package/dist/ripple/p-7093d32b.entry.js +1 -0
- package/dist/ripple/p-716fd2fa.system.entry.js +1 -0
- package/dist/ripple/{p-088e3c4c.system.entry.js → p-71bb4f49.system.entry.js} +1 -1
- package/dist/ripple/{p-e758db14.system.entry.js → p-7a9aac92.system.entry.js} +1 -1
- package/dist/ripple/{p-504579c2.system.entry.js → p-7bc744bf.system.entry.js} +1 -1
- package/dist/ripple/p-7fc8d607.system.entry.js +1 -0
- package/dist/ripple/p-820a1198.entry.js +1 -0
- package/dist/ripple/p-8b0eb05e.entry.js +1 -0
- package/dist/ripple/p-8bc0b663.system.entry.js +1 -0
- package/dist/ripple/p-99548d58.system.js +1 -0
- package/dist/ripple/p-99db8501.entry.js +1 -0
- package/dist/ripple/p-9b8f993d.entry.js +1 -0
- package/dist/ripple/p-9baa3039.js +1 -0
- package/dist/ripple/p-9d02957d.system.js +1 -0
- package/dist/ripple/p-a59094c9.system.entry.js +1 -0
- package/dist/ripple/p-a59713ca.entry.js +1 -0
- package/dist/ripple/p-a7e0ab85.entry.js +1 -0
- package/dist/ripple/{p-a5177480.system.entry.js → p-b3ce2033.system.entry.js} +1 -1
- package/dist/ripple/{p-284a9749.system.entry.js → p-bb31d263.system.entry.js} +1 -1
- package/dist/ripple/p-c34de6f3.system.entry.js +1 -0
- package/dist/ripple/p-c3615fa0.system.entry.js +1 -0
- package/dist/ripple/p-c45caf33.system.entry.js +1 -0
- package/dist/ripple/{p-f2ba1a0f.system.entry.js → p-c652f945.system.entry.js} +1 -1
- package/dist/ripple/p-c68975d3.entry.js +1 -0
- package/dist/ripple/p-ca21ca3a.js +16 -0
- package/dist/ripple/p-cb283dba.system.entry.js +1 -0
- package/dist/ripple/p-ceabb993.entry.js +1 -0
- package/dist/ripple/p-d044fcf4.system.js +15 -0
- package/dist/ripple/p-d0643c9b.entry.js +1 -0
- package/dist/ripple/p-de09f545.system.entry.js +1 -0
- package/dist/ripple/{p-1d7049b5.system.entry.js → p-dea73ebd.system.entry.js} +1 -1
- package/dist/ripple/p-e639b06c.system.entry.js +1 -0
- package/dist/ripple/p-eb0c2d8f.system.entry.js +1 -0
- package/dist/ripple/p-f4fcd826.entry.js +1 -0
- package/dist/ripple/{p-08b7ec08.system.js → p-f5df5903.system.js} +0 -0
- package/dist/ripple/{p-15759528.system.entry.js → p-f781014a.system.entry.js} +1 -1
- package/dist/ripple/p-f927e5da.entry.js +1 -0
- package/dist/ripple/{p-a6d6eae7.js → p-fd8070fb.js} +0 -0
- package/dist/ripple/p-ffc746cb.entry.js +1 -0
- package/dist/ripple/ripple.esm.js +1 -1
- package/dist/ripple/ripple.js +1 -1
- package/dist/types/components/wm-action-menu/wm-action-menu.d.ts +48 -48
- package/dist/types/components/wm-button/wm-button.d.ts +43 -44
- package/dist/types/components/wm-chart/priv-chart-popover/priv-chart-popover.d.ts +23 -23
- package/dist/types/components/wm-chart/wm-chart-slice.d.ts +11 -11
- package/dist/types/components/wm-chart/wm-chart.d.ts +82 -82
- package/dist/types/components/wm-datepicker/priv-datepicker/priv-datepicker.d.ts +80 -80
- package/dist/types/components/wm-datepicker/wm-datepicker.d.ts +42 -42
- package/dist/types/components/wm-input/wm-input.d.ts +46 -46
- package/dist/types/components/wm-menuitem/wm-menuitem.d.ts +34 -34
- package/dist/types/components/wm-modal/wm-modal-footer.d.ts +15 -15
- package/dist/types/components/wm-modal/wm-modal-header.d.ts +12 -12
- package/dist/types/components/wm-modal/wm-modal.d.ts +41 -41
- package/dist/types/components/wm-navigation/wm-navigation-hamburger.d.ts +20 -13
- package/dist/types/components/wm-navigation/wm-navigation-item.d.ts +11 -10
- package/dist/types/components/wm-navigation/wm-navigation.d.ts +28 -19
- package/dist/types/components/wm-navigator/priv-navigator-button/priv-navigator-button.d.ts +10 -10
- package/dist/types/components/wm-navigator/priv-navigator-item/priv-navigator-item.d.ts +13 -13
- package/dist/types/components/wm-navigator/wm-navigator.d.ts +61 -61
- package/dist/types/components/wm-option/wm-option.d.ts +32 -32
- package/dist/types/components/wm-pagination/wm-pagination.d.ts +32 -32
- package/dist/types/components/wm-search/wm-search.d.ts +86 -86
- package/dist/types/components/wm-select/wm-select.d.ts +66 -66
- package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +35 -35
- package/dist/types/components/wm-tabs/wm-tab-item/wm-tab-item.d.ts +38 -38
- package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +53 -53
- package/dist/types/components/wm-tabs/wm-tab-panel/wm-tab-panel.d.ts +20 -20
- package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +92 -92
- package/dist/types/components/wm-timepicker/wm-timepicker.d.ts +61 -61
- package/dist/types/components/wm-toggletip/wm-toggletip.d.ts +27 -27
- package/dist/types/components/wm-uploader/wm-network-uploader/wm-network-uploader.d.ts +85 -85
- package/dist/types/components/wm-uploader/wm-uploader.d.ts +80 -80
- package/dist/types/components/wm-wrapper/wm-wrapper.d.ts +7 -7
- package/dist/types/components.d.ts +26 -24
- package/dist/types/global/__mocks__/functions.d.ts +6 -6
- package/dist/types/global/functions.d.ts +42 -40
- package/dist/types/global/global.d.ts +1 -1
- package/dist/types/global/interfaces.d.ts +34 -34
- package/dist/types/global/services/__mocks__/http-service.d.ts +6 -6
- package/dist/types/global/services/http-service.d.ts +4 -4
- package/dist/types/lang/lang.d.ts +5 -5
- package/dist/types/stencil-public-runtime.d.ts +4 -6
- package/package.json +47 -47
- package/dist/cjs/wm-navigation-hamburger.cjs.entry.js +0 -56
- package/dist/cjs/wm-navigation-item.cjs.entry.js +0 -31
- package/dist/cjs/wm-navigation.cjs.entry.js +0 -87
- package/dist/esm/wm-navigation-hamburger.entry.js +0 -52
- package/dist/esm/wm-navigation-item.entry.js +0 -27
- package/dist/esm/wm-navigation.entry.js +0 -83
- package/dist/esm-es5/functions-6cd52dcf.js +0 -15
- package/dist/esm-es5/index-cd8f9ae2.js +0 -1
- package/dist/esm-es5/wm-navigation-hamburger.entry.js +0 -1
- package/dist/esm-es5/wm-navigation-item.entry.js +0 -1
- package/dist/esm-es5/wm-navigation.entry.js +0 -1
- package/dist/ripple/p-05b44011.system.entry.js +0 -1
- package/dist/ripple/p-17fef956.entry.js +0 -1
- package/dist/ripple/p-20856a2d.system.js +0 -1
- package/dist/ripple/p-2206c8d0.entry.js +0 -1
- package/dist/ripple/p-244877c8.entry.js +0 -1
- package/dist/ripple/p-2b526a98.entry.js +0 -1
- package/dist/ripple/p-2f63e022.system.entry.js +0 -1
- package/dist/ripple/p-313b6073.system.js +0 -1
- package/dist/ripple/p-323c8fbd.entry.js +0 -1
- package/dist/ripple/p-38062c39.js +0 -1
- package/dist/ripple/p-3ba3afca.entry.js +0 -1
- package/dist/ripple/p-48ab9e16.entry.js +0 -1
- package/dist/ripple/p-4999f5dc.entry.js +0 -1
- package/dist/ripple/p-4ab257fe.entry.js +0 -1
- package/dist/ripple/p-4c0de099.system.entry.js +0 -1
- package/dist/ripple/p-4c75587a.system.entry.js +0 -1
- package/dist/ripple/p-58a1e616.system.entry.js +0 -1
- package/dist/ripple/p-5fd47eac.entry.js +0 -1
- package/dist/ripple/p-664c3f62.entry.js +0 -1
- package/dist/ripple/p-6923b8f6.system.js +0 -15
- package/dist/ripple/p-6e5a35ae.system.entry.js +0 -1
- package/dist/ripple/p-741972e8.system.entry.js +0 -1
- package/dist/ripple/p-764fa608.entry.js +0 -1
- package/dist/ripple/p-77bd8d1b.entry.js +0 -1
- package/dist/ripple/p-7ff67db9.entry.js +0 -1
- package/dist/ripple/p-8139cdfe.system.js +0 -1
- package/dist/ripple/p-864b71bf.system.entry.js +0 -1
- package/dist/ripple/p-87b8fddf.entry.js +0 -1
- package/dist/ripple/p-8a0450fd.entry.js +0 -1
- package/dist/ripple/p-9173f673.entry.js +0 -1
- package/dist/ripple/p-9f442b49.system.entry.js +0 -1
- package/dist/ripple/p-a2c2f475.system.entry.js +0 -1
- package/dist/ripple/p-a3fcdd9f.entry.js +0 -1
- package/dist/ripple/p-a588ae81.entry.js +0 -1
- package/dist/ripple/p-a8358b36.entry.js +0 -1
- package/dist/ripple/p-a88d46f9.system.entry.js +0 -1
- package/dist/ripple/p-a8dfec6d.system.entry.js +0 -1
- package/dist/ripple/p-b1d25dec.entry.js +0 -1
- package/dist/ripple/p-b542340c.system.entry.js +0 -1
- package/dist/ripple/p-c401898d.entry.js +0 -1
- package/dist/ripple/p-ce81ccb4.system.entry.js +0 -1
- package/dist/ripple/p-cfa8106a.system.entry.js +0 -1
- package/dist/ripple/p-dadb6c78.js +0 -16
- package/dist/ripple/p-db7f5d60.entry.js +0 -1
- package/dist/ripple/p-dff01b0a.system.entry.js +0 -1
- package/dist/ripple/p-ecb6a2e0.entry.js +0 -1
- package/dist/ripple/p-ef344252.entry.js +0 -1
- package/dist/ripple/p-f0dfc5d7.entry.js +0 -1
- package/dist/ripple/p-f92f2d83.entry.js +0 -1
- package/dist/ripple/p-fe0a25c1.entry.js +0 -1
|
@@ -3878,17 +3878,11 @@ function icuUnitToEcma(unit) {
|
|
|
3878
3878
|
return unit.replace(/^(.*?)-/, '');
|
|
3879
3879
|
}
|
|
3880
3880
|
var FRACTION_PRECISION_REGEX = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g;
|
|
3881
|
-
var SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\+|#+)
|
|
3881
|
+
var SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\+|#+)?$/g;
|
|
3882
3882
|
var INTEGER_WIDTH_REGEX = /(\*)(0+)|(#+)(0+)|(0+)/g;
|
|
3883
3883
|
var CONCISE_INTEGER_WIDTH_REGEX = /^(0+)$/;
|
|
3884
3884
|
function parseSignificantPrecision(str) {
|
|
3885
3885
|
var result = {};
|
|
3886
|
-
if (str[str.length - 1] === 'r') {
|
|
3887
|
-
result.roundingPriority = 'morePrecision';
|
|
3888
|
-
}
|
|
3889
|
-
else if (str[str.length - 1] === 's') {
|
|
3890
|
-
result.roundingPriority = 'lessPrecision';
|
|
3891
|
-
}
|
|
3892
3886
|
str.replace(SIGNIFICANT_PRECISION_REGEX, function (_, g1, g2) {
|
|
3893
3887
|
// @@@ case
|
|
3894
3888
|
if (typeof g2 !== 'string') {
|
|
@@ -4115,13 +4109,8 @@ function parseNumberSkeleton(tokens) {
|
|
|
4115
4109
|
}
|
|
4116
4110
|
return '';
|
|
4117
4111
|
});
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
if (opt === 'w') {
|
|
4121
|
-
result = __assign(__assign({}, result), { trailingZeroDisplay: 'stripIfInteger' });
|
|
4122
|
-
}
|
|
4123
|
-
else if (opt) {
|
|
4124
|
-
result = __assign(__assign({}, result), parseSignificantPrecision(opt));
|
|
4112
|
+
if (token.options.length) {
|
|
4113
|
+
result = __assign(__assign({}, result), parseSignificantPrecision(token.options[0]));
|
|
4125
4114
|
}
|
|
4126
4115
|
continue;
|
|
4127
4116
|
}
|
|
@@ -4143,8 +4132,8 @@ function parseNumberSkeleton(tokens) {
|
|
|
4143
4132
|
}
|
|
4144
4133
|
|
|
4145
4134
|
var _a;
|
|
4146
|
-
var SPACE_SEPARATOR_START_REGEX = new RegExp("^"
|
|
4147
|
-
var SPACE_SEPARATOR_END_REGEX = new RegExp(
|
|
4135
|
+
var SPACE_SEPARATOR_START_REGEX = new RegExp("^" + SPACE_SEPARATOR_REGEX.source + "*");
|
|
4136
|
+
var SPACE_SEPARATOR_END_REGEX = new RegExp(SPACE_SEPARATOR_REGEX.source + "*$");
|
|
4148
4137
|
function createLocation(start, end) {
|
|
4149
4138
|
return { start: start, end: end };
|
|
4150
4139
|
}
|
|
@@ -4391,7 +4380,7 @@ var Parser = /** @class */ (function () {
|
|
|
4391
4380
|
return {
|
|
4392
4381
|
val: {
|
|
4393
4382
|
type: TYPE.literal,
|
|
4394
|
-
value: "<"
|
|
4383
|
+
value: "<" + tagName + "/>",
|
|
4395
4384
|
location: createLocation(startPosition, this.clonePosition()),
|
|
4396
4385
|
},
|
|
4397
4386
|
err: null,
|
|
@@ -4996,7 +4985,7 @@ var Parser = /** @class */ (function () {
|
|
|
4996
4985
|
}
|
|
4997
4986
|
var code = codePointAt(this.message, offset);
|
|
4998
4987
|
if (code === undefined) {
|
|
4999
|
-
throw Error("Offset "
|
|
4988
|
+
throw Error("Offset " + offset + " is at invalid UTF-16 code unit boundary");
|
|
5000
4989
|
}
|
|
5001
4990
|
return code;
|
|
5002
4991
|
};
|
|
@@ -5064,7 +5053,7 @@ var Parser = /** @class */ (function () {
|
|
|
5064
5053
|
*/
|
|
5065
5054
|
Parser.prototype.bumpTo = function (targetOffset) {
|
|
5066
5055
|
if (this.offset() > targetOffset) {
|
|
5067
|
-
throw Error("targetOffset "
|
|
5056
|
+
throw Error("targetOffset " + targetOffset + " must be greater than or equal to the current offset " + this.offset());
|
|
5068
5057
|
}
|
|
5069
5058
|
targetOffset = Math.min(targetOffset, this.message.length);
|
|
5070
5059
|
while (true) {
|
|
@@ -5073,7 +5062,7 @@ var Parser = /** @class */ (function () {
|
|
|
5073
5062
|
break;
|
|
5074
5063
|
}
|
|
5075
5064
|
if (offset > targetOffset) {
|
|
5076
|
-
throw Error("targetOffset "
|
|
5065
|
+
throw Error("targetOffset " + targetOffset + " is at invalid UTF-16 code unit boundary");
|
|
5077
5066
|
}
|
|
5078
5067
|
this.bump();
|
|
5079
5068
|
if (this.isEOF()) {
|
|
@@ -5539,28 +5528,28 @@ var FormatError = /** @class */ (function (_super) {
|
|
|
5539
5528
|
return _this;
|
|
5540
5529
|
}
|
|
5541
5530
|
FormatError.prototype.toString = function () {
|
|
5542
|
-
return "[formatjs Error: "
|
|
5531
|
+
return "[formatjs Error: " + this.code + "] " + this.message;
|
|
5543
5532
|
};
|
|
5544
5533
|
return FormatError;
|
|
5545
5534
|
}(Error));
|
|
5546
5535
|
var InvalidValueError = /** @class */ (function (_super) {
|
|
5547
5536
|
__extends(InvalidValueError, _super);
|
|
5548
5537
|
function InvalidValueError(variableId, value, options, originalMessage) {
|
|
5549
|
-
return _super.call(this, "Invalid values for \""
|
|
5538
|
+
return _super.call(this, "Invalid values for \"" + variableId + "\": \"" + value + "\". Options are \"" + Object.keys(options).join('", "') + "\"", ErrorCode.INVALID_VALUE, originalMessage) || this;
|
|
5550
5539
|
}
|
|
5551
5540
|
return InvalidValueError;
|
|
5552
5541
|
}(FormatError));
|
|
5553
5542
|
var InvalidValueTypeError = /** @class */ (function (_super) {
|
|
5554
5543
|
__extends(InvalidValueTypeError, _super);
|
|
5555
5544
|
function InvalidValueTypeError(value, type, originalMessage) {
|
|
5556
|
-
return _super.call(this, "Value for \""
|
|
5545
|
+
return _super.call(this, "Value for \"" + value + "\" must be of type " + type, ErrorCode.INVALID_VALUE, originalMessage) || this;
|
|
5557
5546
|
}
|
|
5558
5547
|
return InvalidValueTypeError;
|
|
5559
5548
|
}(FormatError));
|
|
5560
5549
|
var MissingValueError = /** @class */ (function (_super) {
|
|
5561
5550
|
__extends(MissingValueError, _super);
|
|
5562
5551
|
function MissingValueError(variableId, originalMessage) {
|
|
5563
|
-
return _super.call(this, "The intl string context variable \""
|
|
5552
|
+
return _super.call(this, "The intl string context variable \"" + variableId + "\" was not provided to the string \"" + originalMessage + "\"", ErrorCode.MISSING_VALUE, originalMessage) || this;
|
|
5564
5553
|
}
|
|
5565
5554
|
return MissingValueError;
|
|
5566
5555
|
}(FormatError));
|
|
@@ -5721,7 +5710,7 @@ originalMessage) {
|
|
|
5721
5710
|
continue;
|
|
5722
5711
|
}
|
|
5723
5712
|
if (isPluralElement(el)) {
|
|
5724
|
-
var opt = el.options["="
|
|
5713
|
+
var opt = el.options["=" + value];
|
|
5725
5714
|
if (!opt) {
|
|
5726
5715
|
if (!Intl.PluralRules) {
|
|
5727
5716
|
throw new FormatError("Intl.PluralRules is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-pluralrules\"\n", ErrorCode.MISSING_INTL_API, originalMessage);
|
|
@@ -5792,7 +5781,7 @@ function createDefaultFormatters(cache) {
|
|
|
5792
5781
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
5793
5782
|
args[_i] = arguments[_i];
|
|
5794
5783
|
}
|
|
5795
|
-
return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args
|
|
5784
|
+
return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args)))();
|
|
5796
5785
|
}, {
|
|
5797
5786
|
cache: createFastMemoizeCache$1(cache.number),
|
|
5798
5787
|
strategy: strategies.variadic,
|
|
@@ -5803,7 +5792,7 @@ function createDefaultFormatters(cache) {
|
|
|
5803
5792
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
5804
5793
|
args[_i] = arguments[_i];
|
|
5805
5794
|
}
|
|
5806
|
-
return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args
|
|
5795
|
+
return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args)))();
|
|
5807
5796
|
}, {
|
|
5808
5797
|
cache: createFastMemoizeCache$1(cache.dateTime),
|
|
5809
5798
|
strategy: strategies.variadic,
|
|
@@ -5814,7 +5803,7 @@ function createDefaultFormatters(cache) {
|
|
|
5814
5803
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
5815
5804
|
args[_i] = arguments[_i];
|
|
5816
5805
|
}
|
|
5817
|
-
return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args
|
|
5806
|
+
return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args)))();
|
|
5818
5807
|
}, {
|
|
5819
5808
|
cache: createFastMemoizeCache$1(cache.pluralRules),
|
|
5820
5809
|
strategy: strategies.variadic,
|
|
@@ -5972,13 +5961,7 @@ var IntlErrorCode;
|
|
|
5972
5961
|
var IntlError = /** @class */ (function (_super) {
|
|
5973
5962
|
__extends(IntlError, _super);
|
|
5974
5963
|
function IntlError(code, message, exception) {
|
|
5975
|
-
var _this = this;
|
|
5976
|
-
var err = exception
|
|
5977
|
-
? exception instanceof Error
|
|
5978
|
-
? exception
|
|
5979
|
-
: new Error(String(exception))
|
|
5980
|
-
: undefined;
|
|
5981
|
-
_this = _super.call(this, "[@formatjs/intl Error ".concat(code, "] ").concat(message, " \n").concat(err ? "\n".concat(err.message, "\n").concat(err.stack) : '')) || this;
|
|
5964
|
+
var _this = _super.call(this, "[@formatjs/intl Error " + code + "] " + message + " \n" + (exception ? "\n" + exception.message + "\n" + exception.stack : '')) || this;
|
|
5982
5965
|
_this.code = code;
|
|
5983
5966
|
// @ts-ignore just so we don't need to declare dep on @types/node
|
|
5984
5967
|
if (typeof Error.captureStackTrace === 'function') {
|
|
@@ -6010,26 +5993,19 @@ var MissingDataError = /** @class */ (function (_super) {
|
|
|
6010
5993
|
}
|
|
6011
5994
|
return MissingDataError;
|
|
6012
5995
|
}(IntlError));
|
|
6013
|
-
var IntlFormatError = /** @class */ (function (_super) {
|
|
6014
|
-
__extends(IntlFormatError, _super);
|
|
6015
|
-
function IntlFormatError(message, locale, exception) {
|
|
6016
|
-
return _super.call(this, IntlErrorCode.FORMAT_ERROR, "".concat(message, " \nLocale: ").concat(locale, "\n"), exception) || this;
|
|
6017
|
-
}
|
|
6018
|
-
return IntlFormatError;
|
|
6019
|
-
}(IntlError));
|
|
6020
5996
|
var MessageFormatError = /** @class */ (function (_super) {
|
|
6021
5997
|
__extends(MessageFormatError, _super);
|
|
6022
5998
|
function MessageFormatError(message, locale, descriptor, exception) {
|
|
6023
|
-
var _this = _super.call(this,
|
|
5999
|
+
var _this = _super.call(this, IntlErrorCode.FORMAT_ERROR, message + " \nLocale: " + locale + "\nMessageID: " + (descriptor === null || descriptor === void 0 ? void 0 : descriptor.id) + "\nDefault Message: " + (descriptor === null || descriptor === void 0 ? void 0 : descriptor.defaultMessage) + "\nDescription: " + (descriptor === null || descriptor === void 0 ? void 0 : descriptor.description) + " \n", exception) || this;
|
|
6024
6000
|
_this.descriptor = descriptor;
|
|
6025
6001
|
return _this;
|
|
6026
6002
|
}
|
|
6027
6003
|
return MessageFormatError;
|
|
6028
|
-
}(
|
|
6004
|
+
}(IntlError));
|
|
6029
6005
|
var MissingTranslationError = /** @class */ (function (_super) {
|
|
6030
6006
|
__extends(MissingTranslationError, _super);
|
|
6031
6007
|
function MissingTranslationError(descriptor, locale) {
|
|
6032
|
-
var _this = _super.call(this, IntlErrorCode.MISSING_TRANSLATION, "Missing message: \""
|
|
6008
|
+
var _this = _super.call(this, IntlErrorCode.MISSING_TRANSLATION, "Missing message: \"" + descriptor.id + "\" for locale \"" + locale + "\", using " + (descriptor.defaultMessage ? 'default message' : 'id') + " as fallback.") || this;
|
|
6033
6009
|
_this.descriptor = descriptor;
|
|
6034
6010
|
return _this;
|
|
6035
6011
|
}
|
|
@@ -6056,7 +6032,6 @@ var DEFAULT_INTL_CONFIG = {
|
|
|
6056
6032
|
timeZone: undefined,
|
|
6057
6033
|
defaultLocale: 'en',
|
|
6058
6034
|
defaultFormats: {},
|
|
6059
|
-
fallbackOnEmptyString: true,
|
|
6060
6035
|
onError: defaultErrorHandler,
|
|
6061
6036
|
};
|
|
6062
6037
|
function createIntlCache() {
|
|
@@ -6099,7 +6074,7 @@ function createFormatters(cache) {
|
|
|
6099
6074
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
6100
6075
|
args[_i] = arguments[_i];
|
|
6101
6076
|
}
|
|
6102
|
-
return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args
|
|
6077
|
+
return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args)))();
|
|
6103
6078
|
}, {
|
|
6104
6079
|
cache: createFastMemoizeCache(cache.dateTime),
|
|
6105
6080
|
strategy: strategies.variadic,
|
|
@@ -6110,7 +6085,7 @@ function createFormatters(cache) {
|
|
|
6110
6085
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
6111
6086
|
args[_i] = arguments[_i];
|
|
6112
6087
|
}
|
|
6113
|
-
return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args
|
|
6088
|
+
return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args)))();
|
|
6114
6089
|
}, {
|
|
6115
6090
|
cache: createFastMemoizeCache(cache.number),
|
|
6116
6091
|
strategy: strategies.variadic,
|
|
@@ -6121,7 +6096,7 @@ function createFormatters(cache) {
|
|
|
6121
6096
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
6122
6097
|
args[_i] = arguments[_i];
|
|
6123
6098
|
}
|
|
6124
|
-
return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args
|
|
6099
|
+
return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args)))();
|
|
6125
6100
|
}, {
|
|
6126
6101
|
cache: createFastMemoizeCache(cache.pluralRules),
|
|
6127
6102
|
strategy: strategies.variadic,
|
|
@@ -6144,7 +6119,7 @@ function createFormatters(cache) {
|
|
|
6144
6119
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
6145
6120
|
args[_i] = arguments[_i];
|
|
6146
6121
|
}
|
|
6147
|
-
return new (RelativeTimeFormat.bind.apply(RelativeTimeFormat, __spreadArray([void 0], args
|
|
6122
|
+
return new (RelativeTimeFormat.bind.apply(RelativeTimeFormat, __spreadArray([void 0], args)))();
|
|
6148
6123
|
}, {
|
|
6149
6124
|
cache: createFastMemoizeCache(cache.relativeTime),
|
|
6150
6125
|
strategy: strategies.variadic,
|
|
@@ -6155,7 +6130,7 @@ function createFormatters(cache) {
|
|
|
6155
6130
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
6156
6131
|
args[_i] = arguments[_i];
|
|
6157
6132
|
}
|
|
6158
|
-
return new (ListFormat.bind.apply(ListFormat, __spreadArray([void 0], args
|
|
6133
|
+
return new (ListFormat.bind.apply(ListFormat, __spreadArray([void 0], args)))();
|
|
6159
6134
|
}, {
|
|
6160
6135
|
cache: createFastMemoizeCache(cache.list),
|
|
6161
6136
|
strategy: strategies.variadic,
|
|
@@ -6165,7 +6140,7 @@ function createFormatters(cache) {
|
|
|
6165
6140
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
6166
6141
|
args[_i] = arguments[_i];
|
|
6167
6142
|
}
|
|
6168
|
-
return new (DisplayNames.bind.apply(DisplayNames, __spreadArray([void 0], args
|
|
6143
|
+
return new (DisplayNames.bind.apply(DisplayNames, __spreadArray([void 0], args)))();
|
|
6169
6144
|
}, {
|
|
6170
6145
|
cache: createFastMemoizeCache(cache.displayNames),
|
|
6171
6146
|
strategy: strategies.variadic,
|
|
@@ -6181,7 +6156,7 @@ function getNamedFormat(formats, type, name, onError) {
|
|
|
6181
6156
|
if (format) {
|
|
6182
6157
|
return format;
|
|
6183
6158
|
}
|
|
6184
|
-
onError(new UnsupportedFormatterError("No "
|
|
6159
|
+
onError(new UnsupportedFormatterError("No " + type + " format named: " + name));
|
|
6185
6160
|
}
|
|
6186
6161
|
|
|
6187
6162
|
/**
|
|
@@ -6216,7 +6191,7 @@ function deepMergeFormatsAndSetTimeZone(f1, timeZone) {
|
|
|
6216
6191
|
return __assign(__assign(__assign({}, mfFormats), f1), { date: deepMergeOptions(setTimeZoneInOptions(mfFormats.date, timeZone), setTimeZoneInOptions(f1.date || {}, timeZone)), time: deepMergeOptions(setTimeZoneInOptions(mfFormats.time, timeZone), setTimeZoneInOptions(f1.time || {}, timeZone)) });
|
|
6217
6192
|
}
|
|
6218
6193
|
function formatMessage(_a, state, messageDescriptor, values, opts) {
|
|
6219
|
-
var locale = _a.locale, formats = _a.formats, messages = _a.messages, defaultLocale = _a.defaultLocale, defaultFormats = _a.defaultFormats,
|
|
6194
|
+
var locale = _a.locale, formats = _a.formats, messages = _a.messages, defaultLocale = _a.defaultLocale, defaultFormats = _a.defaultFormats, onError = _a.onError, timeZone = _a.timeZone, defaultRichTextElements = _a.defaultRichTextElements;
|
|
6220
6195
|
if (messageDescriptor === void 0) { messageDescriptor = { id: '' }; }
|
|
6221
6196
|
var msgId = messageDescriptor.id, defaultMessage = messageDescriptor.defaultMessage;
|
|
6222
6197
|
// `id` is a required field of a Message Descriptor.
|
|
@@ -6246,9 +6221,6 @@ function formatMessage(_a, state, messageDescriptor, values, opts) {
|
|
|
6246
6221
|
formats = deepMergeFormatsAndSetTimeZone(formats, timeZone);
|
|
6247
6222
|
defaultFormats = deepMergeFormatsAndSetTimeZone(defaultFormats, timeZone);
|
|
6248
6223
|
if (!message) {
|
|
6249
|
-
if (fallbackOnEmptyString === false && message === '') {
|
|
6250
|
-
return message;
|
|
6251
|
-
}
|
|
6252
6224
|
if (!defaultMessage ||
|
|
6253
6225
|
(locale && locale.toLowerCase() !== defaultLocale.toLowerCase())) {
|
|
6254
6226
|
// This prevents warnings from littering the console in development
|
|
@@ -6262,7 +6234,7 @@ function formatMessage(_a, state, messageDescriptor, values, opts) {
|
|
|
6262
6234
|
return formatter.format(values);
|
|
6263
6235
|
}
|
|
6264
6236
|
catch (e) {
|
|
6265
|
-
onError(new MessageFormatError("Error formatting default message for: \""
|
|
6237
|
+
onError(new MessageFormatError("Error formatting default message for: \"" + id + "\", rendering default message verbatim", locale, messageDescriptor, e));
|
|
6266
6238
|
return typeof defaultMessage === 'string' ? defaultMessage : id;
|
|
6267
6239
|
}
|
|
6268
6240
|
}
|
|
@@ -6274,7 +6246,7 @@ function formatMessage(_a, state, messageDescriptor, values, opts) {
|
|
|
6274
6246
|
return formatter.format(values);
|
|
6275
6247
|
}
|
|
6276
6248
|
catch (e) {
|
|
6277
|
-
onError(new MessageFormatError("Error formatting message: \""
|
|
6249
|
+
onError(new MessageFormatError("Error formatting message: \"" + id + "\", using " + (defaultMessage ? 'default message' : 'id') + " as fallback.", locale, messageDescriptor, e));
|
|
6278
6250
|
}
|
|
6279
6251
|
if (defaultMessage) {
|
|
6280
6252
|
try {
|
|
@@ -6282,7 +6254,7 @@ function formatMessage(_a, state, messageDescriptor, values, opts) {
|
|
|
6282
6254
|
return formatter.format(values);
|
|
6283
6255
|
}
|
|
6284
6256
|
catch (e) {
|
|
6285
|
-
onError(new MessageFormatError("Error formatting the default message for: \""
|
|
6257
|
+
onError(new MessageFormatError("Error formatting the default message for: \"" + id + "\", rendering message verbatim", locale, messageDescriptor, e));
|
|
6286
6258
|
}
|
|
6287
6259
|
}
|
|
6288
6260
|
if (typeof message === 'string') {
|
|
@@ -6320,7 +6292,9 @@ function getFormatter$2(_a, type, getDateTimeFormat, options) {
|
|
|
6320
6292
|
if (options === void 0) { options = {}; }
|
|
6321
6293
|
var format = options.format;
|
|
6322
6294
|
var defaults = __assign(__assign({}, (timeZone && { timeZone: timeZone })), (format && getNamedFormat(formats, type, format, onError)));
|
|
6323
|
-
var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS,
|
|
6295
|
+
var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS,
|
|
6296
|
+
// @ts-expect-error es2020 has a lot stuff from es2021 bleed in
|
|
6297
|
+
defaults);
|
|
6324
6298
|
if (type === 'time' &&
|
|
6325
6299
|
!filteredOptions.hour &&
|
|
6326
6300
|
!filteredOptions.minute &&
|
|
@@ -6437,7 +6411,7 @@ var LIST_FORMAT_OPTIONS = [
|
|
|
6437
6411
|
];
|
|
6438
6412
|
var now = Date.now();
|
|
6439
6413
|
function generateToken(i) {
|
|
6440
|
-
return
|
|
6414
|
+
return now + "_" + i + "_" + now;
|
|
6441
6415
|
}
|
|
6442
6416
|
function formatList(opts, getListFormat, values, options) {
|
|
6443
6417
|
if (options === void 0) { options = {}; }
|
|
@@ -6504,7 +6478,7 @@ function formatPlural(_a, getPluralRules, value, options) {
|
|
|
6504
6478
|
return getPluralRules(locale, filteredOptions).select(value);
|
|
6505
6479
|
}
|
|
6506
6480
|
catch (e) {
|
|
6507
|
-
onError(new
|
|
6481
|
+
onError(new MessageFormatError('Error formatting plural.', e));
|
|
6508
6482
|
}
|
|
6509
6483
|
return 'other';
|
|
6510
6484
|
}
|
|
@@ -6531,7 +6505,7 @@ function formatRelativeTime(config, getRelativeTimeFormat, value, unit, options)
|
|
|
6531
6505
|
return getFormatter$1(config, getRelativeTimeFormat, options).format(value, unit);
|
|
6532
6506
|
}
|
|
6533
6507
|
catch (e) {
|
|
6534
|
-
config.onError(new
|
|
6508
|
+
config.onError(new MessageFormatError('Error formatting relative time.', e));
|
|
6535
6509
|
}
|
|
6536
6510
|
return String(value);
|
|
6537
6511
|
}
|
|
@@ -6611,7 +6585,7 @@ function createIntl(config, cache) {
|
|
|
6611
6585
|
var locale = resolvedConfig.locale, defaultLocale = resolvedConfig.defaultLocale, onError = resolvedConfig.onError;
|
|
6612
6586
|
if (!locale) {
|
|
6613
6587
|
if (onError) {
|
|
6614
|
-
onError(new InvalidConfigError("\"locale\" was not configured, using \""
|
|
6588
|
+
onError(new InvalidConfigError("\"locale\" was not configured, using \"" + defaultLocale + "\" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details"));
|
|
6615
6589
|
}
|
|
6616
6590
|
// Since there's no registered locale data for `locale`, this will
|
|
6617
6591
|
// fallback to the `defaultLocale` to make sure things can render.
|
|
@@ -6621,458 +6595,481 @@ function createIntl(config, cache) {
|
|
|
6621
6595
|
resolvedConfig.locale = resolvedConfig.defaultLocale || 'en';
|
|
6622
6596
|
}
|
|
6623
6597
|
else if (!Intl.NumberFormat.supportedLocalesOf(locale).length && onError) {
|
|
6624
|
-
onError(new MissingDataError("Missing locale data for locale: \""
|
|
6598
|
+
onError(new MissingDataError("Missing locale data for locale: \"" + locale + "\" in Intl.NumberFormat. Using default locale: \"" + defaultLocale + "\" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details"));
|
|
6625
6599
|
}
|
|
6626
6600
|
else if (!Intl.DateTimeFormat.supportedLocalesOf(locale).length &&
|
|
6627
6601
|
onError) {
|
|
6628
|
-
onError(new MissingDataError("Missing locale data for locale: \""
|
|
6602
|
+
onError(new MissingDataError("Missing locale data for locale: \"" + locale + "\" in Intl.DateTimeFormat. Using default locale: \"" + defaultLocale + "\" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details"));
|
|
6629
6603
|
}
|
|
6630
6604
|
verifyConfigMessages(resolvedConfig);
|
|
6631
6605
|
return __assign(__assign({}, resolvedConfig), { formatters: formatters, formatNumber: formatNumber.bind(null, resolvedConfig, formatters.getNumberFormat), formatNumberToParts: formatNumberToParts.bind(null, resolvedConfig, formatters.getNumberFormat), formatRelativeTime: formatRelativeTime.bind(null, resolvedConfig, formatters.getRelativeTimeFormat), formatDate: formatDate.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatDateToParts: formatDateToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatTime: formatTime.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatDateTimeRange: formatDateTimeRange.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatTimeToParts: formatTimeToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatPlural: formatPlural.bind(null, resolvedConfig, formatters.getPluralRules), formatMessage: formatMessage.bind(null, resolvedConfig, formatters), formatList: formatList.bind(null, resolvedConfig, formatters.getListFormat), formatListToParts: formatListToParts.bind(null, resolvedConfig, formatters.getListFormat), formatDisplayName: formatDisplayName.bind(null, resolvedConfig, formatters.getDisplayNames) });
|
|
6632
6606
|
}
|
|
6633
6607
|
|
|
6634
|
-
const DEFAULT_LANGUAGE = "en";
|
|
6635
|
-
function getBrowserLang() {
|
|
6636
|
-
const langAttr = document.documentElement.getAttribute("lang");
|
|
6637
|
-
if (!!langAttr) {
|
|
6638
|
-
return langAttr;
|
|
6639
|
-
}
|
|
6640
|
-
else if (window.navigator && window.navigator.language) {
|
|
6641
|
-
const lang = window.navigator.languages ? window.navigator.languages[0] : window.navigator.language;
|
|
6642
|
-
return lang.slice(0, 2);
|
|
6643
|
-
}
|
|
6644
|
-
else {
|
|
6645
|
-
return DEFAULT_LANGUAGE;
|
|
6646
|
-
}
|
|
6647
|
-
}
|
|
6648
|
-
// prevents memory leak
|
|
6649
|
-
const cache = createIntlCache();
|
|
6650
|
-
const locale = getBrowserLang();
|
|
6651
|
-
const intl = createIntl({
|
|
6652
|
-
locale: locale,
|
|
6653
|
-
defaultLocale: "en",
|
|
6654
|
-
messages: lang[locale] || en,
|
|
6655
|
-
}, cache);
|
|
6656
|
-
function generateId() {
|
|
6657
|
-
return "wmcl-" + Math.random().toString(36).substr(2, 10);
|
|
6658
|
-
}
|
|
6659
|
-
function
|
|
6660
|
-
|
|
6661
|
-
|
|
6662
|
-
|
|
6663
|
-
|
|
6664
|
-
|
|
6665
|
-
|
|
6666
|
-
|
|
6667
|
-
|
|
6668
|
-
|
|
6669
|
-
|
|
6670
|
-
|
|
6671
|
-
|
|
6672
|
-
|
|
6673
|
-
|
|
6674
|
-
|
|
6675
|
-
|
|
6676
|
-
|
|
6677
|
-
|
|
6678
|
-
|
|
6679
|
-
|
|
6680
|
-
|
|
6681
|
-
|
|
6682
|
-
|
|
6683
|
-
|
|
6684
|
-
|
|
6685
|
-
}
|
|
6686
|
-
|
|
6687
|
-
|
|
6688
|
-
|
|
6689
|
-
|
|
6690
|
-
|
|
6691
|
-
|
|
6692
|
-
|
|
6693
|
-
|
|
6694
|
-
|
|
6695
|
-
|
|
6696
|
-
|
|
6697
|
-
|
|
6698
|
-
|
|
6699
|
-
|
|
6700
|
-
|
|
6701
|
-
|
|
6702
|
-
|
|
6703
|
-
|
|
6704
|
-
|
|
6705
|
-
|
|
6706
|
-
|
|
6707
|
-
|
|
6708
|
-
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
|
|
6720
|
-
|
|
6721
|
-
|
|
6722
|
-
|
|
6723
|
-
|
|
6724
|
-
|
|
6725
|
-
|
|
6726
|
-
|
|
6727
|
-
|
|
6728
|
-
|
|
6729
|
-
|
|
6730
|
-
|
|
6731
|
-
|
|
6732
|
-
)
|
|
6733
|
-
|
|
6734
|
-
|
|
6735
|
-
|
|
6736
|
-
|
|
6737
|
-
|
|
6738
|
-
|
|
6739
|
-
|
|
6740
|
-
|
|
6741
|
-
|
|
6742
|
-
|
|
6743
|
-
|
|
6744
|
-
|
|
6745
|
-
|
|
6746
|
-
|
|
6747
|
-
|
|
6748
|
-
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
|
|
6752
|
-
}
|
|
6753
|
-
|
|
6754
|
-
const
|
|
6755
|
-
|
|
6756
|
-
|
|
6757
|
-
|
|
6758
|
-
|
|
6759
|
-
|
|
6760
|
-
|
|
6761
|
-
|
|
6762
|
-
|
|
6763
|
-
|
|
6764
|
-
const
|
|
6765
|
-
|
|
6766
|
-
|
|
6767
|
-
|
|
6768
|
-
|
|
6769
|
-
const
|
|
6770
|
-
|
|
6771
|
-
|
|
6772
|
-
|
|
6773
|
-
};
|
|
6774
|
-
const
|
|
6775
|
-
|
|
6776
|
-
|
|
6777
|
-
|
|
6778
|
-
|
|
6779
|
-
|
|
6780
|
-
|
|
6781
|
-
|
|
6782
|
-
|
|
6783
|
-
|
|
6784
|
-
|
|
6785
|
-
|
|
6786
|
-
const
|
|
6787
|
-
|
|
6788
|
-
|
|
6789
|
-
|
|
6790
|
-
|
|
6791
|
-
|
|
6792
|
-
|
|
6793
|
-
|
|
6794
|
-
|
|
6795
|
-
|
|
6796
|
-
|
|
6797
|
-
|
|
6798
|
-
|
|
6799
|
-
|
|
6800
|
-
|
|
6801
|
-
|
|
6802
|
-
|
|
6803
|
-
|
|
6804
|
-
|
|
6805
|
-
|
|
6806
|
-
|
|
6807
|
-
|
|
6808
|
-
|
|
6809
|
-
|
|
6810
|
-
|
|
6811
|
-
|
|
6812
|
-
|
|
6813
|
-
|
|
6814
|
-
|
|
6815
|
-
|
|
6816
|
-
|
|
6817
|
-
|
|
6818
|
-
|
|
6819
|
-
|
|
6820
|
-
|
|
6821
|
-
|
|
6822
|
-
|
|
6823
|
-
|
|
6824
|
-
|
|
6825
|
-
|
|
6826
|
-
|
|
6827
|
-
|
|
6828
|
-
|
|
6829
|
-
|
|
6830
|
-
|
|
6831
|
-
|
|
6832
|
-
|
|
6833
|
-
|
|
6834
|
-
|
|
6835
|
-
|
|
6836
|
-
|
|
6837
|
-
|
|
6838
|
-
|
|
6839
|
-
|
|
6840
|
-
|
|
6841
|
-
|
|
6842
|
-
|
|
6843
|
-
|
|
6844
|
-
|
|
6845
|
-
|
|
6846
|
-
|
|
6847
|
-
|
|
6848
|
-
|
|
6849
|
-
}
|
|
6850
|
-
|
|
6851
|
-
|
|
6852
|
-
|
|
6853
|
-
|
|
6854
|
-
|
|
6855
|
-
|
|
6856
|
-
|
|
6857
|
-
|
|
6858
|
-
|
|
6859
|
-
|
|
6860
|
-
|
|
6861
|
-
|
|
6862
|
-
|
|
6863
|
-
|
|
6864
|
-
|
|
6865
|
-
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
|
|
6869
|
-
|
|
6870
|
-
|
|
6871
|
-
|
|
6872
|
-
|
|
6873
|
-
|
|
6874
|
-
|
|
6875
|
-
|
|
6876
|
-
|
|
6877
|
-
|
|
6878
|
-
|
|
6879
|
-
|
|
6880
|
-
|
|
6881
|
-
|
|
6882
|
-
|
|
6883
|
-
|
|
6884
|
-
|
|
6885
|
-
|
|
6886
|
-
|
|
6887
|
-
|
|
6888
|
-
|
|
6889
|
-
|
|
6890
|
-
|
|
6891
|
-
|
|
6892
|
-
|
|
6893
|
-
|
|
6894
|
-
|
|
6895
|
-
|
|
6896
|
-
|
|
6897
|
-
|
|
6898
|
-
|
|
6899
|
-
|
|
6900
|
-
|
|
6901
|
-
|
|
6902
|
-
|
|
6903
|
-
|
|
6904
|
-
|
|
6905
|
-
|
|
6906
|
-
|
|
6907
|
-
|
|
6908
|
-
|
|
6909
|
-
|
|
6910
|
-
|
|
6911
|
-
|
|
6912
|
-
|
|
6913
|
-
|
|
6914
|
-
|
|
6915
|
-
|
|
6916
|
-
|
|
6917
|
-
|
|
6918
|
-
|
|
6919
|
-
|
|
6920
|
-
|
|
6921
|
-
|
|
6922
|
-
|
|
6923
|
-
|
|
6924
|
-
|
|
6925
|
-
|
|
6926
|
-
|
|
6927
|
-
|
|
6928
|
-
|
|
6929
|
-
|
|
6930
|
-
|
|
6931
|
-
|
|
6932
|
-
|
|
6933
|
-
|
|
6934
|
-
|
|
6935
|
-
|
|
6936
|
-
|
|
6937
|
-
|
|
6938
|
-
|
|
6939
|
-
|
|
6940
|
-
|
|
6941
|
-
|
|
6942
|
-
|
|
6943
|
-
|
|
6944
|
-
|
|
6945
|
-
|
|
6946
|
-
const
|
|
6947
|
-
|
|
6948
|
-
|
|
6949
|
-
|
|
6950
|
-
|
|
6951
|
-
|
|
6952
|
-
|
|
6953
|
-
|
|
6954
|
-
|
|
6955
|
-
|
|
6956
|
-
|
|
6957
|
-
|
|
6958
|
-
|
|
6959
|
-
|
|
6960
|
-
|
|
6961
|
-
|
|
6962
|
-
|
|
6963
|
-
|
|
6964
|
-
|
|
6965
|
-
|
|
6966
|
-
|
|
6967
|
-
|
|
6968
|
-
|
|
6969
|
-
|
|
6970
|
-
|
|
6971
|
-
|
|
6972
|
-
|
|
6973
|
-
|
|
6974
|
-
|
|
6975
|
-
|
|
6976
|
-
|
|
6977
|
-
|
|
6978
|
-
|
|
6979
|
-
|
|
6980
|
-
|
|
6981
|
-
|
|
6982
|
-
|
|
6983
|
-
|
|
6984
|
-
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
|
|
6988
|
-
|
|
6989
|
-
|
|
6990
|
-
|
|
6991
|
-
|
|
6992
|
-
|
|
6993
|
-
|
|
6994
|
-
|
|
6995
|
-
|
|
6996
|
-
|
|
6997
|
-
|
|
6998
|
-
|
|
6999
|
-
|
|
7000
|
-
|
|
7001
|
-
|
|
7002
|
-
|
|
7003
|
-
|
|
7004
|
-
|
|
7005
|
-
|
|
7006
|
-
|
|
7007
|
-
|
|
7008
|
-
|
|
7009
|
-
|
|
7010
|
-
|
|
7011
|
-
|
|
7012
|
-
|
|
7013
|
-
|
|
7014
|
-
|
|
7015
|
-
|
|
7016
|
-
|
|
7017
|
-
|
|
7018
|
-
|
|
7019
|
-
|
|
7020
|
-
|
|
7021
|
-
|
|
7022
|
-
|
|
7023
|
-
|
|
7024
|
-
|
|
7025
|
-
|
|
7026
|
-
|
|
7027
|
-
|
|
7028
|
-
|
|
7029
|
-
|
|
7030
|
-
|
|
7031
|
-
|
|
7032
|
-
|
|
7033
|
-
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
|
|
7037
|
-
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
|
|
7042
|
-
|
|
7043
|
-
|
|
7044
|
-
|
|
7045
|
-
|
|
7046
|
-
|
|
7047
|
-
|
|
7048
|
-
|
|
7049
|
-
|
|
7050
|
-
|
|
7051
|
-
|
|
7052
|
-
|
|
7053
|
-
}
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
|
|
7058
|
-
|
|
7059
|
-
|
|
7060
|
-
|
|
7061
|
-
|
|
7062
|
-
|
|
7063
|
-
|
|
7064
|
-
|
|
7065
|
-
|
|
7066
|
-
|
|
7067
|
-
|
|
7068
|
-
|
|
7069
|
-
|
|
7070
|
-
|
|
7071
|
-
|
|
7072
|
-
|
|
7073
|
-
|
|
7074
|
-
|
|
7075
|
-
|
|
6608
|
+
const DEFAULT_LANGUAGE = "en";
|
|
6609
|
+
function getBrowserLang() {
|
|
6610
|
+
const langAttr = document.documentElement.getAttribute("lang");
|
|
6611
|
+
if (!!langAttr) {
|
|
6612
|
+
return langAttr;
|
|
6613
|
+
}
|
|
6614
|
+
else if (window.navigator && window.navigator.language) {
|
|
6615
|
+
const lang = window.navigator.languages ? window.navigator.languages[0] : window.navigator.language;
|
|
6616
|
+
return lang.slice(0, 2);
|
|
6617
|
+
}
|
|
6618
|
+
else {
|
|
6619
|
+
return DEFAULT_LANGUAGE;
|
|
6620
|
+
}
|
|
6621
|
+
}
|
|
6622
|
+
// prevents memory leak
|
|
6623
|
+
const cache = createIntlCache();
|
|
6624
|
+
const locale = getBrowserLang();
|
|
6625
|
+
const intl = createIntl({
|
|
6626
|
+
locale: locale,
|
|
6627
|
+
defaultLocale: "en",
|
|
6628
|
+
messages: lang[locale] || en,
|
|
6629
|
+
}, cache);
|
|
6630
|
+
function generateId() {
|
|
6631
|
+
return "wmcl-" + Math.random().toString(36).substr(2, 10);
|
|
6632
|
+
}
|
|
6633
|
+
// limits how many times a function fires
|
|
6634
|
+
// use when the function should run periodically, but not too often (e.g. window resize)
|
|
6635
|
+
function throttle(fn, wait) {
|
|
6636
|
+
let timeout;
|
|
6637
|
+
let shouldWait = false;
|
|
6638
|
+
return function () {
|
|
6639
|
+
const context = this;
|
|
6640
|
+
if (!shouldWait) {
|
|
6641
|
+
fn.apply(context, arguments);
|
|
6642
|
+
shouldWait = true;
|
|
6643
|
+
clearTimeout(timeout);
|
|
6644
|
+
timeout = setTimeout(function () {
|
|
6645
|
+
shouldWait = false;
|
|
6646
|
+
}, wait);
|
|
6647
|
+
}
|
|
6648
|
+
};
|
|
6649
|
+
}
|
|
6650
|
+
// waits until it hasn't been called for [timeout] ms.
|
|
6651
|
+
// use when the function should run only after something (event) is done firing
|
|
6652
|
+
function debounce(fn, wait) {
|
|
6653
|
+
let timeout;
|
|
6654
|
+
return function () {
|
|
6655
|
+
const context = this;
|
|
6656
|
+
const functionCall = () => fn.apply(context, arguments);
|
|
6657
|
+
clearTimeout(timeout);
|
|
6658
|
+
timeout = setTimeout(functionCall, wait);
|
|
6659
|
+
};
|
|
6660
|
+
}
|
|
6661
|
+
function getTextDir() {
|
|
6662
|
+
const dir = document.querySelector("html").getAttribute("dir");
|
|
6663
|
+
return dir ? dir.toLowerCase() : "";
|
|
6664
|
+
}
|
|
6665
|
+
function getPosition(el) {
|
|
6666
|
+
const coords = el.getBoundingClientRect();
|
|
6667
|
+
let x = coords.x;
|
|
6668
|
+
let y = coords.y;
|
|
6669
|
+
// Edge doesn't have x and y
|
|
6670
|
+
if (!x) {
|
|
6671
|
+
if (getTextDir() === "rtl") {
|
|
6672
|
+
x = coords.right;
|
|
6673
|
+
}
|
|
6674
|
+
else {
|
|
6675
|
+
x = coords.left;
|
|
6676
|
+
}
|
|
6677
|
+
y = coords.top;
|
|
6678
|
+
}
|
|
6679
|
+
return { x, y };
|
|
6680
|
+
}
|
|
6681
|
+
function findParentWithScrollbar(el) {
|
|
6682
|
+
while (!!el) {
|
|
6683
|
+
if (el.scrollHeight > el.clientHeight && ["scroll", "auto"].includes(window.getComputedStyle(el).overflowY)) {
|
|
6684
|
+
return el;
|
|
6685
|
+
}
|
|
6686
|
+
el = el.parentElement;
|
|
6687
|
+
}
|
|
6688
|
+
}
|
|
6689
|
+
function findParentWithHiddenOverflow(el) {
|
|
6690
|
+
while (!!el) {
|
|
6691
|
+
if (window.getComputedStyle(el).overflowY !== "visible") {
|
|
6692
|
+
return el;
|
|
6693
|
+
}
|
|
6694
|
+
el = el.parentElement;
|
|
6695
|
+
}
|
|
6696
|
+
}
|
|
6697
|
+
function getClosableElementMeasurements(fixedEl, closableEl) {
|
|
6698
|
+
const parent = findParentWithHiddenOverflow(fixedEl);
|
|
6699
|
+
// if parent is not found, measurements are checked against the viewport
|
|
6700
|
+
return {
|
|
6701
|
+
closableElHeight: closableEl.clientHeight,
|
|
6702
|
+
closableElWidth: closableEl.clientWidth,
|
|
6703
|
+
// NB boundingClientRect.bottom is space from top of viewport to bottom of el
|
|
6704
|
+
// to get space below the el -> height of viewport minus boundingClientRect.bottom
|
|
6705
|
+
spaceAbove: parent
|
|
6706
|
+
? fixedEl.getBoundingClientRect().top - parent.getBoundingClientRect().top
|
|
6707
|
+
: fixedEl.getBoundingClientRect().top,
|
|
6708
|
+
// NB boundingClientRect.bottom is space from top of viewport to bottom of el
|
|
6709
|
+
// to get space below the el -> height of viewport minus boundingClientRect.bottom
|
|
6710
|
+
spaceBelow: parent
|
|
6711
|
+
? parent.getBoundingClientRect().bottom - fixedEl.getBoundingClientRect().bottom
|
|
6712
|
+
: document.documentElement.clientHeight - fixedEl.getBoundingClientRect().bottom,
|
|
6713
|
+
spaceLeft: parent
|
|
6714
|
+
? fixedEl.getBoundingClientRect().left - parent.getBoundingClientRect().left
|
|
6715
|
+
: fixedEl.getBoundingClientRect().left,
|
|
6716
|
+
spaceRight: parent
|
|
6717
|
+
? parent.getBoundingClientRect().right - fixedEl.getBoundingClientRect().right
|
|
6718
|
+
: document.documentElement.clientWidth - fixedEl.getBoundingClientRect().right,
|
|
6719
|
+
};
|
|
6720
|
+
}
|
|
6721
|
+
function shouldOpenUp(fixedEl, //the element visible on the page when the component is closed
|
|
6722
|
+
closableEl, //the dropdown/popup/etc that becomes visible when the component is open
|
|
6723
|
+
offsetAbove = 0, // if closableEl covers a part of fixedEl, that part should be offset
|
|
6724
|
+
offsetBelow = 0 // if closableEl covers a part of fixedEl, that part should be offset
|
|
6725
|
+
) {
|
|
6726
|
+
const { closableElHeight, spaceAbove, spaceBelow } = getClosableElementMeasurements(fixedEl, closableEl);
|
|
6727
|
+
//we want to open up only if there's not enough space below AND there is enough space above
|
|
6728
|
+
const openUp = closableElHeight > spaceBelow + offsetBelow && closableElHeight <= spaceAbove + offsetAbove;
|
|
6729
|
+
return openUp;
|
|
6730
|
+
}
|
|
6731
|
+
function shouldOpenDown(fixedEl, //the element visible on the page when the component is closed
|
|
6732
|
+
closableEl, //the dropdown/popup/etc that becomes visible when the component is open
|
|
6733
|
+
offsetAbove = 0, // if closableEl covers a part of fixedEl, that part should be offset
|
|
6734
|
+
offsetBelow = 0 // if closableEl covers a part of fixedEl, that part should be offset
|
|
6735
|
+
) {
|
|
6736
|
+
const { closableElHeight, spaceAbove, spaceBelow } = getClosableElementMeasurements(fixedEl, closableEl);
|
|
6737
|
+
//we want to open up only if there's not enough space below AND there is enough space above
|
|
6738
|
+
const openDown = closableElHeight > spaceAbove + offsetAbove && closableElHeight <= spaceBelow + offsetBelow;
|
|
6739
|
+
return openDown;
|
|
6740
|
+
}
|
|
6741
|
+
function shouldShiftRight(fixedEl, closableEl) {
|
|
6742
|
+
const { closableElWidth, spaceLeft, spaceRight } = getClosableElementMeasurements(fixedEl, closableEl);
|
|
6743
|
+
const needsSpaceLeft = closableElWidth > spaceLeft && spaceRight > spaceLeft;
|
|
6744
|
+
return needsSpaceLeft;
|
|
6745
|
+
}
|
|
6746
|
+
function shouldShiftLeft(fixedEl, closableEl) {
|
|
6747
|
+
const { closableElWidth, spaceLeft, spaceRight } = getClosableElementMeasurements(fixedEl, closableEl);
|
|
6748
|
+
const needsSpaceRight = closableElWidth > spaceRight && spaceLeft > spaceRight;
|
|
6749
|
+
return needsSpaceRight;
|
|
6750
|
+
}
|
|
6751
|
+
function adjustTooltipPosition(tPos, el, tooltipEl) {
|
|
6752
|
+
// position must be reset before measurements are taken in adjustTooltipPosition
|
|
6753
|
+
// otherwise text-wrapping from previous position makes width measurement inconsistent
|
|
6754
|
+
tooltipEl.style.top = "";
|
|
6755
|
+
tooltipEl.style.left = "";
|
|
6756
|
+
const { spaceLeft, spaceRight, spaceBelow, spaceAbove } = getClosableElementMeasurements(el, tooltipEl);
|
|
6757
|
+
const tooltipWidth = tooltipEl.getBoundingClientRect().width;
|
|
6758
|
+
const tooltipHeight = tooltipEl.getBoundingClientRect().height;
|
|
6759
|
+
const enoughSpaceAbove = spaceAbove > tooltipHeight;
|
|
6760
|
+
const enoughSpaceBelow = spaceBelow > tooltipHeight;
|
|
6761
|
+
// a tooltip should never be closer than 24px to the edge of a screen
|
|
6762
|
+
const enoughSpaceLeft = spaceLeft - 24 > tooltipWidth;
|
|
6763
|
+
const enoughSpaceRight = spaceRight - 24 > tooltipWidth;
|
|
6764
|
+
const swapAbove = (position) => {
|
|
6765
|
+
return !enoughSpaceAbove ? position.replace("top", "bottom") : position;
|
|
6766
|
+
};
|
|
6767
|
+
const swapBelow = (position) => {
|
|
6768
|
+
return !enoughSpaceBelow && enoughSpaceAbove ? position.replace("bottom", "top") : position;
|
|
6769
|
+
};
|
|
6770
|
+
const swapLeft = (position, centeredPosition) => {
|
|
6771
|
+
if (!enoughSpaceLeft && enoughSpaceRight) {
|
|
6772
|
+
position = position.replace("left", "right");
|
|
6773
|
+
}
|
|
6774
|
+
else if (!enoughSpaceLeft && !enoughSpaceRight) {
|
|
6775
|
+
position = centeredPosition;
|
|
6776
|
+
}
|
|
6777
|
+
return position;
|
|
6778
|
+
};
|
|
6779
|
+
const swapRight = (position, centeredPosition) => {
|
|
6780
|
+
if (!enoughSpaceRight && enoughSpaceLeft) {
|
|
6781
|
+
position = position.replace("right", "left");
|
|
6782
|
+
}
|
|
6783
|
+
else if (!enoughSpaceRight && !enoughSpaceLeft) {
|
|
6784
|
+
position = centeredPosition;
|
|
6785
|
+
}
|
|
6786
|
+
return position;
|
|
6787
|
+
};
|
|
6788
|
+
// horizontal checks must occur before vertical checks, because horizontal can affect vertical positioning but not vice versa
|
|
6789
|
+
switch (tPos) {
|
|
6790
|
+
case "left":
|
|
6791
|
+
tPos = swapLeft(tPos, "bottom");
|
|
6792
|
+
case "right":
|
|
6793
|
+
tPos = swapRight(tPos, "bottom");
|
|
6794
|
+
case "top-left":
|
|
6795
|
+
tPos = swapLeft(tPos, "top");
|
|
6796
|
+
tPos = swapAbove(tPos);
|
|
6797
|
+
case "top-right":
|
|
6798
|
+
tPos = swapRight(tPos, "top");
|
|
6799
|
+
tPos = swapAbove(tPos);
|
|
6800
|
+
case "bottom-left":
|
|
6801
|
+
tPos = swapLeft(tPos, "bottom");
|
|
6802
|
+
tPos = swapBelow(tPos);
|
|
6803
|
+
case "bottom-right":
|
|
6804
|
+
tPos = swapRight(tPos, "bottom");
|
|
6805
|
+
tPos = swapBelow(tPos);
|
|
6806
|
+
case "top":
|
|
6807
|
+
tPos = swapAbove(tPos);
|
|
6808
|
+
case "bottom":
|
|
6809
|
+
tPos = swapBelow(tPos);
|
|
6810
|
+
}
|
|
6811
|
+
return tPos;
|
|
6812
|
+
}
|
|
6813
|
+
function hasRoomRight(x, spaceNeeded) {
|
|
6814
|
+
let horizOffset = 0;
|
|
6815
|
+
// if (getTextDir() === "ltr") {
|
|
6816
|
+
if (x.type === "click") {
|
|
6817
|
+
// if it's a mouse event, deal with mouse coords
|
|
6818
|
+
horizOffset = x.clientX;
|
|
6819
|
+
// if it's a focus event, the offset is 0
|
|
6820
|
+
}
|
|
6821
|
+
else if (x.type === "focus") {
|
|
6822
|
+
horizOffset = 0;
|
|
6823
|
+
}
|
|
6824
|
+
else {
|
|
6825
|
+
// otherwise an element was passed, calculate how far it is from the edge of the window
|
|
6826
|
+
let el = x; // re-assignment is for clarity
|
|
6827
|
+
while (el) {
|
|
6828
|
+
if (el.tagName == "BODY") {
|
|
6829
|
+
// deal with browser quirks with body/window/document and page scroll
|
|
6830
|
+
var xScroll = el.scrollLeft || document.documentElement.scrollLeft;
|
|
6831
|
+
horizOffset += el.offsetLeft - xScroll + el.clientLeft;
|
|
6832
|
+
}
|
|
6833
|
+
else {
|
|
6834
|
+
// for all other non-BODY elements
|
|
6835
|
+
horizOffset += el.offsetLeft - el.scrollLeft + el.clientLeft;
|
|
6836
|
+
}
|
|
6837
|
+
el = el.offsetParent;
|
|
6838
|
+
}
|
|
6839
|
+
// }
|
|
6840
|
+
}
|
|
6841
|
+
return window.innerWidth - horizOffset >= spaceNeeded;
|
|
6842
|
+
}
|
|
6843
|
+
function checkForActiveElInShadow(element) {
|
|
6844
|
+
while (element && element.shadowRoot) {
|
|
6845
|
+
element = element.shadowRoot.activeElement;
|
|
6846
|
+
}
|
|
6847
|
+
return element;
|
|
6848
|
+
}
|
|
6849
|
+
function checkForFocusableElInShadow(element) {
|
|
6850
|
+
const selectors = [
|
|
6851
|
+
"button",
|
|
6852
|
+
"a",
|
|
6853
|
+
"input",
|
|
6854
|
+
"select",
|
|
6855
|
+
"textarea",
|
|
6856
|
+
"wm-button",
|
|
6857
|
+
"wm-search",
|
|
6858
|
+
"wm-select",
|
|
6859
|
+
"wm-action-menu",
|
|
6860
|
+
"wm-tab-item",
|
|
6861
|
+
"wm-datepicker",
|
|
6862
|
+
];
|
|
6863
|
+
let focusableEl = element;
|
|
6864
|
+
selectors.forEach((selector) => {
|
|
6865
|
+
if (focusableEl && focusableEl.shadowRoot) {
|
|
6866
|
+
let elInShadow = focusableEl.shadowRoot.querySelector(selector);
|
|
6867
|
+
if (elInShadow) {
|
|
6868
|
+
if (selector.startsWith("wm-")) {
|
|
6869
|
+
focusableEl = checkForFocusableElInShadow(elInShadow);
|
|
6870
|
+
}
|
|
6871
|
+
else {
|
|
6872
|
+
focusableEl = elInShadow;
|
|
6873
|
+
}
|
|
6874
|
+
}
|
|
6875
|
+
}
|
|
6876
|
+
});
|
|
6877
|
+
return focusableEl;
|
|
6878
|
+
}
|
|
6879
|
+
function isFocusable(element) {
|
|
6880
|
+
if (element.tabIndex > 0 || (element.tabIndex === 0 && element.getAttribute("tabIndex") !== null)) {
|
|
6881
|
+
return true;
|
|
6882
|
+
}
|
|
6883
|
+
if (element.disabled) {
|
|
6884
|
+
return false;
|
|
6885
|
+
}
|
|
6886
|
+
switch (element.nodeName) {
|
|
6887
|
+
case "A":
|
|
6888
|
+
return !!element.href && element.rel != "ignore";
|
|
6889
|
+
case "INPUT":
|
|
6890
|
+
return element.type != "hidden" && element.type != "file";
|
|
6891
|
+
case "BUTTON":
|
|
6892
|
+
case "SELECT":
|
|
6893
|
+
case "TEXTAREA":
|
|
6894
|
+
case "WM-BUTTON":
|
|
6895
|
+
case "WM-SELECT":
|
|
6896
|
+
case "WM-ACTION-MENU":
|
|
6897
|
+
case "WM-DATEPICKER":
|
|
6898
|
+
case "WM-TIMEPICKER":
|
|
6899
|
+
case "WM-INPUT":
|
|
6900
|
+
case "WM-TAG-INPUT":
|
|
6901
|
+
case "WM-TAB-ITEM":
|
|
6902
|
+
case "WM-SEARCH":
|
|
6903
|
+
return true;
|
|
6904
|
+
default:
|
|
6905
|
+
return false;
|
|
6906
|
+
}
|
|
6907
|
+
}
|
|
6908
|
+
function getFirstFocusableDescendant(element) {
|
|
6909
|
+
if (isFocusable(element)) {
|
|
6910
|
+
return checkForFocusableElInShadow(element);
|
|
6911
|
+
}
|
|
6912
|
+
else if (element.childNodes.length > 0) {
|
|
6913
|
+
element.childNodes.forEach((i) => {
|
|
6914
|
+
const childEl = getFirstFocusableDescendant(i);
|
|
6915
|
+
return childEl && checkForFocusableElInShadow(childEl);
|
|
6916
|
+
});
|
|
6917
|
+
}
|
|
6918
|
+
}
|
|
6919
|
+
function hasValidType(file, types) {
|
|
6920
|
+
const acceptedExtensions = types.split(" ");
|
|
6921
|
+
const parts = file.name && file.name.split(".");
|
|
6922
|
+
const ext = parts && parts.length > 1 && parts[parts.length - 1];
|
|
6923
|
+
return ext
|
|
6924
|
+
? acceptedExtensions.includes(ext.toLowerCase())
|
|
6925
|
+
: // fallback: if we couldn't obtain an extension,
|
|
6926
|
+
// validate based on MIME type...
|
|
6927
|
+
!!file.type
|
|
6928
|
+
? getAcceptedMimeTypesList(acceptedExtensions).includes(file.type)
|
|
6929
|
+
: // ...and if that failed too, accept the file
|
|
6930
|
+
// as it's preferable to accept an invalid file
|
|
6931
|
+
// than refusing a valid one (back-end will take care of what slips through)
|
|
6932
|
+
true;
|
|
6933
|
+
}
|
|
6934
|
+
// takes a string (space separated list of extensions), returns an array of strings (corresponding MIME types)
|
|
6935
|
+
function getAcceptedMimeTypesList(acceptedExtensions) {
|
|
6936
|
+
// this is just a list of common file types (regardless of whether they are/can be valid or not)
|
|
6937
|
+
// front end checks are just a convenience to users, independent of security.
|
|
6938
|
+
// it allows users to be notified of an invalid type as soon as they select the file, rather than when it gets uploaded
|
|
6939
|
+
const lookupTable = {
|
|
6940
|
+
aac: ["audio/aac"],
|
|
6941
|
+
abw: ["application/x-abiword"],
|
|
6942
|
+
arc: ["application/x-freearc"],
|
|
6943
|
+
avi: ["video/x-msvideo"],
|
|
6944
|
+
azw: ["application/vnd.amazon.ebook"],
|
|
6945
|
+
bin: ["application/octet-stream"],
|
|
6946
|
+
bmp: ["image/bmp"],
|
|
6947
|
+
bz: ["application/x-bzip"],
|
|
6948
|
+
bz2: ["application/x-bzip2"],
|
|
6949
|
+
csh: ["application/x-csh"],
|
|
6950
|
+
css: ["text/css"],
|
|
6951
|
+
csv: ["text/csv"],
|
|
6952
|
+
doc: ["application/msword"],
|
|
6953
|
+
docx: ["application/vnd.openxmlformats-officedocument.wordprocessingml.document"],
|
|
6954
|
+
eot: ["application/vnd.ms-fontobject"],
|
|
6955
|
+
epub: ["application/epub+zip"],
|
|
6956
|
+
gz: ["application/gzip"],
|
|
6957
|
+
gif: ["image/gif"],
|
|
6958
|
+
htm: ["text/html"],
|
|
6959
|
+
html: ["text/html"],
|
|
6960
|
+
ico: ["image/vnd.microsoft.icon"],
|
|
6961
|
+
ics: ["text/calendar"],
|
|
6962
|
+
jar: ["application/java-archive"],
|
|
6963
|
+
jpeg: ["image/jpeg"],
|
|
6964
|
+
jpg: ["image/jpeg"],
|
|
6965
|
+
js: ["text/javascript"],
|
|
6966
|
+
json: ["application/json"],
|
|
6967
|
+
jsonld: ["application/ld+json"],
|
|
6968
|
+
log: ["text/plain"],
|
|
6969
|
+
mid: ["audio/x-midi"],
|
|
6970
|
+
midi: ["audio/x-midi"],
|
|
6971
|
+
mjs: ["text/javascript"],
|
|
6972
|
+
mp3: ["audio/mpeg"],
|
|
6973
|
+
mpeg: ["video/mpeg"],
|
|
6974
|
+
mpkg: ["application/vnd.apple.installer+xml"],
|
|
6975
|
+
odp: ["application/vnd.oasis.opendocument.presentation"],
|
|
6976
|
+
ods: ["application/vnd.oasis.opendocument.spreadsheet"],
|
|
6977
|
+
odt: ["application/vnd.oasis.opendocument.text"],
|
|
6978
|
+
oga: ["audio/ogg"],
|
|
6979
|
+
ogv: ["video/ogg"],
|
|
6980
|
+
ogx: ["application/ogg"],
|
|
6981
|
+
opus: ["audio/opus"],
|
|
6982
|
+
otf: ["font/otf"],
|
|
6983
|
+
png: ["image/png"],
|
|
6984
|
+
pdf: ["application/pdf"],
|
|
6985
|
+
php: ["application/php"],
|
|
6986
|
+
ppt: ["application/vnd.ms-powerpoint"],
|
|
6987
|
+
pptx: ["application/vnd.openxmlformats-officedocument.presentationml.presentation"],
|
|
6988
|
+
rar: ["application/vnd.rar", "application/x-rar", "application/x-rar-compressed"],
|
|
6989
|
+
rtf: ["application/rtf"],
|
|
6990
|
+
sh: ["application/x-sh"],
|
|
6991
|
+
svg: ["image/svg+xml"],
|
|
6992
|
+
swf: ["application/x-shockwave-flash"],
|
|
6993
|
+
tar: ["application/x-tar"],
|
|
6994
|
+
tif: ["image/tiff"],
|
|
6995
|
+
tiff: ["image/tiff"],
|
|
6996
|
+
ts: ["video/mp2t"],
|
|
6997
|
+
ttf: ["font/ttf"],
|
|
6998
|
+
txt: ["text/plain"],
|
|
6999
|
+
vsd: ["application/vnd.visio"],
|
|
7000
|
+
wav: ["audio/wav"],
|
|
7001
|
+
weba: ["audio/webm"],
|
|
7002
|
+
webm: ["video/webm"],
|
|
7003
|
+
webp: ["image/webp"],
|
|
7004
|
+
woff: ["font/woff"],
|
|
7005
|
+
woff2: ["font/woff2"],
|
|
7006
|
+
xhtml: ["application/xhtml+xml"],
|
|
7007
|
+
xls: ["application/vnd.ms-excel"],
|
|
7008
|
+
xlsx: ["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
|
|
7009
|
+
xml: ["application/xml", "text/xml"],
|
|
7010
|
+
xul: ["application/vnd.mozilla.xul+xml"],
|
|
7011
|
+
zip: ["application/zip", "application/x-zip-compressed", "multipart/x-zip"],
|
|
7012
|
+
"3gp": ["video/3gpp", "audio/3gpp"],
|
|
7013
|
+
"3g2": ["video/3gpp2", "audio/3gpp2"],
|
|
7014
|
+
"7z": ["application/x-7z-compressed"],
|
|
7015
|
+
};
|
|
7016
|
+
return acceptedExtensions.reduce((acc, ext) => acc.concat(lookupTable[ext]), []);
|
|
7017
|
+
}
|
|
7018
|
+
function snakeCaseToCamelCase(str) {
|
|
7019
|
+
const snakeCaseRegexp = /^([a-z0-9]*)(_[a-z0-9]*)*$/g;
|
|
7020
|
+
if (snakeCaseRegexp.test(str)) {
|
|
7021
|
+
let camelCase = "";
|
|
7022
|
+
let arr = str.split("_");
|
|
7023
|
+
arr.forEach((word, idx) => {
|
|
7024
|
+
camelCase += idx === 0 ? word.toLowerCase() : word.charAt(0).toUpperCase() + word.slice(1);
|
|
7025
|
+
});
|
|
7026
|
+
return camelCase;
|
|
7027
|
+
}
|
|
7028
|
+
else {
|
|
7029
|
+
return str;
|
|
7030
|
+
}
|
|
7031
|
+
}
|
|
7032
|
+
function getNewIndexToFocus(currentIndex, direction, listLength) {
|
|
7033
|
+
let newIndex = currentIndex;
|
|
7034
|
+
if (direction === "ArrowDown") {
|
|
7035
|
+
newIndex = (currentIndex + 1) % listLength;
|
|
7036
|
+
}
|
|
7037
|
+
if (direction === "ArrowUp") {
|
|
7038
|
+
newIndex = currentIndex === 0 ? listLength - 1 : currentIndex - 1;
|
|
7039
|
+
}
|
|
7040
|
+
return newIndex;
|
|
7041
|
+
}
|
|
7042
|
+
function isRelatedTarget(ev, id) {
|
|
7043
|
+
// used for onBlur events to check the element that has been clicked
|
|
7044
|
+
const ids = id.split(" ");
|
|
7045
|
+
return ev.relatedTarget && ids.includes(ev.relatedTarget.id);
|
|
7046
|
+
}
|
|
7047
|
+
function toBool(val) {
|
|
7048
|
+
// string "false" needs to be treated as bool False because react wrappers convert bool to string.
|
|
7049
|
+
return val == "false" ? false : !!val;
|
|
7050
|
+
}
|
|
7051
|
+
/*
|
|
7052
|
+
* this is going to be needed to solve the extra tabbing on navigator
|
|
7053
|
+
* and for programmatic focus of tabs
|
|
7054
|
+
* Here's a draft, not bug proof, see:
|
|
7055
|
+
* https://stackoverflow.com/a/10730308/3741713
|
|
7056
|
+
|
|
7057
|
+
function getKeyboardFocusableElements(element = document) {
|
|
7058
|
+
const els = Array.from(element.querySelectorAll('a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), wm-search, wm-timepicker, wm-tab-list, wm-tab-item, wm-button, wm-action-menu'));
|
|
7059
|
+
return els.filter((el: Element) => !el.hasAttribute("disabled")) as HTMLElement[];
|
|
7060
|
+
}
|
|
7061
|
+
|
|
7062
|
+
export function getPreviousKeyboardFocusableElement(element: HTMLElement) {
|
|
7063
|
+
const els = getKeyboardFocusableElements();
|
|
7064
|
+
const current = els.indexOf(element);
|
|
7065
|
+
return els[current - 1] as HTMLElement;
|
|
7066
|
+
}
|
|
7067
|
+
|
|
7068
|
+
export function getNextKeyboardFocusableElement(element: HTMLElement) {
|
|
7069
|
+
const els = getKeyboardFocusableElements();
|
|
7070
|
+
const current = els.indexOf(element);
|
|
7071
|
+
return els[current + 1] as HTMLElement;
|
|
7072
|
+
}
|
|
7076
7073
|
*/
|
|
7077
7074
|
|
|
7078
|
-
export { adjustTooltipPosition as a, getPosition as b, checkForActiveElInShadow as c, debounce as d, isRelatedTarget as e, findParentWithScrollbar as f, generateId as g, checkForFocusableElInShadow as h, intl as i, getFirstFocusableDescendant as j, getNewIndexToFocus as k, shouldOpenUp as l, shouldOpenDown as m, shouldShiftRight as n, shouldShiftLeft as o, hasValidType as p, getTextDir as q,
|
|
7075
|
+
export { adjustTooltipPosition as a, getPosition as b, checkForActiveElInShadow as c, debounce as d, isRelatedTarget as e, findParentWithScrollbar as f, generateId as g, checkForFocusableElInShadow as h, intl as i, getFirstFocusableDescendant as j, getNewIndexToFocus as k, shouldOpenUp as l, shouldOpenDown as m, shouldShiftRight as n, shouldShiftLeft as o, hasValidType as p, getTextDir as q, throttle as r, snakeCaseToCamelCase as s, toBool as t, hasRoomRight as u };
|