@corva/ui 3.20.0-6 → 3.20.0-8
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.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("query-string"),t=require("../../utils/env.js");function r(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var o=r(e).parse(window.location.search),n=t.isDevOrQAEnv||t.isBetaEnv,s=n?"2":"1",
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("query-string"),t=require("../../utils/env.js");function r(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var o=r(e).parse(window.location.search),n=t.isDevOrQAEnv||t.isBetaEnv,s=n?"2":"1",c=o.subscriptions_version||localStorage.getItem("subscriptions_version")||s;n&&"2"!==localStorage.getItem("subscriptions_version_forced")&&(localStorage.setItem("subscriptions_version","2"),localStorage.setItem("subscriptions_version_forced","2"));var i=function(){return"1"===c?"/":"/".concat(c)},a=process.env.REACT_APP_SUBSCRIPTIONS_URL||o.subscriptions_url||"https://subscriptions.qa.corva.ai",u="".concat(a).concat(i()),p=new RegExp("^/reports.*$"),l=new RegExp("^/login(?:/.*)?$");exports.IGNORED_ROUTES_REGEXP=p,exports.LOGIN_ROUTES_REGEXP=l,exports.SUBSCRIPTIONS_URL=u,exports.getHrefDebugField=function(){try{var e=(window.top||window).location,t=e.origin,r=e.pathname,o=e.search;return t&&r&&/^https?:\/\//.test(t)&&!l.test(r)?{_current_location_href:"".concat(t).concat(r).concat(o)}:{}}catch(e){return{}}},exports.getNamespace=i,exports.handleSubscriptionsVersion=function(e,t){return"1"===c?e:t};
|
|
2
2
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as t from"query-string";import{isDevOrQAEnv as o,isBetaEnv as r}from"../../utils/env.js";var n=t.parse(window.location.search),s=o||r,e=s?"2":"1",
|
|
1
|
+
import*as t from"query-string";import{isDevOrQAEnv as o,isBetaEnv as r}from"../../utils/env.js";var n=t.parse(window.location.search),s=o||r,e=s?"2":"1",c=n.subscriptions_version||localStorage.getItem("subscriptions_version")||e;s&&"2"!==localStorage.getItem("subscriptions_version_forced")&&(localStorage.setItem("subscriptions_version","2"),localStorage.setItem("subscriptions_version_forced","2"));var i=function(t,o){return"1"===c?t:o},a=function(){return"1"===c?"/":"/".concat(c)},p=process.env.REACT_APP_SUBSCRIPTIONS_URL||n.subscriptions_url||"https://subscriptions.qa.corva.ai",u="".concat(p).concat(a()),l=new RegExp("^/reports.*$"),_=new RegExp("^/login(?:/.*)?$"),g=function(){try{var t=(window.top||window).location,o=t.origin,r=t.pathname,n=t.search;return o&&r&&/^https?:\/\//.test(o)&&!_.test(r)?{_current_location_href:"".concat(o).concat(r).concat(n)}:{}}catch(t){return{}}};export{l as IGNORED_ROUTES_REGEXP,_ as LOGIN_ROUTES_REGEXP,u as SUBSCRIPTIONS_URL,g as getHrefDebugField,a as getNamespace,i as handleSubscriptionsVersion};
|
|
2
2
|
//# sourceMappingURL=constants.js.map
|