@maxdigital/sdk.js
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -16,4 +16,4 @@ parcelRequire=function(e,r,n,t){var i="function"==typeof parcelRequire&&parcelRequire,o="function"==typeof require&&require;function u(n,t){if(!r[n]){if(!e[n]){var f="function"==typeof parcelRequire&&parcelRequire;if(!t&&f)return f(n,!0);if(i)return i(n,!0);if(o&&"string"==typeof n)return o(n);var c=new Error("Cannot find module '"+n+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[n][1][r]||r},p.cache={};var l=r[n]=new u.Module(n);e[n][0].call(l.exports,p,l,l.exports,this)}return r[n].exports;function p(e){return u(p.resolve(e))}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=r,u.parent=i,u.register=function(r,n){e[r]=[function(e,r){r.exports=n},{}]};for(var f=0;f<n.length;f++)u(n[f]);if(n.length){var c=u(n[n.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=c:"function"==typeof define&&define.amd?define(function(){return c}):t&&(this[t]=c)}return u}({"xAgl":[function(require,module,exports) { | ||
},{"unfetch":"bSFJ"}],"Focm":[function(require,module,exports) { | ||
"use strict";var e=o(require("loadjs"));require("promise-polyfill/src/polyfill");var t=o(require("./lib/dealer"));function o(e){return e&&e.__esModule?e:{default:e}}function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(o,p,u){var a=o.maxsdk={app:{},state:{},boot:function(e,t){return t||"object"!==n(e)||(t=e),t=o[u]=t||o[u]||{},p=t.host||p,t.use=t.use||[],a.load.dealer(e||t.dealerId).then(function(e){e&&e.businessunitid&&t.use.forEach(function(e){a.app[e]?a.use(e,t[e]):a.load.plugin(e,t[e])})})},load:{dealer:function(e){return a.state.dealer=new t.default(e),a.state.dealer.load()},font:function(t,o){return(0,e.default)("css!https://fonts.googleapis.com/css?family="+t.join("|").replace(/\s/g,"+"),o)},plugin:function(t,o){return(0,e.default)([p,"app",t+".latest.js"].join("/"),o)}},plugin:function(e,t,n){a.app[e]||(a.app[e]=t),n=o[u]&&o[u][e],a.use(e,n)},remove:function(e){a.app[e]&&a.app[e].remove&&a.app[e].remove(),delete a.app[e]},use:function(e,t){(a.app[e].install||a.app[e]).bind(a.app[e])(t,a)}};o[u]&&a.boot()}(window,"https://maxapps.io","MaxApps"); | ||
"use strict";var e=t(require("loadjs"));require("promise-polyfill/src/polyfill");var o=t(require("./lib/dealer"));function t(e){return e&&e.__esModule?e:{default:e}}function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(t,r,p){var a=t.maxsdk={app:{},state:{},boot:function(e,o){return o||"object"!==n(e)||(o=e),o=t[p]=o||t[p]||{},r=o.host||r,o.use=o.use||[],a.load.dealer(e||o.dealerId).then(function(e){o.use.forEach(function(e){a.app[e]?a.use(e,o[e]):a.load.plugin(e,o[e])})})},load:{dealer:function(e){return e?(a.state.dealer=new o.default(e),a.state.dealer.load()):Promise.resolve()},font:function(o,t){return(0,e.default)("css!https://fonts.googleapis.com/css?family="+o.join("|").replace(/\s/g,"+"),t)},plugin:function(o,t){return(0,e.default)([r,"app",o+".latest.js"].join("/"),t)}},plugin:function(e,o,n){a.app[e]||(a.app[e]=o),n=t[p]&&t[p][e],a.use(e,n)},remove:function(e){a.app[e]&&a.app[e].remove&&a.app[e].remove(),delete a.app[e]},use:function(e,o){(a.app[e].install||a.app[e]).bind(a.app[e])(o,a)}};t[p]&&a.boot()}(window,"https://maxapps.io","MaxApps"); | ||
},{"loadjs":"xAgl","promise-polyfill/src/polyfill":"qBxc","./lib/dealer":"tuAy"}]},{},["Focm"], null) | ||
//# sourceMappingURL=/sdk.map |
@@ -31,4 +31,2 @@ import load from 'loadjs' | ||
return self.load.dealer(dealerId || config.dealerId).then(dealer => { | ||
if (!dealer || !dealer.businessunitid) return | ||
config.use.forEach(function bootPlugin (plugin) { | ||
@@ -51,2 +49,4 @@ if (self.app[plugin]) { | ||
dealer: bucode => { | ||
if (!bucode) return Promise.resolve() | ||
self.state.dealer = new Dealer(bucode) | ||
@@ -53,0 +53,0 @@ return self.state.dealer.load() |
{ | ||
"name": "@maxdigital/sdk.js", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Javascript SDK for running MAX apps on dealer sites", | ||
@@ -5,0 +5,0 @@ "license": "ISC", |
@@ -15,3 +15,3 @@ ### Installation | ||
If configuration is provided on page load (most common), the embed code will automatically boot and load all configured plugins. At minimum, a valid dealer ID and a list of widgets to use must be supplied. | ||
If configuration is provided on page load (most common), the embed code will automatically boot and load all configured plugins. At minimum, a list of widgets to use must be supplied. A valid dealer ID is optional. | ||
@@ -18,0 +18,0 @@ ``` |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
19029
5
157
2