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

@agility/app-sdk

Package Overview
Dependencies
Maintainers
4
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@agility/app-sdk - npm Package Compare versions

Comparing version 0.9.1 to 0.9.2

2

dist/agility-cms-app-sdk.browser.js

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

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("agilityAppSDK",[],e):"object"==typeof exports?exports.agilityAppSDK=e():t.agilityAppSDK=e()}("undefined"!=typeof self?self:this,(function(){return(()=>{var t={187:(t,e,n)=>{"use strict";n.d(e,{default:()=>T});var r={};n.r(r),n.d(r,{openFlyout:()=>p,subscribeToFieldValueChanges:()=>d,updateFieldValue:()=>h});var o={};n.r(o),n.d(o,{closeFlyout:()=>m});var i={};n.r(i),n.d(i,{initializeField:()=>L,initializeFlyout:()=>b,resolveAppComponent:()=>A,sdkVersion:()=>y.i8,setAppConfig:()=>P,types:()=>a});const a={APP_LOCATION_CUSTOM_FIELD:"CustomField",APP_LOCATION_FLYOUT:"Flyout",APP_LOCATION_UNKNOWN:"Unknown",APP_LOCATION_APP_CONFIG:"AppConfig",APP_FLYOUT_SIZE_SMALL:"Small",APP_FLYOUT_SIZE_LARGE:"Small"};var c=function(t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var e=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(window.location.search);return null===e?"":decodeURIComponent(e[1].replace(/\+/g," "))},u=function(t){var e=t.location,n=t.id,r=t.initiator;return"".concat(e,"_").concat(n,"_").concat(r.id)},s=function(t){var e=t.containerRef,n=t.messageID,r=0;setInterval((function(){var t=e.current?e.current.offsetHeight:e.offsetHeight;t!=r&&(console.log("height changed!"),function(t){var e=t.height,n=t.messageID;window.parent&&window.parent.postMessage({message:e,type:"setHeight_for_".concat(n)},"*")}({height:t,messageID:n})),r=t}),500)},l=function(t){var e=t.message,n=t.messageChannel;window.parent&&window.parent.postMessage({message:e,type:n},"*")},f=function(t){var e=t.messageChannel,n=t.persist,r=void 0!==n&&n;return new Promise((function(t){window.addEventListener("message",(function n(o){if(o.data.type===e)return r||removeEventListener("message",n,!1),void t(o.data.message)}),!1)}))},h=function(t){var e=t.fieldName,n=t.fieldValue,r=u({location:this.location,initiator:this.initiator,id:this.id});e||(e=this.field.name),l({message:{fieldName:e,fieldValue:n},messageChannel:"setNewValue_for_".concat(r)})},p=function(t){var e=t.title,n=t.size,r=t.name,o=t.onClose,i=t.params,c=u({location:a.APP_LOCATION_CUSTOM_FIELD,initiator:this.initiator,id:this.id});l({message:{title:e,size:n,name:r,params:i},messageChannel:"openFlyout_for_".concat(c)}),f({messageChannel:"closeFlyoutCallback_for_".concat(c)}).then((function(t){o(t)}))},d=function(t){var e=t.fieldName,n=t.onChange,r=u({location:a.APP_LOCATION_CUSTOM_FIELD,initiator:this.initiator,id:this.ids});f({messageChannel:"otherValueChanged_".concat(e,"_for_").concat(r),persist:!0}).then((function(t){n(t)})),l({message:e,messageChannel:"subscribeToOtherValueChanges_".concat(r)})},m=function(t){var e=t.params,n=a.APP_LOCATION_CUSTOM_FIELD,r=u({location:a.APP_LOCATION_CUSTOM_FIELD,initiator:{name:"system",id:null},id:this.initiator.id});l({message:{location:n,fieldName:this.initiator.name,fieldID:this.initiator.id,params:e},messageChannel:"closeFlyout_for_".concat(r)})};n(666);const y={i8:"0.9.1"};function g(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function v(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?g(Object(n),!0).forEach((function(e){_(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function _(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function O(t,e,n,r,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void n(t)}c.done?e(u):Promise.resolve(u).then(r,o)}function w(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){O(i,r,o,a,c,"next",t)}function c(t){O(i,r,o,a,c,"throw",t)}a(void 0)}))}}var P=function(t){t.__sdkVersion=y.i8;var e=c("appDefinitionID");l({message:t,messageChannel:"setAppConfig_for_".concat(e)})},L=function(){var t=w(regeneratorRuntime.mark((function t(e){var n,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.containerRef,t.next=4,C({containerRef:n,location:a.APP_LOCATION_CUSTOM_FIELD});case 4:return r=t.sent,t.abrupt("return",r);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),b=function(){var t=w(regeneratorRuntime.mark((function t(e){var n,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.containerRef,t.next=3,C({containerRef:n,location:a.APP_LOCATION_FLYOUT});case 3:return r=t.sent,t.abrupt("return",r);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),C=function(){var t=w(regeneratorRuntime.mark((function t(e){var n,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.containerRef,i=e.location,t.abrupt("return",new Promise((function(t){var e={name:c("initiatorName"),id:c("initiatorID").length>0?c("initiatorID"):null},h=null;i===a.APP_LOCATION_CUSTOM_FIELD?h=c("fieldID"):i===a.APP_LOCATION_FLYOUT&&(h=c("flyoutName"));var p=u({location:i,id:h,initiator:e});s({containerRef:n,messageID:p}),f({messageChannel:"setInitialProps_for_".concat(p)}).then((function(e){e.location=i;var n={};i===a.APP_LOCATION_CUSTOM_FIELD?n=r:i===a.APP_LOCATION_FLYOUT&&(n=o),t(v(v({},e),n))})),l({message:"ready",messageChannel:"ready_for_".concat(p)})})));case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),A=function(t){var e=I(),n=t.appComponents.find((function(t){return t.location===e.location&&(!e.name||t.name===e.name)}));return n?n.componentToRender:e.location===a.APP_LOCATION_APP_CONFIG?a.APP_LOCATION_APP_CONFIG:void console.error("Could not render the '"+t.name+"' component for '"+e.location+"' with the name of '"+e.name+"'")},I=function(){var t=c("location");return t===a.APP_LOCATION_CUSTOM_FIELD?{location:t,name:c("fieldTypeName")}:t===a.APP_LOCATION_APP_CONFIG?{location:t}:t===a.APP_LOCATION_FLYOUT?{location:t,name:c("flyoutName")}:{location:a.APP_LOCATION_UNKNOWN,name:null}};const T=i},666:t=>{var e=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var o=e&&e.prototype instanceof y?e:y,i=Object.create(o.prototype),a=new T(r||[]);return i._invoke=function(t,e,n){var r=f;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===d){if("throw"===o)throw i;return x()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=C(a,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var u=l(t,e,n);if("normal"===u.type){if(r=n.done?d:h,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=d,n.method="throw",n.arg=u.arg)}}}(t,n,a),i}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f="suspendedStart",h="suspendedYield",p="executing",d="completed",m={};function y(){}function g(){}function v(){}var _={};u(_,i,(function(){return this}));var O=Object.getPrototypeOf,w=O&&O(O(N([])));w&&w!==n&&r.call(w,i)&&(_=w);var P=v.prototype=y.prototype=Object.create(_);function L(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function n(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function C(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method))return m;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var o=l(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function N(t){if(t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}return{next:x}}function x(){return{value:e,done:!0}}return g.prototype=v,u(P,"constructor",v),u(v,"constructor",g),g.displayName=u(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,u(t,c,"GeneratorFunction")),t.prototype=Object.create(P),t},t.awrap=function(t){return{__await:t}},L(b.prototype),u(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new b(s(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(P),u(P,c,"Generator"),u(P,i,(function(){return this})),u(P,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=N,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(I),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return c.type="throw",c.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),I(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;I(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:N(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r=n(187);return r.default})()}));
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("agilityAppSDK",[],e):"object"==typeof exports?exports.agilityAppSDK=e():t.agilityAppSDK=e()}("undefined"!=typeof self?self:this,(function(){return(()=>{var t={187:(t,e,n)=>{"use strict";n.d(e,{default:()=>T});var r={};n.r(r),n.d(r,{openFlyout:()=>p,subscribeToFieldValueChanges:()=>d,updateFieldValue:()=>h});var o={};n.r(o),n.d(o,{closeFlyout:()=>m});var i={};n.r(i),n.d(i,{initializeField:()=>L,initializeFlyout:()=>b,resolveAppComponent:()=>A,sdkVersion:()=>y.i8,setAppConfig:()=>P,types:()=>a});const a={APP_LOCATION_CUSTOM_FIELD:"CustomField",APP_LOCATION_FLYOUT:"Flyout",APP_LOCATION_UNKNOWN:"Unknown",APP_LOCATION_APP_CONFIG:"AppConfig",APP_FLYOUT_SIZE_SMALL:"Small",APP_FLYOUT_SIZE_LARGE:"Small"};var c=function(t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var e=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(window.location.search);return null===e?"":decodeURIComponent(e[1].replace(/\+/g," "))},u=function(t){var e=t.location,n=t.id,r=t.initiator;return"".concat(e,"_").concat(n,"_").concat(r.id)},s=function(t){var e=t.containerRef,n=t.messageID,r=0;setInterval((function(){var t=e.current?e.current.offsetHeight:e.offsetHeight;t!=r&&(console.log("height changed!"),function(t){var e=t.height,n=t.messageID;window.parent&&window.parent.postMessage({message:e,type:"setHeight_for_".concat(n)},"*")}({height:t,messageID:n})),r=t}),500)},l=function(t){var e=t.message,n=t.messageChannel;window.parent&&window.parent.postMessage({message:e,type:n},"*")},f=function(t){var e=t.messageChannel,n=t.persist,r=void 0!==n&&n;return new Promise((function(t){window.addEventListener("message",(function n(o){if(o.data.type===e)return r||removeEventListener("message",n,!1),void t(o.data.message)}),!1)}))},h=function(t){var e=t.fieldName,n=t.fieldValue,r=u({location:this.location,initiator:this.initiator,id:this.id});e||(e=this.field.name),l({message:{fieldName:e,fieldValue:n},messageChannel:"setNewValue_for_".concat(r)})},p=function(t){var e=t.title,n=t.size,r=t.name,o=t.onClose,i=t.params,c=u({location:a.APP_LOCATION_CUSTOM_FIELD,initiator:this.initiator,id:this.id});l({message:{title:e,size:n,name:r,params:i},messageChannel:"openFlyout_for_".concat(c)}),f({messageChannel:"closeFlyoutCallback_for_".concat(c)}).then((function(t){o(t)}))},d=function(t){var e=t.fieldName,n=t.onChange,r=u({location:a.APP_LOCATION_CUSTOM_FIELD,initiator:this.initiator,id:this.ids});f({messageChannel:"otherValueChanged_".concat(e,"_for_").concat(r),persist:!0}).then((function(t){n(t)})),l({message:e,messageChannel:"subscribeToOtherValueChanges_".concat(r)})},m=function(t){var e=t.params,n=a.APP_LOCATION_CUSTOM_FIELD,r=u({location:a.APP_LOCATION_CUSTOM_FIELD,initiator:{name:"system",id:null},id:this.initiator.id});l({message:{location:n,fieldName:this.initiator.name,fieldID:this.initiator.id,params:e},messageChannel:"closeFlyout_for_".concat(r)})};n(666);const y={i8:"0.9.2"};function g(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function v(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?g(Object(n),!0).forEach((function(e){_(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function _(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function O(t,e,n,r,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void n(t)}c.done?e(u):Promise.resolve(u).then(r,o)}function w(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){O(i,r,o,a,c,"next",t)}function c(t){O(i,r,o,a,c,"throw",t)}a(void 0)}))}}var P=function(t){t.__sdkVersion=y.i8;var e=c("appDefinitionID");l({message:t,messageChannel:"setAppConfig_for_".concat(e)})},L=function(){var t=w(regeneratorRuntime.mark((function t(e){var n,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.containerRef,t.next=3,C({containerRef:n,location:a.APP_LOCATION_CUSTOM_FIELD});case 3:return r=t.sent,t.abrupt("return",r);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),b=function(){var t=w(regeneratorRuntime.mark((function t(e){var n,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.containerRef,t.next=3,C({containerRef:n,location:a.APP_LOCATION_FLYOUT});case 3:return r=t.sent,t.abrupt("return",r);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),C=function(){var t=w(regeneratorRuntime.mark((function t(e){var n,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.containerRef,i=e.location,t.abrupt("return",new Promise((function(t){var e={name:c("initiatorName"),id:c("initiatorID").length>0?c("initiatorID"):null},h=null;i===a.APP_LOCATION_CUSTOM_FIELD?h=c("fieldID"):i===a.APP_LOCATION_FLYOUT&&(h=c("flyoutName"));var p=u({location:i,id:h,initiator:e});s({containerRef:n,messageID:p}),f({messageChannel:"setInitialProps_for_".concat(p)}).then((function(e){e.location=i;var n={};i===a.APP_LOCATION_CUSTOM_FIELD?n=r:i===a.APP_LOCATION_FLYOUT&&(n=o),t(v(v({},e),n))})),l({message:"ready",messageChannel:"ready_for_".concat(p)})})));case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),A=function(t){var e=I(),n=t.appComponents.find((function(t){return t.location===e.location&&(!e.name||t.name===e.name)}));return n?n.componentToRender:e.location===a.APP_LOCATION_APP_CONFIG?a.APP_LOCATION_APP_CONFIG:void console.error("Could not render the '"+t.name+"' component for '"+e.location+"' with the name of '"+e.name+"'")},I=function(){var t=c("location");return t===a.APP_LOCATION_CUSTOM_FIELD?{location:t,name:c("fieldTypeName")}:t===a.APP_LOCATION_APP_CONFIG?{location:t}:t===a.APP_LOCATION_FLYOUT?{location:t,name:c("flyoutName")}:{location:a.APP_LOCATION_UNKNOWN,name:null}};const T=i},666:t=>{var e=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var o=e&&e.prototype instanceof y?e:y,i=Object.create(o.prototype),a=new T(r||[]);return i._invoke=function(t,e,n){var r=f;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===d){if("throw"===o)throw i;return x()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=C(a,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var u=l(t,e,n);if("normal"===u.type){if(r=n.done?d:h,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=d,n.method="throw",n.arg=u.arg)}}}(t,n,a),i}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f="suspendedStart",h="suspendedYield",p="executing",d="completed",m={};function y(){}function g(){}function v(){}var _={};u(_,i,(function(){return this}));var O=Object.getPrototypeOf,w=O&&O(O(N([])));w&&w!==n&&r.call(w,i)&&(_=w);var P=v.prototype=y.prototype=Object.create(_);function L(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function n(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function C(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method))return m;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var o=l(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function N(t){if(t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}return{next:x}}function x(){return{value:e,done:!0}}return g.prototype=v,u(P,"constructor",v),u(v,"constructor",g),g.displayName=u(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,u(t,c,"GeneratorFunction")),t.prototype=Object.create(P),t},t.awrap=function(t){return{__await:t}},L(b.prototype),u(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new b(s(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(P),u(P,c,"Generator"),u(P,i,(function(){return this})),u(P,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=N,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(I),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return c.type="throw",c.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),I(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;I(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:N(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r=n(187);return r.default})()}));

@@ -247,3 +247,3 @@ (function webpackUniversalModuleDefinition(root, factory) {

;// CONCATENATED MODULE: ./package.json
const package_namespaceObject = {"i8":"0.9.1"};
const package_namespaceObject = {"i8":"0.9.2"};
;// CONCATENATED MODULE: ./src/sdk.js

@@ -266,6 +266,5 @@ function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) {symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});}keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {try {var info = gen[key](arg);var value = info.value;} catch (error) {reject(error);return;}if (info.done) {resolve(value);} else {Promise.resolve(value).then(_next, _throw);}}function _asyncToGenerator(fn) {return function () {var self = this,args = arguments;return new Promise(function (resolve, reject) {var gen = fn.apply(self, args);function _next(value) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);}function _throw(err) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);}_next(undefined);});};}

var initializeField = /*#__PURE__*/function () {var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(_ref) {var containerRef, fieldSDK;return regeneratorRuntime.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:containerRef = _ref.containerRef;
debugger;_context.next = 4;return (
initializeAppComponent({ containerRef: containerRef, location: types.APP_LOCATION_CUSTOM_FIELD }));case 4:fieldSDK = _context.sent;return _context.abrupt("return",
fieldSDK);case 6:case "end":return _context.stop();}}}, _callee);}));return function initializeField(_x) {return _ref2.apply(this, arguments);};}();
var initializeField = /*#__PURE__*/function () {var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(_ref) {var containerRef, fieldSDK;return regeneratorRuntime.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:containerRef = _ref.containerRef;_context.next = 3;return (
initializeAppComponent({ containerRef: containerRef, location: types.APP_LOCATION_CUSTOM_FIELD }));case 3:fieldSDK = _context.sent;return _context.abrupt("return",
fieldSDK);case 5:case "end":return _context.stop();}}}, _callee);}));return function initializeField(_x) {return _ref2.apply(this, arguments);};}();

@@ -278,7 +277,6 @@

var initializeAppComponent = /*#__PURE__*/function () {var _ref6 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(_ref5) {var containerRef, location;return regeneratorRuntime.wrap(function _callee3$(_context3) {while (1) {switch (_context3.prev = _context3.next) {case 0:containerRef = _ref5.containerRef, location = _ref5.location;
debugger;
// returns different available methods depending on whether this is a CustomField or a Flyout
return _context3.abrupt("return", new Promise(function (resolve) {
var initializeAppComponent = /*#__PURE__*/function () {var _ref6 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(_ref5) {var containerRef, location;return regeneratorRuntime.wrap(function _callee3$(_context3) {while (1) {switch (_context3.prev = _context3.next) {case 0:containerRef = _ref5.containerRef, location = _ref5.location;return _context3.abrupt("return",
new Promise(function (resolve) {
var initiator = {

@@ -322,3 +320,3 @@ name: getUrlParameter('initiatorName'),

}));case 3:case "end":return _context3.stop();}}}, _callee3);}));return function initializeAppComponent(_x3) {return _ref6.apply(this, arguments);};}();
}));case 2:case "end":return _context3.stop();}}}, _callee3);}));return function initializeAppComponent(_x3) {return _ref6.apply(this, arguments);};}();

@@ -325,0 +323,0 @@

{
"name": "@agility/app-sdk",
"version": "0.9.1",
"version": "0.9.2",
"description": "JavaScript library for building Agility CMS apps.",

@@ -5,0 +5,0 @@ "main": "dist/agility-cms-app-sdk.node.js",

@@ -18,3 +18,2 @@ import * as fieldMethods from './fields'

const initializeField = async ({ containerRef }) => {
debugger;
const fieldSDK = await initializeAppComponent({ containerRef, location: types.APP_LOCATION_CUSTOM_FIELD })

@@ -30,3 +29,2 @@ return fieldSDK;

const initializeAppComponent = async ({ containerRef, location}) => {
debugger;
// returns different available methods depending on whether this is a CustomField or a Flyout

@@ -33,0 +31,0 @@ return new Promise(resolve => {

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