@bigbinary/neeto-commons-frontend 2.0.58 → 2.0.60
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/configs/scripts/jsdoc-builder/constants.mjs +42 -0
- package/configs/scripts/jsdoc-builder/index.mjs +67 -0
- package/configs/scripts/jsdoc-builder/utils.mjs +218 -0
- package/configs/webpack/index.js +1 -0
- package/cypress-utils.d.ts +99 -103
- package/initializers.d.ts +20 -9
- package/package.json +8 -4
- package/pure.d.ts +1895 -270
- package/react-utils.cjs.js +1 -1
- package/react-utils.d.ts +297 -116
- package/react-utils.js +1 -1
- package/utils.d.ts +263 -48
package/react-utils.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("react"),e=require("@honeybadger-io/react"),t=require("@bigbinary/neetoui"),o=require("ramda"),l=require("react-i18next"),r=require("@bigbinary/neeto-molecules/ErrorPage"),c=require("react-router-dom"),i=require("axios"),a=require("react-helmet");function u(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}function s(n){if(n&&n.__esModule)return n;var e=Object.create(null);return n&&Object.keys(n).forEach((function(t){if("default"!==t){var o=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,o.get?o:{enumerable:!0,get:function(){return n[t]}})}})),e.default=n,Object.freeze(e)}var m,d,f,p,b,h,v=s(n),y=u(n),g=u(r),_=u(i);function w(){return w=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o])}return n},w.apply(this,arguments)}var x=function(n){return v.createElement("svg",w({width:230,height:230,viewBox:"0 0 317 320",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),m||(m=v.createElement("path",{d:"M271.071 28.008c-8.563-12.544-25.317-10.81-38.577-10.717-30.899.206-159.103.047-168.105.497-13.866.713-27.79 6.33-30.041 20.132-1.216 7.456-.14 15.427.139 22.94 1.118 30.417 1.953 68.044 5.7 95.148 1.016 7.372 2.35 14.761 6.936 20.853 7.238 9.618 21.581 12.998 33.616 13.2.141.236 110.261 2.828 150.068-.154 11.579-.87 25.682-1.74 33.488-11.652 3.913-4.971 4.246-12.136 5.028-18.171 2.816-21.653 4.695-58.296 7.156-97.59.703-11.222 1.25-24.736-5.408-34.486Zm3.044 27.34c-.082 4.493-3.429 57.629-3.648 60.853-.746 10.901-3.144 45.195-6.244 55.905-3.064 10.571-16.833 13.173-26.189 14.167-7.926.857-15.906 1.35-23.877 1.608-40.911 1.322-129.772 1.044-133.332.949-14.415-.663-30.588-4.888-36.021-19.843a81.026 81.026 0 0 1-3.298-20.918c-2.712-32.616-2.294-42.461-4.372-92.667-.293-7.188-1.76-15.638 1.536-22.356C45.898 18.356 67.727 20.417 81.1 20.27c15.73-.172 149.231-.271 157.495-.338 7.347-.06 15.278-.433 22.12 2.756 12.343 5.744 13.613 20.671 13.399 32.649v.01Z",fill:"#2F3941"})),d||(d=v.createElement("path",{d:"M220.642 50.4a1.586 1.586 0 0 0-.415-1.21 1.607 1.607 0 0 0-1.177-.52c-35.537-.183-99.035-.669-135.303-.466a1.056 1.056 0 0 0-.76.238 1.044 1.044 0 0 0-.373.699c-.43 34.284-.24 68.58-.24 102.862 0 1.636.685 2.122 1.643 2.162 45.113 2.049 92.2.763 137.476.91a2.342 2.342 0 0 0 1.518-.675c.405-.403.648-.94.68-1.509-.443-33.909-1.227-68.635-3.049-102.49Zm-2.277.78c1.187 24.763 1.712 49.901 2.264 74.806-45.853 1.664-90.202.658-135.787.522 0-24.642-.313-50.868 0-76.093 43.482.375 89.992.537 133.523.764ZM91.463 151.855l16.27-22.423 18.964.294c-3.709 5.108-12.138 17.321-14.959 22.512-6.749-.114-20.275-.383-20.275-.383Zm42.769.671 15.24-22.699c6.347 0 12.699-.04 19.055-.12-3.627 6.705-10.492 16.8-14.739 22.976-6.51-.007-13.028-.059-19.556-.157Zm42.469.228c5.503-8.232 10.238-15.419 16.186-23.434 6.993-.163 13.993-.365 20.998-.605-4.761 6.22-12.597 17.04-15.361 23.986-7.274.037-14.548.054-21.823.053Z",fill:"#2F3941"})),f||(f=v.createElement("path",{d:"M153.904 69.903c-3.722-.185-22.748 30.824-20.049 34.788 2.493 3.664 37.821 2.965 39.914 0 2.39-3.436-16.031-34.596-19.865-34.788Zm.745 10.224c.19 2.645.576 11.328.205 13.546-.27 1.633-1.778.747-1.796-.113-.065-4.437-.177-8.883-.27-13.32a.957.957 0 0 1 .224-.699.925.925 0 0 1 1.551.221.973.973 0 0 1 .086.365Zm.707 18.984c-.727 2.011-2.791 1.389-2.791-.259-.057-3.119 3.572-1.901 2.791.26v-.001ZM155.392 199.891c1.926 4.35 9.139 2.15 6.621-3.658a3.653 3.653 0 0 0-2.338-2.083 3.669 3.669 0 0 0-3.092.487c-1.534 1.051-2.876 3.875-1.144 5.376a.499.499 0 0 0 .85-.353c.107-1.148-.119-2.371.838-3.231a2.288 2.288 0 0 1 3.549.378 2.661 2.661 0 0 1-.467 3.601 3.032 3.032 0 0 1-4.019-.994c-.313-.517-1.037-.06-.798.477ZM145.571 226.664c3.876.66 7.809.928 11.739.798 4.292.127 8.604.273 12.894.248a1.103 1.103 0 0 0 0-2.204c-4.29-.174-8.602-.186-12.894-.206a57.817 57.817 0 0 0-11.739.39.508.508 0 0 0 0 .974Z",fill:"#2F3941"})),p||(p=v.createElement("path",{d:"M290.099 17.651a26.343 26.343 0 0 0-14.443-13.727c-8.184-3.209-17.301-2.702-25.923-2.622-36.725.338-187.491.226-197.868.656a46.93 46.93 0 0 0-23.035 6.39c-15.658 9.89-12.084 26.386-11.458 44.885 1.203 35.566 2.12 79.713 6.107 111.322 1.049 8.324 2.204 16.755 6.676 24.05 7.983 13.016 24.148 17.93 39.357 17.867.586 0 34.396.811 73.168 1.099.06 2.045.465 4.305.694 6.462-.845-.102-23.612.467-30.303 1.419a.956.956 0 0 0-.771.893.982.982 0 0 0 .07.415c-3.429 2.898-6.462 6.492-9.588 9.661-3.848 3.879-7.906 7.645-11.5 11.758a.822.822 0 0 0 1.163 1.163c4.026-3.696 7.685-7.846 11.473-11.786 3.151-3.283 6.762-6.462 9.603-10.051a284.168 284.168 0 0 1 30.012-1.086c.02 1.633-.067 3.567 1.553 4.394.249.132.684.04.731-.3.119-2.158.03-4.322-.266-6.463a20.308 20.308 0 0 0-1.205-6.462c9.037.065 18.32.097 27.494.082a22.04 22.04 0 0 0-.498 11.488.589.589 0 0 0 .558.411.583.583 0 0 0 .558-.411c.323-1.081.516-2.196.575-3.323 5.085.679 9.298.204 22.997 1.059 2.081.132 5.048.161 6.8.151a49.891 49.891 0 0 0 9.03 9.507 126.265 126.265 0 0 0 10.551 9.276c.89.671 1.988-.798 1.188-1.541-3.547-3.244-7.275-6.278-10.814-9.542a93.19 93.19 0 0 0-8.62-8.122.687.687 0 0 0-.296-.8 16.466 16.466 0 0 0-6.571-1.034 303.46 303.46 0 0 0-8.896-.433 119.194 119.194 0 0 0-15.245-.532c.139-2.202.522-4.237.539-6.156 26.179-.057 51.28-.512 67.03-1.762 13.367-1.064 29.723-1.842 38.877-13.173 4.737-5.858 5.182-13.963 6.112-21.166 3.929-30.407 5.575-77.387 8.06-112.188.997-13.655 2.17-28.933-3.676-41.728Zm1.613 31.317c-.146 4.2-3.837 64.939-4.225 70.999-.84 12.757-3.594 52.564-7.069 65.039-3.355 12.052-18.191 15.578-28.953 16.886-9.22 1.123-18.553 1.715-27.836 2.028-47.201 1.6-152.146 1.016-154.02.947-17.12-.746-35.33-6.288-41.204-24.174-2.597-7.906-2.91-16.548-3.567-24.799-2.594-32.741-2.42-43.205-4.722-107.053-.313-8.463-1.814-17.863.596-26.12C26.38 3.355 51.897 4.623 67.642 4.416c18.621-.248 177.824-.437 187.33-.497 8.565-.045 17.791.174 25.046 5.349 12.02 8.565 12.159 26.432 11.694 39.692v.008ZM2.113 306.233c1.504-2.13 36.665-41.756 38.413-43.727a10.606 10.606 0 0 1 9.066-3.728c23.95-.139 47.907-.29 71.857.095 44.688.73 142.992-1.775 146.288-1.74 3.231.032 7.399-.711 9.864 1.66 2.352 2.264 26.674 35.343 35.177 44.204 1.322 1.374 3.407-.716 2.093-2.093-8.324-8.682-29.105-36.658-32.5-40.888a17.18 17.18 0 0 0-4.722-5.016c-4.243-2.115-53.46.465-74.499.942-24.904.57-18.499.127-150.918.092-5.858 0-10.004.249-13.864 5.043-4.439 5.52-35.989 42.114-37.403 44.477-.44.751.663 1.365 1.148.679ZM310.594 315.641c2.172-3.694 6.668-9.738 4.511-10.439-3.336-1.064-312.387 1.784-312.387 1.784s-5.946.154-.249 5.456c5.697 5.301 5.965 6.656 16.25 6.258 10.284-.397 262.609-1.203 269.642-1.091 7.034.112 20.856.37 22.233-1.968Z",fill:"#2F3941"})),b||(b=v.createElement("path",{d:"M34.938 281.227c-2.187 2.709-11.898 12.69-12.29 15.161a1.074 1.074 0 0 0 .471 1.163c1.328.85 41.622 0 50.602-.032 18.968-.08 153.463.745 156.865.79 2.603.032 4.444-.519 3.169-3.435-4.347-9.942-8.664-19.883-13.081-29.795-1.123-2.513-2.02-2.851-4.722-2.839 0 0-161.347 0-166.45-.059a.918.918 0 0 0-.874.921.92.92 0 0 0 .874.92c31.896.311 159.016-.087 167.966.445.724.045-.248-1.638 13.958 30.395.199.445.147 1.242-2.207 1.3-1.633.034-157.686-.624-193.429-.358-1.899 0-9.956.338-9.897-.14.2-1.6 12.619-14.798 23.217-31.038.365-.559-.497-1.016-.875-.512-.02-.007-8.443 11.098-13.297 17.113ZM238.084 290.689a39.103 39.103 0 0 0 3.124 6.895c.746 1.022 1.243 1.009 2.486 1.049 6.929.216 26.206-.664 45.483-.286 1.275.027 6.532.83 6.463-1.243-.102-3.042-9.343-13.789-22.084-33.67-1.454-2.272-2.08-2.411-4.956-2.284-4.702.199-32.4 1.195-41.541 1.491-1.216.04-1.223 1.934 0 1.894 47.176-1.491 43.545-1.605 43.833-1.422.93.592 1.862 2.879 2.458 3.793 1.33 2.021 17.513 26.115 18.981 28.222.878 1.256.02 1.183-1.739 1.149-1.989-.045-45.168.233-46.573.221-1.739-.022-2.589-3.415-3.3-4.931-9.112-19.476-10.563-22.476-13.054-26.54-.392-.638-1.409-.445-1.131.207 4.36 10.205 7.591 16.5 11.55 25.455ZM285.242 112.053v.445c0 .04.067.04.067 0 0-.147 0-.298.02-.445-.002-.047-.087-.052-.087 0ZM91.163 240.165s131.381-1.695 132.656-1.416c1.275.278-.313 8.776-4.226 8.751-3.912-.025-121.276.922-123.175.171-1.9-.75-7.28-7.478-5.255-7.506Z",fill:"#2F3941"})),h||(h=v.createElement("path",{d:"M45.82 293.676a.023.023 0 0 0 .014-.01.025.025 0 0 0 .005-.016.027.027 0 0 0-.019-.026.027.027 0 0 0-.014.042.023.023 0 0 0 .014.01ZM220.834 284.323c-2.237-.034-6-.062-10.973-.082-1.198-2.995.522 1.459-4.325-10.759 4.354 0 7.692 0 9.735.025a.767.767 0 0 0 .545-.226.767.767 0 0 0 0-1.09.77.77 0 0 0-.545-.225c-2.09-.03-5.666-.057-10.376-.077-1.134-2.734-1.506-3.154-2.411-3.637a.552.552 0 0 0-.798.319c-.291.832-.328 1.339.355 3.308-8.714-.03-20.504-.047-33.677-.05a23.38 23.38 0 0 0-2.021-4.446.51.51 0 0 0-.566-.224.509.509 0 0 0-.383.472c.033 1.409.199 2.811.497 4.188-11.212 0-23.326 0-35.336.027a706.988 706.988 0 0 0-.186-3.171.582.582 0 0 0-1.161 0 442.255 442.255 0 0 0-.313 3.174c-12.514.017-24.854.045-35.902.079a6.379 6.379 0 0 0-.378-2.835c-.107-.266-.457-.443-.676-.187a6.309 6.309 0 0 0-1.322 3.03c-12.572.042-23.276.094-30.335.154a18.732 18.732 0 0 0 1.8-3.577c.372-1.061-1.22-2.03-1.954-1.128-1.223 1.511-2.374 3.112-3.495 4.742-2.634.03-4.386.062-5.067.095a.503.503 0 0 0-.357.861.503.503 0 0 0 .357.148c1.155.087 2.55.164 4.158.236-5.903 8.771-5.418 7.829-7.526 11.008-3.607.032-5.985.067-6.83.104a.503.503 0 0 0-.505.505.505.505 0 0 0 .505.504c1.39.1 3.4.184 5.94.249a48.466 48.466 0 0 0-3.343 6.094.431.431 0 0 0 .746.433c1.491-2.168 3.149-4.337 4.859-6.462 8.45.191 21.417.268 36.556.28a22.934 22.934 0 0 0-1.295 5.891c-.048.723.89.823 1.242.338a22.61 22.61 0 0 0 2.963-6.214c12.082 0 25.401-.03 38.835-.079a13.904 13.904 0 0 0 .698 6.238.857.857 0 0 0 .746.429.857.857 0 0 0 .746-.429 13.875 13.875 0 0 0 .952-6.251c13.227-.052 26.474-.116 38.666-.171a25.556 25.556 0 0 0 2.281 5.572.781.781 0 0 0 1.442-.392 24.472 24.472 0 0 0-.816-5.193c13.586-.062 25.705-.111 34.797-.114a27.226 27.226 0 0 0 3.362 6.462c.353.47 1.362.41 1.283-.345a25.886 25.886 0 0 0-1.554-6.119c4.439 0 7.974.022 10.37.059a.761.761 0 0 0 .543-.229.766.766 0 0 0 .222-.546.77.77 0 0 0-.775-.766Zm-170.101.139c3.142-3.859 6.303-7.563 8.562-10.853 7.58.248 18.36.358 30.772.4a97.23 97.23 0 0 1-3.278 10.287c-15.024.045-27.84.102-36.056.166Zm38.892-.173c2.341-7.884 2.585-7.954 3.072-10.273 11.167.028 23.527 0 35.999-.057-.562 6.246-.38 6.529-.691 10.247-13.287.02-26.457.048-38.38.083Zm41.303-.087c-.144-3.319.03-4.226-.263-10.253 12.178-.057 24.392-.142 35.668-.221.621 2.423-.107-.639 2.838 10.439-12.059.01-25.167.017-38.243.035Zm41.164-.023c-.072-.248-3.022-10.14-3.122-10.471 13.235-.094 25.019-.181 33.668-.216 1.941 5.087 1.325 3.139 4.136 10.737-9.003-.032-21.099-.047-34.682-.05ZM281.202 286.259c-1.339-.479-2.53-.671-8.326-.591a140.94 140.94 0 0 0-7.491-12.89 25.902 25.902 0 0 0 7.379-.656.778.778 0 0 0 .398-1.209.778.778 0 0 0-.398-.282c-2.98-.66-6.05-.813-9.081-.452a201.697 201.697 0 0 0-2.486-3.634.674.674 0 0 0-1.163.679l1.695 3.022c-4.143.151-10.849.437-15.243.636a24.566 24.566 0 0 0-3.679-4.576.437.437 0 0 0-.251-.114.444.444 0 0 0-.479.539 25.034 25.034 0 0 0 1.613 4.28 45.342 45.342 0 0 0-8.833.763.515.515 0 0 0-.365.489.511.511 0 0 0 .365.488c3.286.677 6.655.86 9.996.542 1.327 2.443 2.833 4.824 4.079 7.126 1.006 1.854 1.953 3.842 2.965 5.798a40.865 40.865 0 0 0-9.527.716.499.499 0 0 0-.405.488.496.496 0 0 0 .405.489c3.549.665 7.169.868 10.769.604a28.675 28.675 0 0 0 3.542 5.078c.37.412.962-.035.868-.498a23.462 23.462 0 0 0-1.452-4.583 1830.64 1830.64 0 0 0 15.658-.134 30.665 30.665 0 0 0 2.662 4.012c.378.497 1.283.248 1.076-.45a29.948 29.948 0 0 0-1.337-3.587 23.018 23.018 0 0 0 7.071-.599.775.775 0 0 0 .542-.756.78.78 0 0 0-.567-.738Zm-26.223-.126c-1.213-2.414-2.63-4.75-3.865-6.989-1.029-1.859-2.068-3.91-3.211-5.911 3.728-.082 8.656-.218 15.263-.4 3.599 6.462 5.696 10.337 7.091 12.882-3.291.047-6.51.157-15.278.408v.01Z",fill:"#2F3941"})))};function S(){var n="/home/runner/work/neeto-commons-frontend/neeto-commons-frontend/src/react-utils/components/HoneybadgerErrorBoundary.jsx",e=new Function("return this")(),t="__coverage__",o={path:"/home/runner/work/neeto-commons-frontend/neeto-commons-frontend/src/react-utils/components/HoneybadgerErrorBoundary.jsx",statementMap:{0:{start:{line:13,column:26},end:{line:76,column:1}},1:{start:{line:14,column:16},end:{line:14,column:32}},2:{start:{line:16,column:2},end:{line:24,column:9}},3:{start:{line:17,column:21},end:{line:20,column:5}},4:{start:{line:18,column:6},end:{line:18,column:33}},5:{start:{line:18,column:26},end:{line:18,column:33}},6:{start:{line:19,column:6},end:{line:19,column:53}},7:{start:{line:21,column:4},end:{line:21,column:50}},8:{start:{line:23,column:4},end:{line:23,column:66}},9:{start:{line:23,column:17},end:{line:23,column:65}},10:{start:{line:26,column:2},end:{line:75,column:4}},11:{start:{line:55,column:33},end:{line:55,column:57}},12:{start:{line:65,column:20},end:{line:65,column:71}},13:{start:{line:66,column:20},end:{line:66,column:67}},14:{start:{line:79,column:2},end:{line:79,column:65}},15:{start:{line:81,column:33},end:{line:109,column:1}},16:{start:{line:86,column:2},end:{line:90,column:5}},17:{start:{line:87,column:4},end:{line:87,column:64}},18:{start:{line:87,column:51},end:{line:87,column:64}},19:{start:{line:89,column:4},end:{line:89,column:34}},20:{start:{line:92,column:22},end:{line:101,column:4}},21:{start:{line:103,column:2},end:{line:108,column:4}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:13,column:26},end:{line:13,column:27}},loc:{start:{line:13,column:32},end:{line:76,column:1}},line:13},1:{name:"(anonymous_1)",decl:{start:{line:16,column:12},end:{line:16,column:13}},loc:{start:{line:16,column:18},end:{line:24,column:3}},line:16},2:{name:"(anonymous_2)",decl:{start:{line:17,column:21},end:{line:17,column:22}},loc:{start:{line:17,column:26},end:{line:20,column:5}},line:17},3:{name:"(anonymous_3)",decl:{start:{line:23,column:11},end:{line:23,column:12}},loc:{start:{line:23,column:17},end:{line:23,column:65}},line:23},4:{name:"(anonymous_4)",decl:{start:{line:55,column:27},end:{line:55,column:28}},loc:{start:{line:55,column:33},end:{line:55,column:57}},line:55},5:{name:"(anonymous_5)",decl:{start:{line:64,column:27},end:{line:64,column:28}},loc:{start:{line:64,column:33},end:{line:67,column:19}},line:64},6:{name:"(anonymous_6)",decl:{start:{line:81,column:33},end:{line:81,column:34}},loc:{start:{line:85,column:6},end:{line:109,column:1}},line:85},7:{name:"(anonymous_7)",decl:{start:{line:86,column:27},end:{line:86,column:28}},loc:{start:{line:86,column:37},end:{line:90,column:3}},line:86}},branchMap:{0:{loc:{start:{line:18,column:6},end:{line:18,column:33}},type:"if",locations:[{start:{line:18,column:6},end:{line:18,column:33}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:18},1:{loc:{start:{line:83,column:2},end:{line:83,column:36}},type:"default-arg",locations:[{start:{line:83,column:19},end:{line:83,column:36}}],line:83},2:{loc:{start:{line:84,column:2},end:{line:84,column:26}},type:"default-arg",locations:[{start:{line:84,column:17},end:{line:84,column:26}}],line:84},3:{loc:{start:{line:87,column:4},end:{line:87,column:64}},type:"if",locations:[{start:{line:87,column:4},end:{line:87,column:64}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:87}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},b:{0:[0,0],1:[0],2:[0],3:[0,0]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"a52872401f6b4ed196f717a9388dd6e619c5baa3"},l=e[t]||(e[t]={});l[n]&&"a52872401f6b4ed196f717a9388dd6e619c5baa3"===l[n].hash||(l[n]=o);var r=l[n];return S=function(){return r},r}S(),S().s[0]++;var E=function(){S().f[0]++;var e=(S().s[1]++,l.useTranslation()).t;return S().s[2]++,n.useEffect((function(){S().f[1]++,S().s[3]++;var n=function(n){var e;if(S().f[2]++,S().s[4]++,o.isNil(n.state))return S().b[0][0]++,void S().s[5]++;S().b[0][1]++,S().s[6]++,window.location.href=null===(e=n.target)||void 0===e?void 0:e.location.href};return S().s[7]++,window.addEventListener("popstate",n),S().s[8]++,function(){return S().f[3]++,S().s[9]++,window.removeEventListener("popstate",n)}}),[]),S().s[10]++,y.default.createElement("div",{className:"flex h-screen w-full flex-row items-start justify-start"},y.default.createElement("div",{className:"m-auto text-center"},y.default.createElement("div",{className:"m-auto mb-8 flex items-center justify-center"},y.default.createElement(x,null)),y.default.createElement(t.Typography,{className:"mb-4",component:"h2",style:"h2",weight:"semibold"},e("neetoCommons.fallbackComponent.somethingWentWrong")),y.default.createElement(t.Typography,{className:"mb-8 text-gray-600",component:"p",style:"body1",weight:"normal"},y.default.createElement(l.Trans,{i18nKey:"neetoCommons.fallbackComponent.description",components:{reloading:y.default.createElement(t.Button,{style:"link",label:e("neetoCommons.fallbackComponent.reloadingButtonLabel"),onClick:function(){return S().f[4]++,S().s[11]++,window.location.reload()}}),contactus:y.default.createElement(t.Button,{style:"link",label:e("neetoCommons.fallbackComponent.contactusButtonLabel"),onClick:function(){var n,e,t,o;S().f[5]++,S().s[12]++,null===(n=window.NeetoChat)||void 0===n||null===(e=n.contextualHelp)||void 0===e||e.maximizeWidget(),S().s[13]++,null===(t=window.NeetoChat)||void 0===t||null===(o=t.contextualHelp)||void 0===o||o.openWidget()}})}}))))},O=(S().s[14]++,/(window\.requestAnimationFrame|ResizeObserver|ChunkLoadError)/);S().s[15]++;function k(n,e){if(null==n)return{};var t,o,l=function(n,e){if(null==n)return{};var t,o,l={},r=Object.keys(n);for(o=0;o<r.length;o++)t=r[o],e.indexOf(t)>=0||(l[t]=n[t]);return l}(n,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);for(o=0;o<r.length;o++)t=r[o],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(l[t]=n[t])}return l}var M=["condition","redirectRoute","errorPage"];function j(){var n="/home/runner/work/neeto-commons-frontend/neeto-commons-frontend/src/react-utils/components/PrivateRoute.jsx",e=new Function("return this")(),t="__coverage__",o=e[t]||(e[t]={});o[n]&&"1f7d85c118e7435093f984165fe13fbc99005f2c"===o[n].hash||(o[n]={path:"/home/runner/work/neeto-commons-frontend/neeto-commons-frontend/src/react-utils/components/PrivateRoute.jsx",statementMap:{0:{start:{line:6,column:21},end:{line:19,column:3}},1:{start:{line:13,column:2},end:{line:19,column:3}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:6,column:21},end:{line:6,column:22}},loc:{start:{line:13,column:2},end:{line:19,column:3}},line:13}},branchMap:{0:{loc:{start:{line:7,column:2},end:{line:7,column:39}},type:"default-arg",locations:[{start:{line:7,column:14},end:{line:7,column:39}}],line:7},1:{loc:{start:{line:8,column:2},end:{line:8,column:27}},type:"default-arg",locations:[{start:{line:8,column:18},end:{line:8,column:27}}],line:8},2:{loc:{start:{line:9,column:2},end:{line:9,column:23}},type:"default-arg",locations:[{start:{line:9,column:14},end:{line:9,column:23}}],line:9},3:{loc:{start:{line:13,column:2},end:{line:19,column:3}},type:"cond-expr",locations:[{start:{line:14,column:4},end:{line:14,column:24}},{start:{line:15,column:6},end:{line:19,column:3}}],line:13},4:{loc:{start:{line:15,column:6},end:{line:19,column:3}},type:"cond-expr",locations:[{start:{line:16,column:4},end:{line:16,column:49}},{start:{line:18,column:4},end:{line:18,column:43}}],line:15},5:{loc:{start:{line:18,column:4},end:{line:18,column:43}},type:"binary-expr",locations:[{start:{line:18,column:4},end:{line:18,column:13}},{start:{line:18,column:17},end:{line:18,column:43}}],line:18}},s:{0:0,1:0},f:{0:0},b:{0:[0],1:[0],2:[0],3:[0,0],4:[0,0],5:[0,0]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"1f7d85c118e7435093f984165fe13fbc99005f2c"});var l=o[n];return j=function(){return l},l}j(),j().s[0]++;function P(){var n="/home/runner/work/neeto-commons-frontend/neeto-commons-frontend/src/react-utils/components/index.js",e=new Function("return this")(),t="__coverage__",o=e[t]||(e[t]={});o[n]&&"57d9e2a60e3ebad3a8731882df4a3e983bfd617a"===o[n].hash||(o[n]={path:"/home/runner/work/neeto-commons-frontend/neeto-commons-frontend/src/react-utils/components/index.js",statementMap:{},fnMap:{},branchMap:{},s:{},f:{},b:{},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"57d9e2a60e3ebad3a8731882df4a3e983bfd617a"});var l=o[n];return P=function(){return l},l}function C(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,o=new Array(e);t<e;t++)o[t]=n[t];return o}function L(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var t=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var o,l,r,c,i=[],a=!0,u=!1;try{if(r=(t=t.call(n)).next,0===e){if(Object(t)!==t)return;a=!1}else for(;!(a=(o=r.call(t)).done)&&(i.push(o.value),i.length!==e);a=!0);}catch(n){u=!0,l=n}finally{try{if(!a&&null!=t.return&&(c=t.return(),Object(c)!==c))return}finally{if(u)throw l}}return i}}(n,e)||function(n,e){if(n){if("string"==typeof n)return C(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?C(n,e):void 0}}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(){var n="/home/runner/work/neeto-commons-frontend/neeto-commons-frontend/src/react-utils/hooks/useDebounce.js",e=new Function("return this")(),t="__coverage__",o=e[t]||(e[t]={});o[n]&&"d75854d708b4bd66be795d67eea59e163c845113"===o[n].hash||(o[n]={path:"/home/runner/work/neeto-commons-frontend/neeto-commons-frontend/src/react-utils/hooks/useDebounce.js",statementMap:{0:{start:{line:3,column:20},end:{line:17,column:1}},1:{start:{line:4,column:46},end:{line:4,column:61}},2:{start:{line:6,column:2},end:{line:14,column:14}},3:{start:{line:7,column:20},end:{line:9,column:13}},4:{start:{line:8,column:6},end:{line:8,column:31}},5:{start:{line:11,column:4},end:{line:13,column:6}},6:{start:{line:12,column:6},end:{line:12,column:28}},7:{start:{line:16,column:2},end:{line:16,column:24}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:3,column:20},end:{line:3,column:21}},loc:{start:{line:3,column:44},end:{line:17,column:1}},line:3},1:{name:"(anonymous_1)",decl:{start:{line:6,column:12},end:{line:6,column:13}},loc:{start:{line:6,column:18},end:{line:14,column:3}},line:6},2:{name:"(anonymous_2)",decl:{start:{line:7,column:31},end:{line:7,column:32}},loc:{start:{line:7,column:37},end:{line:9,column:5}},line:7},3:{name:"(anonymous_3)",decl:{start:{line:11,column:11},end:{line:11,column:12}},loc:{start:{line:11,column:17},end:{line:13,column:5}},line:11}},branchMap:{0:{loc:{start:{line:3,column:28},end:{line:3,column:39}},type:"default-arg",locations:[{start:{line:3,column:36},end:{line:3,column:39}}],line:3}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},f:{0:0,1:0,2:0,3:0},b:{0:[0]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"d75854d708b4bd66be795d67eea59e163c845113"});var l=o[n];return A=function(){return l},l}P(),A(),A().s[0]++;const T=n=>{let e;const t=new Set,o=(n,o)=>{const l="function"==typeof n?n(e):n;if(!Object.is(l,e)){const n=e;e=(null!=o?o:"object"!=typeof l)?l:Object.assign({},e,l),t.forEach((t=>t(e,n)))}},l=()=>e,r={setState:o,getState:l,subscribe:n=>(t.add(n),()=>t.delete(n)),destroy:()=>{console.warn("[DEPRECATED] The destroy method will be unsupported in the future version. You should use unsubscribe function returned by subscribe. Everything will be garbage collected if store is garbage collected."),t.clear()}};return e=n(o,l,r),r};var B="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function F(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var R,I={exports:{}},N={},K={exports:{}},W={};var G,D,V,H={};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("react"),e=require("@honeybadger-io/react"),t=require("@bigbinary/neetoui"),o=require("ramda"),l=require("react-i18next"),r=require("@bigbinary/neeto-molecules/ErrorPage"),c=require("react-router-dom"),i=require("axios"),a=require("react-helmet");function u(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}function s(n){if(n&&n.__esModule)return n;var e=Object.create(null);return n&&Object.keys(n).forEach((function(t){if("default"!==t){var o=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,o.get?o:{enumerable:!0,get:function(){return n[t]}})}})),e.default=n,Object.freeze(e)}var m,d,f,p,b,h,v=s(n),y=u(n),g=u(r),_=u(i);function w(){return w=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o])}return n},w.apply(this,arguments)}var x=function(n){return v.createElement("svg",w({width:230,height:230,viewBox:"0 0 317 320",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img"},n),m||(m=v.createElement("path",{d:"M271.071 28.008c-8.563-12.544-25.317-10.81-38.577-10.717-30.899.206-159.103.047-168.105.497-13.866.713-27.79 6.33-30.041 20.132-1.216 7.456-.14 15.427.139 22.94 1.118 30.417 1.953 68.044 5.7 95.148 1.016 7.372 2.35 14.761 6.936 20.853 7.238 9.618 21.581 12.998 33.616 13.2.141.236 110.261 2.828 150.068-.154 11.579-.87 25.682-1.74 33.488-11.652 3.913-4.971 4.246-12.136 5.028-18.171 2.816-21.653 4.695-58.296 7.156-97.59.703-11.222 1.25-24.736-5.408-34.486Zm3.044 27.34c-.082 4.493-3.429 57.629-3.648 60.853-.746 10.901-3.144 45.195-6.244 55.905-3.064 10.571-16.833 13.173-26.189 14.167-7.926.857-15.906 1.35-23.877 1.608-40.911 1.322-129.772 1.044-133.332.949-14.415-.663-30.588-4.888-36.021-19.843a81.026 81.026 0 0 1-3.298-20.918c-2.712-32.616-2.294-42.461-4.372-92.667-.293-7.188-1.76-15.638 1.536-22.356C45.898 18.356 67.727 20.417 81.1 20.27c15.73-.172 149.231-.271 157.495-.338 7.347-.06 15.278-.433 22.12 2.756 12.343 5.744 13.613 20.671 13.399 32.649v.01Z",fill:"#2F3941"})),d||(d=v.createElement("path",{d:"M220.642 50.4a1.586 1.586 0 0 0-.415-1.21 1.607 1.607 0 0 0-1.177-.52c-35.537-.183-99.035-.669-135.303-.466a1.056 1.056 0 0 0-.76.238 1.044 1.044 0 0 0-.373.699c-.43 34.284-.24 68.58-.24 102.862 0 1.636.685 2.122 1.643 2.162 45.113 2.049 92.2.763 137.476.91a2.342 2.342 0 0 0 1.518-.675c.405-.403.648-.94.68-1.509-.443-33.909-1.227-68.635-3.049-102.49Zm-2.277.78c1.187 24.763 1.712 49.901 2.264 74.806-45.853 1.664-90.202.658-135.787.522 0-24.642-.313-50.868 0-76.093 43.482.375 89.992.537 133.523.764ZM91.463 151.855l16.27-22.423 18.964.294c-3.709 5.108-12.138 17.321-14.959 22.512-6.749-.114-20.275-.383-20.275-.383Zm42.769.671 15.24-22.699c6.347 0 12.699-.04 19.055-.12-3.627 6.705-10.492 16.8-14.739 22.976-6.51-.007-13.028-.059-19.556-.157Zm42.469.228c5.503-8.232 10.238-15.419 16.186-23.434 6.993-.163 13.993-.365 20.998-.605-4.761 6.22-12.597 17.04-15.361 23.986-7.274.037-14.548.054-21.823.053Z",fill:"#2F3941"})),f||(f=v.createElement("path",{d:"M153.904 69.903c-3.722-.185-22.748 30.824-20.049 34.788 2.493 3.664 37.821 2.965 39.914 0 2.39-3.436-16.031-34.596-19.865-34.788Zm.745 10.224c.19 2.645.576 11.328.205 13.546-.27 1.633-1.778.747-1.796-.113-.065-4.437-.177-8.883-.27-13.32a.957.957 0 0 1 .224-.699.925.925 0 0 1 1.551.221.973.973 0 0 1 .086.365Zm.707 18.984c-.727 2.011-2.791 1.389-2.791-.259-.057-3.119 3.572-1.901 2.791.26v-.001ZM155.392 199.891c1.926 4.35 9.139 2.15 6.621-3.658a3.653 3.653 0 0 0-2.338-2.083 3.669 3.669 0 0 0-3.092.487c-1.534 1.051-2.876 3.875-1.144 5.376a.499.499 0 0 0 .85-.353c.107-1.148-.119-2.371.838-3.231a2.288 2.288 0 0 1 3.549.378 2.661 2.661 0 0 1-.467 3.601 3.032 3.032 0 0 1-4.019-.994c-.313-.517-1.037-.06-.798.477ZM145.571 226.664c3.876.66 7.809.928 11.739.798 4.292.127 8.604.273 12.894.248a1.103 1.103 0 0 0 0-2.204c-4.29-.174-8.602-.186-12.894-.206a57.817 57.817 0 0 0-11.739.39.508.508 0 0 0 0 .974Z",fill:"#2F3941"})),p||(p=v.createElement("path",{d:"M290.099 17.651a26.343 26.343 0 0 0-14.443-13.727c-8.184-3.209-17.301-2.702-25.923-2.622-36.725.338-187.491.226-197.868.656a46.93 46.93 0 0 0-23.035 6.39c-15.658 9.89-12.084 26.386-11.458 44.885 1.203 35.566 2.12 79.713 6.107 111.322 1.049 8.324 2.204 16.755 6.676 24.05 7.983 13.016 24.148 17.93 39.357 17.867.586 0 34.396.811 73.168 1.099.06 2.045.465 4.305.694 6.462-.845-.102-23.612.467-30.303 1.419a.956.956 0 0 0-.771.893.982.982 0 0 0 .07.415c-3.429 2.898-6.462 6.492-9.588 9.661-3.848 3.879-7.906 7.645-11.5 11.758a.822.822 0 0 0 1.163 1.163c4.026-3.696 7.685-7.846 11.473-11.786 3.151-3.283 6.762-6.462 9.603-10.051a284.168 284.168 0 0 1 30.012-1.086c.02 1.633-.067 3.567 1.553 4.394.249.132.684.04.731-.3.119-2.158.03-4.322-.266-6.463a20.308 20.308 0 0 0-1.205-6.462c9.037.065 18.32.097 27.494.082a22.04 22.04 0 0 0-.498 11.488.589.589 0 0 0 .558.411.583.583 0 0 0 .558-.411c.323-1.081.516-2.196.575-3.323 5.085.679 9.298.204 22.997 1.059 2.081.132 5.048.161 6.8.151a49.891 49.891 0 0 0 9.03 9.507 126.265 126.265 0 0 0 10.551 9.276c.89.671 1.988-.798 1.188-1.541-3.547-3.244-7.275-6.278-10.814-9.542a93.19 93.19 0 0 0-8.62-8.122.687.687 0 0 0-.296-.8 16.466 16.466 0 0 0-6.571-1.034 303.46 303.46 0 0 0-8.896-.433 119.194 119.194 0 0 0-15.245-.532c.139-2.202.522-4.237.539-6.156 26.179-.057 51.28-.512 67.03-1.762 13.367-1.064 29.723-1.842 38.877-13.173 4.737-5.858 5.182-13.963 6.112-21.166 3.929-30.407 5.575-77.387 8.06-112.188.997-13.655 2.17-28.933-3.676-41.728Zm1.613 31.317c-.146 4.2-3.837 64.939-4.225 70.999-.84 12.757-3.594 52.564-7.069 65.039-3.355 12.052-18.191 15.578-28.953 16.886-9.22 1.123-18.553 1.715-27.836 2.028-47.201 1.6-152.146 1.016-154.02.947-17.12-.746-35.33-6.288-41.204-24.174-2.597-7.906-2.91-16.548-3.567-24.799-2.594-32.741-2.42-43.205-4.722-107.053-.313-8.463-1.814-17.863.596-26.12C26.38 3.355 51.897 4.623 67.642 4.416c18.621-.248 177.824-.437 187.33-.497 8.565-.045 17.791.174 25.046 5.349 12.02 8.565 12.159 26.432 11.694 39.692v.008ZM2.113 306.233c1.504-2.13 36.665-41.756 38.413-43.727a10.606 10.606 0 0 1 9.066-3.728c23.95-.139 47.907-.29 71.857.095 44.688.73 142.992-1.775 146.288-1.74 3.231.032 7.399-.711 9.864 1.66 2.352 2.264 26.674 35.343 35.177 44.204 1.322 1.374 3.407-.716 2.093-2.093-8.324-8.682-29.105-36.658-32.5-40.888a17.18 17.18 0 0 0-4.722-5.016c-4.243-2.115-53.46.465-74.499.942-24.904.57-18.499.127-150.918.092-5.858 0-10.004.249-13.864 5.043-4.439 5.52-35.989 42.114-37.403 44.477-.44.751.663 1.365 1.148.679ZM310.594 315.641c2.172-3.694 6.668-9.738 4.511-10.439-3.336-1.064-312.387 1.784-312.387 1.784s-5.946.154-.249 5.456c5.697 5.301 5.965 6.656 16.25 6.258 10.284-.397 262.609-1.203 269.642-1.091 7.034.112 20.856.37 22.233-1.968Z",fill:"#2F3941"})),b||(b=v.createElement("path",{d:"M34.938 281.227c-2.187 2.709-11.898 12.69-12.29 15.161a1.074 1.074 0 0 0 .471 1.163c1.328.85 41.622 0 50.602-.032 18.968-.08 153.463.745 156.865.79 2.603.032 4.444-.519 3.169-3.435-4.347-9.942-8.664-19.883-13.081-29.795-1.123-2.513-2.02-2.851-4.722-2.839 0 0-161.347 0-166.45-.059a.918.918 0 0 0-.874.921.92.92 0 0 0 .874.92c31.896.311 159.016-.087 167.966.445.724.045-.248-1.638 13.958 30.395.199.445.147 1.242-2.207 1.3-1.633.034-157.686-.624-193.429-.358-1.899 0-9.956.338-9.897-.14.2-1.6 12.619-14.798 23.217-31.038.365-.559-.497-1.016-.875-.512-.02-.007-8.443 11.098-13.297 17.113ZM238.084 290.689a39.103 39.103 0 0 0 3.124 6.895c.746 1.022 1.243 1.009 2.486 1.049 6.929.216 26.206-.664 45.483-.286 1.275.027 6.532.83 6.463-1.243-.102-3.042-9.343-13.789-22.084-33.67-1.454-2.272-2.08-2.411-4.956-2.284-4.702.199-32.4 1.195-41.541 1.491-1.216.04-1.223 1.934 0 1.894 47.176-1.491 43.545-1.605 43.833-1.422.93.592 1.862 2.879 2.458 3.793 1.33 2.021 17.513 26.115 18.981 28.222.878 1.256.02 1.183-1.739 1.149-1.989-.045-45.168.233-46.573.221-1.739-.022-2.589-3.415-3.3-4.931-9.112-19.476-10.563-22.476-13.054-26.54-.392-.638-1.409-.445-1.131.207 4.36 10.205 7.591 16.5 11.55 25.455ZM285.242 112.053v.445c0 .04.067.04.067 0 0-.147 0-.298.02-.445-.002-.047-.087-.052-.087 0ZM91.163 240.165s131.381-1.695 132.656-1.416c1.275.278-.313 8.776-4.226 8.751-3.912-.025-121.276.922-123.175.171-1.9-.75-7.28-7.478-5.255-7.506Z",fill:"#2F3941"})),h||(h=v.createElement("path",{d:"M45.82 293.676a.023.023 0 0 0 .014-.01.025.025 0 0 0 .005-.016.027.027 0 0 0-.019-.026.027.027 0 0 0-.014.042.023.023 0 0 0 .014.01ZM220.834 284.323c-2.237-.034-6-.062-10.973-.082-1.198-2.995.522 1.459-4.325-10.759 4.354 0 7.692 0 9.735.025a.767.767 0 0 0 .545-.226.767.767 0 0 0 0-1.09.77.77 0 0 0-.545-.225c-2.09-.03-5.666-.057-10.376-.077-1.134-2.734-1.506-3.154-2.411-3.637a.552.552 0 0 0-.798.319c-.291.832-.328 1.339.355 3.308-8.714-.03-20.504-.047-33.677-.05a23.38 23.38 0 0 0-2.021-4.446.51.51 0 0 0-.566-.224.509.509 0 0 0-.383.472c.033 1.409.199 2.811.497 4.188-11.212 0-23.326 0-35.336.027a706.988 706.988 0 0 0-.186-3.171.582.582 0 0 0-1.161 0 442.255 442.255 0 0 0-.313 3.174c-12.514.017-24.854.045-35.902.079a6.379 6.379 0 0 0-.378-2.835c-.107-.266-.457-.443-.676-.187a6.309 6.309 0 0 0-1.322 3.03c-12.572.042-23.276.094-30.335.154a18.732 18.732 0 0 0 1.8-3.577c.372-1.061-1.22-2.03-1.954-1.128-1.223 1.511-2.374 3.112-3.495 4.742-2.634.03-4.386.062-5.067.095a.503.503 0 0 0-.357.861.503.503 0 0 0 .357.148c1.155.087 2.55.164 4.158.236-5.903 8.771-5.418 7.829-7.526 11.008-3.607.032-5.985.067-6.83.104a.503.503 0 0 0-.505.505.505.505 0 0 0 .505.504c1.39.1 3.4.184 5.94.249a48.466 48.466 0 0 0-3.343 6.094.431.431 0 0 0 .746.433c1.491-2.168 3.149-4.337 4.859-6.462 8.45.191 21.417.268 36.556.28a22.934 22.934 0 0 0-1.295 5.891c-.048.723.89.823 1.242.338a22.61 22.61 0 0 0 2.963-6.214c12.082 0 25.401-.03 38.835-.079a13.904 13.904 0 0 0 .698 6.238.857.857 0 0 0 .746.429.857.857 0 0 0 .746-.429 13.875 13.875 0 0 0 .952-6.251c13.227-.052 26.474-.116 38.666-.171a25.556 25.556 0 0 0 2.281 5.572.781.781 0 0 0 1.442-.392 24.472 24.472 0 0 0-.816-5.193c13.586-.062 25.705-.111 34.797-.114a27.226 27.226 0 0 0 3.362 6.462c.353.47 1.362.41 1.283-.345a25.886 25.886 0 0 0-1.554-6.119c4.439 0 7.974.022 10.37.059a.761.761 0 0 0 .543-.229.766.766 0 0 0 .222-.546.77.77 0 0 0-.775-.766Zm-170.101.139c3.142-3.859 6.303-7.563 8.562-10.853 7.58.248 18.36.358 30.772.4a97.23 97.23 0 0 1-3.278 10.287c-15.024.045-27.84.102-36.056.166Zm38.892-.173c2.341-7.884 2.585-7.954 3.072-10.273 11.167.028 23.527 0 35.999-.057-.562 6.246-.38 6.529-.691 10.247-13.287.02-26.457.048-38.38.083Zm41.303-.087c-.144-3.319.03-4.226-.263-10.253 12.178-.057 24.392-.142 35.668-.221.621 2.423-.107-.639 2.838 10.439-12.059.01-25.167.017-38.243.035Zm41.164-.023c-.072-.248-3.022-10.14-3.122-10.471 13.235-.094 25.019-.181 33.668-.216 1.941 5.087 1.325 3.139 4.136 10.737-9.003-.032-21.099-.047-34.682-.05ZM281.202 286.259c-1.339-.479-2.53-.671-8.326-.591a140.94 140.94 0 0 0-7.491-12.89 25.902 25.902 0 0 0 7.379-.656.778.778 0 0 0 .398-1.209.778.778 0 0 0-.398-.282c-2.98-.66-6.05-.813-9.081-.452a201.697 201.697 0 0 0-2.486-3.634.674.674 0 0 0-1.163.679l1.695 3.022c-4.143.151-10.849.437-15.243.636a24.566 24.566 0 0 0-3.679-4.576.437.437 0 0 0-.251-.114.444.444 0 0 0-.479.539 25.034 25.034 0 0 0 1.613 4.28 45.342 45.342 0 0 0-8.833.763.515.515 0 0 0-.365.489.511.511 0 0 0 .365.488c3.286.677 6.655.86 9.996.542 1.327 2.443 2.833 4.824 4.079 7.126 1.006 1.854 1.953 3.842 2.965 5.798a40.865 40.865 0 0 0-9.527.716.499.499 0 0 0-.405.488.496.496 0 0 0 .405.489c3.549.665 7.169.868 10.769.604a28.675 28.675 0 0 0 3.542 5.078c.37.412.962-.035.868-.498a23.462 23.462 0 0 0-1.452-4.583 1830.64 1830.64 0 0 0 15.658-.134 30.665 30.665 0 0 0 2.662 4.012c.378.497 1.283.248 1.076-.45a29.948 29.948 0 0 0-1.337-3.587 23.018 23.018 0 0 0 7.071-.599.775.775 0 0 0 .542-.756.78.78 0 0 0-.567-.738Zm-26.223-.126c-1.213-2.414-2.63-4.75-3.865-6.989-1.029-1.859-2.068-3.91-3.211-5.911 3.728-.082 8.656-.218 15.263-.4 3.599 6.462 5.696 10.337 7.091 12.882-3.291.047-6.51.157-15.278.408v.01Z",fill:"#2F3941"})))};function S(){var n="/home/runner/work/neeto-commons-frontend/neeto-commons-frontend/src/react-utils/components/HoneybadgerErrorBoundary.jsx",e=new Function("return this")(),t="__coverage__",o={path:"/home/runner/work/neeto-commons-frontend/neeto-commons-frontend/src/react-utils/components/HoneybadgerErrorBoundary.jsx",statementMap:{0:{start:{line:13,column:26},end:{line:76,column:1}},1:{start:{line:14,column:16},end:{line:14,column:32}},2:{start:{line:16,column:2},end:{line:24,column:9}},3:{start:{line:17,column:21},end:{line:20,column:5}},4:{start:{line:18,column:6},end:{line:18,column:33}},5:{start:{line:18,column:26},end:{line:18,column:33}},6:{start:{line:19,column:6},end:{line:19,column:53}},7:{start:{line:21,column:4},end:{line:21,column:50}},8:{start:{line:23,column:4},end:{line:23,column:66}},9:{start:{line:23,column:17},end:{line:23,column:65}},10:{start:{line:26,column:2},end:{line:75,column:4}},11:{start:{line:55,column:33},end:{line:55,column:57}},12:{start:{line:65,column:20},end:{line:65,column:71}},13:{start:{line:66,column:20},end:{line:66,column:67}},14:{start:{line:79,column:2},end:{line:79,column:65}},15:{start:{line:81,column:33},end:{line:109,column:1}},16:{start:{line:86,column:2},end:{line:90,column:5}},17:{start:{line:87,column:4},end:{line:87,column:64}},18:{start:{line:87,column:51},end:{line:87,column:64}},19:{start:{line:89,column:4},end:{line:89,column:34}},20:{start:{line:92,column:22},end:{line:101,column:4}},21:{start:{line:103,column:2},end:{line:108,column:4}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:13,column:26},end:{line:13,column:27}},loc:{start:{line:13,column:32},end:{line:76,column:1}},line:13},1:{name:"(anonymous_1)",decl:{start:{line:16,column:12},end:{line:16,column:13}},loc:{start:{line:16,column:18},end:{line:24,column:3}},line:16},2:{name:"(anonymous_2)",decl:{start:{line:17,column:21},end:{line:17,column:22}},loc:{start:{line:17,column:26},end:{line:20,column:5}},line:17},3:{name:"(anonymous_3)",decl:{start:{line:23,column:11},end:{line:23,column:12}},loc:{start:{line:23,column:17},end:{line:23,column:65}},line:23},4:{name:"(anonymous_4)",decl:{start:{line:55,column:27},end:{line:55,column:28}},loc:{start:{line:55,column:33},end:{line:55,column:57}},line:55},5:{name:"(anonymous_5)",decl:{start:{line:64,column:27},end:{line:64,column:28}},loc:{start:{line:64,column:33},end:{line:67,column:19}},line:64},6:{name:"(anonymous_6)",decl:{start:{line:81,column:33},end:{line:81,column:34}},loc:{start:{line:85,column:6},end:{line:109,column:1}},line:85},7:{name:"(anonymous_7)",decl:{start:{line:86,column:27},end:{line:86,column:28}},loc:{start:{line:86,column:37},end:{line:90,column:3}},line:86}},branchMap:{0:{loc:{start:{line:18,column:6},end:{line:18,column:33}},type:"if",locations:[{start:{line:18,column:6},end:{line:18,column:33}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:18},1:{loc:{start:{line:83,column:2},end:{line:83,column:36}},type:"default-arg",locations:[{start:{line:83,column:19},end:{line:83,column:36}}],line:83},2:{loc:{start:{line:84,column:2},end:{line:84,column:26}},type:"default-arg",locations:[{start:{line:84,column:17},end:{line:84,column:26}}],line:84},3:{loc:{start:{line:87,column:4},end:{line:87,column:64}},type:"if",locations:[{start:{line:87,column:4},end:{line:87,column:64}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:87}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},b:{0:[0,0],1:[0],2:[0],3:[0,0]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"a52872401f6b4ed196f717a9388dd6e619c5baa3"},l=e[t]||(e[t]={});l[n]&&"a52872401f6b4ed196f717a9388dd6e619c5baa3"===l[n].hash||(l[n]=o);var r=l[n];return S=function(){return r},r}S(),S().s[0]++;var E=function(){S().f[0]++;var e=(S().s[1]++,l.useTranslation()).t;return S().s[2]++,n.useEffect((function(){S().f[1]++,S().s[3]++;var n=function(n){var e;if(S().f[2]++,S().s[4]++,o.isNil(n.state))return S().b[0][0]++,void S().s[5]++;S().b[0][1]++,S().s[6]++,window.location.href=null===(e=n.target)||void 0===e?void 0:e.location.href};return S().s[7]++,window.addEventListener("popstate",n),S().s[8]++,function(){return S().f[3]++,S().s[9]++,window.removeEventListener("popstate",n)}}),[]),S().s[10]++,y.default.createElement("div",{className:"flex h-screen w-full flex-row items-start justify-start"},y.default.createElement("div",{className:"m-auto text-center"},y.default.createElement("div",{className:"m-auto mb-8 flex items-center justify-center"},y.default.createElement(x,null)),y.default.createElement(t.Typography,{className:"mb-4",component:"h2",style:"h2",weight:"semibold"},e("neetoCommons.fallbackComponent.somethingWentWrong")),y.default.createElement(t.Typography,{className:"mb-8 text-gray-600",component:"p",style:"body1",weight:"normal"},y.default.createElement(l.Trans,{i18nKey:"neetoCommons.fallbackComponent.description",components:{reloading:y.default.createElement(t.Button,{style:"link",label:e("neetoCommons.fallbackComponent.reloadingButtonLabel"),onClick:function(){return S().f[4]++,S().s[11]++,window.location.reload()}}),contactus:y.default.createElement(t.Button,{style:"link",label:e("neetoCommons.fallbackComponent.contactusButtonLabel"),onClick:function(){var n,e,t,o;S().f[5]++,S().s[12]++,null===(n=window.NeetoChat)||void 0===n||null===(e=n.contextualHelp)||void 0===e||e.maximizeWidget(),S().s[13]++,null===(t=window.NeetoChat)||void 0===t||null===(o=t.contextualHelp)||void 0===o||o.openWidget()}})}}))))},O=(S().s[14]++,/(window\.requestAnimationFrame|ResizeObserver|ChunkLoadError)/);S().s[15]++;function k(n,e){if(null==n)return{};var t,o,l=function(n,e){if(null==n)return{};var t,o,l={},r=Object.keys(n);for(o=0;o<r.length;o++)t=r[o],e.indexOf(t)>=0||(l[t]=n[t]);return l}(n,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);for(o=0;o<r.length;o++)t=r[o],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(l[t]=n[t])}return l}var M=["condition","redirectRoute","errorPage"];function j(){var n="/home/runner/work/neeto-commons-frontend/neeto-commons-frontend/src/react-utils/components/PrivateRoute.jsx",e=new Function("return this")(),t="__coverage__",o=e[t]||(e[t]={});o[n]&&"1f7d85c118e7435093f984165fe13fbc99005f2c"===o[n].hash||(o[n]={path:"/home/runner/work/neeto-commons-frontend/neeto-commons-frontend/src/react-utils/components/PrivateRoute.jsx",statementMap:{0:{start:{line:6,column:21},end:{line:19,column:3}},1:{start:{line:13,column:2},end:{line:19,column:3}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:6,column:21},end:{line:6,column:22}},loc:{start:{line:13,column:2},end:{line:19,column:3}},line:13}},branchMap:{0:{loc:{start:{line:7,column:2},end:{line:7,column:39}},type:"default-arg",locations:[{start:{line:7,column:14},end:{line:7,column:39}}],line:7},1:{loc:{start:{line:8,column:2},end:{line:8,column:27}},type:"default-arg",locations:[{start:{line:8,column:18},end:{line:8,column:27}}],line:8},2:{loc:{start:{line:9,column:2},end:{line:9,column:23}},type:"default-arg",locations:[{start:{line:9,column:14},end:{line:9,column:23}}],line:9},3:{loc:{start:{line:13,column:2},end:{line:19,column:3}},type:"cond-expr",locations:[{start:{line:14,column:4},end:{line:14,column:24}},{start:{line:15,column:6},end:{line:19,column:3}}],line:13},4:{loc:{start:{line:15,column:6},end:{line:19,column:3}},type:"cond-expr",locations:[{start:{line:16,column:4},end:{line:16,column:49}},{start:{line:18,column:4},end:{line:18,column:43}}],line:15},5:{loc:{start:{line:18,column:4},end:{line:18,column:43}},type:"binary-expr",locations:[{start:{line:18,column:4},end:{line:18,column:13}},{start:{line:18,column:17},end:{line:18,column:43}}],line:18}},s:{0:0,1:0},f:{0:0},b:{0:[0],1:[0],2:[0],3:[0,0],4:[0,0],5:[0,0]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"1f7d85c118e7435093f984165fe13fbc99005f2c"});var l=o[n];return j=function(){return l},l}j(),j().s[0]++;function P(){var n="/home/runner/work/neeto-commons-frontend/neeto-commons-frontend/src/react-utils/components/index.js",e=new Function("return this")(),t="__coverage__",o=e[t]||(e[t]={});o[n]&&"57d9e2a60e3ebad3a8731882df4a3e983bfd617a"===o[n].hash||(o[n]={path:"/home/runner/work/neeto-commons-frontend/neeto-commons-frontend/src/react-utils/components/index.js",statementMap:{},fnMap:{},branchMap:{},s:{},f:{},b:{},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"57d9e2a60e3ebad3a8731882df4a3e983bfd617a"});var l=o[n];return P=function(){return l},l}function C(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,o=new Array(e);t<e;t++)o[t]=n[t];return o}function L(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var t=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var o,l,r,c,i=[],a=!0,u=!1;try{if(r=(t=t.call(n)).next,0===e){if(Object(t)!==t)return;a=!1}else for(;!(a=(o=r.call(t)).done)&&(i.push(o.value),i.length!==e);a=!0);}catch(n){u=!0,l=n}finally{try{if(!a&&null!=t.return&&(c=t.return(),Object(c)!==c))return}finally{if(u)throw l}}return i}}(n,e)||function(n,e){if(n){if("string"==typeof n)return C(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?C(n,e):void 0}}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(){var n="/home/runner/work/neeto-commons-frontend/neeto-commons-frontend/src/react-utils/hooks/useDebounce.js",e=new Function("return this")(),t="__coverage__",o=e[t]||(e[t]={});o[n]&&"d75854d708b4bd66be795d67eea59e163c845113"===o[n].hash||(o[n]={path:"/home/runner/work/neeto-commons-frontend/neeto-commons-frontend/src/react-utils/hooks/useDebounce.js",statementMap:{0:{start:{line:3,column:20},end:{line:17,column:1}},1:{start:{line:4,column:46},end:{line:4,column:61}},2:{start:{line:6,column:2},end:{line:14,column:14}},3:{start:{line:7,column:20},end:{line:9,column:13}},4:{start:{line:8,column:6},end:{line:8,column:31}},5:{start:{line:11,column:4},end:{line:13,column:6}},6:{start:{line:12,column:6},end:{line:12,column:28}},7:{start:{line:16,column:2},end:{line:16,column:24}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:3,column:20},end:{line:3,column:21}},loc:{start:{line:3,column:44},end:{line:17,column:1}},line:3},1:{name:"(anonymous_1)",decl:{start:{line:6,column:12},end:{line:6,column:13}},loc:{start:{line:6,column:18},end:{line:14,column:3}},line:6},2:{name:"(anonymous_2)",decl:{start:{line:7,column:31},end:{line:7,column:32}},loc:{start:{line:7,column:37},end:{line:9,column:5}},line:7},3:{name:"(anonymous_3)",decl:{start:{line:11,column:11},end:{line:11,column:12}},loc:{start:{line:11,column:17},end:{line:13,column:5}},line:11}},branchMap:{0:{loc:{start:{line:3,column:28},end:{line:3,column:39}},type:"default-arg",locations:[{start:{line:3,column:36},end:{line:3,column:39}}],line:3}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},f:{0:0,1:0,2:0,3:0},b:{0:[0]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"d75854d708b4bd66be795d67eea59e163c845113"});var l=o[n];return A=function(){return l},l}P(),A(),A().s[0]++;const T=n=>{let e;const t=new Set,o=(n,o)=>{const l="function"==typeof n?n(e):n;if(!Object.is(l,e)){const n=e;e=(null!=o?o:"object"!=typeof l)?l:Object.assign({},e,l),t.forEach((t=>t(e,n)))}},l=()=>e,r={setState:o,getState:l,subscribe:n=>(t.add(n),()=>t.delete(n)),destroy:()=>{console.warn("[DEPRECATED] The destroy method will be unsupported in the future version. You should use unsubscribe function returned by subscribe. Everything will be garbage collected if store is garbage collected."),t.clear()}};return e=n(o,l,r),r};var B="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function F(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var R,I={exports:{}},N={},K={exports:{}},W={};var G,D,V,H={};
|
|
2
2
|
/**
|
|
3
3
|
* @license React
|
|
4
4
|
* use-sync-external-store-shim.development.js
|
package/react-utils.d.ts
CHANGED
|
@@ -1,120 +1,301 @@
|
|
|
1
|
+
import dayjs from "dayjs";
|
|
1
2
|
import React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
3
|
+
export function resetAuthTokens(): void;
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* Curried: true
|
|
7
|
+
*
|
|
8
|
+
* It is a curried function that accepts a function as the first parameter and an
|
|
9
|
+
*
|
|
10
|
+
* event as the second, and executes the given function with event.target.value
|
|
11
|
+
*
|
|
12
|
+
* Usage:
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
*
|
|
16
|
+
* const onChange = val => console.log(`Value = ${val}`);
|
|
17
|
+
*
|
|
18
|
+
* <input onChange={withEventTargetValue(onChange)} />;
|
|
19
|
+
*
|
|
20
|
+
* // For example, in this case when user types "1" in the input field, "Value = 1" will be printed in the console.
|
|
21
|
+
* @endexample
|
|
22
|
+
*/
|
|
23
|
+
export function withEventTargetValue(func: (value: string) => void, event: React.ChangeEventHandler<HTMLInputElement>): void;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* Curried: true
|
|
27
|
+
*
|
|
28
|
+
* It is a curried function that accepts a function as the first parameter and an
|
|
29
|
+
*
|
|
30
|
+
* event as the second, and executes the given function with event.target.value
|
|
31
|
+
*
|
|
32
|
+
* Usage:
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
*
|
|
36
|
+
* const onChange = val => console.log(`Value = ${val}`);
|
|
37
|
+
*
|
|
38
|
+
* <input onChange={withEventTargetValue(onChange)} />;
|
|
39
|
+
*
|
|
40
|
+
* // For example, in this case when user types "1" in the input field, "Value = 1" will be printed in the console.
|
|
41
|
+
* @endexample
|
|
42
|
+
*/
|
|
43
|
+
export function withEventTargetValue(func: (value: string) => void): (event: React.ChangeEventHandler<HTMLInputElement>) => void;
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* Curried: false
|
|
47
|
+
*
|
|
48
|
+
* This function returns the subdomain of the current URL.
|
|
49
|
+
*
|
|
50
|
+
* Usage:
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
*
|
|
54
|
+
* // Let the current url be "https://spinkart.example.com".
|
|
55
|
+
* getSubdomain();
|
|
56
|
+
*
|
|
57
|
+
* // output: spinkart
|
|
58
|
+
* @endexample
|
|
59
|
+
*/
|
|
60
|
+
export function getSubdomain(): string;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* Curried: false
|
|
64
|
+
*
|
|
65
|
+
* Returns the specified hardcoded data after some delay for simulating an API
|
|
66
|
+
*
|
|
67
|
+
* call.
|
|
68
|
+
*
|
|
69
|
+
* This function will simulate an API call and retrieve the hardcoded success/error
|
|
70
|
+
*
|
|
71
|
+
* responses after some delay based on the given error probability. This function
|
|
72
|
+
*
|
|
73
|
+
* is helpful when we are building the frontend before the backend is ready.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
*
|
|
77
|
+
* simulateApiCall(hardCodedResponseData, hardCodedErrorResponse);
|
|
78
|
+
* @endexample
|
|
79
|
+
*/
|
|
80
|
+
export function simulateApiCall<T>(result: T, error?: any, errorProbability?: number, delayMs?: number): Promise<T>;
|
|
81
|
+
/**
|
|
82
|
+
*
|
|
83
|
+
* Curried: false
|
|
84
|
+
*
|
|
85
|
+
* Copies the given string to clipboard and shows a success toaster message.
|
|
86
|
+
*
|
|
87
|
+
* This function accepts a string as an argument and copies it to the clipboard.
|
|
88
|
+
*
|
|
89
|
+
* Also, it accepts two optional arguments: a boolean flag to indicate whether a
|
|
90
|
+
*
|
|
91
|
+
* toaster should be shown and a message to be shown in the toaster. By default the
|
|
92
|
+
*
|
|
93
|
+
* show toaster flag is set to true and the toaster message is set to "Copied to
|
|
94
|
+
*
|
|
95
|
+
* clipboard!". You can override these defaults by passing the appropriate values
|
|
96
|
+
*
|
|
97
|
+
* to the function.
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
*
|
|
101
|
+
* copyToClipboard("https://spinkart.example.com", {
|
|
102
|
+
* showToastr: true,
|
|
103
|
+
* message: "URL copied successfully!",
|
|
104
|
+
* });
|
|
105
|
+
*
|
|
106
|
+
* // If the URL is copied to the clipboard, a toaster message will be shown with the message "URL copied successfully!"
|
|
107
|
+
* @endexample
|
|
108
|
+
*/
|
|
109
|
+
export function copyToClipboard(text: string, configs?: {
|
|
110
|
+
showToastr?: boolean;
|
|
111
|
+
message?: string;
|
|
112
|
+
}): void;
|
|
113
|
+
/**
|
|
114
|
+
*
|
|
115
|
+
* Curried: false
|
|
116
|
+
*
|
|
117
|
+
* Builds a URL by inflating route like template string (example:
|
|
118
|
+
*
|
|
119
|
+
* /products/:productId/variants/:id) using the given params. Any extra
|
|
120
|
+
*
|
|
121
|
+
* properties in the params will be attached as query parameters to the URL.
|
|
122
|
+
*
|
|
123
|
+
* @example
|
|
124
|
+
*
|
|
125
|
+
* buildUrl("/products/:id", { id: "123" }); // output "/products/123"
|
|
126
|
+
* buildUrl("/products", { search: "abc" }); // output "/products?search=abc"
|
|
127
|
+
* buildUrl("/products/:productId/variants/:variantId/attributes", {
|
|
128
|
+
* productId: "123",
|
|
129
|
+
* variantId: "456",
|
|
130
|
+
* search: "abc",
|
|
131
|
+
* page: 1,
|
|
132
|
+
* per_page: 10,
|
|
133
|
+
* }); // output "/products/123/variants/456/attributes?page=1&per_page=10&search=abc"
|
|
134
|
+
* @endexample
|
|
135
|
+
*/
|
|
136
|
+
export function buildUrl(route: string, params: object): string;
|
|
137
|
+
type DateTimeType = string | number | dayjs.Dayjs | Date | null | undefined;
|
|
138
|
+
export const timeFormat: {
|
|
139
|
+
fromNow: (time: DateTimeType) => string;
|
|
140
|
+
time: (time: DateTimeType) => string;
|
|
141
|
+
date: (time: DateTimeType) => string;
|
|
142
|
+
dateWeek: (time: DateTimeType) => string;
|
|
143
|
+
dateWeekWithoutYear: (time: DateTimeType) => string;
|
|
144
|
+
dateTime: (time: DateTimeType) => string;
|
|
145
|
+
dateWeekTime: (time: DateTimeType) => string;
|
|
146
|
+
extended: (time: DateTimeType) => string;
|
|
25
147
|
};
|
|
26
|
-
export
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
): any;
|
|
75
|
-
(): any;
|
|
148
|
+
export const dateFormat: typeof timeFormat;
|
|
149
|
+
/**
|
|
150
|
+
*
|
|
151
|
+
* Curried: false
|
|
152
|
+
*
|
|
153
|
+
* Converts the given number to a locale string (converts to a comma separated
|
|
154
|
+
*
|
|
155
|
+
* string). It automatically identifies the locale using globalProps. If a valid
|
|
156
|
+
*
|
|
157
|
+
* value isn't present in globalProps, it will rely on the current browser's
|
|
158
|
+
*
|
|
159
|
+
* locale.
|
|
160
|
+
*
|
|
161
|
+
* The function also accepts options, which will be forwarded to
|
|
162
|
+
*
|
|
163
|
+
* Number.prototype.toLocaleString, which can be used for additional
|
|
164
|
+
*
|
|
165
|
+
* configurations like rounding, currency, units etc.
|
|
166
|
+
*
|
|
167
|
+
* @example
|
|
168
|
+
*
|
|
169
|
+
* toLocale(1000000); // "1,000,000" when locale is "en-US"
|
|
170
|
+
* toLocale(1000000); // "10,00,000" when locale is "en-IN"
|
|
171
|
+
* toLocale(1000000.987, { maximumFractionDigits: 2 }); // "1,000,000.99"
|
|
172
|
+
* toLocale(1000000.987, {
|
|
173
|
+
* currencyDisplay: "narrowSymbol",
|
|
174
|
+
* style: "currency",
|
|
175
|
+
* currency: "INR",
|
|
176
|
+
* }); // "₹1,000,000.99"
|
|
177
|
+
* @endexample
|
|
178
|
+
*/
|
|
179
|
+
export function toLocale(number: string | number, options?: Intl.NumberFormatOptions): string;
|
|
180
|
+
type qsOptionsType = {
|
|
181
|
+
comma?: boolean | undefined;
|
|
182
|
+
delimiter?: string | RegExp | undefined;
|
|
183
|
+
depth?: number | false | undefined;
|
|
184
|
+
decoder?: ((str: string, defaultDecoder: any, charset: string, type: "key" | "value") => any) | undefined;
|
|
185
|
+
arrayLimit?: number | undefined;
|
|
186
|
+
parseArrays?: boolean | undefined;
|
|
187
|
+
allowDots?: boolean | undefined;
|
|
188
|
+
plainObjects?: boolean | undefined;
|
|
189
|
+
allowPrototypes?: boolean | undefined;
|
|
190
|
+
parameterLimit?: number | undefined;
|
|
191
|
+
strictNullHandling?: boolean | undefined;
|
|
192
|
+
ignoreQueryPrefix?: boolean | undefined;
|
|
193
|
+
charset?: "utf-8" | "iso-8859-1" | undefined;
|
|
194
|
+
charsetSentinel?: boolean | undefined;
|
|
195
|
+
interpretNumericEntities?: boolean | undefined;
|
|
76
196
|
};
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
current: HTMLInputElement & HTMLTextAreaElement;
|
|
197
|
+
type QueryParamsType = {
|
|
198
|
+
[key: string]: any;
|
|
80
199
|
};
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
200
|
+
/**
|
|
201
|
+
*
|
|
202
|
+
* Curried: false
|
|
203
|
+
*
|
|
204
|
+
* This function returns all the query parameters of the current URL as an object.
|
|
205
|
+
*
|
|
206
|
+
* Usage:
|
|
207
|
+
*
|
|
208
|
+
* @example
|
|
209
|
+
*
|
|
210
|
+
* // Let the current url be "https://example.com?search=something&sort=date".
|
|
211
|
+
* getQueryParams();
|
|
212
|
+
*
|
|
213
|
+
* // output: { search: "something", sort: "date" }
|
|
214
|
+
* @endexample
|
|
215
|
+
*/
|
|
216
|
+
export function getQueryParams(options?: qsOptionsType): QueryParamsType;
|
|
217
|
+
/**
|
|
218
|
+
*
|
|
219
|
+
* Curried: false
|
|
220
|
+
*
|
|
221
|
+
* This function joins the given strings with hyphen.
|
|
222
|
+
*
|
|
223
|
+
* Usage:
|
|
224
|
+
*
|
|
225
|
+
* @example
|
|
226
|
+
*
|
|
227
|
+
* joinHyphenCase("hello", "world"); // output: "hello-world"
|
|
228
|
+
* @endexample
|
|
229
|
+
*/
|
|
230
|
+
export function joinHyphenCase(...args: string[]): string;
|
|
231
|
+
/**
|
|
232
|
+
*
|
|
233
|
+
* Curried: false
|
|
234
|
+
*
|
|
235
|
+
* Creates a debounced function that will execute the given function after the
|
|
236
|
+
*
|
|
237
|
+
* stated wait time in milliseconds has elapsed since the last time it was invoked.
|
|
238
|
+
*
|
|
239
|
+
* It accepts the function to be debounced as the first argument, the delay in
|
|
240
|
+
*
|
|
241
|
+
* milliseconds as the second argument.
|
|
242
|
+
*
|
|
243
|
+
* Usage:
|
|
244
|
+
*
|
|
245
|
+
* @example
|
|
246
|
+
*
|
|
247
|
+
* const searchForProducts = debounce(async key => {
|
|
248
|
+
* // this function will be triggered once after user stops typing for 300ms
|
|
249
|
+
* const products = await productsApi.fetch(key);
|
|
250
|
+
* // do something with the products
|
|
251
|
+
* }, 300);
|
|
252
|
+
* <input onChange={e => searchForProducts(e.target.value)} />;
|
|
253
|
+
* @endexample
|
|
254
|
+
*/
|
|
255
|
+
export function debounce<F extends Function>(func: F, delay?: number): F;
|
|
256
|
+
/**
|
|
257
|
+
*
|
|
258
|
+
* Curried: false
|
|
259
|
+
*
|
|
260
|
+
* This function will return true if the current user has the given permission.
|
|
261
|
+
*
|
|
262
|
+
* Usage:
|
|
263
|
+
*
|
|
264
|
+
* @example
|
|
265
|
+
*
|
|
266
|
+
* hasPermission("user.view_settings");
|
|
267
|
+
* @endexample
|
|
268
|
+
*/
|
|
269
|
+
export function hasPermission(permission: string): boolean;
|
|
270
|
+
/**
|
|
271
|
+
*
|
|
272
|
+
* Curried: false
|
|
273
|
+
*
|
|
274
|
+
* This function will return true if the current user has any of the given
|
|
275
|
+
*
|
|
276
|
+
* permissions.
|
|
277
|
+
*
|
|
278
|
+
* Usage:
|
|
279
|
+
*
|
|
280
|
+
* @example
|
|
281
|
+
*
|
|
282
|
+
* hasAnyPermission("user.view_settings", "user.edit_settings");
|
|
283
|
+
* @endexample
|
|
284
|
+
*/
|
|
285
|
+
export function hasAnyPermission(...permissions: string[]): boolean;
|
|
286
|
+
/**
|
|
287
|
+
*
|
|
288
|
+
* Curried: false
|
|
289
|
+
*
|
|
290
|
+
* This function will return true if the current user has all of the given
|
|
291
|
+
*
|
|
292
|
+
* permissions.
|
|
293
|
+
*
|
|
294
|
+
* Usage:
|
|
295
|
+
*
|
|
296
|
+
* @example
|
|
297
|
+
*
|
|
298
|
+
* hasAllPermissions("user.view_settings", "user.edit_settings");
|
|
299
|
+
* @endexample
|
|
300
|
+
*/
|
|
301
|
+
export function hasAllPermissions(...permissions: string[]): boolean;
|