pict 1.0.61 → 1.0.63
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/.browserslistrc +1 -1
- package/dist/pict.compatible.js +10 -6
- package/dist/pict.compatible.min.js +2 -2
- package/dist/pict.compatible.min.js.map +1 -1
- package/dist/pict.js +10 -6
- package/dist/pict.min.js +2 -2
- package/dist/pict.min.js.map +1 -1
- package/gulpfile-config.json +2 -2
- package/package.json +1 -1
- package/source/Pict.js +14 -0
package/.browserslistrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
> 0.01%
|
package/dist/pict.compatible.js
CHANGED
|
@@ -2867,8 +2867,8 @@ try{if(!global.localStorage)return false;}catch(_){return false;}var val=global.
|
|
|
2867
2867
|
module.exports=wrappy;function wrappy(fn,cb){if(fn&&cb)return wrappy(fn)(cb);if(typeof fn!=='function')throw new TypeError('need wrapper function');Object.keys(fn).forEach(function(k){wrapper[k]=fn[k];});return wrapper;function wrapper(){var args=new Array(arguments.length);for(var i=0;i<args.length;i++){args[i]=arguments[i];}var ret=fn.apply(this,args);var cb=args[args.length-1];if(typeof ret==='function'&&ret!==cb){Object.keys(cb).forEach(function(k){ret[k]=cb[k];});}return ret;}}},{}],105:[function(require,module,exports){module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty;function extend(){var target={};for(var i=0;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;}},{}],106:[function(require,module,exports){var libFableServiceBase=require('fable').ServiceProviderBase;var defaultPictSettings={Name:'DefaultPictApplication',InitializeOnLoad:true,// The main "viewport" is the view that is used to host our application
|
|
2868
2868
|
MainViewportView:'Default-View',MainViewportRenderable:'Application-Default-View-Renderable',MainViewportDestinationAddress:'Application-Destination-Address',MainViewportDefaultDataAddress:'',// Whether or not we should automatically render the main viewport when appropriate
|
|
2869
2869
|
AutoRenderMainViewportView:false,Manifests:{},// The prefix to prepend on all template destination hashes
|
|
2870
|
-
IdentifierAddressPrefix:'PICT-'};var PictApplication=/*#__PURE__*/function(_libFableServiceBase7){_inherits(PictApplication,_libFableServiceBase7);var _super17=_createSuper(PictApplication);function PictApplication(pFable,pOptions,pServiceHash){var _this30;_classCallCheck2(this,PictApplication);_this30=_super17.call(this,pFable,pOptions,pServiceHash);_this30.options=_this30.fable.Utility.extend(defaultPictSettings,_this30.options);_this30.serviceType='PictApplication';_this30.AppData=_this30.fable.AppData;_this30.initializationFunctionSet=[];
|
|
2871
|
-
var tmpManifestKey=tmpManifestKeys[i];
|
|
2870
|
+
IdentifierAddressPrefix:'PICT-'};var PictApplication=/*#__PURE__*/function(_libFableServiceBase7){_inherits(PictApplication,_libFableServiceBase7);var _super17=_createSuper(PictApplication);function PictApplication(pFable,pOptions,pServiceHash,fCallback){var _this30;_classCallCheck2(this,PictApplication);_this30=_super17.call(this,pFable,pOptions,pServiceHash);_this30.options=_this30.fable.Utility.extend(defaultPictSettings,_this30.options);_this30.serviceType='PictApplication';_this30.AppData=_this30.fable.AppData;_this30.initializationFunctionSet=[];var tmpManifestKeys=Object.keys(_this30.options.Manifests);if(tmpManifestKeys.length>0){for(var i=0;i<tmpManifestKeys.length;i++){// Load each manifest
|
|
2871
|
+
var tmpManifestKey=tmpManifestKeys[i];_this30.fable.serviceManager.instantiateServiceProvider('Manifest',_this30.options.Manifests[tmpManifestKey],tmpManifestKey);}}_this30.fable.Utility.waterfall([function(fStageComplete){if(_this30.options.InitializeOnLoad){return _this30.initialize(fStageComplete);}return fStageComplete();},function(fStageComplete){if(_this30.options.AutoRenderMainViewportView){_this30.log.info("Pict Application ".concat(_this30.options.Name,"[").concat(_this30.UUID,"]::[").concat(_this30.Hash,"] beginning auto render of [").concat(_this30.options.MainViewportView,"::").concat(_this30.options.MainViewportRenderable,"]."));return _this30.renderAsync(_this30.options.MainViewportView,_this30.options.MainViewportRenderable,_this30.options.MainViewportDestinationAddress,_this30.options.MainViewportDefaultDataAddress,fStageComplete);}return fStageComplete();}],function(pError){if(pError){_this30.log.error("PictView [".concat(_this30.UUID,"]::[").concat(_this30.Hash,"] ").concat(_this30.options.ViewIdentifier," did not auto initialize/render properly: ").concat(pError),pError);}if(typeof fCallback==='function'){return fCallback(pError);}else{return false;}});return _this30;}_createClass2(PictApplication,[{key:"internalInitialize",value:function internalInitialize(fCallback){return fCallback();}},{key:"initialize",value:function initialize(fCallback){var _this31=this;this.fable.Utility.waterfall([function(fStageComplete){_this31.log.info("Pict Application ".concat(_this31.options.Name,"[").concat(_this31.UUID,"]::[").concat(_this31.Hash,"] beginning initialization..."));return fStageComplete();},this.internalInitialize].concat(_toConsumableArray(this.initializationFunctionSet),[function(fStageComplete){_this31.log.info("Pict Application ".concat(_this31.options.Name,"[").concat(_this31.UUID,"]::[").concat(_this31.Hash,"] initialization complete."));return fStageComplete();}]),function(pError){if(pError){_this31.log.error("PictView [".concat(_this31.UUID,"]::[").concat(_this31.Hash,"] ").concat(_this31.options.ViewIdentifier," did not initialize properly: ").concat(pError),pError);}return fCallback(pError);});}},{key:"render",value:function render(pViewHash,pRenderableHash,pRenderDestinationAddress,pTemplateDataAddress){var tmpView=typeof pViewHash==='string'?this.services.PictView[pViewHash]:false;if(!tmpView){this.log.error("PictApplication [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," could not render from View ").concat(pViewHash," because it is not a valid view."));return false;}return tmpView.render(pRenderableHash,pRenderDestinationAddress,pTemplateDataAddress);}},{key:"renderAsync",value:function renderAsync(pViewHash,pRenderableHash,pRenderDestinationAddress,pTemplateDataAddress,fCallback){var tmpView=typeof pViewHash==='string'?this.services.PictView[pViewHash]:false;if(!tmpView){this.log.error("PictApplication [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," could not render from View ").concat(pViewHash," because it is not a valid view."));return false;}return tmpView.renderAsync(pRenderableHash,pRenderDestinationAddress,pTemplateDataAddress,fCallback);}}]);return PictApplication;}(libFableServiceBase);module.exports=PictApplication;},{"fable":41}],107:[function(require,module,exports){/**
|
|
2872
2872
|
* Pict browser shim loader
|
|
2873
2873
|
* @author <steven@velozo.com>
|
|
2874
2874
|
*/ // Load the pict module into the browser global automatically.
|
|
@@ -2913,7 +2913,7 @@ _this37.loadTemplateFunction=function(pTemplateHash){return false;};return _this
|
|
|
2913
2913
|
*/for(var i=0;i<this.defaultTemplates.length;i++){if(pTemplateHash.indexOf(this.defaultTemplates[i].postfix)==pTemplateHash.length-this.defaultTemplates[i].postfix.length&&pTemplateHash.indexOf(this.defaultTemplates[i].prefix)==0){this.templates[pTemplateHash]=this.defaultTemplates[i].template;this.templateSources[pTemplateHash]="Auto created in checkDefaultTemplateHash('".concat(pTemplateHash,"') function by PictTemplateProvider [").concat(this.UUID,"]::[").concat(this.Hash,"] from [").concat(this.defaultTemplates[i].prefix,"]...[").concat(this.defaultTemplates[i].postfix,"]");return this.templates[pTemplateHash];}}return false;}},{key:"getTemplate",value:function getTemplate(pTemplateHash){// TODO: Optimize this.
|
|
2914
2914
|
// If the template doesn't exist, try to load it with the loading function
|
|
2915
2915
|
if(!this.templates.hasOwnProperty(pTemplateHash)){this.loadTemplate(pTemplateHash);}// If the loading function fails, try to load it from the default templates
|
|
2916
|
-
if(!this.templates.hasOwnProperty(pTemplateHash)){this.checkDefaultTemplateHash(pTemplateHash);}if(this.templates.hasOwnProperty(pTemplateHash)){return this.templates[pTemplateHash];}else{return false;}}},{key:"loadTemplate",value:function loadTemplate(pTemplateHash){var tmpTemplate=this.loadTemplateFunction(pTemplateHash);if(tmpTemplate){this.templates[pTemplateHash]=tmpTemplate.template;this.templateSources[pTemplateHash]="Loaded in loadTemplate('".concat(pTemplateHash,"') function by PictTemplateProvider [").concat(this.UUID,"]::[").concat(this.Hash,"] from [").concat(tmpTemplate.source,"]");}return tmpTemplate;}}]);return PictTemplateProvider;}(libFableServiceBase);module.exports=PictTemplateProvider;},{"fable":41}],112:[function(require,module,exports){var libFableServiceBase=require('fable').ServiceProviderBase;var defaultPictViewSettings={DefaultRenderable:false,DefaultDestinationAddress:false,DefaultTemplateRecordAddress:false,ViewIdentifier:'DEFAULT',InitializeOnLoad:true,RenderOnLoad:false,Templates:[],DefaultTemplates:[],Renderables:[],Manifests:{}};var PictView=/*#__PURE__*/function(_libFableServiceBase12){_inherits(PictView,_libFableServiceBase12);var _super22=_createSuper(PictView);function PictView(pFable,pOptions,pServiceHash){var _this38;_classCallCheck2(this,PictView);_this38=_super22.call(this,pFable,pOptions,pServiceHash);_this38.options=_this38.fable.Utility.extend(defaultPictViewSettings,_this38.options);_this38.serviceType='PictView';// Wire in the essential Pict service
|
|
2916
|
+
if(!this.templates.hasOwnProperty(pTemplateHash)){this.checkDefaultTemplateHash(pTemplateHash);}if(this.templates.hasOwnProperty(pTemplateHash)){return this.templates[pTemplateHash];}else{return false;}}},{key:"loadTemplate",value:function loadTemplate(pTemplateHash){var tmpTemplate=this.loadTemplateFunction(pTemplateHash);if(tmpTemplate){this.templates[pTemplateHash]=tmpTemplate.template;this.templateSources[pTemplateHash]="Loaded in loadTemplate('".concat(pTemplateHash,"') function by PictTemplateProvider [").concat(this.UUID,"]::[").concat(this.Hash,"] from [").concat(tmpTemplate.source,"]");}return tmpTemplate;}}]);return PictTemplateProvider;}(libFableServiceBase);module.exports=PictTemplateProvider;},{"fable":41}],112:[function(require,module,exports){var libFableServiceBase=require('fable').ServiceProviderBase;var defaultPictViewSettings={DefaultRenderable:false,DefaultDestinationAddress:false,DefaultTemplateRecordAddress:false,ViewIdentifier:'DEFAULT',InitializeOnLoad:true,RenderOnLoad:false,Templates:[],DefaultTemplates:[],Renderables:[],Manifests:{}};var PictView=/*#__PURE__*/function(_libFableServiceBase12){_inherits(PictView,_libFableServiceBase12);var _super22=_createSuper(PictView);function PictView(pFable,pOptions,pServiceHash,fCallback){var _this38;_classCallCheck2(this,PictView);_this38=_super22.call(this,pFable,pOptions,pServiceHash);_this38.options=_this38.fable.Utility.extend(defaultPictViewSettings,_this38.options);_this38.serviceType='PictView';// Wire in the essential Pict service
|
|
2917
2917
|
_this38.AppData=_this38.fable.AppData;// Load all templates from the array in the options
|
|
2918
2918
|
// Templates are in the form of {Hash:'Some-Template-Hash',Template:'Template content',Source:'TemplateSource'}
|
|
2919
2919
|
for(var i=0;i<_this38.options.Templates.length;i++){var tmpTemplate=_this38.options.Templates[i];if(!tmpTemplate.hasOwnProperty('Hash')||!tmpTemplate.hasOwnProperty('Template')){_this38.log.error("PictView [".concat(_this38.UUID,"]::[").concat(_this38.Hash,"] ").concat(_this38.options.ViewIdentifier," could not load Template ").concat(i," in the options array."),tmpTemplate);}else{if(!tmpTemplate.Source){tmpTemplate.Source="PictView [".concat(_this38.UUID,"]::[").concat(_this38.Hash,"] ").concat(_this38.options.ViewIdentifier," options object.");}_this38.fable.TemplateProvider.addTemplate(tmpTemplate.Hash,tmpTemplate.Template,tmpTemplate.Source);}}// Load all default templates from the array in the options
|
|
@@ -2925,13 +2925,17 @@ for(var _i11=0;_i11<_this38.options.DefaultTemplates.length;_i11++){var tmpDefau
|
|
|
2925
2925
|
// A developer can then do render('ContentEntry') and it just kinda works. Or they can override the ContentDestinationAddress
|
|
2926
2926
|
_this38.renderables={};for(var _i12=0;_i12<_this38.options.Renderables.length;_i12++){var tmpRenderable=_this38.options.Renderables[_i12];if(!tmpRenderable.hasOwnProperty('RenderableHash')||!tmpRenderable.hasOwnProperty('TemplateHash')){_this38.log.error("PictView [".concat(_this38.UUID,"]::[").concat(_this38.Hash,"] ").concat(_this38.options.ViewIdentifier," could not load Renderable ").concat(_i12," in the options array."),tmpRenderable);}else{_this38.renderables[tmpRenderable.RenderableHash]=tmpRenderable;}}// Array of Initialization Functions
|
|
2927
2927
|
_this38.initializationFunctionSet=[];// This is here so we can easily have an inline initialize override
|
|
2928
|
-
_this38.internalInitialize=function(fStageComplete){return fStageComplete();};_this38.fable.Utility.waterfall([function(fStageComplete){if(_this38.options.InitializeOnLoad){return _this38.initialize(fStageComplete);}return fStageComplete();},function(fStageComplete){if(_this38.options.RenderOnLoad){return _this38.renderAsync(_this38.options.DefaultRenderable,null,null,fStageComplete);}}],function(pError){if(pError){_this38.log.error("PictView [".concat(_this38.UUID,"]::[").concat(_this38.Hash,"] ").concat(_this38.options.ViewIdentifier," did not auto initialize/render properly: ").concat(pError),pError);return
|
|
2928
|
+
_this38.internalInitialize=function(fStageComplete){return fStageComplete();};_this38.fable.Utility.waterfall([function(fStageComplete){if(_this38.options.InitializeOnLoad){return _this38.initialize(fStageComplete);}return fStageComplete();},function(fStageComplete){if(_this38.options.RenderOnLoad){return _this38.renderAsync(_this38.options.DefaultRenderable,null,null,fStageComplete);}}],function(pError){if(pError){_this38.log.error("PictView [".concat(_this38.UUID,"]::[").concat(_this38.Hash,"] ").concat(_this38.options.ViewIdentifier," did not auto initialize/render properly: ").concat(pError),pError);}if(typeof fCallback==='function'){return fCallback(pError);}else{return false;}});return _this38;}_createClass2(PictView,[{key:"initialize",value:function initialize(fCallback){var _this39=this;this.fable.Utility.waterfall([function(fStageComplete){_this39.log.info("PictView [".concat(_this39.UUID,"]::[").concat(_this39.Hash,"] ").concat(_this39.options.ViewIdentifier," beginning initialization..."));return fStageComplete();},this.internalInitialize].concat(_toConsumableArray(this.initializationFunctionSet),[function(fStageComplete){_this39.log.info("PictView [".concat(_this39.UUID,"]::[").concat(_this39.Hash,"] ").concat(_this39.options.ViewIdentifier," initialization complete."));return fStageComplete();}]),function(pError){if(pError){_this39.log.error("PictView [".concat(_this39.UUID,"]::[").concat(_this39.Hash,"] ").concat(_this39.options.ViewIdentifier," did not initialize properly: ").concat(pError),pError);}return fCallback(pError);});}},{key:"render",value:function render(pRenderable,pRenderDestinationAddress,pTemplateDataAddress){var tmpRenderableHash=typeof pRenderable==='string'?pRenderable:typeof this.options.DefaultRenderable=='string'?this.options.DefaultRenderable:false;if(!tmpRenderableHash){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(tmpRenderableHash," (param ").concat(pRenderable,") because it is not a valid renderable."));return false;}var tmpRenderable=this.renderables[tmpRenderableHash];if(!tmpRenderable){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(tmpRenderableHash," (param ").concat(pRenderable,") because it does not exist."));return false;}var tmpRenderDestinationAddress=typeof pRenderDestinationAddress==='string'?pRenderDestinationAddress:typeof tmpRenderable.ContentDestinationAddress==='string'?tmpRenderable.ContentDestinationAddress:typeof this.options.DefaultDestinationAddress==='string'?this.options.DefaultDestinationAddress:false;if(!tmpRenderDestinationAddress){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(tmpRenderableHash," (param ").concat(pRenderable,") because it does not have a valid destination address."));return false;}var tmpDataAddress=typeof pTemplateDataAddress==='string'?pTemplateDataAddress:typeof tmpRenderable.RecordAddress==='string'?tmpRenderable.RecordAddress:typeof this.options.DefaultTemplateRecordAddress==='string'?this.options.DefaultTemplateRecordAddress:false;var tmpData=typeof tmpDataAddress==='string'?this.fable.DataProvider.getDataByAddress(tmpDataAddress):undefined;var tmpContent=this.fable.parseTemplateByHash(tmpRenderable.TemplateHash,tmpData);return this.fable.ContentAssignment.assignContent(tmpRenderDestinationAddress,tmpContent);}},{key:"renderAsync",value:function renderAsync(pRenderable,pRenderDestinationAddress,pTemplateDataAddress,fCallback){var _this40=this;var tmpRenderableHash=typeof pRenderable==='string'?pRenderable:false;if(!tmpRenderableHash){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not asynchronously render ").concat(tmpRenderableHash," (param ").concat(pRenderable,"because it is not a valid renderable."));return fCallback(Error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not asynchronously render ").concat(tmpRenderableHash," (param ").concat(pRenderable,"because it is not a valid renderable.")));}var tmpRenderable=this.renderables[tmpRenderableHash];if(!tmpRenderable){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(tmpRenderableHash," (param ").concat(pRenderable,") because it does not exist."));return fCallback(Error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(tmpRenderableHash," (param ").concat(pRenderable,") because it does not exist.")));}var tmpRenderDestinationAddress=typeof pRenderDestinationAddress==='string'?pRenderDestinationAddress:typeof tmpRenderable.ContentDestinationAddress==='string'?tmpRenderable.ContentDestinationAddress:typeof this.options.DefaultDestinationAddress==='string'?this.options.DefaultDestinationAddress:false;if(!tmpRenderDestinationAddress){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(tmpRenderableHash," (param ").concat(pRenderable,") because it does not have a valid destination address."));return fCallback(Error("Could not render ".concat(tmpRenderableHash)));}var tmpDataAddress=typeof pTemplateDataAddress==='string'?pTemplateDataAddress:typeof tmpRenderable.RecordAddress==='string'?tmpRenderable.RecordAddress:typeof this.options.DefaultTemplateRecordAddress==='string'?this.options.DefaultTemplateRecordAddress:false;var tmpData=typeof tmpDataAddress==='string'?this.fable.DataProvider.getDataByAddress(tmpDataAddress):undefined;this.fable.parseTemplateByHash(tmpRenderable.TemplateHash,tmpData,function(pError,pContent){if(pError){_this40.log.error("PictView [".concat(_this40.UUID,"]::[").concat(_this40.Hash,"] ").concat(_this40.options.ViewIdentifier," could not render (asynchronously) ").concat(tmpRenderableHash," (param ").concat(pRenderable,") because it did not parse the template."),pError);return fCallback(pError);}_this40.fable.ContentAssignment.assignContent(tmpRenderDestinationAddress,pContent);return fCallback(null,pContent);});}}]);return PictView;}(libFableServiceBase);module.exports=PictView;},{"fable":41}],113:[function(require,module,exports){/**
|
|
2929
2929
|
* @author <steven@velozo.com>
|
|
2930
2930
|
*/var libFable=require('fable');var Pict=/*#__PURE__*/function(_libFable){_inherits(Pict,_libFable);var _super23=_createSuper(Pict);function Pict(pSettings){var _this41;_classCallCheck2(this,Pict);_this41=_super23.call(this,pSettings);// The templateProvider provides a basic key->template mapping with default fallback capabilities
|
|
2931
|
-
_this41.serviceManager.addAndInstantiateServiceType('TemplateProvider',require('./Pict-Template-Provider.js'));_this41.serviceManager.addAndInstantiateServiceType('EntityProvider',require('./Pict-Meadow-EntityProvider.js'));_this41.serviceManager.addAndInstantiateServiceType('DataProvider',require('./Pict-DataProvider.js'));_this41.serviceManager.addAndInstantiateServiceType('ContentAssignment',require('./Pict-Content-Assignment.js'));_this41.serviceManager.instantiateServiceProvider('MetaTemplate');_this41.manifest=_this41.serviceManager.instantiateServiceProvider('Manifest');_this41.AppData={};_this41.Bundle={};_this41.
|
|
2931
|
+
_this41.serviceManager.addAndInstantiateServiceType('TemplateProvider',require('./Pict-Template-Provider.js'));_this41.serviceManager.addAndInstantiateServiceType('EntityProvider',require('./Pict-Meadow-EntityProvider.js'));_this41.serviceManager.addAndInstantiateServiceType('DataProvider',require('./Pict-DataProvider.js'));_this41.serviceManager.addAndInstantiateServiceType('ContentAssignment',require('./Pict-Content-Assignment.js'));_this41.serviceManager.instantiateServiceProvider('MetaTemplate');_this41.manifest=_this41.serviceManager.instantiateServiceProvider('Manifest');_this41.AppData={};_this41.Bundle={};if(_typeof(_this41.settings.Manifests)=='object'){var tmpManifestKeys=Object.keys(_this41.settings.Manifests);if(tmpManifestKeys.length>0){for(var i=0;i<tmpManifestKeys.length;i++){// Load each manifest
|
|
2932
|
+
var tmpManifestKey=tmpManifestKeys[i];_this41.serviceManager.instantiateServiceProvider('Manifest',_this41.settings.Manifests[tmpManifestKey],tmpManifestKey);}}}_this41._DefaultPictTemplatesInitialized=false;_this41.initializePictTemplates();_this41.serviceManager.addServiceType('PictView',require('./Pict-View.js'));_this41.serviceManager.addServiceType('PictApplication',require('./Pict-Application.js'));return _this41;}// Just passing an options will construct one for us.
|
|
2932
2933
|
// Passing a hash will set the hash.
|
|
2933
2934
|
// Passing a prototype will use that!
|
|
2934
|
-
_createClass2(Pict,[{key:"addView",value:function addView(pOptions,pViewHash,pViewPrototype){var tmpOptions=_typeof(pOptions)=='object'?pOptions:{};var tmpViewHash=typeof pViewHash=='string'?pViewHash:this.fable.getUUID();if(typeof pViewPrototype!='undefined'){return this.serviceManager.instantiateServiceProviderFromPrototype('PictView',tmpOptions,tmpViewHash,pViewPrototype);}else{return this.serviceManager.instantiateServiceProvider('PictView',tmpOptions,tmpViewHash);}}
|
|
2935
|
+
_createClass2(Pict,[{key:"addView",value:function addView(pOptions,pViewHash,pViewPrototype){var tmpOptions=_typeof(pOptions)=='object'?pOptions:{};var tmpViewHash=typeof pViewHash=='string'?pViewHash:this.fable.getUUID();if(typeof pViewPrototype!='undefined'){return this.serviceManager.instantiateServiceProviderFromPrototype('PictView',tmpOptions,tmpViewHash,pViewPrototype);}else{return this.serviceManager.instantiateServiceProvider('PictView',tmpOptions,tmpViewHash);}}// Just passing an options will construct one for us.
|
|
2936
|
+
// Passing a hash will set the hash.
|
|
2937
|
+
// Passing a prototype will use that!
|
|
2938
|
+
},{key:"addApplication",value:function addApplication(pOptions,pApplicationHash,pApplicationPrototype){var tmpOptions=_typeof(pOptions)=='object'?pOptions:{};var tmpApplicationHash=typeof pApplicationHash=='string'?pApplicationHash:this.fable.getUUID();if(typeof pApplicationPrototype!='undefined'){return this.serviceManager.instantiateServiceProviderFromPrototype('PictView',tmpOptions,tmpApplicationHash,pApplicationPrototype);}else{return this.serviceManager.instantiateServiceProvider('PictView',tmpOptions,tmpApplicationHash);}}},{key:"initializePictTemplates",value:function initializePictTemplates(){var _this42=this;/*
|
|
2935
2939
|
*
|
|
2936
2940
|
* To stave off madness, these are inefficient for now. The wkhtmltopdf renderer leaves much to be desired
|
|
2937
2941
|
* in the way of feedback with regards to javascript compatibility.
|