@corva/ui 0.93.0-rc.0 → 0.94.0-1
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/cjs-bundle/clients/index.js +1 -1
- package/clients/index.d.ts +4 -0
- package/clients/index.d.ts.map +1 -1
- package/clients/index.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),t=require("uuid"),r=require("lodash"),n=require("./clientStorage/index.js"),o=require("./jsonApi/index.js"),i=require("./subscriptions.js"),u=require("./api/apiCore.js"),c=require("./constants.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),t=require("uuid"),r=require("lodash"),n=require("./clientStorage/index.js"),o=require("./jsonApi/index.js"),i=require("./subscriptions.js"),u=require("./api/apiCore.js"),c=require("./constants.js"),a=require("./corvaUrls.js"),p=require("./sso/index.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=s(e);function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){l.default(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var f={get:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return u.get(e,t,r)},getWithHeaders:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return u.getWithHeaders(e,t,r)},put:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return u.put(e,t,r,n)},patch:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return u.patch(e,t,r,n)},post:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return u.post(e,t,r)},del:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return u.del(e,t,r)}},g={get:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return u.get(e,t,v({apiUrl:c.CORVA_API_URLS.DATA_API},r))},put:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return u.put(e,t,r,v({apiUrl:c.CORVA_API_URLS.DATA_API},n))},patch:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return u.patch(e,t,r,v({apiUrl:c.CORVA_API_URLS.DATA_API},n))},post:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return u.post(e,t,v({apiUrl:c.CORVA_API_URLS.DATA_API},r))},del:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return u.del(e,t,v({apiUrl:c.CORVA_API_URLS.DATA_API},r))}};function h(){if(window.xprops){var e,r,n,o,i,u=(null===(e=window.xprops)||void 0===e||null===(r=e.app)||void 0===r||null===(n=r.app)||void 0===n?void 0:n.id)||"unknown-app-id",c=(null===(o=window.xprops)||void 0===o||null===(i=o.app)||void 0===i?void 0:i.id)||"unknown-instance-id";return"".concat(u,":").concat(c,":").concat(t.v4())}return"non-dc-app:".concat(t.v4())}var A={subscribe:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.onDataReceive,o=void 0===n?r.noop:n,i=window[Symbol.for("socket")]||{},u=i.subscribe,c=i.unsubscribe,a=i.socket;if(!a)return console.error("Socket is not initialized!"),r.noop;var p=h(),s=v(v({},e),{},{collection:e.collection||e.dataset,appInstanceId:p});return u(s),a.on("data",(function(e){return e.appInstanceId===p&&o(e)})),function(){return c(s)}}};exports.clientStorage=n,exports.jsonApi=o,exports.subscriptions=i,exports.corvaUrls=a,exports.sso=p,exports.corvaAPI=f,exports.corvaDataAPI=g,exports.socketClient=A;
|
package/clients/index.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
export * as sso from "./sso";
|
|
2
2
|
export namespace corvaAPI {
|
|
3
3
|
function get(path: any, queryParams?: {}, requestOptions?: {}): Promise<any>;
|
|
4
|
+
function getWithHeaders(path: any, queryParams?: {}, requestOptions?: {}): Promise<{
|
|
5
|
+
data: any;
|
|
6
|
+
headers: any;
|
|
7
|
+
}>;
|
|
4
8
|
function put(path: any, content: any, queryParams?: {}, requestOptions?: {}): Promise<any>;
|
|
5
9
|
function patch(path: any, content: any, queryParams?: {}, requestOptions?: {}): Promise<any>;
|
|
6
10
|
function post(path: any, entity: any, requestOptions?: {}): Promise<any>;
|
package/clients/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/clients/index.js"],"names":[],"mappings":";;IAcO,6EAEJ;IACI,2FAEJ;IACM,6FAEN;IACK,yEAEL;IACI,6EAEJ;;;IAII,sFAC2E;;IAC3E,oGACoF;;IAClF,sGACoF;;IACrF,kFACsE;;IACvE,sFAC2E;;;;IAiBrE;;iCAuBV"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/clients/index.js"],"names":[],"mappings":";;IAcO,6EAEJ;IACe;;;OAEf;IACI,2FAEJ;IACM,6FAEN;IACK,yEAEL;IACI,6EAEJ;;;IAII,sFAC2E;;IAC3E,oGACoF;;IAClF,sGACoF;;IACrF,kFACsE;;IACvE,sFAC2E;;;;IAiBrE;;iCAuBV"}
|
package/clients/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"@babel/runtime/helpers/defineProperty";import{v4 as r}from"uuid";import{noop as n}from"lodash";import*as o from"./clientStorage/index.js";export{o as clientStorage};import*as e from"./jsonApi/index.js";export{e as jsonApi};import*as i from"./subscriptions.js";export{i as subscriptions};import{get as p,put as
|
|
1
|
+
import t from"@babel/runtime/helpers/defineProperty";import{v4 as r}from"uuid";import{noop as n}from"lodash";import*as o from"./clientStorage/index.js";export{o as clientStorage};import*as e from"./jsonApi/index.js";export{e as jsonApi};import*as i from"./subscriptions.js";export{i as subscriptions};import{get as a,getWithHeaders as p,put as c,patch as s,post as u,del as l}from"./api/apiCore.js";import{CORVA_API_URLS as d}from"./constants.js";import*as v from"./corvaUrls.js";export{v as corvaUrls};import*as f from"./sso/index.js";export{f as sso};function g(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),n.push.apply(n,o)}return n}function h(r){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?g(Object(o),!0).forEach((function(n){t(r,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):g(Object(o)).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(o,t))}))}return r}var m={get:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return a(t,r,n)},getWithHeaders:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return p(t,r,n)},put:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return c(t,r,n,o)},patch:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return s(t,r,n,o)},post:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return u(t,r,n)},del:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return l(t,r,n)}},b={get:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return a(t,r,h({apiUrl:d.DATA_API},n))},put:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return c(t,r,n,h({apiUrl:d.DATA_API},o))},patch:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return s(t,r,n,h({apiUrl:d.DATA_API},o))},post:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return u(t,r,h({apiUrl:d.DATA_API},n))},del:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return l(t,r,h({apiUrl:d.DATA_API},n))}};function j(){if(window.xprops){var t,n,o,e,i,a=(null===(t=window.xprops)||void 0===t||null===(n=t.app)||void 0===n||null===(o=n.app)||void 0===o?void 0:o.id)||"unknown-app-id",p=(null===(e=window.xprops)||void 0===e||null===(i=e.app)||void 0===i?void 0:i.id)||"unknown-instance-id";return"".concat(a,":").concat(p,":").concat(r())}return"non-dc-app:".concat(r())}var A={subscribe:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.onDataReceive,e=void 0===o?n:o,i=window[Symbol.for("socket")]||{},a=i.subscribe,p=i.unsubscribe,c=i.socket;if(!c)return console.error("Socket is not initialized!"),n;var s=j(),u=h(h({},t),{},{collection:t.collection||t.dataset,appInstanceId:s});return a(u),c.on("data",(function(t){return t.appInstanceId===s&&e(t)})),function(){return p(u)}}};export{m as corvaAPI,b as corvaDataAPI,A as socketClient};
|