pict 1.0.297 → 1.0.299
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 +123 -87
- 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 +73 -37
- 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 +1 -1
- package/source/Pict.js +8 -0
- package/source/templates/Pict-Template-TemplateFromAddress.js +177 -0
- package/test/Pict_template_tests.js +17 -1
- package/types/source/Pict.d.ts.map +1 -1
- package/types/source/templates/Pict-Template-TemplateFromAddress.d.ts +13 -0
- package/types/source/templates/Pict-Template-TemplateFromAddress.d.ts.map +1 -0
package/dist/pict.compatible.js
CHANGED
|
@@ -5153,7 +5153,7 @@ try{if(!global.localStorage)return false;}catch(_){return false;}var val=global.
|
|
|
5153
5153
|
// presumably different callback function.
|
|
5154
5154
|
// This makes sure that own properties are retained, so that
|
|
5155
5155
|
// decorations and such are not lost along the way.
|
|
5156
|
-
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;}}},{}],190:[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;}},{}],191:[function(require,module,exports){module.exports={"name":"pict","version":"1.0.
|
|
5156
|
+
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;}}},{}],190:[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;}},{}],191:[function(require,module,exports){module.exports={"name":"pict","version":"1.0.299","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.27.0","@types/jquery":"^3.5.32","@types/sinon":"^17.0.4","eslint":"^9.27.0","globals":"^16.2.0","quackage":"^1.0.42","sinon":"^20.0.0","typescript":"^5.8.3"},"dependencies":{"cachetrax":"^1.0.4","fable":"^3.1.18","pict-application":"^1.0.27","pict-provider":"^1.0.6","pict-template":"^1.0.13","pict-view":"^1.0.63"}};},{}],192:[function(require,module,exports){// This assumes Pict has been required in the browser. Delcare these as globals so linter can do its job.
|
|
5157
5157
|
/* global Pict, _Pict: writeable *//**
|
|
5158
5158
|
* Simple function to load a pict Application
|
|
5159
5159
|
*
|
|
@@ -5596,7 +5596,7 @@ if("default_configuration"in pApplicationPrototype){tmpOptions=this.fable.Utilit
|
|
|
5596
5596
|
*/},{key:"initializePictTemplateEngine",value:function initializePictTemplateEngine(){if(!this._DefaultPictTemplatesInitialized){// Just looking up data in the application state template expression
|
|
5597
5597
|
//{~Data:AppData.Some.Value.to.Render~}
|
|
5598
5598
|
//{~D:AppData.Some.Value.to.Render~}
|
|
5599
|
-
this.addTemplate(require("./templates/Pict-Template-Data.js"));this.addTemplate(require("./templates/Pict-Template-DataWithTemplateFallback.js"));this.addTemplate(require("./templates/Pict-Template-TemplateByReference.js"));this.addTemplate(require("./templates/Pict-Template-DataValueByKey.js"));this.addTemplate(require("./templates/Pict-Template-View.js"));this.addTemplate(require("./templates/data/Pict-Template-DataEncodeJavascriptString.js"));// HTML Comment Start and End based on truthiness ... if the value is false, the comment shows up.
|
|
5599
|
+
this.addTemplate(require("./templates/Pict-Template-Data.js"));this.addTemplate(require("./templates/Pict-Template-DataWithTemplateFallback.js"));this.addTemplate(require("./templates/Pict-Template-TemplateByReference.js"));this.addTemplate(require("./templates/Pict-Template-TemplateFromAddress.js"));this.addTemplate(require("./templates/Pict-Template-DataValueByKey.js"));this.addTemplate(require("./templates/Pict-Template-View.js"));this.addTemplate(require("./templates/data/Pict-Template-DataEncodeJavascriptString.js"));// HTML Comment Start and End based on truthiness ... if the value is false, the comment shows up.
|
|
5600
5600
|
// {~HtmlCommentStart:Some.Address~} gives you "<!--"
|
|
5601
5601
|
// {~HCS:Some.Address~} gives you "<!--"
|
|
5602
5602
|
this.addTemplate(require("./templates/data/Pict-Template-HtmlCommentStart.js"));// {~HtmlCommentEnd:Some.Address~} gives you "-->"
|
|
@@ -5680,7 +5680,7 @@ if(!tmpTemplateString){tmpTemplateString="";}return this.parseTemplate(tmpTempla
|
|
|
5680
5680
|
*
|
|
5681
5681
|
* @return {String?} The parsed template string, or undefined if a callback was provided
|
|
5682
5682
|
*/},{key:"parseTemplateSet",value:function parseTemplateSet(pTemplateString,pDataSet,fCallback,pContextArray,pScope,pState){var _this85=this;// TODO: This will need streaming -- for now janky old string append does the trick
|
|
5683
|
-
var tmpValue="";if(typeof fCallback=="function"){if(Array.isArray(pDataSet)||_typeof(pDataSet)=="object"){this.Utility.eachLimit(pDataSet,1,function(pRecord,fRecordTemplateCallback){return _this85.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,pScope,pState);}}else{var tmpKeys=Object.keys(pDataSet);for(var _i66=0;_i66<tmpKeys.length;_i66++){tmpValue+=this.parseTemplate(pTemplateString,pDataSet[tmpKeys[_i66]],null,pContextArray,pScope,pState);}}return tmpValue;}else{return"";}}}/**
|
|
5683
|
+
var tmpValue="";if(typeof fCallback=="function"){if(Array.isArray(pDataSet)||_typeof(pDataSet)=="object"){this.Utility.eachLimit(pDataSet,1,function(pRecord,fRecordTemplateCallback){return _this85.parseTemplate(pTemplateString,pRecord,function(pError,pTemplateResult){tmpValue+=pTemplateResult;return fRecordTemplateCallback();},pContextArray,pScope,pState);},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,pScope,pState);}}else{var tmpKeys=Object.keys(pDataSet);for(var _i66=0;_i66<tmpKeys.length;_i66++){tmpValue+=this.parseTemplate(pTemplateString,pDataSet[tmpKeys[_i66]],null,pContextArray,pScope,pState);}}return tmpValue;}else{return"";}}}/**
|
|
5684
5684
|
* Parse a template set by hash.
|
|
5685
5685
|
*
|
|
5686
5686
|
* @param {String} pTemplateHash - The hash of the template to parse
|
|
@@ -5704,7 +5704,7 @@ if(!tmpTemplateString){tmpTemplateString="";}return this.parseTemplateSet(tmpTem
|
|
|
5704
5704
|
*
|
|
5705
5705
|
* @return {String?} The parsed template string, or undefined if a callback was provided
|
|
5706
5706
|
*/},{key:"parseTemplateSetWithPayload",value:function parseTemplateSetWithPayload(pTemplateString,pDataSet,pPayload,fCallback,pContextArray,pScope,pState){var _this86=this;// TODO: This will need streaming -- for now janky old string append does the trick
|
|
5707
|
-
var tmpValue="";if(typeof fCallback=="function"){if(Array.isArray(pDataSet)||_typeof(pDataSet)=="object"){this.Utility.eachLimit(pDataSet,1,function(pRecord,fRecordTemplateCallback){return _this86.parseTemplate(pTemplateString,{Data:pRecord,Payload:pPayload},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,{Data:pDataSet[i],Payload:pPayload},null,pContextArray,pScope,pState);}}else{var tmpKeys=Object.keys(pDataSet);for(var _i67=0;_i67<tmpKeys.length;_i67++){tmpValue+=this.parseTemplate(pTemplateString,{Data:pDataSet[tmpKeys[_i67]],Payload:pPayload},null,pContextArray,pScope,pState);}}return tmpValue;}else{return"";}}}/**
|
|
5707
|
+
var tmpValue="";if(typeof fCallback=="function"){if(Array.isArray(pDataSet)||_typeof(pDataSet)=="object"){this.Utility.eachLimit(pDataSet,1,function(pRecord,fRecordTemplateCallback){return _this86.parseTemplate(pTemplateString,{Data:pRecord,Payload:pPayload},function(pError,pTemplateResult){tmpValue+=pTemplateResult;return fRecordTemplateCallback();},pContextArray,pScope,pState);},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,{Data:pDataSet[i],Payload:pPayload},null,pContextArray,pScope,pState);}}else{var tmpKeys=Object.keys(pDataSet);for(var _i67=0;_i67<tmpKeys.length;_i67++){tmpValue+=this.parseTemplate(pTemplateString,{Data:pDataSet[tmpKeys[_i67]],Payload:pPayload},null,pContextArray,pScope,pState);}}return tmpValue;}else{return"";}}}/**
|
|
5708
5708
|
* Parse a template set by hash.
|
|
5709
5709
|
*
|
|
5710
5710
|
* @param {String} pTemplateHash - The hash of the template to parse
|
|
@@ -5718,7 +5718,7 @@ var tmpValue="";if(typeof fCallback=="function"){if(Array.isArray(pDataSet)||_ty
|
|
|
5718
5718
|
* @return {String?} The parsed template string, or undefined if a callback was provided
|
|
5719
5719
|
*/},{key:"parseTemplateSetWithPayloadByHash",value:function parseTemplateSetWithPayloadByHash(pTemplateHash,pDataSet,pPayload,fCallback,pContextArray,pScope,pState){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
|
|
5720
5720
|
if(!tmpTemplateString){tmpTemplateString="";}return this.parseTemplateSetWithPayload(tmpTemplateString,pDataSet,pPayload,fCallback,pContextArray,pScope,pState);}}]);}(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");module.exports.FilterClauseBase=require('./filters/FilterClauseBase.js');module.exports.FilterClauseLocal=require('./filters/FilterClauseLocal.js');module.exports.FilterClauseInternalJoin=require('./filters/FilterClauseInternalJoin.js');module.exports.FilterClauseExternalJoin=require('./filters/FilterClauseExternalJoin.js');// This is to help understand the type of enivironement we're executing in
|
|
5721
|
-
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":191,"./Pict-Browser-SafeLoad.js":192,"./Pict-Browser-SafeOnDocumentReady.js":193,"./Pict-CSS.js":194,"./Pict-Content-Assignment.js":195,"./Pict-DataProvider.js":196,"./Pict-Meadow-EntityProvider.js":197,"./Pict-Template-Provider.js":198,"./environments/Pict-Environment-Log.js":200,"./environments/Pict-Environment-Object.js":201,"./filters/FilterClauseBase.js":203,"./filters/FilterClauseExternalJoin.js":204,"./filters/FilterClauseInternalJoin.js":205,"./filters/FilterClauseLocal.js":206,"./providers/Provider-DataBroker.js":207,"./providers/Provider-Filter-Manager.js":208,"./services/Fable-Service-TransactionTracking.js":209,"./templates/Pict-Template-Data.js":210,"./templates/Pict-Template-DataValueByKey.js":211,"./templates/Pict-Template-DataWithTemplateFallback.js":212,"./templates/Pict-Template-Entity.js":213,"./templates/Pict-Template-Self.js":214,"./templates/Pict-Template-SolveByReference.js":215,"./templates/Pict-Template-Template.js":216,"./templates/Pict-Template-TemplateByDataAddress.js":217,"./templates/Pict-Template-TemplateByReference.js":218,"./templates/Pict-Template-
|
|
5721
|
+
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":191,"./Pict-Browser-SafeLoad.js":192,"./Pict-Browser-SafeOnDocumentReady.js":193,"./Pict-CSS.js":194,"./Pict-Content-Assignment.js":195,"./Pict-DataProvider.js":196,"./Pict-Meadow-EntityProvider.js":197,"./Pict-Template-Provider.js":198,"./environments/Pict-Environment-Log.js":200,"./environments/Pict-Environment-Object.js":201,"./filters/FilterClauseBase.js":203,"./filters/FilterClauseExternalJoin.js":204,"./filters/FilterClauseInternalJoin.js":205,"./filters/FilterClauseLocal.js":206,"./providers/Provider-DataBroker.js":207,"./providers/Provider-Filter-Manager.js":208,"./services/Fable-Service-TransactionTracking.js":209,"./templates/Pict-Template-Data.js":210,"./templates/Pict-Template-DataValueByKey.js":211,"./templates/Pict-Template-DataWithTemplateFallback.js":212,"./templates/Pict-Template-Entity.js":213,"./templates/Pict-Template-Self.js":214,"./templates/Pict-Template-SolveByReference.js":215,"./templates/Pict-Template-Template.js":216,"./templates/Pict-Template-TemplateByDataAddress.js":217,"./templates/Pict-Template-TemplateByReference.js":218,"./templates/Pict-Template-TemplateFromAddress.js":219,"./templates/Pict-Template-TemplateFromMap.js":220,"./templates/Pict-Template-TemplateSet.js":221,"./templates/Pict-Template-TemplateSetFromMap.js":222,"./templates/Pict-Template-TemplateSetWithPayload.js":223,"./templates/Pict-Template-TemplateValueSet.js":224,"./templates/Pict-Template-View.js":225,"./templates/data-generation/Pict-Template-RandomNumber.js":226,"./templates/data-generation/Pict-Template-RandomNumberString.js":227,"./templates/data/Pict-Template-DataEncodeJavascriptString.js":228,"./templates/data/Pict-Template-DataJson.js":229,"./templates/data/Pict-Template-DateOnlyFormat.js":230,"./templates/data/Pict-Template-DateOnlyYMD.js":231,"./templates/data/Pict-Template-DateTimeFormat.js":232,"./templates/data/Pict-Template-DateTimeYMD.js":233,"./templates/data/Pict-Template-Digits.js":234,"./templates/data/Pict-Template-Dollars.js":235,"./templates/data/Pict-Template-HtmlCommentEnd.js":236,"./templates/data/Pict-Template-HtmlCommentStart.js":237,"./templates/data/Pict-Template-Join.js":238,"./templates/data/Pict-Template-JoinUnique.js":239,"./templates/data/Pict-Template-PascalCaseIdentifier.js":240,"./templates/data/Pict-Template-PluckJoinUnique.js":241,"./templates/debugging/Pict-Template-Breakpoint.js":242,"./templates/debugging/Pict-Template-DataValueTree.js":243,"./templates/debugging/Pict-Template-LogStatement.js":244,"./templates/debugging/Pict-Template-LogValue.js":245,"./templates/debugging/Pict-Template-LogValueTree.js":246,"./templates/logic/Pict-Template-NotEmpty.js":247,"./templates/logic/Pict-Template-TemplateIf.js":249,"./templates/logic/Pict-Template-TemplateIfAbsolute.js":250,"fable":68,"pict-application":139,"pict-provider":141,"pict-template":143,"pict-view":145}],200:[function(require,module,exports){/**
|
|
5722
5722
|
* Pict browser shim loader
|
|
5723
5723
|
* @author <steven@velozo.com>
|
|
5724
5724
|
*
|
|
@@ -6396,11 +6396,11 @@ if(!tmpTemplateHashReferenceLocation){this.log.warn("Pict: Template Render Async
|
|
|
6396
6396
|
var tmpTemplateHash=this.resolveStateFromAddress(tmpTemplateHashReferenceLocation,pRecord,pContextArray,null,pScope,pState);// No template hash
|
|
6397
6397
|
if(!tmpTemplateHash){this.log.warn("Pict: Template Render Async: TemplateHash not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
|
|
6398
6398
|
// The async portion of this is a mind bender because of how entry can happen dynamically from templates
|
|
6399
|
-
this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}else{this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope,pState),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplate;},{"pict-template":143}],219:[function(require,module,exports){var libPictTemplate=require('pict-template');var
|
|
6399
|
+
this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}else{this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope,pState),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplate;},{"pict-template":143}],219:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateFromAddress=/*#__PURE__*/function(_libPictTemplate0){/**
|
|
6400
6400
|
* @param {Object} pFable - The Fable Framework instance
|
|
6401
6401
|
* @param {Object} pOptions - The options for the service
|
|
6402
6402
|
* @param {String} pServiceHash - The hash of the service
|
|
6403
|
-
*/function
|
|
6403
|
+
*/function PictTemplateProviderTemplateFromAddress(pFable,pOptions,pServiceHash){var _this104;_classCallCheck2(this,PictTemplateProviderTemplateFromAddress);_this104=_callSuper(this,PictTemplateProviderTemplateFromAddress,[pFable,pOptions,pServiceHash]);/** @type {any} */_this104.log;_this104.addPattern('{~TemplateFromAddress:','~}');_this104.addPattern('{~TFA:','~}');return _this104;}/**
|
|
6404
6404
|
* Render a template expression, returning a string with the resulting content.
|
|
6405
6405
|
*
|
|
6406
6406
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6410,7 +6410,43 @@ this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,function(pError,pValue){if
|
|
|
6410
6410
|
* @param {any} [pState] - A catchall state object for plumbing data through template processing.
|
|
6411
6411
|
*
|
|
6412
6412
|
* @return {string} The rendered template
|
|
6413
|
-
*/_inherits(
|
|
6413
|
+
*/_inherits(PictTemplateProviderTemplateFromAddress,_libPictTemplate0);return _createClass2(PictTemplateProviderTemplateFromAddress,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateRender]::[".concat(tmpHash,"]"));}var tmpTemplateContentAddress;var tmpAddressOfData;// This is just a simple 2 part hash (the entity and the ID)
|
|
6414
|
+
var tmpHashTemplateSeparator=tmpHash.indexOf(':');tmpTemplateContentAddress=tmpHash.substring(0,tmpHashTemplateSeparator);if(tmpHashTemplateSeparator>-1){tmpAddressOfData=tmpHash.substring(tmpHashTemplateSeparator+1);}else{tmpTemplateContentAddress=tmpHash;}// No template hash
|
|
6415
|
+
if(!tmpTemplateContentAddress){this.log.warn("Pict: Template Render: TemplateHashReferenceLocation not resolved for [".concat(tmpHash,"]"));return'';}// Now look up the template by the reference
|
|
6416
|
+
var tmpTemplateContent=this.resolveStateFromAddress(tmpTemplateContentAddress,pRecord,pContextArray,null,pScope,pState);// No template hash
|
|
6417
|
+
if(!tmpTemplateContent){this.log.warn("Pict: Template Render: Template not resolved for [".concat(tmpHash,"]"));return'';}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
|
|
6418
|
+
return this.pict.parseTemplate(tmpTemplateContent,pRecord,null,pContextArray,pScope,pState);}else{return this.pict.parseTemplate(tmpTemplateContent,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope,pState),null,pContextArray,pScope,pState);}}/**
|
|
6419
|
+
* Render a template expression, deliver a string with the resulting content to a callback function.
|
|
6420
|
+
*
|
|
6421
|
+
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
6422
|
+
* @param {any} pRecord - The json object to be used as the Record for the template render
|
|
6423
|
+
* @param {(error?: Error, content?: String) => void} fCallback - callback function invoked with the rendered template, or an error
|
|
6424
|
+
* @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
|
|
6425
|
+
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
6426
|
+
* @param {any} [pState] - A catchall state object for plumbing data through template processing.
|
|
6427
|
+
*
|
|
6428
|
+
* @return {void}
|
|
6429
|
+
*/},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope,pState){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateContentAddress;var tmpAddressOfData;// This is just a simple 2 part hash (the entity and the ID)
|
|
6430
|
+
var tmpHashTemplateSeparator=tmpHash.indexOf(':');tmpTemplateContentAddress=tmpHash.substring(0,tmpHashTemplateSeparator);if(tmpHashTemplateSeparator>-1){tmpAddressOfData=tmpHash.substring(tmpHashTemplateSeparator+1);}else{tmpTemplateContentAddress=tmpHash;}// No template hash
|
|
6431
|
+
if(!tmpTemplateContentAddress){this.log.warn("Pict: Template Render Async: TemplateHashReferenceLocation not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}// Now look up the template by the reference
|
|
6432
|
+
var tmpTemplateContent=this.resolveStateFromAddress(tmpTemplateContentAddress,pRecord,pContextArray,null,pScope,pState);// No template hash
|
|
6433
|
+
if(!tmpTemplateContent){this.log.warn("Pict: Template Render Async: TemplateHash not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
|
|
6434
|
+
// The async portion of this is a mind bender because of how entry can happen dynamically from templates
|
|
6435
|
+
this.pict.parseTemplate(tmpTemplateContent,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}else{this.pict.parseTemplate(tmpTemplateContent,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope,pState),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateFromAddress;},{"pict-template":143}],220:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateFromMap=/*#__PURE__*/function(_libPictTemplate1){/**
|
|
6436
|
+
* @param {Object} pFable - The Fable Framework instance
|
|
6437
|
+
* @param {Object} pOptions - The options for the service
|
|
6438
|
+
* @param {String} pServiceHash - The hash of the service
|
|
6439
|
+
*/function PictTemplateProviderTemplateFromMap(pFable,pOptions,pServiceHash){var _this105;_classCallCheck2(this,PictTemplateProviderTemplateFromMap);_this105=_callSuper(this,PictTemplateProviderTemplateFromMap,[pFable,pOptions,pServiceHash]);/** @type {any} */_this105.log;_this105.addPattern('{~TFM:','~}');_this105.addPattern('{~TemplateFromMap:','~}');return _this105;}/**
|
|
6440
|
+
* Render a template expression, returning a string with the resulting content.
|
|
6441
|
+
*
|
|
6442
|
+
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
6443
|
+
* @param {any} pRecord - The json object to be used as the Record for the template render
|
|
6444
|
+
* @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
|
|
6445
|
+
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
6446
|
+
* @param {any} [pState] - A catchall state object for plumbing data through template processing.
|
|
6447
|
+
*
|
|
6448
|
+
* @return {string} The rendered template
|
|
6449
|
+
*/_inherits(PictTemplateProviderTemplateFromMap,_libPictTemplate1);return _createClass2(PictTemplateProviderTemplateFromMap,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRender]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash;var tmpAddressOfMap;var tmpAddressOfKey;// This is a 3 part hash with the map address and the key address both
|
|
6414
6450
|
var tmpTemplateHashPart=tmpHash.split(':');if(tmpTemplateHashPart.length<3){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(tmpHash,"] failed because there were not three stanzas in the expression [").concat(pTemplateHash,"]"));return'';}tmpTemplateFromMapHash=tmpTemplateHashPart[0];tmpAddressOfMap=tmpTemplateHashPart[1];tmpAddressOfKey=tmpTemplateHashPart[2];// No TemplateFromMap hash
|
|
6415
6451
|
if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMap Render: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return'';}// Now resolve the data
|
|
6416
6452
|
var tmpMap=this.resolveStateFromAddress(tmpAddressOfMap,tmpData,pContextArray,null,pScope,pState);var tmpKey=this.resolveStateFromAddress(tmpAddressOfKey,tmpData,pContextArray,null,pScope,pState);if(!tmpMap){this.log.warn("Pict: TemplateFromMap Render: Map not resolved for [".concat(tmpHash,"]"));return'';}tmpData=tmpMap[tmpKey];if(!tmpData){// No address was provided, just render the TemplateFromMap with what this TemplateFromMap has.
|
|
@@ -6430,11 +6466,11 @@ var tmpTemplateHashPart=tmpHash.split(':');if(tmpTemplateHashPart.length<3){this
|
|
|
6430
6466
|
if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}// Now resolve the data
|
|
6431
6467
|
var tmpMap=this.resolveStateFromAddress(tmpAddressOfMap,tmpData,pContextArray,null,pScope,pState);var tmpKey=this.resolveStateFromAddress(tmpAddressOfKey,tmpData,pContextArray,null,pScope,pState);if(!tmpMap){this.log.warn("Pict: TemplateFromMap Render: Map not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}tmpData=tmpMap[tmpKey];if(!tmpData){// No address was provided, just render the TemplateFromMap with what this TemplateFromMap has.
|
|
6432
6468
|
// The async portion of this is a mind bender because of how entry can happen dynamically from TemplateFromMaps
|
|
6433
|
-
this.pict.parseTemplateByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}else{this.pict.parseTemplateByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateFromMap;},{"pict-template":143}],
|
|
6469
|
+
this.pict.parseTemplateByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}else{this.pict.parseTemplateByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateFromMap;},{"pict-template":143}],221:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateSet=/*#__PURE__*/function(_libPictTemplate10){/**
|
|
6434
6470
|
* @param {Object} pFable - The Fable Framework instance
|
|
6435
6471
|
* @param {Object} pOptions - The options for the service
|
|
6436
6472
|
* @param {String} pServiceHash - The hash of the service
|
|
6437
|
-
*/function PictTemplateProviderTemplateSet(pFable,pOptions,pServiceHash){var
|
|
6473
|
+
*/function PictTemplateProviderTemplateSet(pFable,pOptions,pServiceHash){var _this106;_classCallCheck2(this,PictTemplateProviderTemplateSet);_this106=_callSuper(this,PictTemplateProviderTemplateSet,[pFable,pOptions,pServiceHash]);/** @type {any} */_this106.log;_this106.addPattern('{~TemplateSet:','~}');_this106.addPattern('{~TS:','~}');return _this106;}/**
|
|
6438
6474
|
* Render a template expression, returning a string with the resulting content.
|
|
6439
6475
|
*
|
|
6440
6476
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6444,7 +6480,7 @@ this.pict.parseTemplateByHash(tmpTemplateFromMapHash,pRecord,function(pError,pVa
|
|
|
6444
6480
|
* @param {any} [pState] - A catchall state object for plumbing data through template processing.
|
|
6445
6481
|
*
|
|
6446
6482
|
* @return {string} The rendered template
|
|
6447
|
-
*/_inherits(PictTemplateProviderTemplateSet,
|
|
6483
|
+
*/_inherits(PictTemplateProviderTemplateSet,_libPictTemplate10);return _createClass2(PictTemplateProviderTemplateSet,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateSetRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateSetRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;// This is just a simple 2 part hash (the entity and the ID)
|
|
6448
6484
|
var tmpHashTemplateSeparator=tmpHash.indexOf(':');tmpTemplateHash=tmpHash.substring(0,tmpHashTemplateSeparator);if(tmpHashTemplateSeparator>-1){tmpAddressOfData=tmpHash.substring(tmpHashTemplateSeparator+1);}else{tmpTemplateHash=tmpHash;}// No template hash
|
|
6449
6485
|
if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return'';}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
|
|
6450
6486
|
return this.pict.parseTemplateSetByHash(tmpTemplateHash,pRecord,null,pContextArray,pScope,pState);}else{return this.pict.parseTemplateSetByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope,pState),null,pContextArray,pScope,pState);}}/**
|
|
@@ -6463,11 +6499,11 @@ var tmpTemplateHashPart=tmpHash.split(':');if(tmpTemplateHashPart.length<2){this
|
|
|
6463
6499
|
if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}// Now resolve the data
|
|
6464
6500
|
tmpData=this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope,pState);if(!tmpData){// No address was provided, just render the template with what this template has.
|
|
6465
6501
|
// The async portion of this is a mind bender because of how entry can happen dynamically from templates
|
|
6466
|
-
this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}else{this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateSet;},{"pict-template":143}],
|
|
6502
|
+
this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}else{this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateSet;},{"pict-template":143}],222:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateSetFromMap=/*#__PURE__*/function(_libPictTemplate11){/**
|
|
6467
6503
|
* @param {Object} pFable - The Fable Framework instance
|
|
6468
6504
|
* @param {Object} pOptions - The options for the service
|
|
6469
6505
|
* @param {String} pServiceHash - The hash of the service
|
|
6470
|
-
*/function PictTemplateProviderTemplateSetFromMap(pFable,pOptions,pServiceHash){var
|
|
6506
|
+
*/function PictTemplateProviderTemplateSetFromMap(pFable,pOptions,pServiceHash){var _this107;_classCallCheck2(this,PictTemplateProviderTemplateSetFromMap);_this107=_callSuper(this,PictTemplateProviderTemplateSetFromMap,[pFable,pOptions,pServiceHash]);/** @type {any} */_this107.log;_this107.addPattern('{~TSFM:','~}');_this107.addPattern('{~TemplateSetFromMap:','~}');return _this107;}/**
|
|
6471
6507
|
* Render a template expression, returning a string with the resulting content.
|
|
6472
6508
|
*
|
|
6473
6509
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6477,7 +6513,7 @@ this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(pError,
|
|
|
6477
6513
|
* @param {any} [pState] - A catchall state object for plumbing data through template processing.
|
|
6478
6514
|
*
|
|
6479
6515
|
* @return {string} The rendered template
|
|
6480
|
-
*/_inherits(PictTemplateProviderTemplateSetFromMap,
|
|
6516
|
+
*/_inherits(PictTemplateProviderTemplateSetFromMap,_libPictTemplate11);return _createClass2(PictTemplateProviderTemplateSetFromMap,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRender]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash;var tmpAddressOfMap;var tmpAddressOfKey;// This is a 3 part hash with the map address and the key address both
|
|
6481
6517
|
var tmpTemplateHashPart=tmpHash.split(':');if(tmpTemplateHashPart.length<3){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(tmpHash,"] failed because there were not three stanzas in the expression [").concat(pTemplateHash,"]"));return'';}tmpTemplateFromMapHash=tmpTemplateHashPart[0];tmpAddressOfMap=tmpTemplateHashPart[1];tmpAddressOfKey=tmpTemplateHashPart[2];// No TemplateFromMap hash
|
|
6482
6518
|
if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return'';}// Now resolve the data
|
|
6483
6519
|
var tmpMap=this.resolveStateFromAddress(tmpAddressOfMap,tmpData,pContextArray,null,pScope,pState);var tmpKey=this.resolveStateFromAddress(tmpAddressOfKey,tmpData,pContextArray,null,pScope,pState);if(!tmpMap){this.log.warn("Pict: TemplateFromMap Render: Map not resolved for [".concat(tmpHash,"]"));return'';}tmpData=tmpMap[tmpKey];if(!tmpData){// No address was provided, just render the TemplateFromMap with what this TemplateFromMap has.
|
|
@@ -6497,11 +6533,11 @@ var tmpTemplateHashPart=tmpHash.split(':');if(tmpTemplateHashPart.length<3){this
|
|
|
6497
6533
|
if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMapSet Render Async: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}// Now resolve the data
|
|
6498
6534
|
var tmpMap=this.resolveStateFromAddress(tmpAddressOfMap,tmpData,pContextArray,null,pScope,pState);var tmpKey=this.resolveStateFromAddress(tmpAddressOfKey,tmpData,pContextArray,null,pScope,pState);if(!tmpMap){this.log.warn("Pict: TemplateFromMapSet Render: Map not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}tmpData=tmpMap[tmpKey];if(!tmpData){// No address was provided, just render the TemplateFromMap with what this TemplateFromMap has.
|
|
6499
6535
|
// The async portion of this is a mind bender because of how entry can happen dynamically from TemplateFromMaps
|
|
6500
|
-
this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}else{this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateSetFromMap;},{"pict-template":143}],
|
|
6536
|
+
this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}else{this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateSetFromMap;},{"pict-template":143}],223:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateSetWithPayload=/*#__PURE__*/function(_libPictTemplate12){/**
|
|
6501
6537
|
* @param {Object} pFable - The Fable Framework instance
|
|
6502
6538
|
* @param {Object} pOptions - The options for the service
|
|
6503
6539
|
* @param {String} pServiceHash - The hash of the service
|
|
6504
|
-
*/function PictTemplateProviderTemplateSetWithPayload(pFable,pOptions,pServiceHash){var
|
|
6540
|
+
*/function PictTemplateProviderTemplateSetWithPayload(pFable,pOptions,pServiceHash){var _this108;_classCallCheck2(this,PictTemplateProviderTemplateSetWithPayload);_this108=_callSuper(this,PictTemplateProviderTemplateSetWithPayload,[pFable,pOptions,pServiceHash]);/** @type {any} */_this108.log;_this108.addPattern('{~TemplateSetWithPayload:','~}');_this108.addPattern('{~TSWP:','~}');return _this108;}/**
|
|
6505
6541
|
* Render a template expression, returning a string with the resulting content.
|
|
6506
6542
|
*
|
|
6507
6543
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6511,7 +6547,7 @@ this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(pError,
|
|
|
6511
6547
|
* @param {any} [pState] - A catchall state object for plumbing data through template processing.
|
|
6512
6548
|
*
|
|
6513
6549
|
* @return {string} The rendered template
|
|
6514
|
-
*/_inherits(PictTemplateProviderTemplateSetWithPayload,
|
|
6550
|
+
*/_inherits(PictTemplateProviderTemplateSetWithPayload,_libPictTemplate12);return _createClass2(PictTemplateProviderTemplateSetWithPayload,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){var tmpHash=pTemplateHash.trim();if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(tmpHash,"] with record:"),pRecord);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;var tmpAddressOfPayload;// This is just a simple 3 part hash (template, address of set, address of payload)
|
|
6515
6551
|
var tmpTemplateHashes=tmpHash.trim().split(':');if(tmpTemplateHashes.length<3){this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(tmpHash,"] failed because there were not three stanzas in the expression [").concat(pTemplateHash,"]"));return"";}tmpTemplateHash=tmpTemplateHashes[0];tmpAddressOfData=tmpTemplateHashes[1];tmpAddressOfPayload=tmpTemplateHashes[2];var tmpData=this.resolveStateFromAddress(tmpAddressOfData,pRecord,pContextArray,null,pScope,pState);if(!tmpData){tmpData=pRecord;}if(!tmpData){tmpData={};}var tmpPayloadData=this.resolveStateFromAddress(tmpAddressOfPayload,pRecord,pContextArray,null,pScope,pState);if(!tmpPayloadData){tmpPayloadData=pRecord;}if(!tmpPayloadData){tmpPayloadData={};}return this.pict.parseTemplateSetWithPayloadByHash(tmpTemplateHash,tmpData,tmpPayloadData,null,pContextArray,pScope,pState);}/**
|
|
6516
6552
|
* Render a template expression, deliver a string with the resulting content to a callback function.
|
|
6517
6553
|
*
|
|
@@ -6524,11 +6560,11 @@ var tmpTemplateHashes=tmpHash.trim().split(':');if(tmpTemplateHashes.length<3){t
|
|
|
6524
6560
|
*
|
|
6525
6561
|
* @return {void}
|
|
6526
6562
|
*/},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope,pState){var tmpHash=pTemplateHash.trim();var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateSetWithPayloadRenderAsync]::[".concat(tmpHash,"]"));}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateSetWithPayloadRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;var tmpAddressOfPayload;// This is just a simple 3 part hash (template, address of set, address of payload)
|
|
6527
|
-
var tmpTemplateHashes=tmpHash.trim().split(':');if(tmpTemplateHashes.length<3){this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(tmpHash,"] failed because there were not three stanzas in the expression [").concat(pTemplateHash,"]"));return fCallback(null,'');}tmpTemplateHash=tmpTemplateHashes[0];tmpAddressOfData=tmpTemplateHashes[1];tmpAddressOfPayload=tmpTemplateHashes[2];var tmpData=this.resolveStateFromAddress(tmpAddressOfData,pRecord,pContextArray,null,pScope,pState);if(!tmpData){tmpData=pRecord;}if(!tmpData){tmpData={};}var tmpPayloadData=this.resolveStateFromAddress(tmpAddressOfPayload,pRecord,pContextArray,null,pScope,pState);if(!tmpPayloadData){tmpPayloadData=pRecord;}if(!tmpPayloadData){tmpPayloadData={};}this.pict.parseTemplateSetWithPayloadByHash(tmpTemplateHash,tmpData,tmpPayloadData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateSetWithPayload;},{"pict-template":143}],
|
|
6563
|
+
var tmpTemplateHashes=tmpHash.trim().split(':');if(tmpTemplateHashes.length<3){this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(tmpHash,"] failed because there were not three stanzas in the expression [").concat(pTemplateHash,"]"));return fCallback(null,'');}tmpTemplateHash=tmpTemplateHashes[0];tmpAddressOfData=tmpTemplateHashes[1];tmpAddressOfPayload=tmpTemplateHashes[2];var tmpData=this.resolveStateFromAddress(tmpAddressOfData,pRecord,pContextArray,null,pScope,pState);if(!tmpData){tmpData=pRecord;}if(!tmpData){tmpData={};}var tmpPayloadData=this.resolveStateFromAddress(tmpAddressOfPayload,pRecord,pContextArray,null,pScope,pState);if(!tmpPayloadData){tmpPayloadData=pRecord;}if(!tmpPayloadData){tmpPayloadData={};}this.pict.parseTemplateSetWithPayloadByHash(tmpTemplateHash,tmpData,tmpPayloadData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateSetWithPayload;},{"pict-template":143}],224:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateValueSet=/*#__PURE__*/function(_libPictTemplate13){/**
|
|
6528
6564
|
* @param {Object} pFable - The Fable Framework instance
|
|
6529
6565
|
* @param {Object} pOptions - The options for the service
|
|
6530
6566
|
* @param {String} pServiceHash - The hash of the service
|
|
6531
|
-
*/function PictTemplateProviderTemplateValueSet(pFable,pOptions,pServiceHash){var
|
|
6567
|
+
*/function PictTemplateProviderTemplateValueSet(pFable,pOptions,pServiceHash){var _this109;_classCallCheck2(this,PictTemplateProviderTemplateValueSet);_this109=_callSuper(this,PictTemplateProviderTemplateValueSet,[pFable,pOptions,pServiceHash]);/** @type {any} */_this109.log;_this109.addPattern('{~TemplateValueSet:','~}');_this109.addPattern('{~TVS:','~}');return _this109;}/**
|
|
6532
6568
|
* Render a template expression, returning a string with the resulting content.
|
|
6533
6569
|
*
|
|
6534
6570
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6538,7 +6574,7 @@ var tmpTemplateHashes=tmpHash.trim().split(':');if(tmpTemplateHashes.length<3){t
|
|
|
6538
6574
|
* @param {any} [pState] - A catchall state object for plumbing data through template processing.
|
|
6539
6575
|
*
|
|
6540
6576
|
* @return {string} The rendered template
|
|
6541
|
-
*/_inherits(PictTemplateProviderTemplateValueSet,
|
|
6577
|
+
*/_inherits(PictTemplateProviderTemplateValueSet,_libPictTemplate13);return _createClass2(PictTemplateProviderTemplateValueSet,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateValueSetRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateValueSetRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;// This is just a simple 2 part hash (the entity and the ID)
|
|
6542
6578
|
var tmpHashTemplateSeparator=tmpHash.indexOf(':');tmpTemplateHash=tmpHash.substring(0,tmpHashTemplateSeparator);if(tmpHashTemplateSeparator>-1){tmpAddressOfData=tmpHash.substring(tmpHashTemplateSeparator+1);}else{tmpTemplateHash=tmpHash;}// No template hash
|
|
6543
6579
|
if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return'';}tmpData=this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope,pState);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 _i69=0;_i69<tmpValueKeys.length;_i69++){tmpDataValueSet.push({Value:tmpData[tmpValueKeys[_i69]],Key:tmpValueKeys[_i69]});}}else{tmpDataValueSet.push({Value:tmpData});}tmpData=tmpDataValueSet;if(!tmpData){// No address was provided, just render the template with what this template has.
|
|
6544
6580
|
return this.pict.parseTemplateSetByHash(tmpTemplateHash,pRecord,null,pContextArray,pScope,pState);}else{return this.pict.parseTemplateSetByHash(tmpTemplateHash,tmpData,null,pContextArray,pScope,pState);}}/**
|
|
@@ -6557,11 +6593,11 @@ var tmpTemplateHashPart=tmpHash.split(':');if(tmpTemplateHashPart.length<2){this
|
|
|
6557
6593
|
if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}// Now resolve the data
|
|
6558
6594
|
tmpData=this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope,pState);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 _i70=0;_i70<tmpValueKeys.length;_i70++){tmpDataValueSet.push({Value:tmpData[tmpValueKeys[_i70]],Key:tmpData[tmpValueKeys[_i70]]});}}else{tmpDataValueSet.push({Value:tmpData});}tmpData=tmpDataValueSet;if(!tmpData){// No address was provided, just render the template with what this template has.
|
|
6559
6595
|
// The async portion of this is a mind bender because of how entry can happen dynamically from templates
|
|
6560
|
-
this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}else{this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateValueSet;},{"pict-template":143}],
|
|
6596
|
+
this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}else{this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateValueSet;},{"pict-template":143}],225:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderView=/*#__PURE__*/function(_libPictTemplate14){/**
|
|
6561
6597
|
* @param {Object} pFable - The Fable Framework instance
|
|
6562
6598
|
* @param {Object} pOptions - The options for the service
|
|
6563
6599
|
* @param {String} pServiceHash - The hash of the service
|
|
6564
|
-
*/function PictTemplateProviderView(pFable,pOptions,pServiceHash){var
|
|
6600
|
+
*/function PictTemplateProviderView(pFable,pOptions,pServiceHash){var _this110;_classCallCheck2(this,PictTemplateProviderView);_this110=_callSuper(this,PictTemplateProviderView,[pFable,pOptions,pServiceHash]);/** @type {any} */_this110.log;_this110.addPattern('{~V:','~}');_this110.addPattern('{~View:','~}');if(!('__TemplateOutputCache'in _this110.pict)){_this110.pict.__TemplateOutputCache={};}return _this110;}/**
|
|
6565
6601
|
* Render a template expression, returning a string with the resulting content.
|
|
6566
6602
|
*
|
|
6567
6603
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6571,7 +6607,7 @@ this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(pError,
|
|
|
6571
6607
|
* @param {any} [pState] - A catchall state object for plumbing data through template processing.
|
|
6572
6608
|
*
|
|
6573
6609
|
* @return {string} The rendered template
|
|
6574
|
-
*/_inherits(PictTemplateProviderView,
|
|
6610
|
+
*/_inherits(PictTemplateProviderView,_libPictTemplate14);return _createClass2(PictTemplateProviderView,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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();/** @type {import('pict-view')} */var tmpView=this.pict.views[tmpViewHash];tmpView.render('__Virtual',"__TemplateOutputCache.".concat(tmpRenderGUID),pRecord,pState?pState.RootRenderable:undefined);var tmpResult=this.pict.__TemplateOutputCache[tmpRenderGUID];// TODO: Uncomment this when we like how it's working
|
|
6575
6611
|
//delete this.pict.__TemplateOutputCache[tmpRenderGUID];
|
|
6576
6612
|
return tmpResult;}/**
|
|
6577
6613
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6582,13 +6618,13 @@ return tmpResult;}/**
|
|
|
6582
6618
|
* @param {any} [pState] - A catchall state object for plumbing data through template processing.
|
|
6583
6619
|
*
|
|
6584
6620
|
* @return {void}
|
|
6585
|
-
*/},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope,pState){var
|
|
6621
|
+
*/},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope,pState){var _this111=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 fCallback(null,'');}var tmpRenderGUID=this.pict.getUUID();var tmpView=this.pict.views[tmpViewHash];return tmpView.renderAsync('__Virtual',"__TemplateOutputCache.".concat(tmpRenderGUID),pRecord,pState?pState.RootRenderable:undefined,function(pError,pResult){if(pError){_this111.log.warn("Pict: View Template Render: Error rendering view [".concat(tmpViewHash,"]"),pError);return fCallback(pError,'');}var tmpResult=_this111.pict.__TemplateOutputCache[tmpRenderGUID];// TODO: Uncomment this when we like how it's working
|
|
6586
6622
|
//delete this.pict.__TemplateOutputCache[tmpRenderGUID];
|
|
6587
|
-
return fCallback(null,tmpResult);});}}]);}(libPictTemplate);module.exports=PictTemplateProviderView;},{"pict-template":143}],
|
|
6623
|
+
return fCallback(null,tmpResult);});}}]);}(libPictTemplate);module.exports=PictTemplateProviderView;},{"pict-template":143}],226:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderRandomNumber=/*#__PURE__*/function(_libPictTemplate15){/**
|
|
6588
6624
|
* @param {Object} pFable - The Fable Framework instance
|
|
6589
6625
|
* @param {Object} pOptions - The options for the service
|
|
6590
6626
|
* @param {String} pServiceHash - The hash of the service
|
|
6591
|
-
*/function PictTemplateProviderRandomNumber(pFable,pOptions,pServiceHash){var
|
|
6627
|
+
*/function PictTemplateProviderRandomNumber(pFable,pOptions,pServiceHash){var _this112;_classCallCheck2(this,PictTemplateProviderRandomNumber);_this112=_callSuper(this,PictTemplateProviderRandomNumber,[pFable,pOptions,pServiceHash]);/** @type {any} */_this112.log;_this112.addPattern('{~RandomNumber:','~}');_this112.addPattern('{~RN:','~}');return _this112;}/**
|
|
6592
6628
|
* Render a template expression, returning a string with the resulting content.
|
|
6593
6629
|
*
|
|
6594
6630
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6598,11 +6634,11 @@ return fCallback(null,tmpResult);});}}]);}(libPictTemplate);module.exports=PictT
|
|
|
6598
6634
|
* @param {any} [pState] - A catchall state object for plumbing data through template processing.
|
|
6599
6635
|
*
|
|
6600
6636
|
* @return {string} The rendered template
|
|
6601
|
-
*/_inherits(PictTemplateProviderRandomNumber,
|
|
6637
|
+
*/_inherits(PictTemplateProviderRandomNumber,_libPictTemplate15);return _createClass2(PictTemplateProviderRandomNumber,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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":143}],227:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderRandomNumberString=/*#__PURE__*/function(_libPictTemplate16){/**
|
|
6602
6638
|
* @param {Object} pFable - The Fable Framework instance
|
|
6603
6639
|
* @param {Object} pOptions - The options for the service
|
|
6604
6640
|
* @param {String} pServiceHash - The hash of the service
|
|
6605
|
-
*/function PictTemplateProviderRandomNumberString(pFable,pOptions,pServiceHash){var
|
|
6641
|
+
*/function PictTemplateProviderRandomNumberString(pFable,pOptions,pServiceHash){var _this113;_classCallCheck2(this,PictTemplateProviderRandomNumberString);_this113=_callSuper(this,PictTemplateProviderRandomNumberString,[pFable,pOptions,pServiceHash]);/** @type {any} */_this113.log;_this113.addPattern('{~RandomNumberString:','~}');_this113.addPattern('{~RNS:','~}');return _this113;}/**
|
|
6606
6642
|
* Render a template expression, returning a string with the resulting content.
|
|
6607
6643
|
*
|
|
6608
6644
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6612,11 +6648,11 @@ return fCallback(null,tmpResult);});}}]);}(libPictTemplate);module.exports=PictT
|
|
|
6612
6648
|
* @param {any} [pState] - A catchall state object for plumbing data through template processing.
|
|
6613
6649
|
*
|
|
6614
6650
|
* @return {string} The rendered template
|
|
6615
|
-
*/_inherits(PictTemplateProviderRandomNumberString,
|
|
6651
|
+
*/_inherits(PictTemplateProviderRandomNumberString,_libPictTemplate16);return _createClass2(PictTemplateProviderRandomNumberString,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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":143}],228:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDataEncodeJavascriptString=/*#__PURE__*/function(_libPictTemplate17){/**
|
|
6616
6652
|
* @param {Object} pFable - The Fable Framework instance
|
|
6617
6653
|
* @param {Object} pOptions - The options for the service
|
|
6618
6654
|
* @param {String} pServiceHash - The hash of the service
|
|
6619
|
-
*/function PictTemplateProviderDataEncodeJavascriptString(pFable,pOptions,pServiceHash){var
|
|
6655
|
+
*/function PictTemplateProviderDataEncodeJavascriptString(pFable,pOptions,pServiceHash){var _this114;_classCallCheck2(this,PictTemplateProviderDataEncodeJavascriptString);_this114=_callSuper(this,PictTemplateProviderDataEncodeJavascriptString,[pFable,pOptions,pServiceHash]);/** @type {any} */_this114.log;_this114.addPattern('{~DataEncodeJavascriptString:','~}');_this114.addPattern('{~DEJS:','~}');return _this114;}/**
|
|
6620
6656
|
* Render a template expression, returning a string with the resulting content.
|
|
6621
6657
|
*
|
|
6622
6658
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6626,11 +6662,11 @@ return fCallback(null,tmpResult);});}}]);}(libPictTemplate);module.exports=PictT
|
|
|
6626
6662
|
* @param {any} [pState] - A catchall state object for plumbing data through template processing.
|
|
6627
6663
|
*
|
|
6628
6664
|
* @return {string} The rendered template
|
|
6629
|
-
*/_inherits(PictTemplateProviderDataEncodeJavascriptString,
|
|
6665
|
+
*/_inherits(PictTemplateProviderDataEncodeJavascriptString,_libPictTemplate17);return _createClass2(PictTemplateProviderDataEncodeJavascriptString,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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 tmpDataToEncode=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray,null,pScope,pState);return this.pict.DataFormat.stringEncodeForJavascript(tmpDataToEncode);}}]);}(libPictTemplate);module.exports=PictTemplateProviderDataEncodeJavascriptString;},{"pict-template":143}],229:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderJSONOutput=/*#__PURE__*/function(_libPictTemplate18){/**
|
|
6630
6666
|
* @param {Object} pFable - The Fable Framework instance
|
|
6631
6667
|
* @param {Object} pOptions - The options for the service
|
|
6632
6668
|
* @param {String} pServiceHash - The hash of the service
|
|
6633
|
-
*/function PictTemplateProviderJSONOutput(pFable,pOptions,pServiceHash){var
|
|
6669
|
+
*/function PictTemplateProviderJSONOutput(pFable,pOptions,pServiceHash){var _this115;_classCallCheck2(this,PictTemplateProviderJSONOutput);_this115=_callSuper(this,PictTemplateProviderJSONOutput,[pFable,pOptions,pServiceHash]);/** @type {any} */_this115.log;_this115.addPattern('{~DataJson:','~}');_this115.addPattern('{~DJ:','~}');return _this115;}/**
|
|
6634
6670
|
* Render a template expression, returning a string with the resulting content.
|
|
6635
6671
|
*
|
|
6636
6672
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6640,11 +6676,11 @@ return fCallback(null,tmpResult);});}}]);}(libPictTemplate);module.exports=PictT
|
|
|
6640
6676
|
* @param {any} [pState] - A catchall state object for plumbing data through template processing.
|
|
6641
6677
|
*
|
|
6642
6678
|
* @return {string} The rendered template
|
|
6643
|
-
*/_inherits(PictTemplateProviderJSONOutput,
|
|
6679
|
+
*/_inherits(PictTemplateProviderJSONOutput,_libPictTemplate18);return _createClass2(PictTemplateProviderJSONOutput,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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,null,pScope,pState);if(!tmpDataToStringify){tmpDataToStringify=pRecord;}return JSON.stringify(tmpDataToStringify);}}]);}(libPictTemplate);module.exports=PictTemplateProviderJSONOutput;},{"pict-template":143}],230:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateOnlyFormat=/*#__PURE__*/function(_libPictTemplate19){/**
|
|
6644
6680
|
* @param {import('fable')} pFable - The Fable Framework instance
|
|
6645
6681
|
* @param {any} pOptions - The options for the service
|
|
6646
6682
|
* @param {String} pServiceHash - The hash of the service
|
|
6647
|
-
*/function PictTemplateProviderDateOnlyFormat(pFable,pOptions,pServiceHash){var
|
|
6683
|
+
*/function PictTemplateProviderDateOnlyFormat(pFable,pOptions,pServiceHash){var _this116;_classCallCheck2(this,PictTemplateProviderDateOnlyFormat);_this116=_callSuper(this,PictTemplateProviderDateOnlyFormat,[pFable,pOptions,pServiceHash]);/** @type {any} */_this116.options;/** @type {any} */_this116.log;_this116.addPattern('{~DateOnlyFormat:','~}');return _this116;}/**
|
|
6648
6684
|
* Render a template expression, returning a string with the resulting content.
|
|
6649
6685
|
*
|
|
6650
6686
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6654,18 +6690,18 @@ return fCallback(null,tmpResult);});}}]);}(libPictTemplate);module.exports=PictT
|
|
|
6654
6690
|
* @param {any} [pState] - A catchall state object for plumbing data through template processing.
|
|
6655
6691
|
*
|
|
6656
6692
|
* @return {string} The rendered template
|
|
6657
|
-
*/_inherits(PictTemplateProviderDateOnlyFormat,
|
|
6693
|
+
*/_inherits(PictTemplateProviderDateOnlyFormat,_libPictTemplate19);return _createClass2(PictTemplateProviderDateOnlyFormat,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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,null,pScope,pState);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
|
|
6658
6694
|
var tmpDayJS=this.fable.Dates.dayJS.utc(tmpDateValue).tz('UTC');return tmpDayJS.format(tmpDateValueSet[1]);}}]);}(libPictTemplate);module.exports=PictTemplateProviderDateOnlyFormat;/*
|
|
6659
6695
|
# DEAR DEAD CODE DIARY:
|
|
6660
6696
|
|
|
6661
6697
|
```javascript
|
|
6662
6698
|
|
|
6663
6699
|
```
|
|
6664
|
-
*/},{"pict-template":143}],
|
|
6700
|
+
*/},{"pict-template":143}],231:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateOnlyYMD=/*#__PURE__*/function(_libPictTemplate20){/**
|
|
6665
6701
|
* @param {Object} pFable - The Fable Framework instance
|
|
6666
6702
|
* @param {Object} pOptions - The options for the service
|
|
6667
6703
|
* @param {String} pServiceHash - The hash of the service
|
|
6668
|
-
*/function PictTemplateProviderDateOnlyYMD(pFable,pOptions,pServiceHash){var
|
|
6704
|
+
*/function PictTemplateProviderDateOnlyYMD(pFable,pOptions,pServiceHash){var _this117;_classCallCheck2(this,PictTemplateProviderDateOnlyYMD);_this117=_callSuper(this,PictTemplateProviderDateOnlyYMD,[pFable,pOptions,pServiceHash]);/** @type {any} */_this117.options;/** @type {any} */_this117.log;_this117.addPattern('{~DateOnlyYMD:','~}');return _this117;}/**
|
|
6669
6705
|
* Render a template expression, returning a string with the resulting content.
|
|
6670
6706
|
*
|
|
6671
6707
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6675,15 +6711,15 @@ var tmpDayJS=this.fable.Dates.dayJS.utc(tmpDateValue).tz('UTC');return tmpDayJS.
|
|
|
6675
6711
|
* @param {any} [pState] - A catchall state object for plumbing data through template processing.
|
|
6676
6712
|
*
|
|
6677
6713
|
* @return {string} The rendered template
|
|
6678
|
-
*/_inherits(PictTemplateProviderDateOnlyYMD,
|
|
6714
|
+
*/_inherits(PictTemplateProviderDateOnlyYMD,_libPictTemplate20);return _createClass2(PictTemplateProviderDateOnlyYMD,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpDateValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray,null,pScope,pState);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
|
|
6679
6715
|
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
|
|
6680
6716
|
// not even sure showing negative is right; showing the era is probably better (BCE vs CE)
|
|
6681
|
-
var prefix=tmpDayJS.valueOf()<-62167219200000?'-':'';return prefix+tmpDayJS.format('YYYY-MM-DD');}}]);}(libPictTemplate);module.exports=PictTemplateProviderDateOnlyYMD;},{"pict-template":143}],
|
|
6717
|
+
var prefix=tmpDayJS.valueOf()<-62167219200000?'-':'';return prefix+tmpDayJS.format('YYYY-MM-DD');}}]);}(libPictTemplate);module.exports=PictTemplateProviderDateOnlyYMD;},{"pict-template":143}],232:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateTimeFormat=/*#__PURE__*/function(_libPictTemplate21){/**
|
|
6682
6718
|
* @param {Object} pFable - The Fable Framework instance
|
|
6683
6719
|
* @param {Object} pOptions - The options for the service
|
|
6684
6720
|
* @param {String} pServiceHash - The hash of the service
|
|
6685
|
-
*/function PictTemplateProviderDateTimeFormat(pFable,pOptions,pServiceHash){var
|
|
6686
|
-
return
|
|
6721
|
+
*/function PictTemplateProviderDateTimeFormat(pFable,pOptions,pServiceHash){var _this118;_classCallCheck2(this,PictTemplateProviderDateTimeFormat);_this118=_callSuper(this,PictTemplateProviderDateTimeFormat,[pFable,pOptions,pServiceHash]);/** @type {any} */_this118.options;/** @type {any} */_this118.log;_this118.addPattern('{~DateTimeFormat:','~}');_this118.addPattern('{~DateFormat:','~}');// for backwards compatibility
|
|
6722
|
+
return _this118;}/**
|
|
6687
6723
|
* Render a template expression, returning a string with the resulting content.
|
|
6688
6724
|
*
|
|
6689
6725
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6693,7 +6729,7 @@ return _this117;}/**
|
|
|
6693
6729
|
* @param {any} [pState] - A catchall state object for plumbing data through template processing.
|
|
6694
6730
|
*
|
|
6695
6731
|
* @return {string} The rendered template
|
|
6696
|
-
*/_inherits(PictTemplateProviderDateTimeFormat,
|
|
6732
|
+
*/_inherits(PictTemplateProviderDateTimeFormat,_libPictTemplate21);return _createClass2(PictTemplateProviderDateTimeFormat,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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,null,pScope,pState);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
|
|
6697
6733
|
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
|
|
6698
6734
|
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()}].`);
|
|
6699
6735
|
// Day.js will try to guess the user's timezone for us
|
|
@@ -6703,12 +6739,12 @@ try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.
|
|
|
6703
6739
|
```javascript
|
|
6704
6740
|
|
|
6705
6741
|
```
|
|
6706
|
-
*/},{"pict-template":143}],
|
|
6742
|
+
*/},{"pict-template":143}],233:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateTimeYMD=/*#__PURE__*/function(_libPictTemplate22){/**
|
|
6707
6743
|
* @param {Object} pFable - The Fable Framework instance
|
|
6708
6744
|
* @param {Object} pOptions - The options for the service
|
|
6709
6745
|
* @param {String} pServiceHash - The hash of the service
|
|
6710
|
-
*/function PictTemplateProviderDateTimeYMD(pFable,pOptions,pServiceHash){var
|
|
6711
|
-
return
|
|
6746
|
+
*/function PictTemplateProviderDateTimeYMD(pFable,pOptions,pServiceHash){var _this119;_classCallCheck2(this,PictTemplateProviderDateTimeYMD);_this119=_callSuper(this,PictTemplateProviderDateTimeYMD,[pFable,pOptions,pServiceHash]);/** @type {any} */_this119.options;/** @type {any} */_this119.log;_this119.addPattern('{~DateTimeYMD:','~}');_this119.addPattern('{~DateYMD:','~}');// for backwards compatibility
|
|
6747
|
+
return _this119;}/**
|
|
6712
6748
|
* Render a template expression, returning a string with the resulting content.
|
|
6713
6749
|
*
|
|
6714
6750
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6718,15 +6754,15 @@ return _this118;}/**
|
|
|
6718
6754
|
* @param {any} [pState] - A catchall state object for plumbing data through template processing.
|
|
6719
6755
|
*
|
|
6720
6756
|
* @return {string} The rendered template
|
|
6721
|
-
*/_inherits(PictTemplateProviderDateTimeYMD,
|
|
6757
|
+
*/_inherits(PictTemplateProviderDateTimeYMD,_libPictTemplate22);return _createClass2(PictTemplateProviderDateTimeYMD,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpDateValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray,null,pScope,pState);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
|
|
6722
6758
|
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
|
|
6723
6759
|
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()}].`);
|
|
6724
6760
|
// Day.js will try to guess the user's timezone for us
|
|
6725
|
-
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":143}],
|
|
6761
|
+
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":143}],234:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDigits=/*#__PURE__*/function(_libPictTemplate23){/**
|
|
6726
6762
|
* @param {Object} pFable - The Fable Framework instance
|
|
6727
6763
|
* @param {Object} pOptions - The options for the service
|
|
6728
6764
|
* @param {String} pServiceHash - The hash of the service
|
|
6729
|
-
*/function PictTemplateProviderDigits(pFable,pOptions,pServiceHash){var
|
|
6765
|
+
*/function PictTemplateProviderDigits(pFable,pOptions,pServiceHash){var _this120;_classCallCheck2(this,PictTemplateProviderDigits);_this120=_callSuper(this,PictTemplateProviderDigits,[pFable,pOptions,pServiceHash]);/** @type {any} */_this120.options;/** @type {any} */_this120.log;_this120.addPattern('{~Digits:','~}');return _this120;}/**
|
|
6730
6766
|
* Render a template expression, returning a string with the resulting content.
|
|
6731
6767
|
*
|
|
6732
6768
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6736,11 +6772,11 @@ try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.
|
|
|
6736
6772
|
* @param {any} [pState] - A catchall state object for plumbing data through template processing.
|
|
6737
6773
|
*
|
|
6738
6774
|
* @return {string} The rendered template
|
|
6739
|
-
*/_inherits(PictTemplateProviderDigits,
|
|
6775
|
+
*/_inherits(PictTemplateProviderDigits,_libPictTemplate23);return _createClass2(PictTemplateProviderDigits,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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,null,pScope,pState);return this.fable.DataFormat.formatterAddCommasToNumber(this.fable.DataFormat.formatterRoundNumber(tmpColumnData,2));}}]);}(libPictTemplate);module.exports=PictTemplateProviderDigits;},{"pict-template":143}],235:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDollars=/*#__PURE__*/function(_libPictTemplate24){/**
|
|
6740
6776
|
* @param {Object} pFable - The Fable Framework instance
|
|
6741
6777
|
* @param {Object} pOptions - The options for the service
|
|
6742
6778
|
* @param {String} pServiceHash - The hash of the service
|
|
6743
|
-
*/function PictTemplateProviderDollars(pFable,pOptions,pServiceHash){var
|
|
6779
|
+
*/function PictTemplateProviderDollars(pFable,pOptions,pServiceHash){var _this121;_classCallCheck2(this,PictTemplateProviderDollars);_this121=_callSuper(this,PictTemplateProviderDollars,[pFable,pOptions,pServiceHash]);/** @type {any} */_this121.options;/** @type {any} */_this121.log;_this121.addPattern('{~Dollars:','~}');return _this121;}/**
|
|
6744
6780
|
* Render a template expression, returning a string with the resulting content.
|
|
6745
6781
|
*
|
|
6746
6782
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6750,11 +6786,11 @@ try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.
|
|
|
6750
6786
|
* @param {any} [pState] - A catchall state object for plumbing data through template processing.
|
|
6751
6787
|
*
|
|
6752
6788
|
* @return {string} The rendered template
|
|
6753
|
-
*/_inherits(PictTemplateProviderDollars,
|
|
6789
|
+
*/_inherits(PictTemplateProviderDollars,_libPictTemplate24);return _createClass2(PictTemplateProviderDollars,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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,null,pScope,pState);return this.fable.DataFormat.formatterDollars(tmpColumnData);}}]);}(libPictTemplate);module.exports=PictTemplateProviderDollars;},{"pict-template":143}],236:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderHTMLCommandEnd=/*#__PURE__*/function(_libPictTemplate25){/**
|
|
6754
6790
|
* @param {Object} pFable - The Fable Framework instance
|
|
6755
6791
|
* @param {Object} pOptions - The options for the service
|
|
6756
6792
|
* @param {String} pServiceHash - The hash of the service
|
|
6757
|
-
*/function PictTemplateProviderHTMLCommandEnd(pFable,pOptions,pServiceHash){var
|
|
6793
|
+
*/function PictTemplateProviderHTMLCommandEnd(pFable,pOptions,pServiceHash){var _this122;_classCallCheck2(this,PictTemplateProviderHTMLCommandEnd);_this122=_callSuper(this,PictTemplateProviderHTMLCommandEnd,[pFable,pOptions,pServiceHash]);/** @type {any} */_this122.log;_this122.addPattern('{~HtmlCommentEnd:','~}');_this122.addPattern('{~HCE:','~}');return _this122;}/**
|
|
6758
6794
|
* Render a template expression, returning a string with the resulting content.
|
|
6759
6795
|
*
|
|
6760
6796
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6764,11 +6800,11 @@ try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.
|
|
|
6764
6800
|
* @param {any} [pState] - A catchall state object for plumbing data through template processing.
|
|
6765
6801
|
*
|
|
6766
6802
|
* @return {string} The rendered template
|
|
6767
|
-
*/_inherits(PictTemplateProviderHTMLCommandEnd,
|
|
6803
|
+
*/_inherits(PictTemplateProviderHTMLCommandEnd,_libPictTemplate25);return _createClass2(PictTemplateProviderHTMLCommandEnd,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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,null,pScope,pState);}if(!tmpValue){return' -->';}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderHTMLCommandEnd;},{"pict-template":143}],237:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderHTMLCommandStart=/*#__PURE__*/function(_libPictTemplate26){/**
|
|
6768
6804
|
* @param {Object} pFable - The Fable Framework instance
|
|
6769
6805
|
* @param {Object} pOptions - The options for the service
|
|
6770
6806
|
* @param {String} pServiceHash - The hash of the service
|
|
6771
|
-
*/function PictTemplateProviderHTMLCommandStart(pFable,pOptions,pServiceHash){var
|
|
6807
|
+
*/function PictTemplateProviderHTMLCommandStart(pFable,pOptions,pServiceHash){var _this123;_classCallCheck2(this,PictTemplateProviderHTMLCommandStart);_this123=_callSuper(this,PictTemplateProviderHTMLCommandStart,[pFable,pOptions,pServiceHash]);/** @type {any} */_this123.log;_this123.addPattern('{~HtmlCommentStart:','~}');_this123.addPattern('{~HCS:','~}');return _this123;}/**
|
|
6772
6808
|
* Render a template expression, returning a string with the resulting content.
|
|
6773
6809
|
*
|
|
6774
6810
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6778,11 +6814,11 @@ try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.
|
|
|
6778
6814
|
* @param {any} [pState] - A catchall state object for plumbing data through template processing.
|
|
6779
6815
|
*
|
|
6780
6816
|
* @return {string} The rendered template
|
|
6781
|
-
*/_inherits(PictTemplateProviderHTMLCommandStart,
|
|
6817
|
+
*/_inherits(PictTemplateProviderHTMLCommandStart,_libPictTemplate26);return _createClass2(PictTemplateProviderHTMLCommandStart,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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,null,pScope,pState);}if(!tmpValue){return'<!-- ';}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderHTMLCommandStart;},{"pict-template":143}],238:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderJoin=/*#__PURE__*/function(_libPictTemplate27){/**
|
|
6782
6818
|
* @param {Object} pFable - The Fable Framework instance
|
|
6783
6819
|
* @param {Object} pOptions - The options for the service
|
|
6784
6820
|
* @param {String} pServiceHash - The hash of the service
|
|
6785
|
-
*/function PictTemplateProviderJoin(pFable,pOptions,pServiceHash){var
|
|
6821
|
+
*/function PictTemplateProviderJoin(pFable,pOptions,pServiceHash){var _this124;_classCallCheck2(this,PictTemplateProviderJoin);_this124=_callSuper(this,PictTemplateProviderJoin,[pFable,pOptions,pServiceHash]);/** @type {any} */_this124.options;/** @type {any} */_this124.log;_this124.addPattern('{~Join:','~}');_this124.addPattern('{~J:','~}');return _this124;}/**
|
|
6786
6822
|
* Render a template expression, returning a string with the resulting content.
|
|
6787
6823
|
*
|
|
6788
6824
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6792,12 +6828,12 @@ try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.
|
|
|
6792
6828
|
* @param {any} [pState] - A catchall state object for plumbing data through template processing.
|
|
6793
6829
|
*
|
|
6794
6830
|
* @return {string} The rendered template
|
|
6795
|
-
*/_inherits(PictTemplateProviderJoin,
|
|
6796
|
-
var tmpSeparator=tmpDataAddresses.shift();var tmpValueList=[];for(var i=0;i<tmpDataAddresses.length;i++){var tmpValueSet=this.resolveStateFromAddress(tmpDataAddresses[i],tmpData,pContextArray,null,pScope,pState);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":143}],
|
|
6831
|
+
*/_inherits(PictTemplateProviderJoin,_libPictTemplate27);return _createClass2(PictTemplateProviderJoin,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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
|
|
6832
|
+
var tmpSeparator=tmpDataAddresses.shift();var tmpValueList=[];for(var i=0;i<tmpDataAddresses.length;i++){var tmpValueSet=this.resolveStateFromAddress(tmpDataAddresses[i],tmpData,pContextArray,null,pScope,pState);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":143}],239:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderJoinUnique=/*#__PURE__*/function(_libPictTemplate28){/**
|
|
6797
6833
|
* @param {Object} pFable - The Fable Framework instance
|
|
6798
6834
|
* @param {Object} pOptions - The options for the service
|
|
6799
6835
|
* @param {String} pServiceHash - The hash of the service
|
|
6800
|
-
*/function PictTemplateProviderJoinUnique(pFable,pOptions,pServiceHash){var
|
|
6836
|
+
*/function PictTemplateProviderJoinUnique(pFable,pOptions,pServiceHash){var _this125;_classCallCheck2(this,PictTemplateProviderJoinUnique);_this125=_callSuper(this,PictTemplateProviderJoinUnique,[pFable,pOptions,pServiceHash]);/** @type {any} */_this125.options;/** @type {any} */_this125.log;_this125.addPattern('{~JoinUnique:','~}');_this125.addPattern('{~JU:','~}');return _this125;}/**
|
|
6801
6837
|
* Render a template expression, returning a string with the resulting content.
|
|
6802
6838
|
*
|
|
6803
6839
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6807,12 +6843,12 @@ var tmpSeparator=tmpDataAddresses.shift();var tmpValueList=[];for(var i=0;i<tmpD
|
|
|
6807
6843
|
* @param {any} [pState] - A catchall state object for plumbing data through template processing.
|
|
6808
6844
|
*
|
|
6809
6845
|
* @return {string} The rendered template
|
|
6810
|
-
*/_inherits(PictTemplateProviderJoinUnique,
|
|
6811
|
-
var tmpSeparator=tmpDataAddresses.shift();var tmpValueList=[];var tmpValueMap={};for(var i=0;i<tmpDataAddresses.length;i++){var tmpValueSet=this.resolveStateFromAddress(tmpDataAddresses[i],tmpData,pContextArray,null,pScope,pState);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":143}],
|
|
6846
|
+
*/_inherits(PictTemplateProviderJoinUnique,_libPictTemplate28);return _createClass2(PictTemplateProviderJoinUnique,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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
|
|
6847
|
+
var tmpSeparator=tmpDataAddresses.shift();var tmpValueList=[];var tmpValueMap={};for(var i=0;i<tmpDataAddresses.length;i++){var tmpValueSet=this.resolveStateFromAddress(tmpDataAddresses[i],tmpData,pContextArray,null,pScope,pState);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":143}],240:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderPascalCaseIdentifier=/*#__PURE__*/function(_libPictTemplate29){/**
|
|
6812
6848
|
* @param {Object} pFable - The Fable Framework instance
|
|
6813
6849
|
* @param {Object} pOptions - The options for the service
|
|
6814
6850
|
* @param {String} pServiceHash - The hash of the service
|
|
6815
|
-
*/function PictTemplateProviderPascalCaseIdentifier(pFable,pOptions,pServiceHash){var
|
|
6851
|
+
*/function PictTemplateProviderPascalCaseIdentifier(pFable,pOptions,pServiceHash){var _this126;_classCallCheck2(this,PictTemplateProviderPascalCaseIdentifier);_this126=_callSuper(this,PictTemplateProviderPascalCaseIdentifier,[pFable,pOptions,pServiceHash]);/** @type {any} */_this126.options;/** @type {any} */_this126.log;_this126.addPattern('{~PascalCaseIdentifier:','~}');return _this126;}/**
|
|
6816
6852
|
* Render a template expression, returning a string with the resulting content.
|
|
6817
6853
|
*
|
|
6818
6854
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6822,17 +6858,17 @@ var tmpSeparator=tmpDataAddresses.shift();var tmpValueList=[];var tmpValueMap={}
|
|
|
6822
6858
|
* @param {any} [pState] - A catchall state object for plumbing data through template processing.
|
|
6823
6859
|
*
|
|
6824
6860
|
* @return {string} The rendered template
|
|
6825
|
-
*/_inherits(PictTemplateProviderPascalCaseIdentifier,
|
|
6861
|
+
*/_inherits(PictTemplateProviderPascalCaseIdentifier,_libPictTemplate29);return _createClass2(PictTemplateProviderPascalCaseIdentifier,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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,null,pScope,pState);if(tmpValue==null||tmpValue=='undefined'||typeof tmpValue=='undefined'){return'';}return this.pict.DataFormat.cleanNonAlphaCharacters(this.pict.DataFormat.capitalizeEachWord(tmpValue));}}]);}(libPictTemplate);module.exports=PictTemplateProviderPascalCaseIdentifier;/*
|
|
6826
6862
|
# DEAR DEAD CODE DIARY:
|
|
6827
6863
|
|
|
6828
6864
|
```javascript
|
|
6829
6865
|
|
|
6830
6866
|
```
|
|
6831
|
-
*/},{"pict-template":143}],
|
|
6867
|
+
*/},{"pict-template":143}],241:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderPluckJoinUnique=/*#__PURE__*/function(_libPictTemplate30){/**
|
|
6832
6868
|
* @param {Object} pFable - The Fable Framework instance
|
|
6833
6869
|
* @param {Object} pOptions - The options for the service
|
|
6834
6870
|
* @param {String} pServiceHash - The hash of the service
|
|
6835
|
-
*/function PictTemplateProviderPluckJoinUnique(pFable,pOptions,pServiceHash){var
|
|
6871
|
+
*/function PictTemplateProviderPluckJoinUnique(pFable,pOptions,pServiceHash){var _this127;_classCallCheck2(this,PictTemplateProviderPluckJoinUnique);_this127=_callSuper(this,PictTemplateProviderPluckJoinUnique,[pFable,pOptions,pServiceHash]);/** @type {any} */_this127.options;/** @type {any} */_this127.log;_this127.addPattern('{~PluckJoinUnique:','~}');_this127.addPattern('{~PJU:','~}');return _this127;}/**
|
|
6836
6872
|
* Render a template expression, returning a string with the resulting content.
|
|
6837
6873
|
*
|
|
6838
6874
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6842,13 +6878,13 @@ var tmpSeparator=tmpDataAddresses.shift();var tmpValueList=[];var tmpValueMap={}
|
|
|
6842
6878
|
* @param {any} [pState] - A catchall state object for plumbing data through template processing.
|
|
6843
6879
|
*
|
|
6844
6880
|
* @return {string} The rendered template
|
|
6845
|
-
*/_inherits(PictTemplateProviderPluckJoinUnique,
|
|
6881
|
+
*/_inherits(PictTemplateProviderPluckJoinUnique,_libPictTemplate30);return _createClass2(PictTemplateProviderPluckJoinUnique,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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
|
|
6846
6882
|
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,null,pScope,pState);if(tmpValueSet&&Array.isArray(tmpValueSet)){// This one only works on arrays of objects.
|
|
6847
|
-
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":143}],
|
|
6883
|
+
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":143}],242:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderBreakpoint=/*#__PURE__*/function(_libPictTemplate31){/**
|
|
6848
6884
|
* @param {Object} pFable - The Fable Framework instance
|
|
6849
6885
|
* @param {Object} pOptions - The options for the service
|
|
6850
6886
|
* @param {String} pServiceHash - The hash of the service
|
|
6851
|
-
*/function PictTemplateProviderBreakpoint(pFable,pOptions,pServiceHash){var
|
|
6887
|
+
*/function PictTemplateProviderBreakpoint(pFable,pOptions,pServiceHash){var _this128;_classCallCheck2(this,PictTemplateProviderBreakpoint);_this128=_callSuper(this,PictTemplateProviderBreakpoint,[pFable,pOptions,pServiceHash]);/** @type {any} */_this128.log;_this128.addPattern('{~Breakpoint','~}');return _this128;}/**
|
|
6852
6888
|
* Render a template expression, returning a string with the resulting content.
|
|
6853
6889
|
*
|
|
6854
6890
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6858,13 +6894,13 @@ for(var j=0;j<tmpValueSet.length;j++){if(tmpValueSet[j]===null||_typeof(tmpValue
|
|
|
6858
6894
|
* @param {any} [pState] - A catchall state object for plumbing data through template processing.
|
|
6859
6895
|
*
|
|
6860
6896
|
* @return {string} The rendered template
|
|
6861
|
-
*/_inherits(PictTemplateProviderBreakpoint,
|
|
6897
|
+
*/_inherits(PictTemplateProviderBreakpoint,_libPictTemplate31);return _createClass2(PictTemplateProviderBreakpoint,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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;
|
|
6862
6898
|
debugger;// eslint-disable-line no-debugger
|
|
6863
|
-
return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderBreakpoint;},{"pict-template":143}],
|
|
6899
|
+
return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderBreakpoint;},{"pict-template":143}],243:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDataValueTree=/*#__PURE__*/function(_libPictTemplate32){/**
|
|
6864
6900
|
* @param {Object} pFable - The Fable Framework instance
|
|
6865
6901
|
* @param {Object} pOptions - The options for the service
|
|
6866
6902
|
* @param {String} pServiceHash - The hash of the service
|
|
6867
|
-
*/function PictTemplateProviderDataValueTree(pFable,pOptions,pServiceHash){var
|
|
6903
|
+
*/function PictTemplateProviderDataValueTree(pFable,pOptions,pServiceHash){var _this129;_classCallCheck2(this,PictTemplateProviderDataValueTree);_this129=_callSuper(this,PictTemplateProviderDataValueTree,[pFable,pOptions,pServiceHash]);/** @type {any} */_this129.log;_this129.addPattern('{~DataTree:','~}');_this129.addPattern('{~DT:','~}');return _this129;}/**
|
|
6868
6904
|
* Render a template expression, returning a string with the resulting content.
|
|
6869
6905
|
*
|
|
6870
6906
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6874,7 +6910,7 @@ return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderBreakpoint;}
|
|
|
6874
6910
|
* @param {any} [pState] - A catchall state object for plumbing data through template processing.
|
|
6875
6911
|
*
|
|
6876
6912
|
* @return {string} The rendered template
|
|
6877
|
-
*/_inherits(PictTemplateProviderDataValueTree,
|
|
6913
|
+
*/_inherits(PictTemplateProviderDataValueTree,_libPictTemplate32);return _createClass2(PictTemplateProviderDataValueTree,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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,null,pScope,pState);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
|
|
6878
6914
|
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,pScope);}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,pScope,pState);}/**
|
|
6879
6915
|
* Render a template expression, returning a string with the resulting content.
|
|
6880
6916
|
*
|
|
@@ -6888,11 +6924,11 @@ tmpPictObjectWrapTemplate="<div class=\"PICT PICTObjectSet\">{~D:Record.ObjectVa
|
|
|
6888
6924
|
*
|
|
6889
6925
|
* @return {string} The rendered template
|
|
6890
6926
|
*/},{key:"dataValueTreeObjectSet",value:function dataValueTreeObjectSet(pObject,pRootObject,pCurrentDepth,pMaxDepth,pContextArray,pScope,pState){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
|
|
6891
|
-
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,pScope);}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,pScope,pState);}return tmpTemplateResult;}}]);}(libPictTemplate);module.exports=PictTemplateProviderDataValueTree;},{"pict-template":143}],
|
|
6927
|
+
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,pScope);}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,pScope,pState);}return tmpTemplateResult;}}]);}(libPictTemplate);module.exports=PictTemplateProviderDataValueTree;},{"pict-template":143}],244:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderLogStatement=/*#__PURE__*/function(_libPictTemplate33){/**
|
|
6892
6928
|
* @param {Object} pFable - The Fable Framework instance
|
|
6893
6929
|
* @param {Object} pOptions - The options for the service
|
|
6894
6930
|
* @param {String} pServiceHash - The hash of the service
|
|
6895
|
-
*/function PictTemplateProviderLogStatement(pFable,pOptions,pServiceHash){var
|
|
6931
|
+
*/function PictTemplateProviderLogStatement(pFable,pOptions,pServiceHash){var _this130;_classCallCheck2(this,PictTemplateProviderLogStatement);_this130=_callSuper(this,PictTemplateProviderLogStatement,[pFable,pOptions,pServiceHash]);/** @type {any} */_this130.log;_this130.addPattern('{~LogStatement:','~}');_this130.addPattern('{~LS:','~}');return _this130;}/**
|
|
6896
6932
|
* Render a template expression, returning a string with the resulting content.
|
|
6897
6933
|
*
|
|
6898
6934
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6902,11 +6938,11 @@ tmpPictObjectBranchTemplate="\n<div class=\"PICTObjectBranchDepth_{~D:Record.Cur
|
|
|
6902
6938
|
* @param {any} [pState] - A catchall state object for plumbing data through template processing.
|
|
6903
6939
|
*
|
|
6904
6940
|
* @return {string} The rendered template
|
|
6905
|
-
*/_inherits(PictTemplateProviderLogStatement,
|
|
6941
|
+
*/_inherits(PictTemplateProviderLogStatement,_libPictTemplate33);return _createClass2(PictTemplateProviderLogStatement,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){var tmpHash=pTemplateHash.trim();this.log.trace("PICT Template Log Message: ".concat(tmpHash));return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderLogStatement;},{"pict-template":143}],245:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderLogValue=/*#__PURE__*/function(_libPictTemplate34){/**
|
|
6906
6942
|
* @param {Object} pFable - The Fable Framework instance
|
|
6907
6943
|
* @param {Object} pOptions - The options for the service
|
|
6908
6944
|
* @param {String} pServiceHash - The hash of the service
|
|
6909
|
-
*/function PictTemplateProviderLogValue(pFable,pOptions,pServiceHash){var
|
|
6945
|
+
*/function PictTemplateProviderLogValue(pFable,pOptions,pServiceHash){var _this131;_classCallCheck2(this,PictTemplateProviderLogValue);_this131=_callSuper(this,PictTemplateProviderLogValue,[pFable,pOptions,pServiceHash]);/** @type {any} */_this131.log;_this131.addPattern('{~LogValue:','~}');_this131.addPattern('{~LV:','~}');return _this131;}/**
|
|
6910
6946
|
* Render a template expression, returning a string with the resulting content.
|
|
6911
6947
|
*
|
|
6912
6948
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6916,11 +6952,11 @@ tmpPictObjectBranchTemplate="\n<div class=\"PICTObjectBranchDepth_{~D:Record.Cur
|
|
|
6916
6952
|
* @param {any} [pState] - A catchall state object for plumbing data through template processing.
|
|
6917
6953
|
*
|
|
6918
6954
|
* @return {string} The rendered template
|
|
6919
|
-
*/_inherits(PictTemplateProviderLogValue,
|
|
6955
|
+
*/_inherits(PictTemplateProviderLogValue,_libPictTemplate34);return _createClass2(PictTemplateProviderLogValue,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray,null,pScope,pState);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":143}],246:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderLogValueTree=/*#__PURE__*/function(_libPictTemplate35){/**
|
|
6920
6956
|
* @param {Object} pFable - The Fable Framework instance
|
|
6921
6957
|
* @param {Object} pOptions - The options for the service
|
|
6922
6958
|
* @param {String} pServiceHash - The hash of the service
|
|
6923
|
-
*/function PictTemplateProviderLogValueTree(pFable,pOptions,pServiceHash){var
|
|
6959
|
+
*/function PictTemplateProviderLogValueTree(pFable,pOptions,pServiceHash){var _this132;_classCallCheck2(this,PictTemplateProviderLogValueTree);_this132=_callSuper(this,PictTemplateProviderLogValueTree,[pFable,pOptions,pServiceHash]);/** @type {any} */_defineProperty2(_this132,"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;}_this132.log.trace("[".concat(pBaseAddress,".").concat(tmpObjectValueKeys[i],"] (").concat(tmpBranchType,"): ").concat(tmpBranchValue));if(pCurrentDepth+1>pMaxDepth){return'';}else if(tmpBranchType=='object'){tmpBranchValue=_this132.logValueTreeObjectSet(pObject[tmpObjectValueKeys[i]],"".concat(pBaseAddress,".").concat(tmpObjectValueKeys[i]),pRootObject,pCurrentDepth+1,pMaxDepth);}}return'';});_this132.log;_this132.addPattern('{~LogValueTree:','~}');_this132.addPattern('{~LVT:','~}');return _this132;}/**
|
|
6924
6960
|
* Render a template expression, returning a string with the resulting content.
|
|
6925
6961
|
*
|
|
6926
6962
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6930,11 +6966,11 @@ tmpPictObjectBranchTemplate="\n<div class=\"PICTObjectBranchDepth_{~D:Record.Cur
|
|
|
6930
6966
|
* @param {any} [pState] - A catchall state object for plumbing data through template processing.
|
|
6931
6967
|
*
|
|
6932
6968
|
* @return {string} The rendered template
|
|
6933
|
-
*/_inherits(PictTemplateProviderLogValueTree,
|
|
6969
|
+
*/_inherits(PictTemplateProviderLogValueTree,_libPictTemplate35);return _createClass2(PictTemplateProviderLogValueTree,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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,null,pScope,pState);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":143}],247:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderNotEmpty=/*#__PURE__*/function(_libPictTemplate36){/**
|
|
6934
6970
|
* @param {Object} pFable - The Fable Framework instance
|
|
6935
6971
|
* @param {Object} pOptions - The options for the service
|
|
6936
6972
|
* @param {String} pServiceHash - The hash of the service
|
|
6937
|
-
*/function PictTemplateProviderNotEmpty(pFable,pOptions,pServiceHash){var
|
|
6973
|
+
*/function PictTemplateProviderNotEmpty(pFable,pOptions,pServiceHash){var _this133;_classCallCheck2(this,PictTemplateProviderNotEmpty);_this133=_callSuper(this,PictTemplateProviderNotEmpty,[pFable,pOptions,pServiceHash]);/** @type {any} */_this133.log;_this133.addPattern('{~NotEmpty:','~}');_this133.addPattern('{~NE:','~}');return _this133;}/**
|
|
6938
6974
|
* Render a template expression, returning a string with the resulting content.
|
|
6939
6975
|
*
|
|
6940
6976
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6944,16 +6980,16 @@ tmpPictObjectBranchTemplate="\n<div class=\"PICTObjectBranchDepth_{~D:Record.Cur
|
|
|
6944
6980
|
* @param {any} [pState] - A catchall state object for plumbing data through template processing.
|
|
6945
6981
|
*
|
|
6946
6982
|
* @return {string} The rendered template
|
|
6947
|
-
*/_inherits(PictTemplateProviderNotEmpty,
|
|
6948
|
-
if(this.resolveStateFromAddress(tmpHashParts[0],tmpData,pContextArray,null,pScope,pState)){return tmpHashParts[1];}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderNotEmpty;},{"pict-template":143}],
|
|
6983
|
+
*/_inherits(PictTemplateProviderNotEmpty,_libPictTemplate36);return _createClass2(PictTemplateProviderNotEmpty,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope,pState){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.
|
|
6984
|
+
if(this.resolveStateFromAddress(tmpHashParts[0],tmpData,pContextArray,null,pScope,pState)){return tmpHashParts[1];}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderNotEmpty;},{"pict-template":143}],248:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateIfBase=/*#__PURE__*/function(_libPictTemplate37){/**
|
|
6949
6985
|
* @param {Object} pFable - The Fable Framework instance
|
|
6950
6986
|
* @param {Object} pOptions - The options for the service
|
|
6951
6987
|
* @param {String} pServiceHash - The hash of the service
|
|
6952
|
-
*/function PictTemplateProviderTemplateIfBase(pFable,pOptions,pServiceHash){_classCallCheck2(this,PictTemplateProviderTemplateIfBase);return _callSuper(this,PictTemplateProviderTemplateIfBase,[pFable,pOptions,pServiceHash]);}_inherits(PictTemplateProviderTemplateIfBase,
|
|
6988
|
+
*/function PictTemplateProviderTemplateIfBase(pFable,pOptions,pServiceHash){_classCallCheck2(this,PictTemplateProviderTemplateIfBase);return _callSuper(this,PictTemplateProviderTemplateIfBase,[pFable,pOptions,pServiceHash]);}_inherits(PictTemplateProviderTemplateIfBase,_libPictTemplate37);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":143}],249:[function(require,module,exports){var libPictTemplateIf=require('./Pict-Template-TemplateIf-Base.js');var PictTemplateProviderTemplateIf=/*#__PURE__*/function(_libPictTemplateIf){/**
|
|
6953
6989
|
* @param {Object} pFable - The Fable Framework instance
|
|
6954
6990
|
* @param {Object} pOptions - The options for the service
|
|
6955
6991
|
* @param {String} pServiceHash - The hash of the service
|
|
6956
|
-
*/function PictTemplateProviderTemplateIf(pFable,pOptions,pServiceHash){var
|
|
6992
|
+
*/function PictTemplateProviderTemplateIf(pFable,pOptions,pServiceHash){var _this134;_classCallCheck2(this,PictTemplateProviderTemplateIf);_this134=_callSuper(this,PictTemplateProviderTemplateIf,[pFable,pOptions,pServiceHash]);/** @type {any} */_this134.log;_this134.addPattern('{~TemplateIf:','~}');_this134.addPattern('{~TIf:','~}');return _this134;}/**
|
|
6957
6993
|
* Render a template expression, returning a string with the resulting content.
|
|
6958
6994
|
*
|
|
6959
6995
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6984,11 +7020,11 @@ if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not reso
|
|
|
6984
7020
|
if(!tmpComparisonOperation){this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]"));return tmpCallback(null,'');}// Now try to break the comparison into three parts...
|
|
6985
7021
|
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(null,'');}// Now look up the data at the comparison location
|
|
6986
7022
|
try{// This is the only thing that's different from the absolute value function above. Collapse these.
|
|
6987
|
-
var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray,null,pScope,pState),tmpComparisonParts[1],this.resolveStateFromAddress(tmpComparisonParts[2],tmpData,pContextArray,null,pScope,pState));if(!tmpComparisonResult){return tmpCallback(null,'');}if(!tmpAddressOfData){this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}else{this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope,pState),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}}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":
|
|
7023
|
+
var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray,null,pScope,pState),tmpComparisonParts[1],this.resolveStateFromAddress(tmpComparisonParts[2],tmpData,pContextArray,null,pScope,pState));if(!tmpComparisonResult){return tmpCallback(null,'');}if(!tmpAddressOfData){this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}else{this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope,pState),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}}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":248}],250:[function(require,module,exports){var libPictTemplateIf=require('./Pict-Template-TemplateIf-Base.js');var PictTemplateProviderTemplateIfAbsolute=/*#__PURE__*/function(_libPictTemplateIf2){/**
|
|
6988
7024
|
* @param {Object} pFable - The Fable Framework instance
|
|
6989
7025
|
* @param {Object} pOptions - The options for the service
|
|
6990
7026
|
* @param {String} pServiceHash - The hash of the service
|
|
6991
|
-
*/function PictTemplateProviderTemplateIfAbsolute(pFable,pOptions,pServiceHash){var
|
|
7027
|
+
*/function PictTemplateProviderTemplateIfAbsolute(pFable,pOptions,pServiceHash){var _this135;_classCallCheck2(this,PictTemplateProviderTemplateIfAbsolute);_this135=_callSuper(this,PictTemplateProviderTemplateIfAbsolute,[pFable,pOptions,pServiceHash]);/** @type {any} */_this135.log;_this135.addPattern('{~TemplateIfAbsolute:','~}');_this135.addPattern('{~TIfAbs:','~}');return _this135;}/**
|
|
6992
7028
|
* Render a template expression, returning a string with the resulting content.
|
|
6993
7029
|
*
|
|
6994
7030
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -7018,5 +7054,5 @@ return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray,
|
|
|
7018
7054
|
if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return tmpCallback(null,'');}// No comparison operation
|
|
7019
7055
|
if(!tmpComparisonOperation){this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]"));return tmpCallback(null,'');}// Now try to break the comparison into three parts...
|
|
7020
7056
|
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(null,'');}// Now look up the data at the comparison location
|
|
7021
|
-
try{var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray,null,pScope,pState),tmpComparisonParts[1],tmpComparisonParts[2]);if(!tmpComparisonResult){return tmpCallback(null,'');}if(!tmpAddressOfData){this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}else{this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope,pState),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}}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":
|
|
7057
|
+
try{var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray,null,pScope,pState),tmpComparisonParts[1],tmpComparisonParts[2]);if(!tmpComparisonResult){return tmpCallback(null,'');}if(!tmpAddressOfData){this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}else{this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope,pState),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope,pState);}}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":248}]},{},[199])(199);});
|
|
7022
7058
|
//# sourceMappingURL=pict.compatible.js.map
|