Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@graphcms/app-sdk

Package Overview
Dependencies
Maintainers
11
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphcms/app-sdk - npm Package Compare versions

Comparing version 0.0.3-alpha.0 to 0.0.4-alpha.0

dist/type-helpers/appInstallation.d.ts

7

dist/app-sdk.cjs.development.js

@@ -56,2 +56,8 @@ 'use strict';

var AppInstallationStatus = {
COMPLETED: 'COMPLETED',
DISABLED: 'DISABLED',
PENDING: 'PENDING'
};
var _excluded = ["onProps", "onConnected", "resize"],

@@ -170,2 +176,3 @@ _excluded2 = ["onProps", "onConnected"];

exports.AppInstallationStatus = AppInstallationStatus;
exports.default = index;

@@ -172,0 +179,0 @@ exports.init = init;

2

dist/app-sdk.cjs.production.min.js

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,o=(e=require("@graphcms/zoid/lib/zoid.js"))&&"object"==typeof e&&"default"in e?e.default:e;function n(e,o){if(null==e)return{};var n,r,i={},t=Object.keys(e);for(r=0;r<t.length;r++)o.indexOf(n=t[r])>=0||(i[n]=e[n]);return i}var r,i,t,s=["timeout","window","close","focus","resize","uid","cspNonce","getParent","getParentDomain","hide","show","export","onDisplay","onRendered","onRender","onClose","onDestroy","onResize","onFocus","onError","onProps"];(r=exports.ExtensionPermission||(exports.ExtensionPermission={})).INPUT="INPUT",r.FORM="FORM",r.API="API",(i=exports.FieldExtensionType||(exports.FieldExtensionType={})).STRING="STRING",i.RICHTEXT="RICHTEXT",i.INT="INT",i.FLOAT="FLOAT",i.BOOLEAN="BOOLEAN",i.JSON="JSON",i.DATETIME="DATETIME",i.DATE="DATE",i.LOCATION="LOCATION",i.COLOR="COLOR",i.ENUMERATION="ENUMERATION",i.RELATION="RELATION",i.ASSET="ASSET",i.UNION="UNION",(t=exports.FieldExtensionFeature||(exports.FieldExtensionFeature={})).FieldRenderer="FieldRenderer",t.ListRenderer="ListRenderer",t.TableRenderer="TableRenderer";var d=["onProps","onConnected","resize"],a=["onProps","onConnected"];function p(e){var o={};return Object.keys(e).forEach((function(n){s.includes(n)||(n.startsWith("_")&&s.includes(n.replace(/^_/g,""))?o[n.replace(/^_/g,"")]=e[n]:o[n]=e[n])})),o}function u(e){var r=e.debug,i=e.onProps,t=void 0===i?function(){}:i,s=e.uid;return new Promise((function(e,i){if("undefined"==typeof window||void 0===window.postMessage)return i({error:"unsupported_env",message:"Unsupported environment: Not in a browser supporting PostMessage"});var u=s||"undefined"!=typeof URLSearchParams&&new URLSearchParams(window.location.search).get("extensionUid");if(!u)return r&&console.error("[UIX] no uid found in init params or extension URL"),i({error:"missing_uid",message:"Missing UID: no UID found in init params or extension URL"});r&&console.info("[UIX:"+u+"] initializing with uid "+u),o.create({tag:u,url:window.location.href.toString(),autoResize:{width:!1,height:!0,element:"html"},props:{onConnected:{type:"function"}}}),void 0!==window.xprops?(0,window.xprops.onConnected)(u).then((function(o){if(!0===o){var i=window.xprops,s=i.onProps,c=i.resize,l=n(i,d);r&&console.info("[UIX:"+u+"] initial shared props",l),s((function(e){var o=n(e,a);r&&console.info("[UIX:"+u+"] new shared props",o),"boolean"==typeof e.isExpanded&&c(e.isExpanded?{height:"full",width:"100%"}:{height:"auto",width:"100%"}),t(p(o))})),r&&console.info("[UIX:"+u+"] initialized"),t(p(l)),e({status:"ok",props:p(l)})}else r&&console.info("[UIX:"+u+"] sdk renderer returned status:",o),e({status:"validation"})})):(r&&console.error("[UIX] no shared props from host found"),i({error:"failed_communication",message:"No communication established with host, please check your URL"}))}))}exports.default={init:u},exports.init=u,exports.reservedExtensionProps=s;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,o=(e=require("@graphcms/zoid/lib/zoid.js"))&&"object"==typeof e&&"default"in e?e.default:e;function n(e,o){if(null==e)return{};var n,r,i={},t=Object.keys(e);for(r=0;r<t.length;r++)o.indexOf(n=t[r])>=0||(i[n]=e[n]);return i}var r,i,t,s=["timeout","window","close","focus","resize","uid","cspNonce","getParent","getParentDomain","hide","show","export","onDisplay","onRendered","onRender","onClose","onDestroy","onResize","onFocus","onError","onProps"];(r=exports.ExtensionPermission||(exports.ExtensionPermission={})).INPUT="INPUT",r.FORM="FORM",r.API="API",(i=exports.FieldExtensionType||(exports.FieldExtensionType={})).STRING="STRING",i.RICHTEXT="RICHTEXT",i.INT="INT",i.FLOAT="FLOAT",i.BOOLEAN="BOOLEAN",i.JSON="JSON",i.DATETIME="DATETIME",i.DATE="DATE",i.LOCATION="LOCATION",i.COLOR="COLOR",i.ENUMERATION="ENUMERATION",i.RELATION="RELATION",i.ASSET="ASSET",i.UNION="UNION",(t=exports.FieldExtensionFeature||(exports.FieldExtensionFeature={})).FieldRenderer="FieldRenderer",t.ListRenderer="ListRenderer",t.TableRenderer="TableRenderer";var d=["onProps","onConnected","resize"],a=["onProps","onConnected"];function p(e){var o={};return Object.keys(e).forEach((function(n){s.includes(n)||(n.startsWith("_")&&s.includes(n.replace(/^_/g,""))?o[n.replace(/^_/g,"")]=e[n]:o[n]=e[n])})),o}function u(e){var r=e.debug,i=e.onProps,t=void 0===i?function(){}:i,s=e.uid;return new Promise((function(e,i){if("undefined"==typeof window||void 0===window.postMessage)return i({error:"unsupported_env",message:"Unsupported environment: Not in a browser supporting PostMessage"});var u=s||"undefined"!=typeof URLSearchParams&&new URLSearchParams(window.location.search).get("extensionUid");if(!u)return r&&console.error("[UIX] no uid found in init params or extension URL"),i({error:"missing_uid",message:"Missing UID: no UID found in init params or extension URL"});r&&console.info("[UIX:"+u+"] initializing with uid "+u),o.create({tag:u,url:window.location.href.toString(),autoResize:{width:!1,height:!0,element:"html"},props:{onConnected:{type:"function"}}}),void 0!==window.xprops?(0,window.xprops.onConnected)(u).then((function(o){if(!0===o){var i=window.xprops,s=i.onProps,l=i.resize,c=n(i,d);r&&console.info("[UIX:"+u+"] initial shared props",c),s((function(e){var o=n(e,a);r&&console.info("[UIX:"+u+"] new shared props",o),"boolean"==typeof e.isExpanded&&l(e.isExpanded?{height:"full",width:"100%"}:{height:"auto",width:"100%"}),t(p(o))})),r&&console.info("[UIX:"+u+"] initialized"),t(p(c)),e({status:"ok",props:p(c)})}else r&&console.info("[UIX:"+u+"] sdk renderer returned status:",o),e({status:"validation"})})):(r&&console.error("[UIX] no shared props from host found"),i({error:"failed_communication",message:"No communication established with host, please check your URL"}))}))}var l={init:u};exports.AppInstallationStatus={COMPLETED:"COMPLETED",DISABLED:"DISABLED",PENDING:"PENDING"},exports.default=l,exports.init=u,exports.reservedExtensionProps=s;
//# sourceMappingURL=app-sdk.cjs.production.min.js.map

@@ -55,2 +55,8 @@ import zoid from '@graphcms/zoid/lib/zoid.js';

var AppInstallationStatus = {
COMPLETED: 'COMPLETED',
DISABLED: 'DISABLED',
PENDING: 'PENDING'
};
var _excluded = ["onProps", "onConnected", "resize"],

@@ -170,3 +176,3 @@ _excluded2 = ["onProps", "onConnected"];

export default index;
export { ExtensionPermission, FieldExtensionFeature, FieldExtensionType, init, reservedExtensionProps };
export { AppInstallationStatus, ExtensionPermission, FieldExtensionFeature, FieldExtensionType, init, reservedExtensionProps };
//# sourceMappingURL=app-sdk.esm.js.map

@@ -56,2 +56,8 @@ (function (global, factory) {

var AppInstallationStatus = {
COMPLETED: 'COMPLETED',
DISABLED: 'DISABLED',
PENDING: 'PENDING'
};
var _excluded = ["onProps", "onConnected", "resize"],

@@ -170,2 +176,3 @@ _excluded2 = ["onProps", "onConnected"];

exports.AppInstallationStatus = AppInstallationStatus;
exports.default = index;

@@ -172,0 +179,0 @@ exports.init = init;

@@ -1,2 +0,2 @@

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@graphcms/zoid/lib/zoid.js")):"function"==typeof define&&define.amd?define(["exports","@graphcms/zoid/lib/zoid.js"],n):n((e=e||self)["@graphcms/app-sdk"]={},e.zoid)}(this,(function(e,n){"use strict";function o(e,n){if(null==e)return{};var o,i,r={},t=Object.keys(e);for(i=0;i<t.length;i++)n.indexOf(o=t[i])>=0||(r[o]=e[o]);return r}n=n&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n;var i,r,t,s=["timeout","window","close","focus","resize","uid","cspNonce","getParent","getParentDomain","hide","show","export","onDisplay","onRendered","onRender","onClose","onDestroy","onResize","onFocus","onError","onProps"];(i=e.ExtensionPermission||(e.ExtensionPermission={})).INPUT="INPUT",i.FORM="FORM",i.API="API",(r=e.FieldExtensionType||(e.FieldExtensionType={})).STRING="STRING",r.RICHTEXT="RICHTEXT",r.INT="INT",r.FLOAT="FLOAT",r.BOOLEAN="BOOLEAN",r.JSON="JSON",r.DATETIME="DATETIME",r.DATE="DATE",r.LOCATION="LOCATION",r.COLOR="COLOR",r.ENUMERATION="ENUMERATION",r.RELATION="RELATION",r.ASSET="ASSET",r.UNION="UNION",(t=e.FieldExtensionFeature||(e.FieldExtensionFeature={})).FieldRenderer="FieldRenderer",t.ListRenderer="ListRenderer",t.TableRenderer="TableRenderer";var d=["onProps","onConnected","resize"],a=["onProps","onConnected"];function u(e){var n={};return Object.keys(e).forEach((function(o){s.includes(o)||(o.startsWith("_")&&s.includes(o.replace(/^_/g,""))?n[o.replace(/^_/g,"")]=e[o]:n[o]=e[o])})),n}function p(e){var i=e.debug,r=e.onProps,t=void 0===r?function(){}:r,s=e.uid;return new Promise((function(e,r){if("undefined"==typeof window||void 0===window.postMessage)return r({error:"unsupported_env",message:"Unsupported environment: Not in a browser supporting PostMessage"});var p=s||"undefined"!=typeof URLSearchParams&&new URLSearchParams(window.location.search).get("extensionUid");if(!p)return i&&console.error("[UIX] no uid found in init params or extension URL"),r({error:"missing_uid",message:"Missing UID: no UID found in init params or extension URL"});i&&console.info("[UIX:"+p+"] initializing with uid "+p),n.create({tag:p,url:window.location.href.toString(),autoResize:{width:!1,height:!0,element:"html"},props:{onConnected:{type:"function"}}}),void 0!==window.xprops?(0,window.xprops.onConnected)(p).then((function(n){if(!0===n){var r=window.xprops,s=r.onProps,c=r.resize,l=o(r,d);i&&console.info("[UIX:"+p+"] initial shared props",l),s((function(e){var n=o(e,a);i&&console.info("[UIX:"+p+"] new shared props",n),"boolean"==typeof e.isExpanded&&c(e.isExpanded?{height:"full",width:"100%"}:{height:"auto",width:"100%"}),t(u(n))})),i&&console.info("[UIX:"+p+"] initialized"),t(u(l)),e({status:"ok",props:u(l)})}else i&&console.info("[UIX:"+p+"] sdk renderer returned status:",n),e({status:"validation"})})):(i&&console.error("[UIX] no shared props from host found"),r({error:"failed_communication",message:"No communication established with host, please check your URL"}))}))}e.default={init:p},e.init=p,e.reservedExtensionProps=s,Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@graphcms/zoid/lib/zoid.js")):"function"==typeof define&&define.amd?define(["exports","@graphcms/zoid/lib/zoid.js"],n):n((e=e||self)["@graphcms/app-sdk"]={},e.zoid)}(this,(function(e,n){"use strict";function o(e,n){if(null==e)return{};var o,i,r={},t=Object.keys(e);for(i=0;i<t.length;i++)n.indexOf(o=t[i])>=0||(r[o]=e[o]);return r}n=n&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n;var i,r,t,s=["timeout","window","close","focus","resize","uid","cspNonce","getParent","getParentDomain","hide","show","export","onDisplay","onRendered","onRender","onClose","onDestroy","onResize","onFocus","onError","onProps"];(i=e.ExtensionPermission||(e.ExtensionPermission={})).INPUT="INPUT",i.FORM="FORM",i.API="API",(r=e.FieldExtensionType||(e.FieldExtensionType={})).STRING="STRING",r.RICHTEXT="RICHTEXT",r.INT="INT",r.FLOAT="FLOAT",r.BOOLEAN="BOOLEAN",r.JSON="JSON",r.DATETIME="DATETIME",r.DATE="DATE",r.LOCATION="LOCATION",r.COLOR="COLOR",r.ENUMERATION="ENUMERATION",r.RELATION="RELATION",r.ASSET="ASSET",r.UNION="UNION",(t=e.FieldExtensionFeature||(e.FieldExtensionFeature={})).FieldRenderer="FieldRenderer",t.ListRenderer="ListRenderer",t.TableRenderer="TableRenderer";var d=["onProps","onConnected","resize"],a=["onProps","onConnected"];function p(e){var n={};return Object.keys(e).forEach((function(o){s.includes(o)||(o.startsWith("_")&&s.includes(o.replace(/^_/g,""))?n[o.replace(/^_/g,"")]=e[o]:n[o]=e[o])})),n}function u(e){var i=e.debug,r=e.onProps,t=void 0===r?function(){}:r,s=e.uid;return new Promise((function(e,r){if("undefined"==typeof window||void 0===window.postMessage)return r({error:"unsupported_env",message:"Unsupported environment: Not in a browser supporting PostMessage"});var u=s||"undefined"!=typeof URLSearchParams&&new URLSearchParams(window.location.search).get("extensionUid");if(!u)return i&&console.error("[UIX] no uid found in init params or extension URL"),r({error:"missing_uid",message:"Missing UID: no UID found in init params or extension URL"});i&&console.info("[UIX:"+u+"] initializing with uid "+u),n.create({tag:u,url:window.location.href.toString(),autoResize:{width:!1,height:!0,element:"html"},props:{onConnected:{type:"function"}}}),void 0!==window.xprops?(0,window.xprops.onConnected)(u).then((function(n){if(!0===n){var r=window.xprops,s=r.onProps,c=r.resize,l=o(r,d);i&&console.info("[UIX:"+u+"] initial shared props",l),s((function(e){var n=o(e,a);i&&console.info("[UIX:"+u+"] new shared props",n),"boolean"==typeof e.isExpanded&&c(e.isExpanded?{height:"full",width:"100%"}:{height:"auto",width:"100%"}),t(p(n))})),i&&console.info("[UIX:"+u+"] initialized"),t(p(l)),e({status:"ok",props:p(l)})}else i&&console.info("[UIX:"+u+"] sdk renderer returned status:",n),e({status:"validation"})})):(i&&console.error("[UIX] no shared props from host found"),r({error:"failed_communication",message:"No communication established with host, please check your URL"}))}))}var c={init:u};e.AppInstallationStatus={COMPLETED:"COMPLETED",DISABLED:"DISABLED",PENDING:"PENDING"},e.default=c,e.init=u,e.reservedExtensionProps=s,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=app-sdk.umd.production.min.js.map
import type { ExtensionPropsBase } from './base';
import type { AppInstallation } from './type-helpers/appInstallation';
declare type UpdateInstallation = (arg: Partial<Pick<AppInstallation, 'config' | 'status'>>) => Promise<AppInstallation>;
export interface AppProps extends ExtensionPropsBase<any> {
useInstallApp: () => [(args: any) => Promise<any>, {
loading: boolean;
error: any;
data: any;
}];
updateInstallation: UpdateInstallation;
installation: AppInstallation;
}
export {};
import type { Form } from './type-helpers/form';
import type { ExtensionPropsBase, FieldConfig } from './base';
import type { Model } from './type-helpers/model';
import type { AppInstallation } from './type-helpers/appInstallation';
export declare enum FieldExtensionType {

@@ -66,2 +67,3 @@ STRING = "STRING",

model: Model;
installation: AppInstallation;
}

@@ -7,2 +7,3 @@ import type { ExtensionPropsBase, FormSidebarConfig } from './base';

import type { User } from './type-helpers/user';
import type { AppInstallation } from './type-helpers/appInstallation';
export interface FormSidebarExtensionProps extends ExtensionPropsBase<FormSidebarConfig> {

@@ -20,2 +21,3 @@ form: Form;

};
installation: AppInstallation;
}

@@ -12,2 +12,3 @@ import { ExtensionDialogProps } from './base';

export { FieldExtensionFeature, FieldExtensionType } from './field';
export * from './type-helpers/appInstallation';
export declare type ExtensionProps = FieldExtensionProps | FormSidebarExtensionProps | ExtensionDialogProps;

@@ -14,0 +15,0 @@ declare type Xprops = {

{
"name": "@graphcms/app-sdk",
"version": "0.0.3-alpha.0",
"version": "0.0.4-alpha.0",
"license": "MIT",

@@ -39,3 +39,3 @@ "author": "Frederik Eychenié",

},
"gitHead": "dc4f332ac8e86f58b2d3f1e9d14f8c9e9dfd9c0e"
"gitHead": "9e49cdc6f2374b6e52a1d4eb2bec9d02a385402f"
}
import type { ExtensionPropsBase } from './base';
import type { AppInstallation } from './type-helpers/appInstallation';
type UpdateInstallation = (
arg: Partial<Pick<AppInstallation, 'config' | 'status'>>
) => Promise<AppInstallation>;
export interface AppProps extends ExtensionPropsBase<any> {
useInstallApp: () => [
(args: any) => Promise<any>,
{ loading: boolean; error: any; data: any }
];
updateInstallation: UpdateInstallation;
installation: AppInstallation;
}
import type { Form } from './type-helpers/form';
import type { ExtensionPropsBase, FieldConfig } from './base';
import type { Model } from './type-helpers/model';
import type { AppInstallation } from './type-helpers/appInstallation';

@@ -85,2 +86,3 @@ export enum FieldExtensionType {

model: Model;
installation: AppInstallation;
}

@@ -7,2 +7,3 @@ import type { ExtensionPropsBase, FormSidebarConfig } from './base';

import type { User } from './type-helpers/user';
import type { AppInstallation } from './type-helpers/appInstallation';

@@ -22,2 +23,3 @@ export interface FormSidebarExtensionProps

};
installation: AppInstallation;
}

@@ -27,2 +27,3 @@ import zoid from '@graphcms/zoid/lib/zoid.js';

export { FieldExtensionFeature, FieldExtensionType } from './field';
export * from './type-helpers/appInstallation';

@@ -29,0 +30,0 @@ export type ExtensionProps =

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc