pict 1.0.237 → 1.0.239
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/dist/pict.compatible.js +210 -194
- package/dist/pict.compatible.js.map +1 -1
- package/dist/pict.compatible.min.js +2 -2
- package/dist/pict.compatible.min.js.map +1 -1
- package/dist/pict.js +193 -177
- package/dist/pict.js.map +1 -1
- package/dist/pict.min.js +2 -2
- package/dist/pict.min.js.map +1 -1
- package/package.json +61 -61
- package/source/Pict-Content-Assignment.js +6 -0
- package/source/Pict.js +699 -597
- package/source/templates/Pict-Template-View.js +89 -0
- package/test/Pict_contentassignment_tests.js +13 -0
- package/test/Pict_view_tests.js +46 -0
- package/test/configurations/Pict-View-BasicConfigurationOnly-Virtual.json +23 -0
- package/types/source/Pict-Content-Assignment.d.ts +3 -0
- package/types/source/Pict-Content-Assignment.d.ts.map +1 -1
- package/types/source/Pict.d.ts.map +1 -1
- package/types/source/templates/Pict-Template-View.d.ts +14 -0
- package/types/source/templates/Pict-Template-View.d.ts.map +1 -0
package/dist/pict.compatible.js
CHANGED
|
@@ -3074,7 +3074,7 @@ if(startDot===-1)startDot=i;else if(preDotState!==1)preDotState=1;}else if(start
|
|
|
3074
3074
|
// have a good chance at having a non-empty extension
|
|
3075
3075
|
preDotState=-1;}}if(startDot===-1||end===-1||// We saw a non-dot character immediately before the dot
|
|
3076
3076
|
preDotState===0||// The (right-most) trimmed path component is exactly '..'
|
|
3077
|
-
preDotState===1&&startDot===end-1&&startDot===startPart+1){if(end!==-1){if(startPart===0&&isAbsolute)ret.base=ret.name=path.slice(1,end);else ret.base=ret.name=path.slice(startPart,end);}}else{if(startPart===0&&isAbsolute){ret.name=path.slice(1,startDot);ret.base=path.slice(1,end);}else{ret.name=path.slice(startPart,startDot);ret.base=path.slice(startPart,end);}ret.ext=path.slice(startDot,end);}if(startPart>0)ret.dir=path.slice(0,startPart-1);else if(isAbsolute)ret.dir='/';return ret;},sep:'/',delimiter:':',win32:null,posix:null};posix.posix=posix;module.exports=posix;}).call(this);}).call(this,require('_process'));},{"_process":147}],136:[function(require,module,exports){module.exports={"name":"pict-application","version":"1.0.
|
|
3077
|
+
preDotState===1&&startDot===end-1&&startDot===startPart+1){if(end!==-1){if(startPart===0&&isAbsolute)ret.base=ret.name=path.slice(1,end);else ret.base=ret.name=path.slice(startPart,end);}}else{if(startPart===0&&isAbsolute){ret.name=path.slice(1,startDot);ret.base=path.slice(1,end);}else{ret.name=path.slice(startPart,startDot);ret.base=path.slice(startPart,end);}ret.ext=path.slice(startDot,end);}if(startPart>0)ret.dir=path.slice(0,startPart-1);else if(isAbsolute)ret.dir='/';return ret;},sep:'/',delimiter:':',win32:null,posix:null};posix.posix=posix;module.exports=posix;}).call(this);}).call(this,require('_process'));},{"_process":147}],136:[function(require,module,exports){module.exports={"name":"pict-application","version":"1.0.25","description":"Application base class for a pict view-based application","main":"source/Pict-Application.js","scripts":{"test":"npx mocha -u tdd -R spec","start":"node source/Pict-Application.js","coverage":"npx nyc --reporter=lcov --reporter=text-lcov npx mocha -- -u tdd -R spec","build":"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-application-image:local","docker-dev-run":"docker run -it -d --name pict-application-dev -p 30001:8080 -p 38086:8086 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/pict-application\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" pict-application-image:local","docker-dev-shell":"docker exec -it pict-application-dev /bin/bash","tests":"npx mocha -u tdd --exit -R spec --grep","lint":"eslint source/**","types":"tsc -p ."},"types":"types/source/Pict-Application.d.ts","repository":{"type":"git","url":"git+https://github.com/stevenvelozo/pict-application.git"},"author":"steven velozo <steven@velozo.com>","license":"MIT","bugs":{"url":"https://github.com/stevenvelozo/pict-application/issues"},"homepage":"https://github.com/stevenvelozo/pict-application#readme","devDependencies":{"@eslint/js":"^9.17.0","browser-env":"^3.3.0","eslint":"^9.17.0","pict":"^1.0.238","pict-view":"^1.0.59","quackage":"^1.0.41"},"mocha":{"diff":true,"extension":["js"],"package":"./package.json","reporter":"spec","slow":"75","timeout":"5000","ui":"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},"dependencies":{"fable-serviceproviderbase":"^3.0.15"}};},{}],137:[function(require,module,exports){var libFableServiceBase=require('fable-serviceproviderbase');var libPackage=require('../package.json');var defaultPictSettings={Name:'DefaultPictApplication',// The main "viewport" is the view that is used to host our application
|
|
3078
3078
|
MainViewportViewIdentifier:'Default-View',MainViewportRenderableHash:false,MainViewportDestinationAddress:false,MainViewportDefaultDataAddress:false,// Whether or not we should automatically render the main viewport and other autorender views after we initialize the pict application
|
|
3079
3079
|
AutoSolveAfterInitialize:true,AutoRenderMainViewportViewAfterInitialize:true,AutoRenderViewsAfterInitialize:false,ConfigurationOnlyViews:[],Manifests:{},// The prefix to prepend on all template destination hashes
|
|
3080
3080
|
IdentifierAddressPrefix:'PICT-'};/**
|
|
@@ -3083,7 +3083,7 @@ IdentifierAddressPrefix:'PICT-'};/**
|
|
|
3083
3083
|
* @param {import('fable')} pFable
|
|
3084
3084
|
* @param {any} [pOptions]
|
|
3085
3085
|
* @param {string} [pServiceHash]
|
|
3086
|
-
*/function PictApplication(pFable,pOptions,pServiceHash){var _this52;_classCallCheck2(this,PictApplication);var tmpOptions=Object.assign({},JSON.parse(JSON.stringify(defaultPictSettings)),pOptions);_this52=_callSuper(this,PictApplication,[pFable,tmpOptions,pServiceHash]);/** @type {any} */_this52.options;/** @type {any} */_this52.log;/** @type {import('pict') & import('fable')} */_this52.fable;/** @type {string} */_this52.UUID;/** @type {string} */_this52.Hash;/**
|
|
3086
|
+
*/function PictApplication(pFable,pOptions,pServiceHash){var _this52;_classCallCheck2(this,PictApplication);var tmpCarryOverConfiguration=_typeof(pFable.settings.PictApplicationConfiguration)==='object'?pFable.settings.PictApplicationConfiguration:{};var tmpOptions=Object.assign({},JSON.parse(JSON.stringify(defaultPictSettings)),tmpCarryOverConfiguration,pOptions);_this52=_callSuper(this,PictApplication,[pFable,tmpOptions,pServiceHash]);/** @type {any} */_this52.options;/** @type {any} */_this52.log;/** @type {import('pict') & import('fable')} */_this52.fable;/** @type {string} */_this52.UUID;/** @type {string} */_this52.Hash;/**
|
|
3087
3087
|
* @type {{ [key: string]: any }}
|
|
3088
3088
|
*/_this52.servicesMap;_this52.serviceType='PictApplication';/** @type {Object} */_this52._Package=libPackage;// Convenience and consistency naming
|
|
3089
3089
|
_this52.pict=_this52.fable;// Wire in the essential Pict state
|
|
@@ -3284,7 +3284,7 @@ return fCallback();}}},{key:"onAfterInitialize",value:function onAfterInitialize
|
|
|
3284
3284
|
* @param {any} pRootDataObject - The root data object to resolve (optional)
|
|
3285
3285
|
*
|
|
3286
3286
|
* @return {any} The value at the given address, or undefined
|
|
3287
|
-
*/},{key:"resolveStateFromAddress",value:function resolveStateFromAddress(pAddress,pRecord,pContextArray,pRootDataObject){var tmpContextArray=Array.isArray(pContextArray)?pContextArray:[this.pict];var tmpRootDataObject=_typeof(pRootDataObject)==='object'?pRootDataObject:{};tmpRootDataObject.Pict=this.pict;tmpRootDataObject.AppData=this.pict.AppData;tmpRootDataObject.Bundle=this.pict.Bundle;tmpRootDataObject.Context=tmpContextArray;tmpRootDataObject.Record=pRecord;return this.pict.manifest.getValueByHash(tmpRootDataObject,pAddress);}}]);}(libFableServiceBase);module.exports=PictTemplateExpression;module.exports.template_hash='Default';},{"../package.json":140,"fable-serviceproviderbase":59}],142:[function(require,module,exports){module.exports={"name":"pict-view","version":"1.0.
|
|
3287
|
+
*/},{key:"resolveStateFromAddress",value:function resolveStateFromAddress(pAddress,pRecord,pContextArray,pRootDataObject){var tmpContextArray=Array.isArray(pContextArray)?pContextArray:[this.pict];var tmpRootDataObject=_typeof(pRootDataObject)==='object'?pRootDataObject:{};tmpRootDataObject.Pict=this.pict;tmpRootDataObject.AppData=this.pict.AppData;tmpRootDataObject.Bundle=this.pict.Bundle;tmpRootDataObject.Context=tmpContextArray;tmpRootDataObject.Record=pRecord;return this.pict.manifest.getValueByHash(tmpRootDataObject,pAddress);}}]);}(libFableServiceBase);module.exports=PictTemplateExpression;module.exports.template_hash='Default';},{"../package.json":140,"fable-serviceproviderbase":59}],142:[function(require,module,exports){module.exports={"name":"pict-view","version":"1.0.60","description":"Pict View Base Class","main":"source/Pict-View.js","scripts":{"test":"./node_modules/.bin/mocha -u tdd -R spec","start":"node source/Pict-View.js","coverage":"./node_modules/.bin/nyc --reporter=lcov --reporter=text-lcov ./node_modules/mocha/bin/_mocha -- -u tdd -R spec","build":"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-view-image:local","docker-dev-run":"docker run -it -d --name pict-view-dev -p 30001:8080 -p 38086:8086 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/pict-view\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" pict-view-image:local","docker-dev-shell":"docker exec -it pict-view-dev /bin/bash","types":"tsc -p .","lint":"eslint source/**"},"types":"types/source/Pict-View.d.ts","repository":{"type":"git","url":"git+https://github.com/stevenvelozo/pict-view.git"},"author":"steven velozo <steven@velozo.com>","license":"MIT","bugs":{"url":"https://github.com/stevenvelozo/pict-view/issues"},"homepage":"https://github.com/stevenvelozo/pict-view#readme","devDependencies":{"@eslint/js":"^9.17.0","browser-env":"^3.3.0","eslint":"^9.17.0","pict":"^1.0.238","quackage":"^1.0.41","typescript":"^5.7.2"},"mocha":{"diff":true,"extension":["js"],"package":"./package.json","reporter":"spec","slow":"75","timeout":"5000","ui":"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},"dependencies":{"fable":"^3.1.3","fable-serviceproviderbase":"^3.0.15"}};},{}],143:[function(require,module,exports){var libFableServiceBase=require('fable-serviceproviderbase');var libPackage=require('../package.json');var defaultPictViewSettings={DefaultRenderable:false,DefaultDestinationAddress:false,DefaultTemplateRecordAddress:false,ViewIdentifier:false,// If this is set to true, when the App initializes this will.
|
|
3288
3288
|
// After the App initializes, initialize will be called as soon as it's added.
|
|
3289
3289
|
AutoInitialize:true,AutoInitializeOrdinal:0,// If this is set to true, when the App autorenders (on load) this will.
|
|
3290
3290
|
// After the App initializes, render will be called as soon as it's added.
|
|
@@ -3388,7 +3388,7 @@ if(this.pict.LogNoisiness>3){this.log.trace("PictView [".concat(this.UUID,"]::["
|
|
|
3388
3388
|
* @param {string} [pRenderDestinationAddress] - The address where the renderable will be rendered.
|
|
3389
3389
|
* @param {string|object} [pTemplateRecordAddress] - The address where the data for the template is stored.
|
|
3390
3390
|
* @return {boolean}
|
|
3391
|
-
*/},{key:"render",value:function render(pRenderable,pRenderDestinationAddress,pTemplateRecordAddress){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 tmpRecordAddress;var tmpRecord;if(_typeof(pTemplateRecordAddress)==='object'){tmpRecord=pTemplateRecordAddress;tmpRecordAddress='Passed in as object';}else{tmpRecordAddress=typeof pTemplateRecordAddress==='string'?pTemplateRecordAddress:typeof tmpRenderable.DefaultTemplateRecordAddress==='string'?tmpRenderable.DefaultTemplateRecordAddress:typeof this.options.DefaultTemplateRecordAddress==='string'?this.options.DefaultTemplateRecordAddress:false;tmpRecord=typeof tmpRecordAddress==='string'?this.pict.DataProvider.getDataByAddress(tmpRecordAddress):undefined;}// Execute the developer-overridable pre-render behavior
|
|
3391
|
+
*/},{key:"render",value:function render(pRenderable,pRenderDestinationAddress,pTemplateRecordAddress){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;if(tmpRenderableHash=='__Virtual'){tmpRenderable={RenderableHash:'__Virtual',TemplateHash:this.renderables[this.options.DefaultRenderable].TemplateHash,DestinationAddress:pRenderDestinationAddress,RenderMethod:'virtual-assignment'};}else{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 tmpRecordAddress;var tmpRecord;if(_typeof(pTemplateRecordAddress)==='object'){tmpRecord=pTemplateRecordAddress;tmpRecordAddress='Passed in as object';}else{tmpRecordAddress=typeof pTemplateRecordAddress==='string'?pTemplateRecordAddress:typeof tmpRenderable.DefaultTemplateRecordAddress==='string'?tmpRenderable.DefaultTemplateRecordAddress:typeof this.options.DefaultTemplateRecordAddress==='string'?this.options.DefaultTemplateRecordAddress:false;tmpRecord=typeof tmpRecordAddress==='string'?this.pict.DataProvider.getDataByAddress(tmpRecordAddress):undefined;}// Execute the developer-overridable pre-render behavior
|
|
3392
3392
|
this.onBeforeRender(tmpRenderable,tmpRenderDestinationAddress,tmpRecord);if(this.pict.LogControlFlow){this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] Renderable[").concat(tmpRenderableHash,"] Destination[").concat(tmpRenderDestinationAddress,"] TemplateRecordAddress[").concat(tmpRecordAddress,"] render:"));}if(this.pict.LogNoisiness>0){this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Beginning Render of Renderable[").concat(tmpRenderableHash,"] to Destination [").concat(tmpRenderDestinationAddress,"]..."));}// Generate the content output from the template and data
|
|
3393
3393
|
var tmpContent=this.pict.parseTemplateByHash(tmpRenderable.TemplateHash,tmpRecord,null,[this]);if(this.pict.LogNoisiness>0){this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Assigning Renderable[").concat(tmpRenderableHash,"] content length ").concat(tmpContent.length," to Destination [").concat(tmpRenderDestinationAddress,"] using render method [").concat(tmpRenderable.RenderMethod,"]."));}// Assign the content to the destination address
|
|
3394
3394
|
this.pict.ContentAssignment.projectContent(tmpRenderable.RenderMethod,tmpRenderDestinationAddress,tmpContent,tmpRenderable.TestAddress);// Execute the developer-overridable post-render behavior
|
|
@@ -3402,7 +3402,7 @@ this.onAfterRender(tmpRenderable,tmpRenderDestinationAddress,tmpRecord,tmpConten
|
|
|
3402
3402
|
*
|
|
3403
3403
|
* @return {void}
|
|
3404
3404
|
*/},{key:"renderAsync",value:function renderAsync(pRenderableHash,pRenderDestinationAddress,pTemplateRecordAddress,fCallback){var _this65=this;var tmpRenderableHash=typeof pRenderableHash==='string'?pRenderableHash:typeof this.options.DefaultRenderable=='string'?this.options.DefaultRenderable:false;// Allow the callback to be passed in as the last parameter no matter what
|
|
3405
|
-
var tmpCallback=typeof fCallback==='function'?fCallback:typeof pTemplateRecordAddress==='function'?pTemplateRecordAddress:typeof pRenderDestinationAddress==='function'?pRenderDestinationAddress:typeof pRenderableHash==='function'?pRenderableHash:false;if(!tmpCallback){this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions."));tmpCallback=function tmpCallback(pError){if(pError){_this65.log.error("PictView [".concat(_this65.UUID,"]::[").concat(_this65.Hash,"] ").concat(_this65.options.Name," renderAsync Auto Callback Error: ").concat(pError),pError);}};}if(!tmpRenderableHash){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not asynchronously render ").concat(tmpRenderableHash," (param ").concat(pRenderableHash,"because it is not a valid renderable."));return tmpCallback(Error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not asynchronously render ").concat(tmpRenderableHash," (param ").concat(pRenderableHash,"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(pRenderableHash,") because it does not exist."));return tmpCallback(Error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(tmpRenderableHash," (param ").concat(pRenderableHash,") 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(pRenderableHash,") because it does not have a valid destination address."));return tmpCallback(Error("Could not render ".concat(tmpRenderableHash)));}var tmpRecordAddress;var tmpRecord;if(_typeof(pTemplateRecordAddress)==='object'){tmpRecord=pTemplateRecordAddress;tmpRecordAddress='Passed in as object';}else{tmpRecordAddress=typeof pTemplateRecordAddress==='string'?pTemplateRecordAddress:typeof tmpRenderable.DefaultTemplateRecordAddress==='string'?tmpRenderable.DefaultTemplateRecordAddress:typeof this.options.DefaultTemplateRecordAddress==='string'?this.options.DefaultTemplateRecordAddress:false;tmpRecord=typeof tmpRecordAddress==='string'?this.pict.DataProvider.getDataByAddress(tmpRecordAddress):undefined;}if(this.pict.LogControlFlow){this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] Renderable[").concat(tmpRenderableHash,"] Destination[").concat(tmpRenderDestinationAddress,"] TemplateRecordAddress[").concat(tmpRecordAddress,"] renderAsync:"));}if(this.pict.LogNoisiness>2){this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Beginning Asynchronous Render (callback-style)..."));}var tmpAnticipate=this.fable.newAnticipate();tmpAnticipate.anticipate(function(fOnBeforeRenderCallback){_this65.onBeforeRender(tmpRenderable,tmpRenderDestinationAddress,tmpRecord);_this65.onBeforeRenderAsync(fOnBeforeRenderCallback);});var tmpContent;tmpAnticipate.anticipate(function(fAsyncTemplateCallback){// Render the template (asynchronously)
|
|
3405
|
+
var tmpCallback=typeof fCallback==='function'?fCallback:typeof pTemplateRecordAddress==='function'?pTemplateRecordAddress:typeof pRenderDestinationAddress==='function'?pRenderDestinationAddress:typeof pRenderableHash==='function'?pRenderableHash:false;if(!tmpCallback){this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions."));tmpCallback=function tmpCallback(pError){if(pError){_this65.log.error("PictView [".concat(_this65.UUID,"]::[").concat(_this65.Hash,"] ").concat(_this65.options.Name," renderAsync Auto Callback Error: ").concat(pError),pError);}};}if(!tmpRenderableHash){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not asynchronously render ").concat(tmpRenderableHash," (param ").concat(pRenderableHash,"because it is not a valid renderable."));return tmpCallback(Error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not asynchronously render ").concat(tmpRenderableHash," (param ").concat(pRenderableHash,"because it is not a valid renderable.")));}var tmpRenderable;if(tmpRenderableHash=='__Virtual'){tmpRenderable={RenderableHash:'__Virtual',TemplateHash:this.renderables[this.options.DefaultRenderable].TemplateHash,DestinationAddress:pRenderDestinationAddress,RenderMethod:'virtual-assignment'};}else{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(pRenderableHash,") because it does not exist."));return tmpCallback(Error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(tmpRenderableHash," (param ").concat(pRenderableHash,") 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(pRenderableHash,") because it does not have a valid destination address."));return tmpCallback(Error("Could not render ".concat(tmpRenderableHash)));}var tmpRecordAddress;var tmpRecord;if(_typeof(pTemplateRecordAddress)==='object'){tmpRecord=pTemplateRecordAddress;tmpRecordAddress='Passed in as object';}else{tmpRecordAddress=typeof pTemplateRecordAddress==='string'?pTemplateRecordAddress:typeof tmpRenderable.DefaultTemplateRecordAddress==='string'?tmpRenderable.DefaultTemplateRecordAddress:typeof this.options.DefaultTemplateRecordAddress==='string'?this.options.DefaultTemplateRecordAddress:false;tmpRecord=typeof tmpRecordAddress==='string'?this.pict.DataProvider.getDataByAddress(tmpRecordAddress):undefined;}if(this.pict.LogControlFlow){this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] Renderable[").concat(tmpRenderableHash,"] Destination[").concat(tmpRenderDestinationAddress,"] TemplateRecordAddress[").concat(tmpRecordAddress,"] renderAsync:"));}if(this.pict.LogNoisiness>2){this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Beginning Asynchronous Render (callback-style)..."));}var tmpAnticipate=this.fable.newAnticipate();tmpAnticipate.anticipate(function(fOnBeforeRenderCallback){_this65.onBeforeRender(tmpRenderable,tmpRenderDestinationAddress,tmpRecord);_this65.onBeforeRenderAsync(fOnBeforeRenderCallback);});var tmpContent;tmpAnticipate.anticipate(function(fAsyncTemplateCallback){// Render the template (asynchronously)
|
|
3406
3406
|
_this65.pict.parseTemplateByHash(tmpRenderable.TemplateHash,tmpRecord,function(pError,pContent){if(pError){_this65.log.error("PictView [".concat(_this65.UUID,"]::[").concat(_this65.Hash,"] ").concat(_this65.options.ViewIdentifier," could not render (asynchronously) ").concat(tmpRenderableHash," (param ").concat(pRenderableHash,") because it did not parse the template."),pError);return fAsyncTemplateCallback(pError);}tmpContent=pContent;if(_this65.pict.LogNoisiness>0){_this65.log.trace("PictView [".concat(_this65.UUID,"]::[").concat(_this65.Hash,"] ").concat(_this65.options.ViewIdentifier," Assigning Renderable[").concat(tmpRenderableHash,"] content length ").concat(pContent.length," to Destination [").concat(tmpRenderDestinationAddress,"] using Async render method ").concat(tmpRenderable.RenderMethod,"."));}_this65.pict.ContentAssignment.projectContent(tmpRenderable.RenderMethod,tmpRenderDestinationAddress,pContent,tmpRenderable.TestAddress);// Execute the developer-overridable asynchronous post-render behavior
|
|
3407
3407
|
_this65.lastRenderedTimestamp=_this65.pict.log.getTimeStamp();return fAsyncTemplateCallback();},[_this65]);});tmpAnticipate.anticipate(function(fOnAfterRenderCallback){_this65.onAfterRender(tmpRenderable,tmpRenderDestinationAddress,tmpRecord,tmpContent);_this65.onAfterRenderAsync(fOnAfterRenderCallback);});tmpAnticipate.wait(tmpCallback);}/**
|
|
3408
3408
|
* Renders the default renderable.
|
|
@@ -4812,7 +4812,7 @@ try{if(!global.localStorage)return false;}catch(_){return false;}var val=global.
|
|
|
4812
4812
|
// presumably different callback function.
|
|
4813
4813
|
// This makes sure that own properties are retained, so that
|
|
4814
4814
|
// decorations and such are not lost along the way.
|
|
4815
|
-
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;}}},{}],188:[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;}},{}],189:[function(require,module,exports){module.exports={"name":"pict","version":"1.0.
|
|
4815
|
+
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;}}},{}],188:[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;}},{}],189:[function(require,module,exports){module.exports={"name":"pict","version":"1.0.239","description":"Pict browser library.","main":"source/Pict.js","scripts":{"start":"node source/Pict.js","test":"npx mocha -u tdd -R spec","tests":"npx mocha -u tdd --exit -R spec --grep","coverage":"npx nyc --reporter=lcov --reporter=text-lcov npx mocha -- -u tdd -R spec","build":"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-image:local","docker-dev-run":"docker run -it -d --name pict-dev -p 37447:8080 -p 19506:8086 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/pict\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" pict-image:local","docker-dev-shell":"docker exec -it pict-dev /bin/bash","lint":"eslint source/**/*.js test/**/*.js","types":"tsc -p ."},"types":"types/source/Pict.d.ts","mocha":{"diff":true,"extension":["js"],"package":"./package.json","reporter":"spec","slow":"75","timeout":"5000","ui":"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},"repository":{"type":"git","url":"git+https://stevenvelozo@github.com/stevenvelozo/pict.git"},"author":"steven velozo <steven@velozo.com>","license":"MIT","bugs":{"url":"https://github.com/stevenvelozo/pict/issues"},"homepage":"https://github.com/stevenvelozo/pict#readme","devDependencies":{"@eslint/js":"^9.25.1","@types/jquery":"^3.5.32","eslint":"^9.25.1","globals":"^16.0.0","quackage":"^1.0.41"},"dependencies":{"cachetrax":"^1.0.4","fable":"^3.1.3","pict-application":"^1.0.25","pict-provider":"^1.0.3","pict-template":"^1.0.10","pict-view":"^1.0.60","typescript":"^5.8.3"}};},{}],190:[function(require,module,exports){// This assumes Pict has been required in the browser. Delcare these as globals so linter can do its job.
|
|
4816
4816
|
/* global Pict, _Pict: writeable *//**
|
|
4817
4817
|
* Simple function to load a pict Application
|
|
4818
4818
|
*
|
|
@@ -4838,7 +4838,7 @@ tmpCSSHashes.sort(function(a,b){return _this71.inlineCSSMap[a].Priority-_this71.
|
|
|
4838
4838
|
* @param {import('fable')} pFable - The Fable library instance.
|
|
4839
4839
|
* @param {any} [pOptions] - The options for the service.
|
|
4840
4840
|
* @param {string} [pServiceHash] - The hash of services.
|
|
4841
|
-
*/function PictContentAssignment(pFable,pOptions,pServiceHash){var _this72;_classCallCheck2(this,PictContentAssignment);_this72=_callSuper(this,PictContentAssignment,[pFable,pOptions,pServiceHash]);/** @type {any} */_this72.log;_this72.serviceType='PictContentAssignment';// Check to see if we are running in a browser
|
|
4841
|
+
*/function PictContentAssignment(pFable,pOptions,pServiceHash){var _this72;_classCallCheck2(this,PictContentAssignment);_this72=_callSuper(this,PictContentAssignment,[pFable,pOptions,pServiceHash]);/** @type {any} */_this72.log;/** @type {any} */_this72.fable;_this72.serviceType='PictContentAssignment';_this72.manifest=pFable.newManyfest();// Check to see if we are running in a browser
|
|
4842
4842
|
_this72.inBrowser=false;_this72.hasDocument=false;if((typeof window==="undefined"?"undefined":_typeof(window))=='object'){_this72.inBrowser=true;// Now check that the browser has a document object
|
|
4843
4843
|
if(typeof window.document!='undefined'&&typeof window.document.querySelectorAll=='function'){_this72.hasDocument=true;}}// If we're in a browser, check to see if jQuery is available.
|
|
4844
4844
|
_this72.hasJquery=false;_this72.jQuery=false;if(_this72.inBrowser&&typeof window.jQuery!=='undefined'){_this72.hasJquery=true;}/**
|
|
@@ -4920,7 +4920,7 @@ this.log.trace("PICT Content PREPEND in [".concat(pAddress,"]:"),pContent);}}/**
|
|
|
4920
4920
|
* @param {string} pTestAddress
|
|
4921
4921
|
* @returns Result of the content assignment.
|
|
4922
4922
|
*/},{key:"projectContent",value:function projectContent(pRenderMethod,pDestinationAddress,pContent,pTestAddress){// Assign the content to the destination address
|
|
4923
|
-
switch(pRenderMethod){case'append':return this.appendContent(pDestinationAddress,pContent);case'prepend':return this.prependContent(pDestinationAddress,pContent);case'append_once':{// Try to find the content in either the test address or the destination address
|
|
4923
|
+
switch(pRenderMethod){case'virtual-assignment':return this.manifest.setValueByHash(this.fable,pDestinationAddress,pContent);case'append':return this.appendContent(pDestinationAddress,pContent);case'prepend':return this.prependContent(pDestinationAddress,pContent);case'append_once':{// Try to find the content in either the test address or the destination address
|
|
4924
4924
|
var tmpTestAddress=typeof pTestAddress=='string'?pTestAddress:pDestinationAddress;var tmpExistingContent=this.getElement(tmpTestAddress);if(tmpExistingContent.length<1){return this.appendContent(pDestinationAddress,pContent);}break;}case'replace':// TODO: Should this be the default?
|
|
4925
4925
|
/* falls through */default:return this.assignContent(pDestinationAddress,pContent);}}/**
|
|
4926
4926
|
* Read content from an element.
|
|
@@ -5038,8 +5038,8 @@ if(!(pTemplateHash in this.templates)){this.checkDefaultTemplateHash(pTemplateHa
|
|
|
5038
5038
|
*
|
|
5039
5039
|
* @param {String} pTemplateHash - The hash of the template
|
|
5040
5040
|
*/},{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;}}]);}(libFableServiceBase);module.exports=PictTemplateProvider;},{"fable":68}],197:[function(require,module,exports){/**
|
|
5041
|
-
* @author <steven@velozo.com>
|
|
5042
|
-
*//**
|
|
5041
|
+
* @author <steven@velozo.com>
|
|
5042
|
+
*//**
|
|
5043
5043
|
* @typedef {{
|
|
5044
5044
|
* UUID: string,
|
|
5045
5045
|
* settings: any,
|
|
@@ -5057,110 +5057,110 @@ if(!(pTemplateHash in this.templates)){this.checkDefaultTemplateHash(pTemplateHa
|
|
|
5057
5057
|
* },
|
|
5058
5058
|
* MetaTemplate: any,
|
|
5059
5059
|
* }} Fable
|
|
5060
|
-
*//** @type {{ new(...args: any[]): Fable }} */var libFable=require(
|
|
5060
|
+
*//** @type {{ new(...args: any[]): Fable }} */var libFable=require("fable");var libPackage=require("../package.json");var PictTemplateProvider=require("./Pict-Template-Provider.js");var PictContentAssignment=require("./Pict-Content-Assignment.js");var PictDataProvider=require("./Pict-DataProvider.js");var PictCSS=require("./Pict-CSS.js");var PictMeadowEntityProvider=require("./Pict-Meadow-EntityProvider.js");/**
|
|
5061
5061
|
* Pict management object.
|
|
5062
5062
|
*/var Pict=/*#__PURE__*/function(_libFable){/**
|
|
5063
|
-
|
|
5064
|
-
|
|
5063
|
+
* @param {Object<String, any>} pSettings - The settings for the Pict instance.
|
|
5064
|
+
*/function Pict(pSettings){var _this78;_classCallCheck2(this,Pict);_this78=_callSuper(this,Pict,[pSettings]);/** @type {any} */_this78.settings;_this78.isBrowser=new Function("try {return (this===window);} catch(pError) {return false;}");/** @type {Object} */_this78._PackageFable=_this78._Package;_this78._Package=libPackage;_this78.browserAddress="window._Pict";if("BrowserAddress"in _this78.settings){_this78.browserAddress=_this78.settings.BrowserAddress;}_this78.children=[];/** @type {import('pict-application')} */_this78.PictApplication=null;// shim types from fable until we export types properly
|
|
5065
5065
|
/** @type {any} */_this78.log;/**
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5066
|
+
* The templateProvider provides a basic key->template mapping with default fallback capabilities
|
|
5067
|
+
*
|
|
5068
|
+
* @type {PictTemplateProvider}
|
|
5069
|
+
*/_this78.TemplateProvider=null;_this78.addAndInstantiateServiceType("TemplateProvider",PictTemplateProvider);/**
|
|
5070
|
+
* The meadow entity provider.
|
|
5071
|
+
*
|
|
5072
|
+
* @type {PictMeadowEntityProvider}
|
|
5073
|
+
*/_this78.EntityProvider=null;_this78.addAndInstantiateServiceType("EntityProvider",PictMeadowEntityProvider);/**
|
|
5074
|
+
* The data provider.
|
|
5075
|
+
*
|
|
5076
|
+
* @type {PictDataProvider}
|
|
5077
|
+
*/_this78.DataProvider=null;_this78.addAndInstantiateServiceType("DataProvider",PictDataProvider);/**
|
|
5078
|
+
* The content assignment module.
|
|
5079
|
+
*
|
|
5080
|
+
* @type {PictContentAssignment}
|
|
5081
|
+
*/_this78.ContentAssignment=null;_this78.addAndInstantiateServiceType("ContentAssignment",PictContentAssignment);/**
|
|
5082
|
+
* The CSS module.
|
|
5083
|
+
*
|
|
5084
|
+
* @type {PictCSS}
|
|
5085
|
+
* @public
|
|
5086
|
+
*/_this78.CSSMap=null;_this78.addAndInstantiateServiceType("CSSMap",PictCSS);_this78.addServiceType("PictTemplate",require("pict-template"));_this78.instantiateServiceProvider("MetaTemplate");_this78.instantiateServiceProvider("DataGeneration");_this78.instantiateServiceProvider("RestClient");_this78.manifest=_this78.instantiateServiceProvider("Manifest");_this78.AppData={};if("DefaultAppData"in _this78.fable.settings){_this78.AppData=_this78.fable.settings.DefaultAppData;}_this78.Bundle={};// Log noisness goes from 0 - 5, where 5 is show me everything.
|
|
5087
5087
|
_this78.LogNoisiness=0;// Although we have log noisiness, sometimes we need control flow without all the other noise for hard to diagnose interpreters.
|
|
5088
5088
|
_this78.LogControlFlow=false;// And an easy way to be introspective about data at various locations
|
|
5089
5089
|
_this78.LogControlFlowWatchAddressList=[];// Load manifest sets
|
|
5090
|
-
if(_this78.settings.Manifests){_this78.loadManifestSet(_this78.settings.Manifests);}_this78._DefaultPictTemplatesInitialized=false;_this78.initializePictTemplateEngine();_this78.addServiceType(
|
|
5090
|
+
if(_this78.settings.Manifests){_this78.loadManifestSet(_this78.settings.Manifests);}_this78._DefaultPictTemplatesInitialized=false;_this78.initializePictTemplateEngine();_this78.addServiceType("PictView",require("pict-view"));_this78.addServiceType("PictProvider",require("pict-provider"));_this78.addServiceType("PictApplication",require("pict-application"));// Expose the named views directly, through a convenience accessor
|
|
5091
5091
|
_this78.providers=_this78.servicesMap.PictProvider;_this78.views=_this78.servicesMap.PictView;return _this78;}/**
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
var tmpManifestKey=tmpManifestKeys[i];this.instantiateServiceProvider(
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
|
|
5101
|
-
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5092
|
+
* Load manifests in as Hashed services
|
|
5093
|
+
*
|
|
5094
|
+
* @param {Object<String, String>} pManifestSet - The manifest set to load.
|
|
5095
|
+
*/_inherits(Pict,_libFable);return _createClass2(Pict,[{key:"loadManifestSet",value:function loadManifestSet(pManifestSet){if(_typeof(pManifestSet)!="object"){this.log.warn("PICT [".concat(this.UUID,"] could not load Manifest Set; pManifestSet was not an object."));return;}var tmpManifestKeys=Object.keys(pManifestSet);if(tmpManifestKeys.length>0){for(var i=0;i<tmpManifestKeys.length;i++){// Load each manifest
|
|
5096
|
+
var tmpManifestKey=tmpManifestKeys[i];this.instantiateServiceProvider("Manifest",pManifestSet[tmpManifestKey],tmpManifestKey);}}}/**
|
|
5097
|
+
* Add a template expression to the template engine from the PictTemplate service.
|
|
5098
|
+
*
|
|
5099
|
+
* @template {new (...args: any[]) => any} T
|
|
5100
|
+
* @param {T} pTemplatePrototype - The prototype class for the template expression
|
|
5101
|
+
*
|
|
5102
|
+
* @return {InstanceType<T>} the service instance, or null if the prototype was invalid
|
|
5103
|
+
*/},{key:"addTemplate",value:function addTemplate(pTemplatePrototype){if(typeof pTemplatePrototype!="function"){this.log.warn("PICT [".concat(this.UUID,"] could not add Template; pTemplatePrototype was not a class it was ").concat(_typeof(pTemplatePrototype),"."));return null;}var tmpTemplateHash=pTemplatePrototype["template_hash"];if(this.LogNoisiness>1){this.log.info("PICT-ControlFlow addTemplate [".concat(tmpTemplateHash,"]"));}return this.instantiateServiceProviderFromPrototype("PictTemplate",{},tmpTemplateHash,pTemplatePrototype);}/**
|
|
5104
|
+
* Just passing an options will construct one for us.
|
|
5105
|
+
* Passing a hash will set the hash.
|
|
5106
|
+
* Passing a prototype will use that!
|
|
5107
|
+
*
|
|
5108
|
+
* @template {new (...args: any[]) => any} [T=typeof import('pict-view')]
|
|
5109
|
+
* @param {String} pViewHash - The hash of the view.
|
|
5110
|
+
* @param {Object<String, any>} [pOptions] - The options for the view.
|
|
5111
|
+
* @param {T} [pViewPrototype] - The prototype for the view.
|
|
5112
|
+
*
|
|
5113
|
+
* @return {InstanceType<T>} The view instance.
|
|
5114
|
+
*/},{key:"addView",value:function addView(pViewHash,pOptions,pViewPrototype){var tmpOptions=_typeof(pOptions)=="object"?pOptions:{};var tmpViewHash=typeof pViewHash=="string"?pViewHash:this.fable.getUUID();// This is here to change how the value is managed by webpack
|
|
5115
5115
|
var tmpViewPrototype=pViewPrototype;if(this.LogControlFlow){if(this.LogNoisiness>1){this.log.info("PICT-ControlFlow addView [".concat(tmpViewHash,"]:"),{Options:tmpOptions});}else{this.log.info("PICT-ControlFlow addView [".concat(tmpViewHash,"]"));}}if(tmpViewPrototype){// If the prototype has a default_configuration, it will be merged with options.
|
|
5116
|
-
var tmpDefaultViewConfiguration=tmpViewPrototype[
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
if(
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
if(
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5116
|
+
var tmpDefaultViewConfiguration=tmpViewPrototype["default_configuration"];if(tmpDefaultViewConfiguration){tmpOptions=this.fable.Utility.extend({},JSON.parse(JSON.stringify(tmpDefaultViewConfiguration)),tmpOptions);}return this.instantiateServiceProviderFromPrototype("PictView",tmpOptions,tmpViewHash,tmpViewPrototype);}else{return this.instantiateServiceProvider("PictView",tmpOptions,tmpViewHash);}}/**
|
|
5117
|
+
* Add a provider unless one already exists, then return that one.
|
|
5118
|
+
*
|
|
5119
|
+
* Just passing an options will construct one for us.
|
|
5120
|
+
* Passing a hash will set the hash.
|
|
5121
|
+
* Passing a prototype will use that!
|
|
5122
|
+
*
|
|
5123
|
+
* @param {String} pProviderHash - The hash of the provider.
|
|
5124
|
+
* @param {Object<String, any>} [pOptions] - The options for the provider.
|
|
5125
|
+
* @param {any} [pProviderPrototype] - The prototype for the provider.
|
|
5126
|
+
*
|
|
5127
|
+
* FIXME: refer to PictProvider here once it has a type definition
|
|
5128
|
+
*
|
|
5129
|
+
* @return {any} The provider instance.
|
|
5130
|
+
*/},{key:"addProviderSingleton",value:function addProviderSingleton(pProviderHash,pOptions,pProviderPrototype){if(pProviderHash in this.providers){return this.providers[pProviderHash];}return this.addProvider(pProviderHash,pOptions,pProviderPrototype);}/**
|
|
5131
|
+
* Just passing an options will construct one for us.
|
|
5132
|
+
* Passing a hash will set the hash.
|
|
5133
|
+
* Passing a prototype will use that!
|
|
5134
|
+
*
|
|
5135
|
+
* @param {String} pProviderHash - The hash of the provider.
|
|
5136
|
+
* @param {Object<String, any>} [pOptions] - The options for the provider.
|
|
5137
|
+
* @param {any} [pProviderPrototype] - The prototype for the provider.
|
|
5138
|
+
*
|
|
5139
|
+
* FIXME: refer to PictProvider here once it has a type definition
|
|
5140
|
+
*
|
|
5141
|
+
* @return {any} The provider instance.
|
|
5142
|
+
*/},{key:"addProvider",value:function addProvider(pProviderHash,pOptions,pProviderPrototype){var tmpOptions=_typeof(pOptions)=="object"?pOptions:{};var tmpProviderHash=typeof pProviderHash=="string"?pProviderHash:this.fable.getUUID();if(this.LogControlFlow){if(this.LogNoisiness>1){this.log.info("PICT-ControlFlow addProvider [".concat(tmpProviderHash,"]:"),{Options:tmpOptions});}else{this.log.info("PICT-ControlFlow addProvider [".concat(tmpProviderHash,"]"));}}if(typeof pProviderPrototype!="undefined"){// If the prototype has a default_configuration, it will be merged with options.
|
|
5143
|
+
if("default_configuration"in pProviderPrototype){tmpOptions=this.fable.Utility.extend({},pProviderPrototype.default_configuration,tmpOptions);}return this.instantiateServiceProviderFromPrototype("PictProvider",tmpOptions,tmpProviderHash,pProviderPrototype);}else{return this.instantiateServiceProvider("PictProvider",tmpOptions,tmpProviderHash);}}/**
|
|
5144
|
+
* Just passing an options will construct one for us.
|
|
5145
|
+
* Passing a hash will set the hash.
|
|
5146
|
+
* Passing a prototype will use that!
|
|
5147
|
+
*
|
|
5148
|
+
* @param {String} pApplicationHash - The hash of the application.
|
|
5149
|
+
* @param {Object} [pOptions] - The options for the application.
|
|
5150
|
+
* @param {any} [pApplicationPrototype] - The prototype for the application.
|
|
5151
|
+
*
|
|
5152
|
+
* FIXME: refer to PictApplication here once it has a type definition
|
|
5153
|
+
*
|
|
5154
|
+
* @return {any} The application instance.
|
|
5155
|
+
*/},{key:"addApplication",value:function addApplication(pApplicationHash,pOptions,pApplicationPrototype){var tmpOptions=_typeof(pOptions)=="object"?pOptions:{};var tmpApplicationHash=typeof pApplicationHash=="string"?pApplicationHash:this.fable.getUUID();if(this.LogControlFlow){if(this.LogNoisiness>1){this.log.info("PICT-ControlFlow addApplication [".concat(tmpApplicationHash,"]:"),{Options:tmpOptions});}else{this.log.info("PICT-ControlFlow addApplication [".concat(tmpApplicationHash,"]"));}}if(typeof pApplicationPrototype!="undefined"){// If the prototype has a default_configuration, it will be merged with options.
|
|
5156
|
+
if("default_configuration"in pApplicationPrototype){tmpOptions=this.fable.Utility.extend({},pApplicationPrototype.default_configuration,tmpOptions);}return this.instantiateServiceProviderFromPrototype("PictApplication",tmpOptions,tmpApplicationHash,pApplicationPrototype);}else{return this.instantiateServiceProvider("PictApplication",tmpOptions,tmpApplicationHash);}}/**
|
|
5157
|
+
* Attach the default template engine renderers.
|
|
5158
|
+
*
|
|
5159
|
+
* @private
|
|
5160
|
+
*/},{key:"initializePictTemplateEngine",value:function initializePictTemplateEngine(){if(!this._DefaultPictTemplatesInitialized){// Just looking up data in the application state template expression
|
|
5161
5161
|
//{~Data:AppData.Some.Value.to.Render~}
|
|
5162
5162
|
//{~D:AppData.Some.Value.to.Render~}
|
|
5163
|
-
this.addTemplate(require("./templates/Pict-Template-Data.js"));// HTML Comment Start and End based on truthiness ... if the value is false, the comment shows up.
|
|
5163
|
+
this.addTemplate(require("./templates/Pict-Template-Data.js"));this.addTemplate(require("./templates/Pict-Template-View.js"));// HTML Comment Start and End based on truthiness ... if the value is false, the comment shows up.
|
|
5164
5164
|
// {~HtmlCommentStart:Some.Address~} gives you "<!--"
|
|
5165
5165
|
// {~HCS:Some.Address~} gives you "<!--"
|
|
5166
5166
|
this.addTemplate(require("./templates/data/Pict-Template-HtmlCommentStart.js"));// {~HtmlCommentEnd:Some.Address~} gives you "-->"
|
|
@@ -5184,54 +5184,54 @@ this.addTemplate(require("./templates/logic/Pict-Template-NotEmpty.js"));// Data
|
|
|
5184
5184
|
this.addTemplate(require("./templates/data/Pict-Template-DataJson.js"));this.addTemplate(require("./templates/data/Pict-Template-PascalCaseIdentifier.js"));this.addTemplate(require("./templates/data/Pict-Template-DateOnlyFormat.js"));this.addTemplate(require("./templates/data/Pict-Template-DateOnlyYMD.js"));this.addTemplate(require("./templates/data/Pict-Template-DateTimeFormat.js"));this.addTemplate(require("./templates/data/Pict-Template-DateTimeYMD.js"));this.addTemplate(require("./templates/data/Pict-Template-Digits.js"));this.addTemplate(require("./templates/data/Pict-Template-Dollars.js"));this.addTemplate(require("./templates/data/Pict-Template-Join.js"));this.addTemplate(require("./templates/data/Pict-Template-JoinUnique.js"));this.addTemplate(require("./templates/data/Pict-Template-PluckJoinUnique.js"));// Data Generation Templates
|
|
5185
5185
|
this.addTemplate(require("./templates/data-generation/Pict-Template-RandomNumber.js"));this.addTemplate(require("./templates/data-generation/Pict-Template-RandomNumberString.js"));// Debugging Templates
|
|
5186
5186
|
this.addTemplate(require("./templates/debugging/Pict-Template-Breakpoint.js"));this.addTemplate(require("./templates/debugging/Pict-Template-LogStatement.js"));this.addTemplate(require("./templates/debugging/Pict-Template-LogValue.js"));this.addTemplate(require("./templates/debugging/Pict-Template-LogValueTree.js"));this.addTemplate(require("./templates/debugging/Pict-Template-DataValueTree.js"));this._DefaultPictTemplatesInitialized=true;}}/**
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
if(!tmpTemplateString){tmpTemplateString=
|
|
5214
|
-
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
var tmpValue=
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
if(!tmpTemplateString){tmpTemplateString=
|
|
5234
|
-
module.exports.isBrowser=new Function("try {return (this===window);} catch(pError) {return false;}");module.exports.safeOnDocumentReady=require("./Pict-Browser-SafeOnDocumentReady.js");module.exports.safeLoadPictApplication=require("./Pict-Browser-SafeLoad.js");},{"../package.json":189,"./Pict-Browser-SafeLoad.js":190,"./Pict-Browser-SafeOnDocumentReady.js":191,"./Pict-CSS.js":192,"./Pict-Content-Assignment.js":193,"./Pict-DataProvider.js":194,"./Pict-Meadow-EntityProvider.js":195,"./Pict-Template-Provider.js":196,"./environments/Pict-Environment-Log.js":198,"./environments/Pict-Environment-Object.js":199,"./templates/Pict-Template-Data.js":200,"./templates/Pict-Template-Entity.js":201,"./templates/Pict-Template-Self.js":202,"./templates/Pict-Template-Template.js":203,"./templates/Pict-Template-TemplateFromMap.js":204,"./templates/Pict-Template-TemplateSet.js":205,"./templates/Pict-Template-TemplateSetFromMap.js":206,"./templates/Pict-Template-TemplateValueSet.js":207,"./templates/data-generation/Pict-Template-RandomNumber.js":
|
|
5187
|
+
* Read a value from a nested object using a dot notation string.
|
|
5188
|
+
*
|
|
5189
|
+
* @param {string} pAddress - The address to resolve
|
|
5190
|
+
* @param {any} pRecord - The record to resolve
|
|
5191
|
+
* @param {Array<any>} [pContextArray] - The context array to resolve
|
|
5192
|
+
*
|
|
5193
|
+
* @return {any} The value at the given address, or undefined
|
|
5194
|
+
*/},{key:"resolveStateFromAddress",value:function resolveStateFromAddress(pAddress,pRecord,pContextArray){var tmpContextArray=Array.isArray(pContextArray)?pContextArray:[this];return this.manifest.getValueByHash({Pict:this,AppData:this.AppData,Bundle:this.Bundle,Context:tmpContextArray,Record:pRecord},pAddress);}/**
|
|
5195
|
+
* Parse a template.
|
|
5196
|
+
*
|
|
5197
|
+
* @param {String} pTemplateString - The template string to parse
|
|
5198
|
+
* @param {Object} pData - The data to use in the template
|
|
5199
|
+
* @param {Function} [fCallback] - The callback to call when the template is parsed
|
|
5200
|
+
* @param {Array<any>} [pContextArray] - The context array to use in the template
|
|
5201
|
+
*
|
|
5202
|
+
* @return {String?} The parsed template string, or undefined if a callback was provided
|
|
5203
|
+
*/},{key:"parseTemplate",value:function parseTemplate(pTemplateString,pData,fCallback,pContextArray){var _this79=this;var tmpData=_typeof(pData)==="object"?pData:{};var tmpContextArray=Array.isArray(pContextArray)?pContextArray:[this];var tmpParseUUID;if(this.LogControlFlow){tmpParseUUID=this.fable.getUUID();this.log.info("PICT-ControlFlow parseTemplate ".concat(tmpParseUUID," [").concat(pTemplateString.substring(0,50).replace("\n","\\n"),"...").concat(pTemplateString.length,"] (fCallback: ").concat(_typeof(fCallback),") with data size [").concat(JSON.stringify(tmpData).length,"]"));if(this.LogNoisiness>1){this.log.info("PICT-ControlFlow parseTemplate ".concat(tmpParseUUID," template:\n").concat(pTemplateString));}if(this.LogControlFlowWatchAddressList.length>0){for(var i=0;i<this.LogControlFlowWatchAddressList.length;i++){this.log.info("PICT-ControlFlow parseTemplate ".concat(tmpParseUUID," Watch Value: [").concat(this.LogControlFlowWatchAddressList[i],"]=>[").concat(this.resolveStateFromAddress(this.LogControlFlowWatchAddressList[i],tmpData),"]"));}}}if(typeof fCallback==="function"){this.MetaTemplate.parseString(pTemplateString,tmpData,function(pError,pParsedTemplate){if(_this79.LogControlFlow&&_this79.LogNoisiness>1){_this79.log.info("PICT-ControlFlow parseTemplate ".concat(tmpParseUUID," Template Async Return Value:\n").concat(pParsedTemplate));}return fCallback(pError,pParsedTemplate);},tmpContextArray);}else{var tmpResult=this.MetaTemplate.parseString(pTemplateString,tmpData,null,tmpContextArray);if(this.LogControlFlow&&this.LogNoisiness>1){this.log.info("PICT-ControlFlow parseTemplate ".concat(tmpParseUUID," Template Return Value:\n").concat(tmpResult));}return tmpResult;}}/**
|
|
5204
|
+
* Parse a template by hash.
|
|
5205
|
+
*
|
|
5206
|
+
* @param {String} pTemplateHash - The hash of the template to parse
|
|
5207
|
+
* @param {Object} pData - The data to use in the template
|
|
5208
|
+
* @param {Function} [fCallback] - The callback to call when the template is parsed
|
|
5209
|
+
* @param {Array<any>} [pContextArray] - The context array to use in the template
|
|
5210
|
+
*
|
|
5211
|
+
* @return {String?} The parsed template string, or undefined if a callback was provided
|
|
5212
|
+
*/},{key:"parseTemplateByHash",value:function parseTemplateByHash(pTemplateHash,pData,fCallback,pContextArray){var tmpTemplateString=this.TemplateProvider.getTemplate(pTemplateHash);// TODO: Unsure if returning empty is always the right behavior -- if it isn't we will use config to set the behavior
|
|
5213
|
+
if(!tmpTemplateString){tmpTemplateString="";}return this.parseTemplate(tmpTemplateString,pData,fCallback,pContextArray);}/**
|
|
5214
|
+
* Parse a template set.
|
|
5215
|
+
*
|
|
5216
|
+
* @param {String} pTemplateString - The template string to parse
|
|
5217
|
+
* @param {Array<any>|Object} pDataSet - The data set to use in the template
|
|
5218
|
+
* @param {Function} [fCallback] - The callback to call when the template set is parsed
|
|
5219
|
+
* @param {Array<any>} [pContextArray] - The context array to use in the template
|
|
5220
|
+
*
|
|
5221
|
+
* @return {String?} The parsed template string, or undefined if a callback was provided
|
|
5222
|
+
*/},{key:"parseTemplateSet",value:function parseTemplateSet(pTemplateString,pDataSet,fCallback,pContextArray){var _this80=this;// TODO: This will need streaming -- for now janky old string append does the trick
|
|
5223
|
+
var tmpValue="";if(typeof fCallback=="function"){if(Array.isArray(pDataSet)||_typeof(pDataSet)=="object"){this.Utility.eachLimit(pDataSet,1,function(pRecord,fRecordTemplateCallback){return _this80.parseTemplate(pTemplateString,pRecord,function(pError,pTemplateResult){tmpValue+=pTemplateResult;return fRecordTemplateCallback();});},function(pError){return fCallback(pError,tmpValue);});}else{return fCallback(Error("Pict: Template Set: pDataSet is not an array or object."),"");}}else{if(Array.isArray(pDataSet)||_typeof(pDataSet)=="object"){if(Array.isArray(pDataSet)){for(var i=0;i<pDataSet.length;i++){tmpValue+=this.parseTemplate(pTemplateString,pDataSet[i],null,pContextArray);}}else{var tmpKeys=Object.keys(pDataSet);for(var _i58=0;_i58<tmpKeys.length;_i58++){tmpValue+=this.parseTemplate(pTemplateString,pDataSet[tmpKeys[_i58]],null,pContextArray);}}return tmpValue;}else{return"";}}}/**
|
|
5224
|
+
* Parse a template set by hash.
|
|
5225
|
+
*
|
|
5226
|
+
* @param {String} pTemplateHash - The hash of the template to parse
|
|
5227
|
+
* @param {Array<any>|Object} pDataSet - The data set to use in the template
|
|
5228
|
+
* @param {Function} [fCallback] - The callback to call when the template is parsed
|
|
5229
|
+
* @param {Array<any>} [pContextArray] - The context array to use in the template
|
|
5230
|
+
*
|
|
5231
|
+
* @return {String?} The parsed template string, or undefined if a callback was provided
|
|
5232
|
+
*/},{key:"parseTemplateSetByHash",value:function parseTemplateSetByHash(pTemplateHash,pDataSet,fCallback,pContextArray){var tmpTemplateString=this.TemplateProvider.getTemplate(pTemplateHash);// TODO: Unsure if returning empty is always the right behavior -- if it isn't we will use config to set the behavior
|
|
5233
|
+
if(!tmpTemplateString){tmpTemplateString="";}return this.parseTemplateSet(tmpTemplateString,pDataSet,fCallback,pContextArray);}}]);}(libFable);module.exports=Pict;module.exports.PictApplicationClass=require("pict-application");module.exports.PictViewClass=require("pict-view");module.exports.PictProviderClass=require("pict-provider");module.exports.PictTemplateClass=require("pict-template");module.exports.EnvironmentLog=require("./environments/Pict-Environment-Log.js");module.exports.EnvironmentObject=require("./environments/Pict-Environment-Object.js");// This is to help understand the type of enivironement we're executing in
|
|
5234
|
+
module.exports.isBrowser=new Function("try {return (this===window);} catch(pError) {return false;}");module.exports.safeOnDocumentReady=require("./Pict-Browser-SafeOnDocumentReady.js");module.exports.safeLoadPictApplication=require("./Pict-Browser-SafeLoad.js");},{"../package.json":189,"./Pict-Browser-SafeLoad.js":190,"./Pict-Browser-SafeOnDocumentReady.js":191,"./Pict-CSS.js":192,"./Pict-Content-Assignment.js":193,"./Pict-DataProvider.js":194,"./Pict-Meadow-EntityProvider.js":195,"./Pict-Template-Provider.js":196,"./environments/Pict-Environment-Log.js":198,"./environments/Pict-Environment-Object.js":199,"./templates/Pict-Template-Data.js":200,"./templates/Pict-Template-Entity.js":201,"./templates/Pict-Template-Self.js":202,"./templates/Pict-Template-Template.js":203,"./templates/Pict-Template-TemplateFromMap.js":204,"./templates/Pict-Template-TemplateSet.js":205,"./templates/Pict-Template-TemplateSetFromMap.js":206,"./templates/Pict-Template-TemplateValueSet.js":207,"./templates/Pict-Template-View.js":208,"./templates/data-generation/Pict-Template-RandomNumber.js":209,"./templates/data-generation/Pict-Template-RandomNumberString.js":210,"./templates/data/Pict-Template-DataJson.js":211,"./templates/data/Pict-Template-DateOnlyFormat.js":212,"./templates/data/Pict-Template-DateOnlyYMD.js":213,"./templates/data/Pict-Template-DateTimeFormat.js":214,"./templates/data/Pict-Template-DateTimeYMD.js":215,"./templates/data/Pict-Template-Digits.js":216,"./templates/data/Pict-Template-Dollars.js":217,"./templates/data/Pict-Template-HtmlCommentEnd.js":218,"./templates/data/Pict-Template-HtmlCommentStart.js":219,"./templates/data/Pict-Template-Join.js":220,"./templates/data/Pict-Template-JoinUnique.js":221,"./templates/data/Pict-Template-PascalCaseIdentifier.js":222,"./templates/data/Pict-Template-PluckJoinUnique.js":223,"./templates/debugging/Pict-Template-Breakpoint.js":224,"./templates/debugging/Pict-Template-DataValueTree.js":225,"./templates/debugging/Pict-Template-LogStatement.js":226,"./templates/debugging/Pict-Template-LogValue.js":227,"./templates/debugging/Pict-Template-LogValueTree.js":228,"./templates/logic/Pict-Template-NotEmpty.js":229,"./templates/logic/Pict-Template-TemplateIf.js":231,"./templates/logic/Pict-Template-TemplateIfAbsolute.js":232,"fable":68,"pict-application":137,"pict-provider":139,"pict-template":141,"pict-view":143}],198:[function(require,module,exports){/**
|
|
5235
5235
|
* Pict browser shim loader
|
|
5236
5236
|
* @author <steven@velozo.com>
|
|
5237
5237
|
*
|
|
@@ -5424,34 +5424,50 @@ var tmpTemplateHashPart=tmpHash.split(':');if(tmpTemplateHashPart.length<2){this
|
|
|
5424
5424
|
if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}// Now resolve the data
|
|
5425
5425
|
tmpData=this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray);var tmpDataValueSet=[];if(Array.isArray(tmpData)){for(var i=0;i<tmpData.length;i++){tmpDataValueSet.push({Value:tmpData[i],Key:i});}}else if(_typeof(tmpData)==='object'){var tmpValueKeys=Object.keys(tmpData);for(var _i60=0;_i60<tmpValueKeys.length;_i60++){tmpDataValueSet.push({Value:tmpData[tmpValueKeys[_i60]],Key:tmpData[tmpValueKeys[_i60]]});}}else{tmpDataValueSet.push({Value:tmpData});}tmpData=tmpDataValueSet;if(!tmpData){// No address was provided, just render the template with what this template has.
|
|
5426
5426
|
// The async portion of this is a mind bender because of how entry can happen dynamically from templates
|
|
5427
|
-
return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateValueSet;},{"pict-template":141}],208:[function(require,module,exports){var libPictTemplate=require('pict-template');var
|
|
5427
|
+
return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateValueSet;},{"pict-template":141}],208:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderView=/*#__PURE__*/function(_libPictTemplate9){/**
|
|
5428
|
+
* @param {Object} pFable - The Fable Framework instance
|
|
5429
|
+
* @param {Object} pOptions - The options for the service
|
|
5430
|
+
* @param {String} pServiceHash - The hash of the service
|
|
5431
|
+
*/function PictTemplateProviderView(pFable,pOptions,pServiceHash){var _this89;_classCallCheck2(this,PictTemplateProviderView);_this89=_callSuper(this,PictTemplateProviderView,[pFable,pOptions,pServiceHash]);/** @type {any} */_this89.log;_this89.addPattern('{~V:','~}');_this89.addPattern('{~View:','~}');if(!('__TemplateOutputCache'in _this89.pict)){_this89.pict.__TemplateOutputCache={};}return _this89;}/**
|
|
5432
|
+
* Render a template expression, returning a string with the resulting content.
|
|
5433
|
+
*
|
|
5434
|
+
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
5435
|
+
* @param {any} pRecord - The json object to be used as the Record for the template render
|
|
5436
|
+
* @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
|
|
5437
|
+
*
|
|
5438
|
+
* @return {string} The rendered template
|
|
5439
|
+
*/_inherits(PictTemplateProviderView,_libPictTemplate9);return _createClass2(PictTemplateProviderView,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpViewHash=pTemplateHash.trim();if(!(tmpViewHash in this.pict.views)){this.log.warn("Pict: View Template Render: View not found for [".concat(tmpViewHash,"]"));return'';}var tmpRenderGUID=this.pict.getUUID();var tmpView=this.pict.views[tmpViewHash];tmpView.render('__Virtual',"__TemplateOutputCache.".concat(tmpRenderGUID),pRecord);var tmpResult=this.pict.__TemplateOutputCache[tmpRenderGUID];// TODO: Uncomment this when we like how it's working
|
|
5440
|
+
//delete this.pict.__TemplateOutputCache[tmpRenderGUID];
|
|
5441
|
+
return tmpResult;}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var _this90=this;var tmpViewHash=pTemplateHash.trim();if(!(tmpViewHash in this.pict.views)){this.log.warn("Pict: View Template Render: View not found for [".concat(tmpViewHash,"]"));return'';}var tmpRenderGUID=this.pict.getUUID();var tmpView=this.pict.views[tmpViewHash];return tmpView.renderAsync('__Virtual',"__TemplateOutputCache.".concat(tmpRenderGUID),pRecord,function(pError,pResult){if(pError){_this90.log.warn("Pict: View Template Render: Error rendering view [".concat(tmpViewHash,"]"),pError);return fCallback(pError,'');}var tmpResult=_this90.pict.__TemplateOutputCache[tmpRenderGUID];// TODO: Uncomment this when we like how it's working
|
|
5442
|
+
//delete this.pict.__TemplateOutputCache[tmpRenderGUID];
|
|
5443
|
+
return fCallback(null,tmpResult);});}}]);}(libPictTemplate);module.exports=PictTemplateProviderView;},{"pict-template":141}],209:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderRandomNumber=/*#__PURE__*/function(_libPictTemplate10){/**
|
|
5428
5444
|
* @param {Object} pFable - The Fable Framework instance
|
|
5429
5445
|
* @param {Object} pOptions - The options for the service
|
|
5430
5446
|
* @param {String} pServiceHash - The hash of the service
|
|
5431
|
-
*/function PictTemplateProviderRandomNumber(pFable,pOptions,pServiceHash){var
|
|
5447
|
+
*/function PictTemplateProviderRandomNumber(pFable,pOptions,pServiceHash){var _this91;_classCallCheck2(this,PictTemplateProviderRandomNumber);_this91=_callSuper(this,PictTemplateProviderRandomNumber,[pFable,pOptions,pServiceHash]);/** @type {any} */_this91.log;_this91.addPattern('{~RandomNumber:','~}');_this91.addPattern('{~RN:','~}');return _this91;}_inherits(PictTemplateProviderRandomNumber,_libPictTemplate10);return _createClass2(PictTemplateProviderRandomNumber,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fRandomNumber]::[".concat(tmpHash,"]"));}var tmpMinimumNumber=0;var tmpMaxNumber=9999999;if(tmpHash.length>0){var tmpHashParts=tmpHash.split(',');if(tmpHashParts.length>0){try{tmpMinimumNumber=parseInt(tmpHashParts[0]);}catch(_unused2){tmpMinimumNumber=0;}}if(tmpHashParts.length>1){try{tmpMaxNumber=parseInt(tmpHashParts[1]);}catch(_unused3){tmpMaxNumber=9999999;}}}return this.fable.DataGeneration.randomIntegerBetween(tmpMinimumNumber,tmpMaxNumber);}}]);}(libPictTemplate);module.exports=PictTemplateProviderRandomNumber;},{"pict-template":141}],210:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderRandomNumberString=/*#__PURE__*/function(_libPictTemplate11){/**
|
|
5432
5448
|
* @param {Object} pFable - The Fable Framework instance
|
|
5433
5449
|
* @param {Object} pOptions - The options for the service
|
|
5434
5450
|
* @param {String} pServiceHash - The hash of the service
|
|
5435
|
-
*/function PictTemplateProviderRandomNumberString(pFable,pOptions,pServiceHash){var
|
|
5451
|
+
*/function PictTemplateProviderRandomNumberString(pFable,pOptions,pServiceHash){var _this92;_classCallCheck2(this,PictTemplateProviderRandomNumberString);_this92=_callSuper(this,PictTemplateProviderRandomNumberString,[pFable,pOptions,pServiceHash]);/** @type {any} */_this92.log;_this92.addPattern('{~RandomNumberString:','~}');_this92.addPattern('{~RNS:','~}');return _this92;}_inherits(PictTemplateProviderRandomNumberString,_libPictTemplate11);return _createClass2(PictTemplateProviderRandomNumberString,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fRandomNumberString]::[".concat(tmpHash,"]"));}var tmpStringLength=4;var tmpMaxNumber=9999;if(tmpHash.length>0){var tmpHashParts=tmpHash.split(',');if(tmpHashParts.length>0){try{tmpStringLength=parseInt(tmpHashParts[0]);}catch(_unused4){tmpStringLength=4;}}if(tmpHashParts.length>1){try{tmpMaxNumber=parseInt(tmpHashParts[1]);}catch(_unused5){tmpMaxNumber=9999;}}}return this.fable.DataGeneration.randomNumericString(tmpStringLength,tmpMaxNumber);}}]);}(libPictTemplate);module.exports=PictTemplateProviderRandomNumberString;},{"pict-template":141}],211:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDollars=/*#__PURE__*/function(_libPictTemplate12){/**
|
|
5436
5452
|
* @param {Object} pFable - The Fable Framework instance
|
|
5437
5453
|
* @param {Object} pOptions - The options for the service
|
|
5438
5454
|
* @param {String} pServiceHash - The hash of the service
|
|
5439
|
-
*/function PictTemplateProviderDollars(pFable,pOptions,pServiceHash){var
|
|
5455
|
+
*/function PictTemplateProviderDollars(pFable,pOptions,pServiceHash){var _this93;_classCallCheck2(this,PictTemplateProviderDollars);_this93=_callSuper(this,PictTemplateProviderDollars,[pFable,pOptions,pServiceHash]);/** @type {any} */_this93.log;_this93.addPattern('{~DataJson:','~}');_this93.addPattern('{~DJ:','~}');return _this93;}_inherits(PictTemplateProviderDollars,_libPictTemplate12);return _createClass2(PictTemplateProviderDollars,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDataJson]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDataJson]::[".concat(tmpHash,"]"));}var tmpDataToStringify=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);if(!tmpDataToStringify){tmpDataToStringify=pRecord;}return JSON.stringify(tmpDataToStringify);}}]);}(libPictTemplate);module.exports=PictTemplateProviderDollars;},{"pict-template":141}],212:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateOnlyFormat=/*#__PURE__*/function(_libPictTemplate13){/**
|
|
5440
5456
|
* @param {import('fable')} pFable - The Fable Framework instance
|
|
5441
5457
|
* @param {any} pOptions - The options for the service
|
|
5442
5458
|
* @param {String} pServiceHash - The hash of the service
|
|
5443
|
-
*/function PictTemplateProviderDateOnlyFormat(pFable,pOptions,pServiceHash){var
|
|
5459
|
+
*/function PictTemplateProviderDateOnlyFormat(pFable,pOptions,pServiceHash){var _this94;_classCallCheck2(this,PictTemplateProviderDateOnlyFormat);_this94=_callSuper(this,PictTemplateProviderDateOnlyFormat,[pFable,pOptions,pServiceHash]);/** @type {any} */_this94.options;/** @type {any} */_this94.log;_this94.addPattern('{~DateOnlyFormat:','~}');return _this94;}_inherits(PictTemplateProviderDateOnlyFormat,_libPictTemplate13);return _createClass2(PictTemplateProviderDateOnlyFormat,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpDateValueSet=tmpHash.split('^');if(tmpDateValueSet.length<2){this.log.error("PICT Template [fDateOnlyFormat]::[".concat(tmpHash,"] did not have a valid format string and date."));return'';}var tmpDateValue=this.resolveStateFromAddress(tmpDateValueSet[0],tmpData,pContextArray);if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDateOnlyFormat]::[".concat(tmpHash,"] with data:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDateOnlyFormat]::[".concat(tmpHash,"]"));}// TODO: Modularize this
|
|
5444
5460
|
var tmpDayJS=this.fable.Dates.dayJS.utc(tmpDateValue).tz('UTC');return tmpDayJS.format(tmpDateValueSet[1]);}}]);}(libPictTemplate);module.exports=PictTemplateProviderDateOnlyFormat;/*
|
|
5445
5461
|
# DEAR DEAD CODE DIARY:
|
|
5446
5462
|
|
|
5447
5463
|
```javascript
|
|
5448
5464
|
|
|
5449
5465
|
```
|
|
5450
|
-
*/},{"pict-template":141}],
|
|
5466
|
+
*/},{"pict-template":141}],213:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateOnlyYMD=/*#__PURE__*/function(_libPictTemplate14){/**
|
|
5451
5467
|
* @param {Object} pFable - The Fable Framework instance
|
|
5452
5468
|
* @param {Object} pOptions - The options for the service
|
|
5453
5469
|
* @param {String} pServiceHash - The hash of the service
|
|
5454
|
-
*/function PictTemplateProviderDateOnlyYMD(pFable,pOptions,pServiceHash){var
|
|
5470
|
+
*/function PictTemplateProviderDateOnlyYMD(pFable,pOptions,pServiceHash){var _this95;_classCallCheck2(this,PictTemplateProviderDateOnlyYMD);_this95=_callSuper(this,PictTemplateProviderDateOnlyYMD,[pFable,pOptions,pServiceHash]);/** @type {any} */_this95.options;/** @type {any} */_this95.log;_this95.addPattern('{~DateOnlyYMD:','~}');return _this95;}/**
|
|
5455
5471
|
* Render a template expression, returning a string with the resulting content.
|
|
5456
5472
|
*
|
|
5457
5473
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -5459,15 +5475,15 @@ var tmpDayJS=this.fable.Dates.dayJS.utc(tmpDateValue).tz('UTC');return tmpDayJS.
|
|
|
5459
5475
|
* @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
|
|
5460
5476
|
*
|
|
5461
5477
|
* @return {string} The rendered template
|
|
5462
|
-
*/_inherits(PictTemplateProviderDateOnlyYMD,
|
|
5478
|
+
*/_inherits(PictTemplateProviderDateOnlyYMD,_libPictTemplate14);return _createClass2(PictTemplateProviderDateOnlyYMD,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpDateValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDateTimeYMD]::[".concat(tmpHash,"] with data:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDateTimeYMD]::[".concat(tmpHash,"]"));}// TODO: Modularize this
|
|
5463
5479
|
var tmpDayJS=this.fable.Dates.dayJS.utc(tmpDateValue).tz('UTC');//FIXME: this is kind of wacked out; -62167219200000 is the unix ms timestamp for 0000-01-01 00:00:00 UTC
|
|
5464
5480
|
// not even sure showing negative is right; showing the era is probably better (BCE vs CE)
|
|
5465
|
-
var prefix=tmpDayJS.valueOf()<-62167219200000?'-':'';return prefix+tmpDayJS.format('YYYY-MM-DD');}}]);}(libPictTemplate);module.exports=PictTemplateProviderDateOnlyYMD;},{"pict-template":141}],
|
|
5481
|
+
var prefix=tmpDayJS.valueOf()<-62167219200000?'-':'';return prefix+tmpDayJS.format('YYYY-MM-DD');}}]);}(libPictTemplate);module.exports=PictTemplateProviderDateOnlyYMD;},{"pict-template":141}],214:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateTimeFormat=/*#__PURE__*/function(_libPictTemplate15){/**
|
|
5466
5482
|
* @param {Object} pFable - The Fable Framework instance
|
|
5467
5483
|
* @param {Object} pOptions - The options for the service
|
|
5468
5484
|
* @param {String} pServiceHash - The hash of the service
|
|
5469
|
-
*/function PictTemplateProviderDateTimeFormat(pFable,pOptions,pServiceHash){var
|
|
5470
|
-
return
|
|
5485
|
+
*/function PictTemplateProviderDateTimeFormat(pFable,pOptions,pServiceHash){var _this96;_classCallCheck2(this,PictTemplateProviderDateTimeFormat);_this96=_callSuper(this,PictTemplateProviderDateTimeFormat,[pFable,pOptions,pServiceHash]);/** @type {any} */_this96.options;/** @type {any} */_this96.log;_this96.addPattern('{~DateTimeFormat:','~}');_this96.addPattern('{~DateFormat:','~}');// for backwards compatibility
|
|
5486
|
+
return _this96;}_inherits(PictTemplateProviderDateTimeFormat,_libPictTemplate15);return _createClass2(PictTemplateProviderDateTimeFormat,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpDateValueSet=tmpHash.split('^');if(tmpDateValueSet.length<2){this.log.error("PICT Template [fDateTimeFormat]::[".concat(tmpHash,"] did not have a valid format string and date."));return'';}var tmpDateValue=this.resolveStateFromAddress(tmpDateValueSet[0],tmpData,pContextArray);if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDateTimeFormat]::[".concat(tmpHash,"] with data:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDateTimeFormat]::[".concat(tmpHash,"]"));}// TODO: Modularize this
|
|
5471
5487
|
var tmpDayJS=this.fable.Dates.dayJS.utc(tmpDateValue);try{// Try to cast the day to be a specific timezone if one is set for the app
|
|
5472
5488
|
if(this.options.Timezone){tmpDayJS=tmpDayJS.tz(this.options.Timezone);}else{try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.log.error("Error guessing dayJS guess() function; dates may be formatted to GMT by default. (".concat(pError.message||pError,")"));}}}catch(_unused6){//this.log.error(`Error casting date passed timezone using tz .. casting to the browser guess which is [${this.fable.Dates.dayJS.tz.guess()}].`);
|
|
5473
5489
|
// Day.js will try to guess the user's timezone for us
|
|
@@ -5477,12 +5493,12 @@ try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.
|
|
|
5477
5493
|
```javascript
|
|
5478
5494
|
|
|
5479
5495
|
```
|
|
5480
|
-
*/},{"pict-template":141}],
|
|
5496
|
+
*/},{"pict-template":141}],215:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateTimeYMD=/*#__PURE__*/function(_libPictTemplate16){/**
|
|
5481
5497
|
* @param {Object} pFable - The Fable Framework instance
|
|
5482
5498
|
* @param {Object} pOptions - The options for the service
|
|
5483
5499
|
* @param {String} pServiceHash - The hash of the service
|
|
5484
|
-
*/function PictTemplateProviderDateTimeYMD(pFable,pOptions,pServiceHash){var
|
|
5485
|
-
return
|
|
5500
|
+
*/function PictTemplateProviderDateTimeYMD(pFable,pOptions,pServiceHash){var _this97;_classCallCheck2(this,PictTemplateProviderDateTimeYMD);_this97=_callSuper(this,PictTemplateProviderDateTimeYMD,[pFable,pOptions,pServiceHash]);/** @type {any} */_this97.options;/** @type {any} */_this97.log;_this97.addPattern('{~DateTimeYMD:','~}');_this97.addPattern('{~DateYMD:','~}');// for backwards compatibility
|
|
5501
|
+
return _this97;}/**
|
|
5486
5502
|
* Render a template expression, returning a string with the resulting content.
|
|
5487
5503
|
*
|
|
5488
5504
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -5490,90 +5506,90 @@ return _this95;}/**
|
|
|
5490
5506
|
* @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
|
|
5491
5507
|
*
|
|
5492
5508
|
* @return {string} The rendered template
|
|
5493
|
-
*/_inherits(PictTemplateProviderDateTimeYMD,
|
|
5509
|
+
*/_inherits(PictTemplateProviderDateTimeYMD,_libPictTemplate16);return _createClass2(PictTemplateProviderDateTimeYMD,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpDateValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDateTimeYMD]::[".concat(tmpHash,"] with data:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDateTimeYMD]::[".concat(tmpHash,"]"));}// TODO: Modularize this
|
|
5494
5510
|
var tmpDayJS=this.fable.Dates.dayJS.utc(tmpDateValue);try{// Try to cast the day to be a specific timezone if one is set for the app
|
|
5495
5511
|
if(this.options.Timezone){tmpDayJS=tmpDayJS.tz(this.options.Timezone);}else{try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.log.error("Error guessing dayJS guess() function; dates may be formatted to GMT by default. (".concat(pError.message||pError,")"));}}}catch(_unused7){//this.log.error(`Error casting timezone using tz .. casting to the browser guess which is [${this.fable.Dates.dayJS.tz.guess()}].`);
|
|
5496
5512
|
// Day.js will try to guess the user's timezone for us
|
|
5497
|
-
try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.log.error("Error guessing dayJS guess() function; dates may be formatted to GMT by default. (".concat(pError.message||pError,")"));}}return tmpDayJS.format('YYYY-MM-DD');}}]);}(libPictTemplate);module.exports=PictTemplateProviderDateTimeYMD;},{"pict-template":141}],
|
|
5513
|
+
try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.log.error("Error guessing dayJS guess() function; dates may be formatted to GMT by default. (".concat(pError.message||pError,")"));}}return tmpDayJS.format('YYYY-MM-DD');}}]);}(libPictTemplate);module.exports=PictTemplateProviderDateTimeYMD;},{"pict-template":141}],216:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDigits=/*#__PURE__*/function(_libPictTemplate17){/**
|
|
5498
5514
|
* @param {Object} pFable - The Fable Framework instance
|
|
5499
5515
|
* @param {Object} pOptions - The options for the service
|
|
5500
5516
|
* @param {String} pServiceHash - The hash of the service
|
|
5501
|
-
*/function PictTemplateProviderDigits(pFable,pOptions,pServiceHash){var
|
|
5517
|
+
*/function PictTemplateProviderDigits(pFable,pOptions,pServiceHash){var _this98;_classCallCheck2(this,PictTemplateProviderDigits);_this98=_callSuper(this,PictTemplateProviderDigits,[pFable,pOptions,pServiceHash]);/** @type {any} */_this98.options;/** @type {any} */_this98.log;_this98.addPattern('{~Digits:','~}');return _this98;}_inherits(PictTemplateProviderDigits,_libPictTemplate17);return _createClass2(PictTemplateProviderDigits,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDigits]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDigits]::[".concat(tmpHash,"]"));}var tmpColumnData=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);return this.fable.DataFormat.formatterAddCommasToNumber(this.fable.DataFormat.formatterRoundNumber(tmpColumnData,2));}}]);}(libPictTemplate);module.exports=PictTemplateProviderDigits;},{"pict-template":141}],217:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDollars=/*#__PURE__*/function(_libPictTemplate18){/**
|
|
5502
5518
|
* @param {Object} pFable - The Fable Framework instance
|
|
5503
5519
|
* @param {Object} pOptions - The options for the service
|
|
5504
5520
|
* @param {String} pServiceHash - The hash of the service
|
|
5505
|
-
*/function PictTemplateProviderDollars(pFable,pOptions,pServiceHash){var
|
|
5521
|
+
*/function PictTemplateProviderDollars(pFable,pOptions,pServiceHash){var _this99;_classCallCheck2(this,PictTemplateProviderDollars);_this99=_callSuper(this,PictTemplateProviderDollars,[pFable,pOptions,pServiceHash]);/** @type {any} */_this99.options;/** @type {any} */_this99.log;_this99.addPattern('{~Dollars:','~}');return _this99;}_inherits(PictTemplateProviderDollars,_libPictTemplate18);return _createClass2(PictTemplateProviderDollars,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDollars]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDollars]::[".concat(tmpHash,"]"));}var tmpColumnData=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);return this.fable.DataFormat.formatterDollars(tmpColumnData);}}]);}(libPictTemplate);module.exports=PictTemplateProviderDollars;},{"pict-template":141}],218:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderData=/*#__PURE__*/function(_libPictTemplate19){/**
|
|
5506
5522
|
* @param {Object} pFable - The Fable Framework instance
|
|
5507
5523
|
* @param {Object} pOptions - The options for the service
|
|
5508
5524
|
* @param {String} pServiceHash - The hash of the service
|
|
5509
|
-
*/function PictTemplateProviderData(pFable,pOptions,pServiceHash){var
|
|
5525
|
+
*/function PictTemplateProviderData(pFable,pOptions,pServiceHash){var _this100;_classCallCheck2(this,PictTemplateProviderData);_this100=_callSuper(this,PictTemplateProviderData,[pFable,pOptions,pServiceHash]);/** @type {any} */_this100.log;_this100.addPattern('{~HtmlCommentEnd:','~}');_this100.addPattern('{~HCE:','~}');return _this100;}_inherits(PictTemplateProviderData,_libPictTemplate19);return _createClass2(PictTemplateProviderData,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpRecord=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpRecord);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"]"));}var tmpValue=false;if(tmpHash!=null){tmpValue=this.resolveStateFromAddress(tmpHash,tmpRecord,pContextArray);}if(!tmpValue){return' -->';}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderData;},{"pict-template":141}],219:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderData=/*#__PURE__*/function(_libPictTemplate20){/**
|
|
5510
5526
|
* @param {Object} pFable - The Fable Framework instance
|
|
5511
5527
|
* @param {Object} pOptions - The options for the service
|
|
5512
5528
|
* @param {String} pServiceHash - The hash of the service
|
|
5513
|
-
*/function PictTemplateProviderData(pFable,pOptions,pServiceHash){var
|
|
5529
|
+
*/function PictTemplateProviderData(pFable,pOptions,pServiceHash){var _this101;_classCallCheck2(this,PictTemplateProviderData);_this101=_callSuper(this,PictTemplateProviderData,[pFable,pOptions,pServiceHash]);/** @type {any} */_this101.log;_this101.addPattern('{~HtmlCommentStart:','~}');_this101.addPattern('{~HCS:','~}');return _this101;}_inherits(PictTemplateProviderData,_libPictTemplate20);return _createClass2(PictTemplateProviderData,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpRecord=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpRecord);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"]"));}var tmpValue=false;if(tmpHash!=null){tmpValue=this.resolveStateFromAddress(tmpHash,tmpRecord,pContextArray);}if(!tmpValue){return'<!-- ';}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderData;},{"pict-template":141}],220:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderJoin=/*#__PURE__*/function(_libPictTemplate21){/**
|
|
5514
5530
|
* @param {Object} pFable - The Fable Framework instance
|
|
5515
5531
|
* @param {Object} pOptions - The options for the service
|
|
5516
5532
|
* @param {String} pServiceHash - The hash of the service
|
|
5517
|
-
*/function PictTemplateProviderJoin(pFable,pOptions,pServiceHash){var
|
|
5518
|
-
var tmpSeparator=tmpDataAddresses.shift();var tmpValueList=[];for(var i=0;i<tmpDataAddresses.length;i++){var tmpValueSet=this.resolveStateFromAddress(tmpDataAddresses[i],tmpData,pContextArray);if(tmpValueSet&&Array.isArray(tmpValueSet)){for(var j=0;j<tmpValueSet.length;j++){tmpValueList.push(tmpValueSet[j]);}}else if(tmpValueSet){tmpValueList.push(tmpValueSet);}}return tmpValueList.join(tmpSeparator);}}]);}(libPictTemplate);module.exports=PictTemplateProviderJoin;},{"pict-template":141}],
|
|
5533
|
+
*/function PictTemplateProviderJoin(pFable,pOptions,pServiceHash){var _this102;_classCallCheck2(this,PictTemplateProviderJoin);_this102=_callSuper(this,PictTemplateProviderJoin,[pFable,pOptions,pServiceHash]);/** @type {any} */_this102.options;/** @type {any} */_this102.log;_this102.addPattern('{~Join:','~}');_this102.addPattern('{~J:','~}');return _this102;}_inherits(PictTemplateProviderJoin,_libPictTemplate21);return _createClass2(PictTemplateProviderJoin,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash;var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Join [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Join [fDataRender]::[".concat(tmpHash,"]"));}var tmpDataAddresses=tmpHash.split('^');if(tmpDataAddresses.length<2){return'';}// Get the separator string
|
|
5534
|
+
var tmpSeparator=tmpDataAddresses.shift();var tmpValueList=[];for(var i=0;i<tmpDataAddresses.length;i++){var tmpValueSet=this.resolveStateFromAddress(tmpDataAddresses[i],tmpData,pContextArray);if(tmpValueSet&&Array.isArray(tmpValueSet)){for(var j=0;j<tmpValueSet.length;j++){tmpValueList.push(tmpValueSet[j]);}}else if(tmpValueSet){tmpValueList.push(tmpValueSet);}}return tmpValueList.join(tmpSeparator);}}]);}(libPictTemplate);module.exports=PictTemplateProviderJoin;},{"pict-template":141}],221:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderJoinUnique=/*#__PURE__*/function(_libPictTemplate22){/**
|
|
5519
5535
|
* @param {Object} pFable - The Fable Framework instance
|
|
5520
5536
|
* @param {Object} pOptions - The options for the service
|
|
5521
5537
|
* @param {String} pServiceHash - The hash of the service
|
|
5522
|
-
*/function PictTemplateProviderJoinUnique(pFable,pOptions,pServiceHash){var
|
|
5523
|
-
var tmpSeparator=tmpDataAddresses.shift();var tmpValueList=[];var tmpValueMap={};for(var i=0;i<tmpDataAddresses.length;i++){var tmpValueSet=this.resolveStateFromAddress(tmpDataAddresses[i],tmpData,pContextArray);if(tmpValueSet&&Array.isArray(tmpValueSet)){for(var j=0;j<tmpValueSet.length;j++){if(!(tmpValueSet[j]in tmpValueMap)){tmpValueMap[tmpValueSet[j]]=true;tmpValueList.push(tmpValueSet[j]);}}}else if(tmpValueSet){if(!(tmpValueSet in tmpValueMap)){tmpValueMap[tmpValueSet]=true;tmpValueList.push(tmpValueSet);}}}return tmpValueList.join(tmpSeparator);}}]);}(libPictTemplate);module.exports=PictTemplateProviderJoinUnique;},{"pict-template":141}],
|
|
5538
|
+
*/function PictTemplateProviderJoinUnique(pFable,pOptions,pServiceHash){var _this103;_classCallCheck2(this,PictTemplateProviderJoinUnique);_this103=_callSuper(this,PictTemplateProviderJoinUnique,[pFable,pOptions,pServiceHash]);/** @type {any} */_this103.options;/** @type {any} */_this103.log;_this103.addPattern('{~JoinUnique:','~}');_this103.addPattern('{~JU:','~}');return _this103;}_inherits(PictTemplateProviderJoinUnique,_libPictTemplate22);return _createClass2(PictTemplateProviderJoinUnique,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash;var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Join Unique [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Join Unique [fDataRender]::[".concat(tmpHash,"]"));}var tmpDataAddresses=tmpHash.split('^');if(tmpDataAddresses.length<2){return'';}// Get the separator string
|
|
5539
|
+
var tmpSeparator=tmpDataAddresses.shift();var tmpValueList=[];var tmpValueMap={};for(var i=0;i<tmpDataAddresses.length;i++){var tmpValueSet=this.resolveStateFromAddress(tmpDataAddresses[i],tmpData,pContextArray);if(tmpValueSet&&Array.isArray(tmpValueSet)){for(var j=0;j<tmpValueSet.length;j++){if(!(tmpValueSet[j]in tmpValueMap)){tmpValueMap[tmpValueSet[j]]=true;tmpValueList.push(tmpValueSet[j]);}}}else if(tmpValueSet){if(!(tmpValueSet in tmpValueMap)){tmpValueMap[tmpValueSet]=true;tmpValueList.push(tmpValueSet);}}}return tmpValueList.join(tmpSeparator);}}]);}(libPictTemplate);module.exports=PictTemplateProviderJoinUnique;},{"pict-template":141}],222:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderPascalCaseIdentifier=/*#__PURE__*/function(_libPictTemplate23){/**
|
|
5524
5540
|
* @param {Object} pFable - The Fable Framework instance
|
|
5525
5541
|
* @param {Object} pOptions - The options for the service
|
|
5526
5542
|
* @param {String} pServiceHash - The hash of the service
|
|
5527
|
-
*/function PictTemplateProviderPascalCaseIdentifier(pFable,pOptions,pServiceHash){var
|
|
5543
|
+
*/function PictTemplateProviderPascalCaseIdentifier(pFable,pOptions,pServiceHash){var _this104;_classCallCheck2(this,PictTemplateProviderPascalCaseIdentifier);_this104=_callSuper(this,PictTemplateProviderPascalCaseIdentifier,[pFable,pOptions,pServiceHash]);/** @type {any} */_this104.options;/** @type {any} */_this104.log;_this104.addPattern('{~PascalCaseIdentifier:','~}');return _this104;}_inherits(PictTemplateProviderPascalCaseIdentifier,_libPictTemplate23);return _createClass2(PictTemplateProviderPascalCaseIdentifier,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fPascalCaseIdentifier]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fPascalCaseIdentifier]::[".concat(tmpHash,"]"));}var tmpValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);if(tmpValue==null||tmpValue=='undefined'||typeof tmpValue=='undefined'){return'';}return this.pict.DataFormat.cleanNonAlphaCharacters(this.pict.DataFormat.capitalizeEachWord(tmpValue));}}]);}(libPictTemplate);module.exports=PictTemplateProviderPascalCaseIdentifier;/*
|
|
5528
5544
|
# DEAR DEAD CODE DIARY:
|
|
5529
5545
|
|
|
5530
5546
|
```javascript
|
|
5531
5547
|
|
|
5532
5548
|
```
|
|
5533
|
-
*/},{"pict-template":141}],
|
|
5549
|
+
*/},{"pict-template":141}],223:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderPluckJoinUnique=/*#__PURE__*/function(_libPictTemplate24){/**
|
|
5534
5550
|
* @param {Object} pFable - The Fable Framework instance
|
|
5535
5551
|
* @param {Object} pOptions - The options for the service
|
|
5536
5552
|
* @param {String} pServiceHash - The hash of the service
|
|
5537
|
-
*/function PictTemplateProviderPluckJoinUnique(pFable,pOptions,pServiceHash){var
|
|
5553
|
+
*/function PictTemplateProviderPluckJoinUnique(pFable,pOptions,pServiceHash){var _this105;_classCallCheck2(this,PictTemplateProviderPluckJoinUnique);_this105=_callSuper(this,PictTemplateProviderPluckJoinUnique,[pFable,pOptions,pServiceHash]);/** @type {any} */_this105.options;/** @type {any} */_this105.log;_this105.addPattern('{~PluckJoinUnique:','~}');_this105.addPattern('{~PJU:','~}');return _this105;}_inherits(PictTemplateProviderPluckJoinUnique,_libPictTemplate24);return _createClass2(PictTemplateProviderPluckJoinUnique,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash;var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Pluck Join Unique [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Pluck Join Unique [fDataRender]::[".concat(tmpHash,"]"));}var tmpDataAddresses=tmpHash.split('^');if(tmpDataAddresses.length<3){return'';}// Get the separator string
|
|
5538
5554
|
var tmpSeparator=tmpDataAddresses.shift();var tmpAddress=tmpDataAddresses.shift();var tmpValueList=[];var tmpValueMap={};for(var i=0;i<tmpDataAddresses.length;i++){var tmpValueSet=this.resolveStateFromAddress(tmpDataAddresses[i],tmpData,pContextArray);if(tmpValueSet&&Array.isArray(tmpValueSet)){// This one only works on arrays of objects.
|
|
5539
|
-
for(var j=0;j<tmpValueSet.length;j++){if(tmpValueSet[j]===null||_typeof(tmpValueSet)!=='object'){continue;}var tmpValue=this.pict.manifest.getValueByHash(tmpValueSet[j],tmpAddress);if(!(tmpValue in tmpValueMap)){tmpValueMap[tmpValue]=true;tmpValueList.push(tmpValue);}}}else if(tmpValueSet){if(!(tmpValueSet in tmpValueMap)){tmpValueMap[tmpValueSet]=true;tmpValueList.push(tmpValueSet);}}}return tmpValueList.join(tmpSeparator);}}]);}(libPictTemplate);module.exports=PictTemplateProviderPluckJoinUnique;},{"pict-template":141}],
|
|
5555
|
+
for(var j=0;j<tmpValueSet.length;j++){if(tmpValueSet[j]===null||_typeof(tmpValueSet)!=='object'){continue;}var tmpValue=this.pict.manifest.getValueByHash(tmpValueSet[j],tmpAddress);if(!(tmpValue in tmpValueMap)){tmpValueMap[tmpValue]=true;tmpValueList.push(tmpValue);}}}else if(tmpValueSet){if(!(tmpValueSet in tmpValueMap)){tmpValueMap[tmpValueSet]=true;tmpValueList.push(tmpValueSet);}}}return tmpValueList.join(tmpSeparator);}}]);}(libPictTemplate);module.exports=PictTemplateProviderPluckJoinUnique;},{"pict-template":141}],224:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderBreakpoint=/*#__PURE__*/function(_libPictTemplate25){/**
|
|
5540
5556
|
* @param {Object} pFable - The Fable Framework instance
|
|
5541
5557
|
* @param {Object} pOptions - The options for the service
|
|
5542
5558
|
* @param {String} pServiceHash - The hash of the service
|
|
5543
|
-
*/function PictTemplateProviderBreakpoint(pFable,pOptions,pServiceHash){var
|
|
5559
|
+
*/function PictTemplateProviderBreakpoint(pFable,pOptions,pServiceHash){var _this106;_classCallCheck2(this,PictTemplateProviderBreakpoint);_this106=_callSuper(this,PictTemplateProviderBreakpoint,[pFable,pOptions,pServiceHash]);/** @type {any} */_this106.log;_this106.addPattern('{~Breakpoint','~}');return _this106;}_inherits(PictTemplateProviderBreakpoint,_libPictTemplate25);return _createClass2(PictTemplateProviderBreakpoint,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpError=new Error("PICT Template Breakpoint: ".concat(tmpHash));this.log.trace("PICT Template Breakpoint: ".concat(tmpHash),tmpError.stack);//throw tmpError;
|
|
5544
5560
|
debugger;// eslint-disable-line no-debugger
|
|
5545
|
-
return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderBreakpoint;},{"pict-template":141}],
|
|
5561
|
+
return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderBreakpoint;},{"pict-template":141}],225:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDataValueTree=/*#__PURE__*/function(_libPictTemplate26){/**
|
|
5546
5562
|
* @param {Object} pFable - The Fable Framework instance
|
|
5547
5563
|
* @param {Object} pOptions - The options for the service
|
|
5548
5564
|
* @param {String} pServiceHash - The hash of the service
|
|
5549
|
-
*/function PictTemplateProviderDataValueTree(pFable,pOptions,pServiceHash){var
|
|
5565
|
+
*/function PictTemplateProviderDataValueTree(pFable,pOptions,pServiceHash){var _this107;_classCallCheck2(this,PictTemplateProviderDataValueTree);_this107=_callSuper(this,PictTemplateProviderDataValueTree,[pFable,pOptions,pServiceHash]);/** @type {any} */_this107.log;_this107.addPattern('{~DataTree:','~}');_this107.addPattern('{~DT:','~}');return _this107;}_inherits(PictTemplateProviderDataValueTree,_libPictTemplate26);return _createClass2(PictTemplateProviderDataValueTree,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpData=_typeof(pRecord)==='object'?pRecord:{};tmpData.TemplateHash=pTemplateHash.trim();tmpData.ValueTreeParameters=tmpData.TemplateHash.split('^');if(tmpData.ValueTreeParameters.length<1){return'';}tmpData.ResolvedValue=this.resolveStateFromAddress(tmpData.ValueTreeParameters[0],tmpData,pContextArray);tmpData.ResolvedValueType=_typeof(tmpData.ResolvedValue);try{tmpData.TreeMaxDepth=tmpData.ValueTreeParameters.length<2?1:parseInt(tmpData.ValueTreeParameters[1]);}catch(_unused8){tmpData.TreeMaxDepth=1;}var tmpPictObjectWrapTemplate=this.pict.TemplateProvider.getTemplate('PICT-Object-Wrap');if(!tmpPictObjectWrapTemplate){// This template is here because it is a default template. Users can override this template by providing their own as PICT-Object-Wrap
|
|
5550
5566
|
tmpPictObjectWrapTemplate="<div class=\"PICT PICTObjectSet\">{~D:Record.ObjectValueTree~}</div>";}if(tmpData.ResolvedValueType=='object'){tmpData.ObjectValueTree=this.dataValueTreeObjectSet(tmpData.ResolvedValue,tmpData.ResolvedValue,0,tmpData.TreeMaxDepth,pContextArray);}else{this.log.trace("PICT Template Log Value Tree: [".concat(tmpData.TemplateHash,"] resolved data is not an object."),tmpData.ResolvedValue);tmpData.ObjectValueTree=tmpData.ResolveValue;}return this.pict.parseTemplate(tmpPictObjectWrapTemplate,tmpData,null,pContextArray);}},{key:"dataValueTreeObjectSet",value:function dataValueTreeObjectSet(pObject,pRootObject,pCurrentDepth,pMaxDepth,pContextArray){var tmpTemplateResult='';if(_typeof(pObject)!=='object'){return tmpTemplateResult;}var tmpObjectValueKeys=Object.keys(pObject);var tmpPictObjectBranchTemplate=this.pict.TemplateProvider.getTemplate('PICT-Object-Branch');if(!tmpPictObjectBranchTemplate){// This template is here because it is a default template. Users can override this template by providing their own as PICT-Object-Branch
|
|
5551
|
-
tmpPictObjectBranchTemplate="\n<div class=\"PICTObjectBranchDepth_{~D:Record.CurrentDepth~}\"><div class=\"PICTObjectBranch\">{~D:Record.BranchKey~}</div><div class=\"PICTObjectBranchValue\">{~D:Record.BranchValue~}</div></div>\n";}for(var i=0;i<tmpObjectValueKeys.length;i++){var tmpBranchType=_typeof(pObject[tmpObjectValueKeys[i]]);var tmpBranchValue='';switch(tmpBranchType){case'object':if(pCurrentDepth+1>pMaxDepth){tmpBranchValue='...';}else{tmpBranchValue=this.dataValueTreeObjectSet(pObject[tmpObjectValueKeys[i]],pRootObject,pCurrentDepth+1,pMaxDepth,pContextArray);}break;default:tmpBranchValue=pObject[tmpObjectValueKeys[i]];break;}var tmpDataValue={AppData:this.pict.AppData,Bundle:this.pict.Bundle,RootContainer:pRootObject,Container:pObject,BranchEntryCount:tmpObjectValueKeys.length,BranchIndex:i,BranchKey:tmpObjectValueKeys[i],BranchValue:tmpBranchValue,BranchDataType:tmpBranchType,CurrentDepth:pCurrentDepth,MaxDepth:pMaxDepth};tmpTemplateResult+=this.pict.parseTemplate(tmpPictObjectBranchTemplate,tmpDataValue,null,pContextArray);}return tmpTemplateResult;}}]);}(libPictTemplate);module.exports=PictTemplateProviderDataValueTree;},{"pict-template":141}],
|
|
5567
|
+
tmpPictObjectBranchTemplate="\n<div class=\"PICTObjectBranchDepth_{~D:Record.CurrentDepth~}\"><div class=\"PICTObjectBranch\">{~D:Record.BranchKey~}</div><div class=\"PICTObjectBranchValue\">{~D:Record.BranchValue~}</div></div>\n";}for(var i=0;i<tmpObjectValueKeys.length;i++){var tmpBranchType=_typeof(pObject[tmpObjectValueKeys[i]]);var tmpBranchValue='';switch(tmpBranchType){case'object':if(pCurrentDepth+1>pMaxDepth){tmpBranchValue='...';}else{tmpBranchValue=this.dataValueTreeObjectSet(pObject[tmpObjectValueKeys[i]],pRootObject,pCurrentDepth+1,pMaxDepth,pContextArray);}break;default:tmpBranchValue=pObject[tmpObjectValueKeys[i]];break;}var tmpDataValue={AppData:this.pict.AppData,Bundle:this.pict.Bundle,RootContainer:pRootObject,Container:pObject,BranchEntryCount:tmpObjectValueKeys.length,BranchIndex:i,BranchKey:tmpObjectValueKeys[i],BranchValue:tmpBranchValue,BranchDataType:tmpBranchType,CurrentDepth:pCurrentDepth,MaxDepth:pMaxDepth};tmpTemplateResult+=this.pict.parseTemplate(tmpPictObjectBranchTemplate,tmpDataValue,null,pContextArray);}return tmpTemplateResult;}}]);}(libPictTemplate);module.exports=PictTemplateProviderDataValueTree;},{"pict-template":141}],226:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderLogStatement=/*#__PURE__*/function(_libPictTemplate27){/**
|
|
5552
5568
|
* @param {Object} pFable - The Fable Framework instance
|
|
5553
5569
|
* @param {Object} pOptions - The options for the service
|
|
5554
5570
|
* @param {String} pServiceHash - The hash of the service
|
|
5555
|
-
*/function PictTemplateProviderLogStatement(pFable,pOptions,pServiceHash){var
|
|
5571
|
+
*/function PictTemplateProviderLogStatement(pFable,pOptions,pServiceHash){var _this108;_classCallCheck2(this,PictTemplateProviderLogStatement);_this108=_callSuper(this,PictTemplateProviderLogStatement,[pFable,pOptions,pServiceHash]);/** @type {any} */_this108.log;_this108.addPattern('{~LogStatement:','~}');_this108.addPattern('{~LS:','~}');return _this108;}_inherits(PictTemplateProviderLogStatement,_libPictTemplate27);return _createClass2(PictTemplateProviderLogStatement,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();this.log.trace("PICT Template Log Message: ".concat(tmpHash));return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderLogStatement;},{"pict-template":141}],227:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderLogValue=/*#__PURE__*/function(_libPictTemplate28){/**
|
|
5556
5572
|
* @param {Object} pFable - The Fable Framework instance
|
|
5557
5573
|
* @param {Object} pOptions - The options for the service
|
|
5558
5574
|
* @param {String} pServiceHash - The hash of the service
|
|
5559
|
-
*/function PictTemplateProviderLogValue(pFable,pOptions,pServiceHash){var
|
|
5575
|
+
*/function PictTemplateProviderLogValue(pFable,pOptions,pServiceHash){var _this109;_classCallCheck2(this,PictTemplateProviderLogValue);_this109=_callSuper(this,PictTemplateProviderLogValue,[pFable,pOptions,pServiceHash]);/** @type {any} */_this109.log;_this109.addPattern('{~LogValue:','~}');_this109.addPattern('{~LV:','~}');return _this109;}_inherits(PictTemplateProviderLogValue,_libPictTemplate28);return _createClass2(PictTemplateProviderLogValue,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);var tmpValueType=_typeof(tmpValue);if(tmpValue==null||tmpValueType=='undefined'){this.log.trace("PICT Template Log Value: [".concat(tmpHash,"] is ").concat(tmpValueType,"."));}else if(tmpValueType=='object'){this.log.trace("PICT Template Log Value: [".concat(tmpHash,"] is an object."),tmpValue);}else{this.log.trace("PICT Template Log Value: [".concat(tmpHash,"] is a ").concat(tmpValueType," = [").concat(tmpValue,"]"));}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderLogValue;},{"pict-template":141}],228:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderLogValueTree=/*#__PURE__*/function(_libPictTemplate29){/**
|
|
5560
5576
|
* @param {Object} pFable - The Fable Framework instance
|
|
5561
5577
|
* @param {Object} pOptions - The options for the service
|
|
5562
5578
|
* @param {String} pServiceHash - The hash of the service
|
|
5563
|
-
*/function PictTemplateProviderLogValueTree(pFable,pOptions,pServiceHash){var
|
|
5579
|
+
*/function PictTemplateProviderLogValueTree(pFable,pOptions,pServiceHash){var _this110;_classCallCheck2(this,PictTemplateProviderLogValueTree);_this110=_callSuper(this,PictTemplateProviderLogValueTree,[pFable,pOptions,pServiceHash]);/** @type {any} */_defineProperty2(_this110,"logValueTreeObjectSet",function(pObject,pBaseAddress,pRootObject,pCurrentDepth,pMaxDepth){var tmpTemplateResult='';if(_typeof(pObject)!=='object'){return tmpTemplateResult;}var tmpObjectValueKeys=Object.keys(pObject);for(var i=0;i<tmpObjectValueKeys.length;i++){var tmpBranchType=_typeof(pObject[tmpObjectValueKeys[i]]);var tmpBranchValue='';switch(tmpBranchType){case'object':tmpBranchValue='...';break;default:tmpBranchValue=pObject[tmpObjectValueKeys[i]];break;}_this110.log.trace("[".concat(pBaseAddress,".").concat(tmpObjectValueKeys[i],"] (").concat(tmpBranchType,"): ").concat(tmpBranchValue));if(pCurrentDepth+1>pMaxDepth){return'';}else if(tmpBranchType=='object'){tmpBranchValue=_this110.logValueTreeObjectSet(pObject[tmpObjectValueKeys[i]],"".concat(pBaseAddress,".").concat(tmpObjectValueKeys[i]),pRootObject,pCurrentDepth+1,pMaxDepth);}}return'';});_this110.log;_this110.addPattern('{~LogValueTree:','~}');_this110.addPattern('{~LVT:','~}');return _this110;}_inherits(PictTemplateProviderLogValueTree,_libPictTemplate29);return _createClass2(PictTemplateProviderLogValueTree,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpData=_typeof(pRecord)==='object'?pRecord:{};tmpData.TemplateHash=pTemplateHash.trim();tmpData.ValueTreeParameters=tmpData.TemplateHash.split('^');if(tmpData.ValueTreeParameters.length<1){return'';}tmpData.ResolvedValue=this.resolveStateFromAddress(tmpData.ValueTreeParameters[0],tmpData,pContextArray);tmpData.ResolvedValueType=_typeof(tmpData.ResolvedValue);try{tmpData.TreeMaxDepth=tmpData.ValueTreeParameters.length<2?1:parseInt(tmpData.ValueTreeParameters[1]);}catch(_unused9){tmpData.TreeMaxDepth=1;}if(tmpData.ResolvedValueType=='object'){this.logValueTreeObjectSet(tmpData.ResolvedValue,tmpData.ValueTreeParameters[0],tmpData.ResolvedValue,0,tmpData.TreeMaxDepth);}else{this.log.trace("PICT Template Log Value Tree: [".concat(tmpData.TemplateHash,"] resolved data is not an object."),tmpData.ResolvedValue);}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderLogValueTree;},{"pict-template":141}],229:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderNotEmpty=/*#__PURE__*/function(_libPictTemplate30){/**
|
|
5564
5580
|
* @param {Object} pFable - The Fable Framework instance
|
|
5565
5581
|
* @param {Object} pOptions - The options for the service
|
|
5566
5582
|
* @param {String} pServiceHash - The hash of the service
|
|
5567
|
-
*/function PictTemplateProviderNotEmpty(pFable,pOptions,pServiceHash){var
|
|
5568
|
-
if(this.resolveStateFromAddress(tmpHashParts[0],tmpData,pContextArray)){return tmpHashParts[1];}else{return'';}}}]);}(libPictTemplate);module.exports=PictTemplateProviderNotEmpty;},{"pict-template":141}],
|
|
5583
|
+
*/function PictTemplateProviderNotEmpty(pFable,pOptions,pServiceHash){var _this111;_classCallCheck2(this,PictTemplateProviderNotEmpty);_this111=_callSuper(this,PictTemplateProviderNotEmpty,[pFable,pOptions,pServiceHash]);/** @type {any} */_this111.log;_this111.addPattern('{~NotEmpty:','~}');_this111.addPattern('{~NE:','~}');return _this111;}_inherits(PictTemplateProviderNotEmpty,_libPictTemplate30);return _createClass2(PictTemplateProviderNotEmpty,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fNotEmptyRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>2){this.log.trace("PICT Template [fNotEmptyRender]::[".concat(tmpHash,"]"));}var tmpHashParts=tmpHash.split('^');// For now just check truthiness. Not sure if this is grand.
|
|
5584
|
+
if(this.resolveStateFromAddress(tmpHashParts[0],tmpData,pContextArray)){return tmpHashParts[1];}else{return'';}}}]);}(libPictTemplate);module.exports=PictTemplateProviderNotEmpty;},{"pict-template":141}],230:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateIfBase=/*#__PURE__*/function(_libPictTemplate31){/**
|
|
5569
5585
|
* @param {Object} pFable - The Fable Framework instance
|
|
5570
5586
|
* @param {Object} pOptions - The options for the service
|
|
5571
5587
|
* @param {String} pServiceHash - The hash of the service
|
|
5572
|
-
*/function PictTemplateProviderTemplateIfBase(pFable,pOptions,pServiceHash){_classCallCheck2(this,PictTemplateProviderTemplateIfBase);return _callSuper(this,PictTemplateProviderTemplateIfBase,[pFable,pOptions,pServiceHash]);}_inherits(PictTemplateProviderTemplateIfBase,
|
|
5588
|
+
*/function PictTemplateProviderTemplateIfBase(pFable,pOptions,pServiceHash){_classCallCheck2(this,PictTemplateProviderTemplateIfBase);return _callSuper(this,PictTemplateProviderTemplateIfBase,[pFable,pOptions,pServiceHash]);}_inherits(PictTemplateProviderTemplateIfBase,_libPictTemplate31);return _createClass2(PictTemplateProviderTemplateIfBase,[{key:"compareValues",value:function compareValues(pValueLeft,pOperator,pValueRight){switch(pOperator){case'TRUE':return pValueLeft===true;case'FALSE':return pValueLeft===false;case'LNGT':case'LENGTH_GREATER_THAN':switch(_typeof(pValueLeft)){case'string':return pValueLeft.length>pValueRight;case'object':return pValueLeft.length>pValueRight;default:return false;}case'LNLT':case'LENGTH_LESS_THAN':switch(_typeof(pValueLeft)){case'string':return pValueLeft.length<pValueRight;case'object':return pValueLeft.length<pValueRight;default:return false;}case'!=':return pValueLeft!=pValueRight;case'<':return pValueLeft<pValueRight;case'>':return pValueLeft>pValueRight;case'<=':return pValueLeft<=pValueRight;case'>=':return pValueLeft>=pValueRight;case'===':return pValueLeft===pValueRight;case'==':return pValueLeft==pValueRight;default:return false;}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateIfBase;},{"pict-template":141}],231:[function(require,module,exports){var libPictTemplateIf=require('./Pict-Template-TemplateIf-Base.js');var PictTemplateProviderTemplateIf=/*#__PURE__*/function(_libPictTemplateIf){/**
|
|
5573
5589
|
* @param {Object} pFable - The Fable Framework instance
|
|
5574
5590
|
* @param {Object} pOptions - The options for the service
|
|
5575
5591
|
* @param {String} pServiceHash - The hash of the service
|
|
5576
|
-
*/function PictTemplateProviderTemplateIf(pFable,pOptions,pServiceHash){var
|
|
5592
|
+
*/function PictTemplateProviderTemplateIf(pFable,pOptions,pServiceHash){var _this112;_classCallCheck2(this,PictTemplateProviderTemplateIf);_this112=_callSuper(this,PictTemplateProviderTemplateIf,[pFable,pOptions,pServiceHash]);/** @type {any} */_this112.log;_this112.addPattern('{~TemplateIf:','~}');_this112.addPattern('{~TIf:','~}');return _this112;}_inherits(PictTemplateProviderTemplateIf,_libPictTemplateIf);return _createClass2(PictTemplateProviderTemplateIf,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;var tmpComparisonOperation;var tmpHashParts=tmpHash.split(':');if(tmpHashParts.length<3){this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]"));return"Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]");}tmpTemplateHash=tmpHashParts[0];tmpAddressOfData=tmpHashParts[1];tmpComparisonOperation=tmpHashParts[2];// No template hash
|
|
5577
5593
|
if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]");}// No comparison operation
|
|
5578
5594
|
if(!tmpComparisonOperation){this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]");}// Now try to break the comparison into three parts...
|
|
5579
5595
|
var tmpComparisonParts=tmpComparisonOperation.split('^');if(tmpComparisonParts.length<3){this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]"));return"Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]");}// Now look up the data at the comparison location
|
|
@@ -5583,11 +5599,11 @@ if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not reso
|
|
|
5583
5599
|
if(!tmpComparisonOperation){this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]"));return tmpCallback(new Error("Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]")));}// Now try to break the comparison into three parts...
|
|
5584
5600
|
var tmpComparisonParts=tmpComparisonOperation.split('^');if(tmpComparisonParts.length<3){this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]"));return tmpCallback(new Error("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]")));}// Now look up the data at the comparison location
|
|
5585
5601
|
try{// This is the only thing that's different from the absolute value function above. Collapse these.
|
|
5586
|
-
var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray),tmpComparisonParts[1],this.resolveStateFromAddress(tmpComparisonParts[2],tmpData,pContextArray));if(!tmpComparisonResult){return tmpCallback(null,'');}else{if(!tmpAddressOfData){return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}}catch(pError){this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(tmpHash,"]: ").concat(pError),pError);return tmpCallback(pError,'');}}}]);}(libPictTemplateIf);module.exports=PictTemplateProviderTemplateIf;},{"./Pict-Template-TemplateIf-Base.js":
|
|
5602
|
+
var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray),tmpComparisonParts[1],this.resolveStateFromAddress(tmpComparisonParts[2],tmpData,pContextArray));if(!tmpComparisonResult){return tmpCallback(null,'');}else{if(!tmpAddressOfData){return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}}catch(pError){this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(tmpHash,"]: ").concat(pError),pError);return tmpCallback(pError,'');}}}]);}(libPictTemplateIf);module.exports=PictTemplateProviderTemplateIf;},{"./Pict-Template-TemplateIf-Base.js":230}],232:[function(require,module,exports){var libPictTemplateIf=require('./Pict-Template-TemplateIf-Base.js');var PictTemplateProviderTemplateIfAbsolute=/*#__PURE__*/function(_libPictTemplateIf2){/**
|
|
5587
5603
|
* @param {Object} pFable - The Fable Framework instance
|
|
5588
5604
|
* @param {Object} pOptions - The options for the service
|
|
5589
5605
|
* @param {String} pServiceHash - The hash of the service
|
|
5590
|
-
*/function PictTemplateProviderTemplateIfAbsolute(pFable,pOptions,pServiceHash){var
|
|
5606
|
+
*/function PictTemplateProviderTemplateIfAbsolute(pFable,pOptions,pServiceHash){var _this113;_classCallCheck2(this,PictTemplateProviderTemplateIfAbsolute);_this113=_callSuper(this,PictTemplateProviderTemplateIfAbsolute,[pFable,pOptions,pServiceHash]);/** @type {any} */_this113.log;_this113.addPattern('{~TemplateIfAbsolute:','~}');_this113.addPattern('{~TIfAbs:','~}');return _this113;}_inherits(PictTemplateProviderTemplateIfAbsolute,_libPictTemplateIf2);return _createClass2(PictTemplateProviderTemplateIfAbsolute,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;var tmpComparisonOperation;var tmpHashParts=tmpHash.split(':');if(tmpHashParts.length<3){this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]"));return"Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]");}tmpTemplateHash=tmpHashParts[0];tmpAddressOfData=tmpHashParts[1];tmpComparisonOperation=tmpHashParts[2];// No template hash
|
|
5591
5607
|
if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]");}// No comparison operation
|
|
5592
5608
|
if(!tmpComparisonOperation){this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]");}// Now try to break the comparison into three parts...
|
|
5593
5609
|
var tmpComparisonParts=tmpComparisonOperation.split('^');if(tmpComparisonParts.length<3){this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]"));return"Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]");}// Now look up the data at the comparison location
|
|
@@ -5596,5 +5612,5 @@ return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray)
|
|
|
5596
5612
|
if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return tmpCallback(new Error("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]")));}// No comparison operation
|
|
5597
5613
|
if(!tmpComparisonOperation){this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]"));return tmpCallback(new Error("Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]")));}// Now try to break the comparison into three parts...
|
|
5598
5614
|
var tmpComparisonParts=tmpComparisonOperation.split('^');if(tmpComparisonParts.length<3){this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]"));return tmpCallback(new Error("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]")));}// Now look up the data at the comparison location
|
|
5599
|
-
try{var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray),tmpComparisonParts[1],tmpComparisonParts[2]);if(!tmpComparisonResult){return tmpCallback(null,'');}else{if(!tmpAddressOfData){return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}}catch(pError){this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(tmpHash,"]: ").concat(pError),pError);return tmpCallback(pError,'');}}}]);}(libPictTemplateIf);module.exports=PictTemplateProviderTemplateIfAbsolute;},{"./Pict-Template-TemplateIf-Base.js":
|
|
5615
|
+
try{var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray),tmpComparisonParts[1],tmpComparisonParts[2]);if(!tmpComparisonResult){return tmpCallback(null,'');}else{if(!tmpAddressOfData){return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}}catch(pError){this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(tmpHash,"]: ").concat(pError),pError);return tmpCallback(pError,'');}}}]);}(libPictTemplateIf);module.exports=PictTemplateProviderTemplateIfAbsolute;},{"./Pict-Template-TemplateIf-Base.js":230}]},{},[197])(197);});
|
|
5600
5616
|
//# sourceMappingURL=pict.compatible.js.map
|