@corva/ui 3.21.0-3 → 3.22.0

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",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};
1
+ "use strict";function e(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("query-string")).parse(window.location.search),r=function(){return"/".concat("2")},n=process.env.REACT_APP_SUBSCRIPTIONS_URL||t.subscriptions_url||"https://subscriptions.qa.corva.ai",o="".concat(n).concat(r()),c=new RegExp("^/reports.*$"),s=new RegExp("^/login(?:/.*)?$");exports.IGNORED_ROUTES_REGEXP=c,exports.LOGIN_ROUTES_REGEXP=s,exports.SUBSCRIPTIONS_URL=o,exports.getHrefDebugField=function(){try{var e=(window.top||window).location,t=e.origin,r=e.pathname,n=e.search;return t&&r&&/^https?:\/\//.test(t)&&!s.test(r)?{_current_location_href:"".concat(t).concat(r).concat(n)}:{}}catch(e){return{}}},exports.getNamespace=r,exports.handleSubscriptionsVersion=function(e,t){return t};
2
2
  //# sourceMappingURL=constants.js.map
@@ -31,9 +31,6 @@ export const socketClient: {
31
31
  }) => () => void;
32
32
  onConnectionChange: (handler: import("./subscriptions/types").OnConnectionChange) => () => void;
33
33
  disconnect: () => void;
34
- } | {
35
- subscribe: (subscription: any, { onDataReceive }?: {}) => (...args: any[]) => void;
36
- onConnectionChange: (handler: any) => () => void;
37
34
  };
38
35
  import * as clientStorage from './clientStorage';
39
36
  import * as jsonApi from './jsonApi';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/clients/index.js"],"names":[],"mappings":";;;IAiBO,6EAEJ;IACe;;;OAEf;IACI,2FAEJ;IACM,6FAEN;IACK,yEAEL;IACI,6EAEJ;;;IAII,sFAC2E;;IAC3E,oGACoF;;IAClF,sGACoF;;IACrF,kFACsE;;IACvE,sFAC2E;;;AAqElF;;;;;;;;;;;EAAuF;+BAjHxD,iBAAiB;yBACvB,WAAW;+BACL,iBAAiB;2BAGrB,aAAa"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/clients/index.js"],"names":[],"mappings":";;;IAiBO,6EAEJ;IACe;;;OAEf;IACI,2FAEJ;IACM,6FAEN;IACK,yEAEL;IACI,6EAEJ;;;IAII,sFAC2E;;IAC3E,oGACoF;;IAClF,sGACoF;;IACrF,kFACsE;;IACvE,sFAC2E;;;AAqElF;;;;;;;;EAAuF;+BAjHxD,iBAAiB;yBACvB,WAAW;+BACL,iBAAiB;2BAGrB,aAAa"}
@@ -1,4 +1,4 @@
1
- export declare const handleSubscriptionsVersion: <V1, V2>(v1: V1, v2: V2) => V1 | V2;
1
+ export declare const handleSubscriptionsVersion: <V1, V2>(v1: V1, v2: V2) => V2;
2
2
  export declare const getNamespace: () => string;
3
3
  export declare const SUBSCRIPTIONS_URL: string;
4
4
  export declare const IGNORED_ROUTES_REGEXP: RegExp;
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/clients/subscriptions/constants.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,0BAA0B,GAAI,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,YAMhE,CAAC;AAEF,eAAO,MAAM,YAAY,cAMxB,CAAC;AAOF,eAAO,MAAM,iBAAiB,QAA4B,CAAC;AAC3D,eAAO,MAAM,qBAAqB,QAA6B,CAAC;AAGhE,eAAO,MAAM,mBAAmB,QAAiC,CAAC;AAElE;;GAEG;AACH,eAAO,MAAM,iBAAiB,QAAO;IAAE,sBAAsB,CAAC,EAAE,MAAM,CAAA;CASrE,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/clients/subscriptions/constants.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,0BAA0B,GAAI,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,OAEhE,CAAC;AAEF,eAAO,MAAM,YAAY,cAExB,CAAC;AAOF,eAAO,MAAM,iBAAiB,QAA4B,CAAC;AAC3D,eAAO,MAAM,qBAAqB,QAA6B,CAAC;AAGhE,eAAO,MAAM,mBAAmB,QAAiC,CAAC;AAElE;;GAEG;AACH,eAAO,MAAM,iBAAiB,QAAO;IAAE,sBAAsB,CAAC,EAAE,MAAM,CAAA;CASrE,CAAC"}
@@ -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",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};
1
+ import*as t from"query-string";var n=t.parse(window.location.search),r=function(t,n){return n},o=function(){return"/".concat("2")},c=process.env.REACT_APP_SUBSCRIPTIONS_URL||n.subscriptions_url||"https://subscriptions.qa.corva.ai",a="".concat(c).concat(o()),e=new RegExp("^/reports.*$"),i=new RegExp("^/login(?:/.*)?$"),s=function(){try{var t=(window.top||window).location,n=t.origin,r=t.pathname,o=t.search;return n&&r&&/^https?:\/\//.test(n)&&!i.test(r)?{_current_location_href:"".concat(n).concat(r).concat(o)}:{}}catch(t){return{}}};export{e as IGNORED_ROUTES_REGEXP,i as LOGIN_ROUTES_REGEXP,a as SUBSCRIPTIONS_URL,s as getHrefDebugField,o as getNamespace,r as handleSubscriptionsVersion};
2
2
  //# sourceMappingURL=constants.js.map
@@ -1,2 +1,2 @@
1
- export declare const initializeSocketClient: (({ onDataReceive, onResubscribe }?: {}) => void) | (() => import("./subscriptions/types").SubcriptionsClient);
1
+ export declare const initializeSocketClient: () => import("./subscriptions/types").SubcriptionsClient;
2
2
  //# sourceMappingURL=subscriptions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"subscriptions.d.ts","sourceRoot":"","sources":["../../src/clients/subscriptions.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,sBAAsB,gHAAgG,CAAC"}
1
+ {"version":3,"file":"subscriptions.d.ts","sourceRoot":"","sources":["../../src/clients/subscriptions.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,sBAAsB,0DAAgG,CAAC"}
@@ -1,8 +1,7 @@
1
- import { useSubscriptionsV1 } from './subscriptions/useSubscriptions.v1';
2
1
  /**
3
2
  * @deprecated use {@link socketClient} instead for fine-grained control
4
3
  */
5
- declare const _default: ((_subscriptions?: import("../clients/subscriptions/types").SubscribeOptions[], { timestamp, isOldApiUsed }?: {
4
+ declare const _default: (_subscriptions?: import("../clients/subscriptions/types").SubscribeOptions[], { timestamp, isOldApiUsed }?: {
6
5
  timestamp?: number;
7
6
  isOldApiUsed?: boolean;
8
7
  }) => ({
@@ -11,6 +10,6 @@ declare const _default: ((_subscriptions?: import("../clients/subscriptions/type
11
10
  } | {
12
11
  loading: boolean;
13
12
  data: any;
14
- })[]) | typeof useSubscriptionsV1;
13
+ })[];
15
14
  export default _default;
16
15
  //# sourceMappingURL=useSubscriptions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSubscriptions.d.ts","sourceRoot":"","sources":["../../src/effects/useSubscriptions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAIzE;;GAEG;;aAE4O,CAAC;gBAAsB,CAAC;;;;;;;;AADvQ,wBAAkF"}
1
+ {"version":3,"file":"useSubscriptions.d.ts","sourceRoot":"","sources":["../../src/effects/useSubscriptions.ts"],"names":[],"mappings":"AAKA;;GAEG;;aAE4O,CAAC;gBAAsB,CAAC;;;;;;;;AADvQ,wBAAkF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "3.21.0-3",
3
+ "version": "3.22.0",
4
4
  "description": "Shared components/utils for Corva ui projects",
5
5
  "keywords": [
6
6
  "corva-ui"