pict 1.0.289 → 1.0.291
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 -89
- package/dist/pict.compatible.js.map +1 -1
- package/dist/pict.compatible.min.js +1 -1
- package/dist/pict.compatible.min.js.map +1 -1
- package/dist/pict.js +79 -45
- 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 +13 -0
- package/source/services/Fable-Service-TransactionTracking.js +180 -0
- package/test/Pict_TransactionTracker_tests.js +68 -0
- package/types/source/Pict.d.ts +7 -0
- package/types/source/Pict.d.ts.map +1 -1
- package/types/source/services/Fable-Service-TransactionTracking.d.ts +57 -0
- package/types/source/services/Fable-Service-TransactionTracking.d.ts.map +1 -0
package/dist/pict.compatible.js
CHANGED
|
@@ -5106,7 +5106,7 @@ try{if(!global.localStorage)return false;}catch(_){return false;}var val=global.
|
|
|
5106
5106
|
// presumably different callback function.
|
|
5107
5107
|
// This makes sure that own properties are retained, so that
|
|
5108
5108
|
// decorations and such are not lost along the way.
|
|
5109
|
-
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.
|
|
5109
|
+
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.291","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.17","pict-application":"^1.0.27","pict-provider":"^1.0.6","pict-template":"^1.0.12","pict-view":"^1.0.62"}};},{}],192:[function(require,module,exports){// This assumes Pict has been required in the browser. Delcare these as globals so linter can do its job.
|
|
5110
5110
|
/* global Pict, _Pict: writeable *//**
|
|
5111
5111
|
* Simple function to load a pict Application
|
|
5112
5112
|
*
|
|
@@ -5421,15 +5421,17 @@ if(!(pTemplateHash in this.templates)){this.checkDefaultTemplateHash(pTemplateHa
|
|
|
5421
5421
|
* @param {String} pTemplateHash - The hash of the template
|
|
5422
5422
|
*/},{key:"loadTemplate",value:function loadTemplate(pTemplateHash){var tmpTemplate=this.loadTemplateFunction(pTemplateHash);if(tmpTemplate){this.templates[pTemplateHash]=tmpTemplate.template;this.templateSources[pTemplateHash]="Loaded in loadTemplate('".concat(pTemplateHash,"') function by PictTemplateProvider [").concat(this.UUID,"]::[").concat(this.Hash,"] from [").concat(tmpTemplate.source,"]");}return tmpTemplate;}}]);}(libFableServiceBase);module.exports=PictTemplateProvider;},{"fable":68}],199:[function(require,module,exports){/**
|
|
5423
5423
|
* @author <steven@velozo.com>
|
|
5424
|
-
|
|
5424
|
+
*/var libFableServiceTransactionTracking=require("./services/Fable-Service-TransactionTracking.js");/**
|
|
5425
5425
|
* @typedef {{
|
|
5426
5426
|
* UUID: string,
|
|
5427
5427
|
* settings: any,
|
|
5428
5428
|
* fable: Fable,
|
|
5429
5429
|
* servicesMap: any,
|
|
5430
5430
|
* addAndInstantiateServiceType: (hash: string, prototype: any) => any,
|
|
5431
|
+
* addServiceTypeIfNotExists: (hash: string, prototype: any) => any,
|
|
5431
5432
|
* addServiceType: (hash: string, prototype: any) => any,
|
|
5432
5433
|
* instantiateServiceProvider: (hash: string, options?: any, prototype?: any) => any,
|
|
5434
|
+
* instantiateServiceProviderWithoutRegistration: (hash: string) => any,
|
|
5433
5435
|
* instantiateServiceProviderFromPrototype: (pServiceType: string, pOptions?: any, pCustomServiceHash?: string, pServicePrototype?: any) => any,
|
|
5434
5436
|
* getUUID: () => string,
|
|
5435
5437
|
* Utility:
|
|
@@ -5457,7 +5459,7 @@ _this82.instantiateServiceProvider("RestClient");/**
|
|
|
5457
5459
|
* The data provider.
|
|
5458
5460
|
*
|
|
5459
5461
|
* @type {PictDataProvider}
|
|
5460
|
-
*/_this82.DataProvider=null;_this82.addAndInstantiateServiceType("DataProvider",PictDataProvider);/**
|
|
5462
|
+
*/_this82.DataProvider=null;_this82.addAndInstantiateServiceType("DataProvider",PictDataProvider);_this82.addServiceTypeIfNotExists('TransactionTracking',libFableServiceTransactionTracking);/**
|
|
5461
5463
|
* The content assignment module.
|
|
5462
5464
|
*
|
|
5463
5465
|
* @type {PictContentAssignment}
|
|
@@ -5511,6 +5513,8 @@ var tmpDefaultViewConfiguration=tmpViewPrototype["default_configuration"];if(tmp
|
|
|
5511
5513
|
*
|
|
5512
5514
|
* @return {any} The provider instance.
|
|
5513
5515
|
*/},{key:"addProviderSingleton",value:function addProviderSingleton(pProviderHash,pOptions,pProviderPrototype){if(pProviderHash in this.providers){return this.providers[pProviderHash];}return this.addProvider(pProviderHash,pOptions,pProviderPrototype);}/**
|
|
5516
|
+
* @return {libFableServiceTransactionTracking}
|
|
5517
|
+
*/},{key:"newTransactionTracker",value:function newTransactionTracker(){return this.instantiateServiceProviderWithoutRegistration('TransactionTracking');}/**
|
|
5514
5518
|
* Just passing an options will construct one for us.
|
|
5515
5519
|
* Passing a hash will set the hash.
|
|
5516
5520
|
* Passing a prototype will use that!
|
|
@@ -5660,7 +5664,7 @@ var tmpValue="";if(typeof fCallback=="function"){if(Array.isArray(pDataSet)||_ty
|
|
|
5660
5664
|
* @return {String?} The parsed template string, or undefined if a callback was provided
|
|
5661
5665
|
*/},{key:"parseTemplateSetWithPayloadByHash",value:function parseTemplateSetWithPayloadByHash(pTemplateHash,pDataSet,pPayload,fCallback,pContextArray,pScope){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
|
|
5662
5666
|
if(!tmpTemplateString){tmpTemplateString="";}return this.parseTemplateSetWithPayload(tmpTemplateString,pDataSet,pPayload,fCallback,pContextArray,pScope);}}]);}(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
|
|
5663
|
-
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,"./templates/Pict-Template-Data.js":
|
|
5667
|
+
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-TemplateFromMap.js":219,"./templates/Pict-Template-TemplateSet.js":220,"./templates/Pict-Template-TemplateSetFromMap.js":221,"./templates/Pict-Template-TemplateSetWithPayload.js":222,"./templates/Pict-Template-TemplateValueSet.js":223,"./templates/Pict-Template-View.js":224,"./templates/data-generation/Pict-Template-RandomNumber.js":225,"./templates/data-generation/Pict-Template-RandomNumberString.js":226,"./templates/data/Pict-Template-DataEncodeJavascriptString.js":227,"./templates/data/Pict-Template-DataJson.js":228,"./templates/data/Pict-Template-DateOnlyFormat.js":229,"./templates/data/Pict-Template-DateOnlyYMD.js":230,"./templates/data/Pict-Template-DateTimeFormat.js":231,"./templates/data/Pict-Template-DateTimeYMD.js":232,"./templates/data/Pict-Template-Digits.js":233,"./templates/data/Pict-Template-Dollars.js":234,"./templates/data/Pict-Template-HtmlCommentEnd.js":235,"./templates/data/Pict-Template-HtmlCommentStart.js":236,"./templates/data/Pict-Template-Join.js":237,"./templates/data/Pict-Template-JoinUnique.js":238,"./templates/data/Pict-Template-PascalCaseIdentifier.js":239,"./templates/data/Pict-Template-PluckJoinUnique.js":240,"./templates/debugging/Pict-Template-Breakpoint.js":241,"./templates/debugging/Pict-Template-DataValueTree.js":242,"./templates/debugging/Pict-Template-LogStatement.js":243,"./templates/debugging/Pict-Template-LogValue.js":244,"./templates/debugging/Pict-Template-LogValueTree.js":245,"./templates/logic/Pict-Template-NotEmpty.js":246,"./templates/logic/Pict-Template-TemplateIf.js":248,"./templates/logic/Pict-Template-TemplateIfAbsolute.js":249,"fable":68,"pict-application":139,"pict-provider":141,"pict-template":143,"pict-view":145}],200:[function(require,module,exports){/**
|
|
5664
5668
|
* Pict browser shim loader
|
|
5665
5669
|
* @author <steven@velozo.com>
|
|
5666
5670
|
*
|
|
@@ -6004,11 +6008,41 @@ tmpPageSize=10000;}/** @type {import('../filters/Filter.js').FilterState} */var
|
|
|
6004
6008
|
* @param {number | ((pError?: Error) => void)} pRecordOffset
|
|
6005
6009
|
* @param {number | ((pError?: Error) => void)} pPageSize
|
|
6006
6010
|
* @param {(pError?: Error) => void} fCallback
|
|
6007
|
-
*/},{key:"executeFilterPage",value:function executeFilterPage(pFilterConfigurationAddress,pFilterExperienceAddress,pRecordOffset,pPageSize,fCallback){var tmpCallback=typeof pRecordOffset==='function'?pRecordOffset:typeof pPageSize==='function'?pPageSize:fCallback;var tmpFilterConfiguration=this.pict.resolveStateFromAddress(pFilterConfigurationAddress);if(!Array.isArray(tmpFilterConfiguration)){return tmpCallback(new Error("Filter configuration at address ".concat(pFilterConfigurationAddress," is not an array.")));}var tmpFilterExperience=this.pict.resolveStateFromAddress(pFilterExperienceAddress);if(!tmpFilterExperience||_typeof(tmpFilterExperience)!=='object'){return tmpCallback(new Error("Filter experience at address ".concat(pFilterExperienceAddress," is not an object.")));}return this.loadRecordPageByFilter(tmpFilterConfiguration,tmpFilterExperience,pRecordOffset,pPageSize,fCallback);}},{key:"executeFilterCount",value:function executeFilterCount(pFilterConfigurationAddress,pFilterExperienceAddress,fCallback){var tmpFilterConfiguration=this.pict.resolveStateFromAddress(pFilterConfigurationAddress);if(!Array.isArray(tmpFilterConfiguration)){return fCallback(new Error("Filter configuration at address ".concat(pFilterConfigurationAddress," is not an array.")));}var tmpFilterExperience=this.pict.resolveStateFromAddress(pFilterExperienceAddress);if(!tmpFilterExperience||_typeof(tmpFilterExperience)!=='object'){return fCallback(new Error("Filter experience at address ".concat(pFilterExperienceAddress," is not an object.")));}return this.countRecordsByFilter(tmpFilterConfiguration,tmpFilterExperience,fCallback);}}]);}(libPictProvider);module.exports=PictRecordSetFilterManager;module.exports.default_configuration=_DEFAULT_PROVIDER_CONFIGURATION;},{"../filters/Filter.js":202,"pict-provider":141}],209:[function(require,module,exports){var
|
|
6011
|
+
*/},{key:"executeFilterPage",value:function executeFilterPage(pFilterConfigurationAddress,pFilterExperienceAddress,pRecordOffset,pPageSize,fCallback){var tmpCallback=typeof pRecordOffset==='function'?pRecordOffset:typeof pPageSize==='function'?pPageSize:fCallback;var tmpFilterConfiguration=this.pict.resolveStateFromAddress(pFilterConfigurationAddress);if(!Array.isArray(tmpFilterConfiguration)){return tmpCallback(new Error("Filter configuration at address ".concat(pFilterConfigurationAddress," is not an array.")));}var tmpFilterExperience=this.pict.resolveStateFromAddress(pFilterExperienceAddress);if(!tmpFilterExperience||_typeof(tmpFilterExperience)!=='object'){return tmpCallback(new Error("Filter experience at address ".concat(pFilterExperienceAddress," is not an object.")));}return this.loadRecordPageByFilter(tmpFilterConfiguration,tmpFilterExperience,pRecordOffset,pPageSize,fCallback);}},{key:"executeFilterCount",value:function executeFilterCount(pFilterConfigurationAddress,pFilterExperienceAddress,fCallback){var tmpFilterConfiguration=this.pict.resolveStateFromAddress(pFilterConfigurationAddress);if(!Array.isArray(tmpFilterConfiguration)){return fCallback(new Error("Filter configuration at address ".concat(pFilterConfigurationAddress," is not an array.")));}var tmpFilterExperience=this.pict.resolveStateFromAddress(pFilterExperienceAddress);if(!tmpFilterExperience||_typeof(tmpFilterExperience)!=='object'){return fCallback(new Error("Filter experience at address ".concat(pFilterExperienceAddress," is not an object.")));}return this.countRecordsByFilter(tmpFilterConfiguration,tmpFilterExperience,fCallback);}}]);}(libPictProvider);module.exports=PictRecordSetFilterManager;module.exports.default_configuration=_DEFAULT_PROVIDER_CONFIGURATION;},{"../filters/Filter.js":202,"pict-provider":141}],209:[function(require,module,exports){var libFableServiceProviderBase=require('fable-serviceproviderbase');/*
|
|
6012
|
+
* Provides transaction tracking with keys and events, allowing us to block repeat attempts.
|
|
6013
|
+
* Once the shape is solidified, will move it back to the fable codebase
|
|
6014
|
+
*/var TransactionTracking=/*#__PURE__*/function(_libFableServiceProvi1){function TransactionTracking(pFable,pOptions,pServiceHash){var _this92;_classCallCheck2(this,TransactionTracking);// Intersect default options, parent constructor, service information
|
|
6015
|
+
_this92=_callSuper(this,TransactionTracking,[pFable,pOptions,pServiceHash]);/** @type {import('pict') & { addAndInstantiateSingletonService: (hash: string, options: any, prototype: any) => any }} */_this92.fable;/** @type {any} */_this92.log;/** @type {string} */_this92.UUID;_this92.transactionMap={};return _this92;}_inherits(TransactionTracking,_libFableServiceProvi1);return _createClass2(TransactionTracking,[{key:"transactions",get:function get(){return this.transactionMap;}},{key:"logToTransaction",value:function logToTransaction(pKey,pMessage,pCategory){var tmpTransaction=this.transactionMap[pKey];if(tmpTransaction==null){this.log.warn("TransactionTracking logToTransaction key [".concat(pKey,"] does not exist; auto creating..."));tmpTransaction=this.registerTransaction(pKey);}var tmpCategory=typeof pCategory==='string'?pCategory:'General';this.transactionMap[pKey].Log.push({TimeStamp:new Date(),Category:tmpCategory,Message:pMessage});//this.log.trace(`TransactionTracking logToTransaction [${pKey}]: (${tmpCategory}) ${pMessage}`);
|
|
6016
|
+
return true;}},{key:"registerTransaction",value:function registerTransaction(pKey){if(this.transactionMap[pKey]!=null){//this.log.warn(`TransactionTracking registerTransaction key [${pKey}] already exists... returning existing transaction.`);
|
|
6017
|
+
return this.transactionMap[pKey];}this.transactionMap[pKey]={TransactionKey:pKey,Events:{},Log:[],TransactionQueue:[]};return this.transactionMap[pKey];}/**
|
|
6018
|
+
* @param {string} pKey
|
|
6019
|
+
* @param {any} pData
|
|
6020
|
+
* @param {string} [pType='Entry']
|
|
6021
|
+
*
|
|
6022
|
+
* @return {number} the current queue size
|
|
6023
|
+
*/},{key:"pushToTransactionQueue",value:function pushToTransactionQueue(pKey,pData){var pType=arguments.length>2&&arguments[2]!==undefined?arguments[2]:'Entry';var tmpTransaction=this.transactionMap[pKey];if(tmpTransaction==null){this.log.warn("TransactionTracking pushToTransactionQueue key [".concat(pKey,"] does not exist; auto creating..."));tmpTransaction=this.registerTransaction(pKey);}tmpTransaction.TransactionQueue.push({Timestamp:Date.now(),Data:pData,Type:pType});this.logToTransaction(pKey,"Pushed data to transaction queue",'Queue');return tmpTransaction.TransactionQueue.length;}/**
|
|
6024
|
+
* Returns the transaction queue with wrapping metadata.
|
|
6025
|
+
*
|
|
6026
|
+
* @param {string} pKey
|
|
6027
|
+
*
|
|
6028
|
+
* @return {Array<{Timestamp: number, Data: any}>}
|
|
6029
|
+
*/},{key:"checkTransactionQueue",value:function checkTransactionQueue(pKey){var tmpTransaction=this.transactionMap[pKey];if(tmpTransaction==null){this.log.warn("TransactionTracking checkTransactionQueue key [".concat(pKey,"] does not exist; auto creating..."));tmpTransaction=this.registerTransaction(pKey);}if(tmpTransaction.TransactionQueue==null){tmpTransaction.TransactionQueue=[];}this.logToTransaction(pKey,"Checked transaction queue",'Queue');return tmpTransaction.TransactionQueue;}/**
|
|
6030
|
+
* Returns an array of object registered in the transaction queue for a given transaction ID.
|
|
6031
|
+
*
|
|
6032
|
+
* @param {string} pKey
|
|
6033
|
+
*
|
|
6034
|
+
* @return {Array<any>}
|
|
6035
|
+
*/},{key:"getTransactionQueue",value:function getTransactionQueue(pKey){var tmpQueue=this.checkTransactionQueue(pKey);return tmpQueue.map(function(item){return item.Data;});}/**
|
|
6036
|
+
* @param {string} pKey
|
|
6037
|
+
*
|
|
6038
|
+
* @return {Array<{Timestamp: number, Data: any}>}
|
|
6039
|
+
*/},{key:"clearTransactionQueue",value:function clearTransactionQueue(pKey){var tmpTransaction=this.transactionMap[pKey];if(tmpTransaction==null){this.log.warn("TransactionTracking clearTransactionQueue key [".concat(pKey,"] does not exist; skipping..."));return;}var tmpQueue=tmpTransaction.TransactionQueue;tmpTransaction.TransactionQueue=[];this.logToTransaction(pKey,"Cleared transaction queue",'Queue');return tmpQueue;}},{key:"checkEvent",value:function checkEvent(pKey,pEvent,pHash){var tmpHash=typeof pHash==='string'?pHash:'';var tmpTransaction=this.transactionMap[pKey];if(tmpTransaction==null){this.log.warn("TransactionTracking checkTransactionEvent event [".concat(pEvent,"]->[").concat(tmpHash,"] key [").concat(pKey,"] does not exist; auto creating..."));tmpTransaction=this.registerTransaction(pKey);}if(tmpTransaction.Events[pEvent]==null){tmpTransaction.Events[pEvent]={};}if(tmpHash in tmpTransaction.Events[pEvent]){//this.log.warn(`TransactionTracking checkTransactionEvent event [${pEvent}]->[${tmpHash}] key [${pKey}] firing a second time...`);
|
|
6040
|
+
this.logToTransaction(pKey,"Event [".concat(pEvent,"]->[").concat(tmpHash,"] already exists in transaction [").concat(pKey,"]"),'Event');return false;}else{//this.log.warn(`TransactionTracking checkTransactionEvent event [${pEvent}]->[${tmpHash}] key [${pKey}] firing a first time...`);
|
|
6041
|
+
this.logToTransaction(pKey,"Event [".concat(pEvent,"]->[").concat(tmpHash,"] registered in transaction [").concat(pKey,"]"),'Event');tmpTransaction.Events[pEvent][tmpHash]=true;return true;}}}]);}(libFableServiceProviderBase);module.exports=TransactionTracking;/** @type {Record<string, any>} */TransactionTracking.default_configuration={};},{"fable-serviceproviderbase":59}],210:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderData=/*#__PURE__*/function(_libPictTemplate){/**
|
|
6008
6042
|
* @param {Object} pFable - The Fable Framework instance
|
|
6009
6043
|
* @param {Object} pOptions - The options for the service
|
|
6010
6044
|
* @param {String} pServiceHash - The hash of the service
|
|
6011
|
-
*/function PictTemplateProviderData(pFable,pOptions,pServiceHash){var
|
|
6045
|
+
*/function PictTemplateProviderData(pFable,pOptions,pServiceHash){var _this93;_classCallCheck2(this,PictTemplateProviderData);_this93=_callSuper(this,PictTemplateProviderData,[pFable,pOptions,pServiceHash]);/** @type {any} */_this93.log;_this93.addPattern('{~Data:','~}');_this93.addPattern('{~D:','~}');return _this93;}/**
|
|
6012
6046
|
* Render a template expression, returning a string with the resulting content or an optional default value.
|
|
6013
6047
|
*
|
|
6014
6048
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6017,11 +6051,11 @@ tmpPageSize=10000;}/** @type {import('../filters/Filter.js').FilterState} */var
|
|
|
6017
6051
|
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
6018
6052
|
*
|
|
6019
6053
|
* @return {string} The rendered template
|
|
6020
|
-
*/_inherits(PictTemplateProviderData,_libPictTemplate);return _createClass2(PictTemplateProviderData,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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 tmpDefaultValue='';if(tmpHash.indexOf(':')>-1){tmpDefaultValue=tmpHash.split(':')[1];tmpHash=tmpHash.split(':')[0];}var tmpValue='';if(tmpHash!=null){tmpValue=this.resolveStateFromAddress(tmpHash,tmpRecord,pContextArray,null,pScope);}if(tmpValue==null||tmpValue=='undefined'||typeof tmpValue=='undefined'||tmpValue===''){return tmpDefaultValue;}return tmpValue;}}]);}(libPictTemplate);module.exports=PictTemplateProviderData;},{"pict-template":143}],
|
|
6054
|
+
*/_inherits(PictTemplateProviderData,_libPictTemplate);return _createClass2(PictTemplateProviderData,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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 tmpDefaultValue='';if(tmpHash.indexOf(':')>-1){tmpDefaultValue=tmpHash.split(':')[1];tmpHash=tmpHash.split(':')[0];}var tmpValue='';if(tmpHash!=null){tmpValue=this.resolveStateFromAddress(tmpHash,tmpRecord,pContextArray,null,pScope);}if(tmpValue==null||tmpValue=='undefined'||typeof tmpValue=='undefined'||tmpValue===''){return tmpDefaultValue;}return tmpValue;}}]);}(libPictTemplate);module.exports=PictTemplateProviderData;},{"pict-template":143}],211:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDataValueByKey=/*#__PURE__*/function(_libPictTemplate2){/**
|
|
6021
6055
|
* @param {Object} pFable - The Fable Framework instance
|
|
6022
6056
|
* @param {Object} pOptions - The options for the service
|
|
6023
6057
|
* @param {String} pServiceHash - The hash of the service
|
|
6024
|
-
*/function PictTemplateProviderDataValueByKey(pFable,pOptions,pServiceHash){var
|
|
6058
|
+
*/function PictTemplateProviderDataValueByKey(pFable,pOptions,pServiceHash){var _this94;_classCallCheck2(this,PictTemplateProviderDataValueByKey);_this94=_callSuper(this,PictTemplateProviderDataValueByKey,[pFable,pOptions,pServiceHash]);/** @type {any} */_this94.log;_this94.addPattern('{~DataValueByKey:','~}');_this94.addPattern('{~DVBK:','~}');return _this94;}/**
|
|
6025
6059
|
* Render a template expression, returning a string with the resulting content.
|
|
6026
6060
|
*
|
|
6027
6061
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6030,11 +6064,11 @@ tmpPageSize=10000;}/** @type {import('../filters/Filter.js').FilterState} */var
|
|
|
6030
6064
|
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
6031
6065
|
*
|
|
6032
6066
|
* @return {string} The rendered template
|
|
6033
|
-
*/_inherits(PictTemplateProviderDataValueByKey,_libPictTemplate2);return _createClass2(PictTemplateProviderDataValueByKey,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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 tmpHashArray=tmpHash.split(':');if(tmpHashArray.length<2){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"] failed because there were not two stanzas in the expression [").concat(pTemplateHash,"]"));return'';}var tmpDefaultValue='';if(tmpHashArray.length>2){tmpDefaultValue=tmpHashArray[2];}var tmpValueObject=this.resolveStateFromAddress(tmpHashArray[0],tmpRecord,pContextArray,null,pScope);var tmpValueAddress=this.resolveStateFromAddress(tmpHashArray[1],tmpRecord,pContextArray,null,pScope);var tmpValue=this.pict.manifest.getValueByHash(tmpValueObject,tmpValueAddress);if(tmpValue==null||tmpValue=='undefined'||typeof tmpValue=='undefined'){return tmpDefaultValue;}return tmpValue;}}]);}(libPictTemplate);module.exports=PictTemplateProviderDataValueByKey;},{"pict-template":143}],
|
|
6067
|
+
*/_inherits(PictTemplateProviderDataValueByKey,_libPictTemplate2);return _createClass2(PictTemplateProviderDataValueByKey,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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 tmpHashArray=tmpHash.split(':');if(tmpHashArray.length<2){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"] failed because there were not two stanzas in the expression [").concat(pTemplateHash,"]"));return'';}var tmpDefaultValue='';if(tmpHashArray.length>2){tmpDefaultValue=tmpHashArray[2];}var tmpValueObject=this.resolveStateFromAddress(tmpHashArray[0],tmpRecord,pContextArray,null,pScope);var tmpValueAddress=this.resolveStateFromAddress(tmpHashArray[1],tmpRecord,pContextArray,null,pScope);var tmpValue=this.pict.manifest.getValueByHash(tmpValueObject,tmpValueAddress);if(tmpValue==null||tmpValue=='undefined'||typeof tmpValue=='undefined'){return tmpDefaultValue;}return tmpValue;}}]);}(libPictTemplate);module.exports=PictTemplateProviderDataValueByKey;},{"pict-template":143}],212:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderData=/*#__PURE__*/function(_libPictTemplate3){/**
|
|
6034
6068
|
* @param {Object} pFable - The Fable Framework instance
|
|
6035
6069
|
* @param {Object} pOptions - The options for the service
|
|
6036
6070
|
* @param {String} pServiceHash - The hash of the service
|
|
6037
|
-
*/function PictTemplateProviderData(pFable,pOptions,pServiceHash){var
|
|
6071
|
+
*/function PictTemplateProviderData(pFable,pOptions,pServiceHash){var _this95;_classCallCheck2(this,PictTemplateProviderData);_this95=_callSuper(this,PictTemplateProviderData,[pFable,pOptions,pServiceHash]);/** @type {any} */_this95.log;_this95.addPattern('{~DataWithTemplateFallback:','~}');_this95.addPattern('{~DWTF:','~}');return _this95;}/**
|
|
6038
6072
|
* Render a template expression, returning a string with the resulting content or an optional default template string from an address.
|
|
6039
6073
|
*
|
|
6040
6074
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6056,13 +6090,13 @@ return'';}if(this.pict.LogNoisiness>3){this.log.trace("PICT DataWithTemplateFall
|
|
|
6056
6090
|
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
6057
6091
|
*
|
|
6058
6092
|
* @return {void} The result is passed to the callback function
|
|
6059
|
-
*/},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope){var
|
|
6060
|
-
this.pict.parseTemplateByHash(tmpTemplateFallbackAddress,tmpRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}if(pValue==null||pValue===''){
|
|
6061
|
-
return tmpCallback(null,'');}if(
|
|
6093
|
+
*/},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope){var _this96=this;var tmpHash=pTemplateHash.trim();var tmpRecord=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(tmpHash,"] with tmpRecord:"),tmpRecord);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(tmpHash,"]"));}var tmpTemplateFallbackAddress='';if(tmpHash.indexOf(':')>-1){tmpTemplateFallbackAddress=tmpHash.split(':')[1];tmpHash=tmpHash.split(':')[0];}var tmpValue='';if(tmpHash!=null){tmpValue=this.resolveStateFromAddress(tmpHash,tmpRecord,pContextArray,null,pScope);if(tmpValue&&tmpValue!=='undefined'){if(this.pict.LogNoisiness>3){this.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(tmpHash,"] - Found value: ").concat(tmpValue));}return tmpCallback(null,tmpValue);}}// If the value is not found or is undefined, try to use the fallback template
|
|
6094
|
+
this.pict.parseTemplateByHash(tmpTemplateFallbackAddress,tmpRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}if(pValue==null||pValue===''){_this96.log.warn("PICT DataWithTemplateFallback [fDataRender]::[".concat(tmpHash,"] - No fallback template found at address: ").concat(tmpTemplateFallbackAddress));// If no fallback template is found, return an empty string
|
|
6095
|
+
return tmpCallback(null,'');}if(_this96.pict.LogNoisiness>3){_this96.log.trace("PICT DataWithTemplateFallback [fDataRender]::[".concat(tmpHash,"] - Using fallback template from address: ").concat(tmpTemplateFallbackAddress));}return tmpCallback(null,pValue);},pContextArray,pScope);}}]);}(libPictTemplate);module.exports=PictTemplateProviderData;},{"pict-template":143}],213:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderEntity=/*#__PURE__*/function(_libPictTemplate4){/**
|
|
6062
6096
|
* @param {Object} pFable - The Fable Framework instance
|
|
6063
6097
|
* @param {Object} pOptions - The options for the service
|
|
6064
6098
|
* @param {String} pServiceHash - The hash of the service
|
|
6065
|
-
*/function PictTemplateProviderEntity(pFable,pOptions,pServiceHash){var
|
|
6099
|
+
*/function PictTemplateProviderEntity(pFable,pOptions,pServiceHash){var _this97;_classCallCheck2(this,PictTemplateProviderEntity);_this97=_callSuper(this,PictTemplateProviderEntity,[pFable,pOptions,pServiceHash]);/** @type {any} */_this97.log;_this97.addPattern('{~E:','~}');_this97.addPattern('{~Entity:','~}');return _this97;}/**
|
|
6066
6100
|
* Render a template expression, returning a string with the resulting content.
|
|
6067
6101
|
*
|
|
6068
6102
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6087,11 +6121,11 @@ var tmpAddressParts=tmpHash.split('^');if(tmpAddressParts.length<2){this.log.war
|
|
|
6087
6121
|
tmpEntityID=this.resolveStateFromAddress(String(tmpEntityID),tmpData,pContextArray,null,pScope);}// No Entity or EntityID
|
|
6088
6122
|
if(!tmpEntity||!tmpEntityID){this.log.warn("Pict: Entity Render: Entity or entity ID not resolved for [".concat(tmpHash,"] Entity: ").concat(tmpEntity," ID: ").concat(tmpEntityID));return tmpCallback(null,'');}if(this.pict.LogNoisiness>3){this.log.trace("Pict: Entity Render: Entity [".concat(tmpEntity,"] with ID [").concat(tmpEntityID,"] as template [").concat(tmpEntityTemplate,"] from [").concat(tmpHash,"]"));}// Now try to get the entity
|
|
6089
6123
|
this.pict.EntityProvider.getEntity(tmpEntity,tmpEntityID,function(pError,pRecord){if(pError){this.log.error("Pict: Entity Render: Error getting entity [".concat(tmpEntity,"] with ID [").concat(tmpEntityID,"] for [").concat(tmpHash,"]: ").concat(pError),pError);return tmpCallback(pError,'');}// Now render the template
|
|
6090
|
-
if(tmpEntityTemplate){this.pict.parseTemplateByHash(tmpEntityTemplate,pRecord,tmpCallback,pContextArray,pScope);}else{tmpCallback(null,'');}}.bind(this));}}]);}(libPictTemplate);module.exports=PictTemplateProviderEntity;},{"pict-template":143}],
|
|
6124
|
+
if(tmpEntityTemplate){this.pict.parseTemplateByHash(tmpEntityTemplate,pRecord,tmpCallback,pContextArray,pScope);}else{tmpCallback(null,'');}}.bind(this));}}]);}(libPictTemplate);module.exports=PictTemplateProviderEntity;},{"pict-template":143}],214:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderSelf=/*#__PURE__*/function(_libPictTemplate5){/**
|
|
6091
6125
|
* @param {Object} pFable - The Fable Framework instance
|
|
6092
6126
|
* @param {Object} pOptions - The options for the service
|
|
6093
6127
|
* @param {String} pServiceHash - The hash of the service
|
|
6094
|
-
*/function PictTemplateProviderSelf(pFable,pOptions,pServiceHash){var
|
|
6128
|
+
*/function PictTemplateProviderSelf(pFable,pOptions,pServiceHash){var _this98;_classCallCheck2(this,PictTemplateProviderSelf);_this98=_callSuper(this,PictTemplateProviderSelf,[pFable,pOptions,pServiceHash]);_this98.addPattern('{~Pict','~}');_this98.addPattern('{~P','~}');_this98.addPattern('{~p','~}');return _this98;}/**
|
|
6095
6129
|
* Render a template expression, returning a string with the resulting content.
|
|
6096
6130
|
*
|
|
6097
6131
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6100,11 +6134,11 @@ if(tmpEntityTemplate){this.pict.parseTemplateByHash(tmpEntityTemplate,pRecord,tm
|
|
|
6100
6134
|
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
6101
6135
|
*
|
|
6102
6136
|
* @return {string} The rendered template
|
|
6103
|
-
*/_inherits(PictTemplateProviderSelf,_libPictTemplate5);return _createClass2(PictTemplateProviderSelf,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){return this.pict.browserAddress;}}]);}(libPictTemplate);module.exports=PictTemplateProviderSelf;},{"pict-template":143}],
|
|
6137
|
+
*/_inherits(PictTemplateProviderSelf,_libPictTemplate5);return _createClass2(PictTemplateProviderSelf,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){return this.pict.browserAddress;}}]);}(libPictTemplate);module.exports=PictTemplateProviderSelf;},{"pict-template":143}],215:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderSolveByReference=/*#__PURE__*/function(_libPictTemplate6){/**
|
|
6104
6138
|
* @param {Object} pFable - The Fable Framework instance
|
|
6105
6139
|
* @param {Object} pOptions - The options for the service
|
|
6106
6140
|
* @param {String} pServiceHash - The hash of the service
|
|
6107
|
-
*/function PictTemplateProviderSolveByReference(pFable,pOptions,pServiceHash){var
|
|
6141
|
+
*/function PictTemplateProviderSolveByReference(pFable,pOptions,pServiceHash){var _this99;_classCallCheck2(this,PictTemplateProviderSolveByReference);_this99=_callSuper(this,PictTemplateProviderSolveByReference,[pFable,pOptions,pServiceHash]);/** @type {any} */_this99.log;_this99.addPattern('{~SolveByReference:','~}');_this99.addPattern('{~SBR:','~}');return _this99;}/**
|
|
6108
6142
|
* Render a template expression, returning a string with the resulting content.
|
|
6109
6143
|
*
|
|
6110
6144
|
* @param {string} pSolveParams - The solver parameters.
|
|
@@ -6114,11 +6148,11 @@ if(tmpEntityTemplate){this.pict.parseTemplateByHash(tmpEntityTemplate,pRecord,tm
|
|
|
6114
6148
|
*
|
|
6115
6149
|
* @return {string} The rendered template
|
|
6116
6150
|
*/_inherits(PictTemplateProviderSolveByReference,_libPictTemplate6);return _createClass2(PictTemplateProviderSolveByReference,[{key:"render",value:function render(pSolveParams,pRecord,pContextArray,pScope){// {~SBR:AppData.Equation:AppData.HomeworkRectangleSize:AppData.HomeworkManifest~}
|
|
6117
|
-
var _pSolveParams$trim$sp=pSolveParams.trim().split(':',3),_pSolveParams$trim$sp2=_slicedToArray(_pSolveParams$trim$sp,3),tmpEquationAddress=_pSolveParams$trim$sp2[0],tmpRecordAddress=_pSolveParams$trim$sp2[1],tmpManifestAddress=_pSolveParams$trim$sp2[2];var tmpContextualRecord=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT SolveByReference [fTemplateRender]::[".concat(pSolveParams,"] with tmpData:"),tmpContextualRecord);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT SolveByReference [fTemplateRender]::[".concat(pSolveParams,"]"));}var tmpEquation=this.pict.resolveStateFromAddress(tmpEquationAddress,tmpContextualRecord,pContextArray,null,pScope);if(!tmpEquation){if(this.pict.LogNoisiness>2){this.log.warn("Pict: SolveByReference: Equation not found for [".concat(tmpEquationAddress,"]"));}return'';}var tmpRecord=tmpRecordAddress&&this.pict.resolveStateFromAddress(tmpRecordAddress,tmpContextualRecord,pContextArray,null,pScope)||tmpContextualRecord;var tmpManifest=tmpManifestAddress&&this.pict.resolveStateFromAddress(tmpManifestAddress,tmpContextualRecord,pContextArray,null,pScope)||this.pict.manifest;var expressionParser=this.fable.instantiateServiceProviderIfNotExists('ExpressionParser');var tmpResultObject={};return expressionParser.solve(tmpEquation,tmpRecord,tmpResultObject,tmpManifest,tmpRecord);}}]);}(libPictTemplate);module.exports=PictTemplateProviderSolveByReference;},{"pict-template":143}],
|
|
6151
|
+
var _pSolveParams$trim$sp=pSolveParams.trim().split(':',3),_pSolveParams$trim$sp2=_slicedToArray(_pSolveParams$trim$sp,3),tmpEquationAddress=_pSolveParams$trim$sp2[0],tmpRecordAddress=_pSolveParams$trim$sp2[1],tmpManifestAddress=_pSolveParams$trim$sp2[2];var tmpContextualRecord=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT SolveByReference [fTemplateRender]::[".concat(pSolveParams,"] with tmpData:"),tmpContextualRecord);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT SolveByReference [fTemplateRender]::[".concat(pSolveParams,"]"));}var tmpEquation=this.pict.resolveStateFromAddress(tmpEquationAddress,tmpContextualRecord,pContextArray,null,pScope);if(!tmpEquation){if(this.pict.LogNoisiness>2){this.log.warn("Pict: SolveByReference: Equation not found for [".concat(tmpEquationAddress,"]"));}return'';}var tmpRecord=tmpRecordAddress&&this.pict.resolveStateFromAddress(tmpRecordAddress,tmpContextualRecord,pContextArray,null,pScope)||tmpContextualRecord;var tmpManifest=tmpManifestAddress&&this.pict.resolveStateFromAddress(tmpManifestAddress,tmpContextualRecord,pContextArray,null,pScope)||this.pict.manifest;var expressionParser=this.fable.instantiateServiceProviderIfNotExists('ExpressionParser');var tmpResultObject={};return expressionParser.solve(tmpEquation,tmpRecord,tmpResultObject,tmpManifest,tmpRecord);}}]);}(libPictTemplate);module.exports=PictTemplateProviderSolveByReference;},{"pict-template":143}],216:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplate=/*#__PURE__*/function(_libPictTemplate7){/**
|
|
6118
6152
|
* @param {Object} pFable - The Fable Framework instance
|
|
6119
6153
|
* @param {Object} pOptions - The options for the service
|
|
6120
6154
|
* @param {String} pServiceHash - The hash of the service
|
|
6121
|
-
*/function PictTemplateProviderTemplate(pFable,pOptions,pServiceHash){var
|
|
6155
|
+
*/function PictTemplateProviderTemplate(pFable,pOptions,pServiceHash){var _this100;_classCallCheck2(this,PictTemplateProviderTemplate);_this100=_callSuper(this,PictTemplateProviderTemplate,[pFable,pOptions,pServiceHash]);/** @type {any} */_this100.log;_this100.addPattern('{~Template:','~}');_this100.addPattern('{~T:','~}');return _this100;}/**
|
|
6122
6156
|
* Render a template expression, returning a string with the resulting content.
|
|
6123
6157
|
*
|
|
6124
6158
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6144,11 +6178,11 @@ return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray,
|
|
|
6144
6178
|
var tmpHashTemplateSeparator=tmpHash.indexOf(':');tmpTemplateHash=tmpHash.substring(0,tmpHashTemplateSeparator);if(tmpHashTemplateSeparator>-1){tmpAddressOfData=tmpHash.substring(tmpHashTemplateSeparator+1);}else{tmpTemplateHash=tmpHash;}// No template hash
|
|
6145
6179
|
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.
|
|
6146
6180
|
// The async portion of this is a mind bender because of how entry can happen dynamically from templates
|
|
6147
|
-
this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}else{this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplate;},{"pict-template":143}],
|
|
6181
|
+
this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}else{this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplate;},{"pict-template":143}],217:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateByDataAddress=/*#__PURE__*/function(_libPictTemplate8){/**
|
|
6148
6182
|
* @param {Object} pFable - The Fable Framework instance
|
|
6149
6183
|
* @param {Object} pOptions - The options for the service
|
|
6150
6184
|
* @param {String} pServiceHash - The hash of the service
|
|
6151
|
-
*/function PictTemplateProviderTemplateByDataAddress(pFable,pOptions,pServiceHash){var
|
|
6185
|
+
*/function PictTemplateProviderTemplateByDataAddress(pFable,pOptions,pServiceHash){var _this101;_classCallCheck2(this,PictTemplateProviderTemplateByDataAddress);_this101=_callSuper(this,PictTemplateProviderTemplateByDataAddress,[pFable,pOptions,pServiceHash]);/** @type {any} */_this101.log;_this101.addPattern('{~TemplateByDataAddress:','~}');_this101.addPattern('{~TBDA:','~}');return _this101;}/**
|
|
6152
6186
|
* Render a template expression, returning a string with the resulting content.
|
|
6153
6187
|
*
|
|
6154
6188
|
* @param {string} pTemplateDataAddress - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6174,11 +6208,11 @@ return this.pict.parseTemplate(tmpTemplate,pRecord,null,pContextArray,pScope);}e
|
|
|
6174
6208
|
var tmpHashTemplateSeparator=tmpDataAddress.indexOf(':');tmpTemplateDataAddress=tmpDataAddress.substring(0,tmpHashTemplateSeparator);if(tmpHashTemplateSeparator>-1){tmpAddressOfData=tmpDataAddress.substring(tmpHashTemplateSeparator+1);}else{tmpTemplateDataAddress=tmpDataAddress;}// No template hash
|
|
6175
6209
|
if(!tmpTemplateDataAddress){this.log.warn("Pict: Template Render Async: TemplateHash not resolved for [".concat(tmpDataAddress,"]"));return tmpCallback(null,'');}var tmpTemplate=this.pict.resolveStateFromAddress(tmpTemplateDataAddress,pRecord,pContextArray,null,pScope)||'';if(!tmpTemplate){if(this.pict.LogNoisiness>2){this.log.warn("Pict: Template Render: Template not found for [".concat(tmpTemplateDataAddress,"]"));}tmpTemplate='';}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
|
|
6176
6210
|
// The async portion of this is a mind bender because of how entry can happen dynamically from templates
|
|
6177
|
-
this.pict.parseTemplate(tmpTemplate,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}else{this.pict.parseTemplate(tmpTemplate,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateByDataAddress;},{"pict-template":143}],
|
|
6211
|
+
this.pict.parseTemplate(tmpTemplate,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}else{this.pict.parseTemplate(tmpTemplate,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateByDataAddress;},{"pict-template":143}],218:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplate=/*#__PURE__*/function(_libPictTemplate9){/**
|
|
6178
6212
|
* @param {Object} pFable - The Fable Framework instance
|
|
6179
6213
|
* @param {Object} pOptions - The options for the service
|
|
6180
6214
|
* @param {String} pServiceHash - The hash of the service
|
|
6181
|
-
*/function PictTemplateProviderTemplate(pFable,pOptions,pServiceHash){var
|
|
6215
|
+
*/function PictTemplateProviderTemplate(pFable,pOptions,pServiceHash){var _this102;_classCallCheck2(this,PictTemplateProviderTemplate);_this102=_callSuper(this,PictTemplateProviderTemplate,[pFable,pOptions,pServiceHash]);/** @type {any} */_this102.log;_this102.addPattern('{~TemplateByReference:','~}');_this102.addPattern('{~TBR:','~}');return _this102;}/**
|
|
6182
6216
|
* Render a template expression, returning a string with the resulting content.
|
|
6183
6217
|
*
|
|
6184
6218
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6208,11 +6242,11 @@ if(!tmpTemplateHashReferenceLocation){this.log.warn("Pict: Template Render Async
|
|
|
6208
6242
|
var tmpTemplateHash=this.resolveStateFromAddress(tmpTemplateHashReferenceLocation,pRecord,pContextArray,null,pScope);// No template hash
|
|
6209
6243
|
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.
|
|
6210
6244
|
// The async portion of this is a mind bender because of how entry can happen dynamically from templates
|
|
6211
|
-
this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}else{this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplate;},{"pict-template":143}],
|
|
6245
|
+
this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}else{this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplate;},{"pict-template":143}],219:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateFromMap=/*#__PURE__*/function(_libPictTemplate0){/**
|
|
6212
6246
|
* @param {Object} pFable - The Fable Framework instance
|
|
6213
6247
|
* @param {Object} pOptions - The options for the service
|
|
6214
6248
|
* @param {String} pServiceHash - The hash of the service
|
|
6215
|
-
*/function PictTemplateProviderTemplateFromMap(pFable,pOptions,pServiceHash){var
|
|
6249
|
+
*/function PictTemplateProviderTemplateFromMap(pFable,pOptions,pServiceHash){var _this103;_classCallCheck2(this,PictTemplateProviderTemplateFromMap);_this103=_callSuper(this,PictTemplateProviderTemplateFromMap,[pFable,pOptions,pServiceHash]);/** @type {any} */_this103.log;_this103.addPattern('{~TFM:','~}');_this103.addPattern('{~TemplateFromMap:','~}');return _this103;}/**
|
|
6216
6250
|
* Render a template expression, returning a string with the resulting content.
|
|
6217
6251
|
*
|
|
6218
6252
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6240,11 +6274,11 @@ var tmpTemplateHashPart=tmpHash.split(':');if(tmpTemplateHashPart.length<3){this
|
|
|
6240
6274
|
if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}// Now resolve the data
|
|
6241
6275
|
var tmpMap=this.resolveStateFromAddress(tmpAddressOfMap,tmpData,pContextArray,null,pScope);var tmpKey=this.resolveStateFromAddress(tmpAddressOfKey,tmpData,pContextArray,null,pScope);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.
|
|
6242
6276
|
// The async portion of this is a mind bender because of how entry can happen dynamically from TemplateFromMaps
|
|
6243
|
-
this.pict.parseTemplateByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}else{this.pict.parseTemplateByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateFromMap;},{"pict-template":143}],
|
|
6277
|
+
this.pict.parseTemplateByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}else{this.pict.parseTemplateByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateFromMap;},{"pict-template":143}],220:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateSet=/*#__PURE__*/function(_libPictTemplate1){/**
|
|
6244
6278
|
* @param {Object} pFable - The Fable Framework instance
|
|
6245
6279
|
* @param {Object} pOptions - The options for the service
|
|
6246
6280
|
* @param {String} pServiceHash - The hash of the service
|
|
6247
|
-
*/function PictTemplateProviderTemplateSet(pFable,pOptions,pServiceHash){var
|
|
6281
|
+
*/function PictTemplateProviderTemplateSet(pFable,pOptions,pServiceHash){var _this104;_classCallCheck2(this,PictTemplateProviderTemplateSet);_this104=_callSuper(this,PictTemplateProviderTemplateSet,[pFable,pOptions,pServiceHash]);/** @type {any} */_this104.log;_this104.addPattern('{~TemplateSet:','~}');_this104.addPattern('{~TS:','~}');return _this104;}/**
|
|
6248
6282
|
* Render a template expression, returning a string with the resulting content.
|
|
6249
6283
|
*
|
|
6250
6284
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6271,11 +6305,11 @@ var tmpTemplateHashPart=tmpHash.split(':');if(tmpTemplateHashPart.length<2){this
|
|
|
6271
6305
|
if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}// Now resolve the data
|
|
6272
6306
|
tmpData=this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope);if(!tmpData){// No address was provided, just render the template with what this template has.
|
|
6273
6307
|
// The async portion of this is a mind bender because of how entry can happen dynamically from templates
|
|
6274
|
-
this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}else{this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateSet;},{"pict-template":143}],
|
|
6308
|
+
this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}else{this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateSet;},{"pict-template":143}],221:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateSetFromMap=/*#__PURE__*/function(_libPictTemplate10){/**
|
|
6275
6309
|
* @param {Object} pFable - The Fable Framework instance
|
|
6276
6310
|
* @param {Object} pOptions - The options for the service
|
|
6277
6311
|
* @param {String} pServiceHash - The hash of the service
|
|
6278
|
-
*/function PictTemplateProviderTemplateSetFromMap(pFable,pOptions,pServiceHash){var
|
|
6312
|
+
*/function PictTemplateProviderTemplateSetFromMap(pFable,pOptions,pServiceHash){var _this105;_classCallCheck2(this,PictTemplateProviderTemplateSetFromMap);_this105=_callSuper(this,PictTemplateProviderTemplateSetFromMap,[pFable,pOptions,pServiceHash]);/** @type {any} */_this105.log;_this105.addPattern('{~TSFM:','~}');_this105.addPattern('{~TemplateSetFromMap:','~}');return _this105;}/**
|
|
6279
6313
|
* Render a template expression, returning a string with the resulting content.
|
|
6280
6314
|
*
|
|
6281
6315
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6303,11 +6337,11 @@ var tmpTemplateHashPart=tmpHash.split(':');if(tmpTemplateHashPart.length<3){this
|
|
|
6303
6337
|
if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMapSet Render Async: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}// Now resolve the data
|
|
6304
6338
|
var tmpMap=this.resolveStateFromAddress(tmpAddressOfMap,tmpData,pContextArray,null,pScope);var tmpKey=this.resolveStateFromAddress(tmpAddressOfKey,tmpData,pContextArray,null,pScope);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.
|
|
6305
6339
|
// The async portion of this is a mind bender because of how entry can happen dynamically from TemplateFromMaps
|
|
6306
|
-
this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}else{this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateSetFromMap;},{"pict-template":143}],
|
|
6340
|
+
this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}else{this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateSetFromMap;},{"pict-template":143}],222:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateSetWithPayload=/*#__PURE__*/function(_libPictTemplate11){/**
|
|
6307
6341
|
* @param {Object} pFable - The Fable Framework instance
|
|
6308
6342
|
* @param {Object} pOptions - The options for the service
|
|
6309
6343
|
* @param {String} pServiceHash - The hash of the service
|
|
6310
|
-
*/function PictTemplateProviderTemplateSetWithPayload(pFable,pOptions,pServiceHash){var
|
|
6344
|
+
*/function PictTemplateProviderTemplateSetWithPayload(pFable,pOptions,pServiceHash){var _this106;_classCallCheck2(this,PictTemplateProviderTemplateSetWithPayload);_this106=_callSuper(this,PictTemplateProviderTemplateSetWithPayload,[pFable,pOptions,pServiceHash]);/** @type {any} */_this106.log;_this106.addPattern('{~TemplateSetWithPayload:','~}');_this106.addPattern('{~TSWP:','~}');return _this106;}/**
|
|
6311
6345
|
* Render a template expression, returning a string with the resulting content.
|
|
6312
6346
|
*
|
|
6313
6347
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6328,11 +6362,11 @@ var tmpTemplateHashes=tmpHash.trim().split(':');if(tmpTemplateHashes.length<3){t
|
|
|
6328
6362
|
*
|
|
6329
6363
|
* @return {void}
|
|
6330
6364
|
*/},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope){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)
|
|
6331
|
-
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);if(!tmpData){tmpData=pRecord;}if(!tmpData){tmpData={};}var tmpPayloadData=this.resolveStateFromAddress(tmpAddressOfPayload,pRecord,pContextArray,null,pScope);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);}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateSetWithPayload;},{"pict-template":143}],
|
|
6365
|
+
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);if(!tmpData){tmpData=pRecord;}if(!tmpData){tmpData={};}var tmpPayloadData=this.resolveStateFromAddress(tmpAddressOfPayload,pRecord,pContextArray,null,pScope);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);}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateSetWithPayload;},{"pict-template":143}],223:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateValueSet=/*#__PURE__*/function(_libPictTemplate12){/**
|
|
6332
6366
|
* @param {Object} pFable - The Fable Framework instance
|
|
6333
6367
|
* @param {Object} pOptions - The options for the service
|
|
6334
6368
|
* @param {String} pServiceHash - The hash of the service
|
|
6335
|
-
*/function PictTemplateProviderTemplateValueSet(pFable,pOptions,pServiceHash){var
|
|
6369
|
+
*/function PictTemplateProviderTemplateValueSet(pFable,pOptions,pServiceHash){var _this107;_classCallCheck2(this,PictTemplateProviderTemplateValueSet);_this107=_callSuper(this,PictTemplateProviderTemplateValueSet,[pFable,pOptions,pServiceHash]);/** @type {any} */_this107.log;_this107.addPattern('{~TemplateValueSet:','~}');_this107.addPattern('{~TVS:','~}');return _this107;}/**
|
|
6336
6370
|
* Render a template expression, returning a string with the resulting content.
|
|
6337
6371
|
*
|
|
6338
6372
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6359,11 +6393,11 @@ var tmpTemplateHashPart=tmpHash.split(':');if(tmpTemplateHashPart.length<2){this
|
|
|
6359
6393
|
if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}// Now resolve the data
|
|
6360
6394
|
tmpData=this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope);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.
|
|
6361
6395
|
// The async portion of this is a mind bender because of how entry can happen dynamically from templates
|
|
6362
|
-
this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}else{this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateValueSet;},{"pict-template":143}],
|
|
6396
|
+
this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}else{this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateValueSet;},{"pict-template":143}],224:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderView=/*#__PURE__*/function(_libPictTemplate13){/**
|
|
6363
6397
|
* @param {Object} pFable - The Fable Framework instance
|
|
6364
6398
|
* @param {Object} pOptions - The options for the service
|
|
6365
6399
|
* @param {String} pServiceHash - The hash of the service
|
|
6366
|
-
*/function PictTemplateProviderView(pFable,pOptions,pServiceHash){var
|
|
6400
|
+
*/function PictTemplateProviderView(pFable,pOptions,pServiceHash){var _this108;_classCallCheck2(this,PictTemplateProviderView);_this108=_callSuper(this,PictTemplateProviderView,[pFable,pOptions,pServiceHash]);/** @type {any} */_this108.log;_this108.addPattern('{~V:','~}');_this108.addPattern('{~View:','~}');if(!('__TemplateOutputCache'in _this108.pict)){_this108.pict.__TemplateOutputCache={};}return _this108;}/**
|
|
6367
6401
|
* Render a template expression, returning a string with the resulting content.
|
|
6368
6402
|
*
|
|
6369
6403
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6382,13 +6416,13 @@ return tmpResult;}/**
|
|
|
6382
6416
|
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
6383
6417
|
*
|
|
6384
6418
|
* @return {void}
|
|
6385
|
-
*/},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope){var
|
|
6419
|
+
*/},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope){var _this109=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,function(pError,pResult){if(pError){_this109.log.warn("Pict: View Template Render: Error rendering view [".concat(tmpViewHash,"]"),pError);return fCallback(pError,'');}var tmpResult=_this109.pict.__TemplateOutputCache[tmpRenderGUID];// TODO: Uncomment this when we like how it's working
|
|
6386
6420
|
//delete this.pict.__TemplateOutputCache[tmpRenderGUID];
|
|
6387
|
-
return fCallback(null,tmpResult);});}}]);}(libPictTemplate);module.exports=PictTemplateProviderView;},{"pict-template":143}],
|
|
6421
|
+
return fCallback(null,tmpResult);});}}]);}(libPictTemplate);module.exports=PictTemplateProviderView;},{"pict-template":143}],225:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderRandomNumber=/*#__PURE__*/function(_libPictTemplate14){/**
|
|
6388
6422
|
* @param {Object} pFable - The Fable Framework instance
|
|
6389
6423
|
* @param {Object} pOptions - The options for the service
|
|
6390
6424
|
* @param {String} pServiceHash - The hash of the service
|
|
6391
|
-
*/function PictTemplateProviderRandomNumber(pFable,pOptions,pServiceHash){var
|
|
6425
|
+
*/function PictTemplateProviderRandomNumber(pFable,pOptions,pServiceHash){var _this110;_classCallCheck2(this,PictTemplateProviderRandomNumber);_this110=_callSuper(this,PictTemplateProviderRandomNumber,[pFable,pOptions,pServiceHash]);/** @type {any} */_this110.log;_this110.addPattern('{~RandomNumber:','~}');_this110.addPattern('{~RN:','~}');return _this110;}/**
|
|
6392
6426
|
* Render a template expression, returning a string with the resulting content.
|
|
6393
6427
|
*
|
|
6394
6428
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6397,11 +6431,11 @@ return fCallback(null,tmpResult);});}}]);}(libPictTemplate);module.exports=PictT
|
|
|
6397
6431
|
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
6398
6432
|
*
|
|
6399
6433
|
* @return {string} The rendered template
|
|
6400
|
-
*/_inherits(PictTemplateProviderRandomNumber,_libPictTemplate14);return _createClass2(PictTemplateProviderRandomNumber,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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}],
|
|
6434
|
+
*/_inherits(PictTemplateProviderRandomNumber,_libPictTemplate14);return _createClass2(PictTemplateProviderRandomNumber,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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}],226:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderRandomNumberString=/*#__PURE__*/function(_libPictTemplate15){/**
|
|
6401
6435
|
* @param {Object} pFable - The Fable Framework instance
|
|
6402
6436
|
* @param {Object} pOptions - The options for the service
|
|
6403
6437
|
* @param {String} pServiceHash - The hash of the service
|
|
6404
|
-
*/function PictTemplateProviderRandomNumberString(pFable,pOptions,pServiceHash){var
|
|
6438
|
+
*/function PictTemplateProviderRandomNumberString(pFable,pOptions,pServiceHash){var _this111;_classCallCheck2(this,PictTemplateProviderRandomNumberString);_this111=_callSuper(this,PictTemplateProviderRandomNumberString,[pFable,pOptions,pServiceHash]);/** @type {any} */_this111.log;_this111.addPattern('{~RandomNumberString:','~}');_this111.addPattern('{~RNS:','~}');return _this111;}/**
|
|
6405
6439
|
* Render a template expression, returning a string with the resulting content.
|
|
6406
6440
|
*
|
|
6407
6441
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6410,11 +6444,11 @@ return fCallback(null,tmpResult);});}}]);}(libPictTemplate);module.exports=PictT
|
|
|
6410
6444
|
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
6411
6445
|
*
|
|
6412
6446
|
* @return {string} The rendered template
|
|
6413
|
-
*/_inherits(PictTemplateProviderRandomNumberString,_libPictTemplate15);return _createClass2(PictTemplateProviderRandomNumberString,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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}],
|
|
6447
|
+
*/_inherits(PictTemplateProviderRandomNumberString,_libPictTemplate15);return _createClass2(PictTemplateProviderRandomNumberString,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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}],227:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDataEncodeJavascriptString=/*#__PURE__*/function(_libPictTemplate16){/**
|
|
6414
6448
|
* @param {Object} pFable - The Fable Framework instance
|
|
6415
6449
|
* @param {Object} pOptions - The options for the service
|
|
6416
6450
|
* @param {String} pServiceHash - The hash of the service
|
|
6417
|
-
*/function PictTemplateProviderDataEncodeJavascriptString(pFable,pOptions,pServiceHash){var
|
|
6451
|
+
*/function PictTemplateProviderDataEncodeJavascriptString(pFable,pOptions,pServiceHash){var _this112;_classCallCheck2(this,PictTemplateProviderDataEncodeJavascriptString);_this112=_callSuper(this,PictTemplateProviderDataEncodeJavascriptString,[pFable,pOptions,pServiceHash]);/** @type {any} */_this112.log;_this112.addPattern('{~DataEncodeJavascriptString:','~}');_this112.addPattern('{~DEJS:','~}');return _this112;}/**
|
|
6418
6452
|
* Render a template expression, returning a string with the resulting content.
|
|
6419
6453
|
*
|
|
6420
6454
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6423,11 +6457,11 @@ return fCallback(null,tmpResult);});}}]);}(libPictTemplate);module.exports=PictT
|
|
|
6423
6457
|
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
6424
6458
|
*
|
|
6425
6459
|
* @return {string} The rendered template
|
|
6426
|
-
*/_inherits(PictTemplateProviderDataEncodeJavascriptString,_libPictTemplate16);return _createClass2(PictTemplateProviderDataEncodeJavascriptString,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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);return this.pict.DataFormat.stringEncodeForJavascript(tmpDataToEncode);}}]);}(libPictTemplate);module.exports=PictTemplateProviderDataEncodeJavascriptString;},{"pict-template":143}],
|
|
6460
|
+
*/_inherits(PictTemplateProviderDataEncodeJavascriptString,_libPictTemplate16);return _createClass2(PictTemplateProviderDataEncodeJavascriptString,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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);return this.pict.DataFormat.stringEncodeForJavascript(tmpDataToEncode);}}]);}(libPictTemplate);module.exports=PictTemplateProviderDataEncodeJavascriptString;},{"pict-template":143}],228:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderJSONOutput=/*#__PURE__*/function(_libPictTemplate17){/**
|
|
6427
6461
|
* @param {Object} pFable - The Fable Framework instance
|
|
6428
6462
|
* @param {Object} pOptions - The options for the service
|
|
6429
6463
|
* @param {String} pServiceHash - The hash of the service
|
|
6430
|
-
*/function PictTemplateProviderJSONOutput(pFable,pOptions,pServiceHash){var
|
|
6464
|
+
*/function PictTemplateProviderJSONOutput(pFable,pOptions,pServiceHash){var _this113;_classCallCheck2(this,PictTemplateProviderJSONOutput);_this113=_callSuper(this,PictTemplateProviderJSONOutput,[pFable,pOptions,pServiceHash]);/** @type {any} */_this113.log;_this113.addPattern('{~DataJson:','~}');_this113.addPattern('{~DJ:','~}');return _this113;}/**
|
|
6431
6465
|
* Render a template expression, returning a string with the resulting content.
|
|
6432
6466
|
*
|
|
6433
6467
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6436,11 +6470,11 @@ return fCallback(null,tmpResult);});}}]);}(libPictTemplate);module.exports=PictT
|
|
|
6436
6470
|
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
6437
6471
|
*
|
|
6438
6472
|
* @return {string} The rendered template
|
|
6439
|
-
*/_inherits(PictTemplateProviderJSONOutput,_libPictTemplate17);return _createClass2(PictTemplateProviderJSONOutput,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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);if(!tmpDataToStringify){tmpDataToStringify=pRecord;}return JSON.stringify(tmpDataToStringify);}}]);}(libPictTemplate);module.exports=PictTemplateProviderJSONOutput;},{"pict-template":143}],
|
|
6473
|
+
*/_inherits(PictTemplateProviderJSONOutput,_libPictTemplate17);return _createClass2(PictTemplateProviderJSONOutput,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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);if(!tmpDataToStringify){tmpDataToStringify=pRecord;}return JSON.stringify(tmpDataToStringify);}}]);}(libPictTemplate);module.exports=PictTemplateProviderJSONOutput;},{"pict-template":143}],229:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateOnlyFormat=/*#__PURE__*/function(_libPictTemplate18){/**
|
|
6440
6474
|
* @param {import('fable')} pFable - The Fable Framework instance
|
|
6441
6475
|
* @param {any} pOptions - The options for the service
|
|
6442
6476
|
* @param {String} pServiceHash - The hash of the service
|
|
6443
|
-
*/function PictTemplateProviderDateOnlyFormat(pFable,pOptions,pServiceHash){var
|
|
6477
|
+
*/function PictTemplateProviderDateOnlyFormat(pFable,pOptions,pServiceHash){var _this114;_classCallCheck2(this,PictTemplateProviderDateOnlyFormat);_this114=_callSuper(this,PictTemplateProviderDateOnlyFormat,[pFable,pOptions,pServiceHash]);/** @type {any} */_this114.options;/** @type {any} */_this114.log;_this114.addPattern('{~DateOnlyFormat:','~}');return _this114;}/**
|
|
6444
6478
|
* Render a template expression, returning a string with the resulting content.
|
|
6445
6479
|
*
|
|
6446
6480
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6456,11 +6490,11 @@ var tmpDayJS=this.fable.Dates.dayJS.utc(tmpDateValue).tz('UTC');return tmpDayJS.
|
|
|
6456
6490
|
```javascript
|
|
6457
6491
|
|
|
6458
6492
|
```
|
|
6459
|
-
*/},{"pict-template":143}],
|
|
6493
|
+
*/},{"pict-template":143}],230:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateOnlyYMD=/*#__PURE__*/function(_libPictTemplate19){/**
|
|
6460
6494
|
* @param {Object} pFable - The Fable Framework instance
|
|
6461
6495
|
* @param {Object} pOptions - The options for the service
|
|
6462
6496
|
* @param {String} pServiceHash - The hash of the service
|
|
6463
|
-
*/function PictTemplateProviderDateOnlyYMD(pFable,pOptions,pServiceHash){var
|
|
6497
|
+
*/function PictTemplateProviderDateOnlyYMD(pFable,pOptions,pServiceHash){var _this115;_classCallCheck2(this,PictTemplateProviderDateOnlyYMD);_this115=_callSuper(this,PictTemplateProviderDateOnlyYMD,[pFable,pOptions,pServiceHash]);/** @type {any} */_this115.options;/** @type {any} */_this115.log;_this115.addPattern('{~DateOnlyYMD:','~}');return _this115;}/**
|
|
6464
6498
|
* Render a template expression, returning a string with the resulting content.
|
|
6465
6499
|
*
|
|
6466
6500
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6472,12 +6506,12 @@ var tmpDayJS=this.fable.Dates.dayJS.utc(tmpDateValue).tz('UTC');return tmpDayJS.
|
|
|
6472
6506
|
*/_inherits(PictTemplateProviderDateOnlyYMD,_libPictTemplate19);return _createClass2(PictTemplateProviderDateOnlyYMD,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpDateValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray,null,pScope);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
|
|
6473
6507
|
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
|
|
6474
6508
|
// not even sure showing negative is right; showing the era is probably better (BCE vs CE)
|
|
6475
|
-
var prefix=tmpDayJS.valueOf()<-62167219200000?'-':'';return prefix+tmpDayJS.format('YYYY-MM-DD');}}]);}(libPictTemplate);module.exports=PictTemplateProviderDateOnlyYMD;},{"pict-template":143}],
|
|
6509
|
+
var prefix=tmpDayJS.valueOf()<-62167219200000?'-':'';return prefix+tmpDayJS.format('YYYY-MM-DD');}}]);}(libPictTemplate);module.exports=PictTemplateProviderDateOnlyYMD;},{"pict-template":143}],231:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateTimeFormat=/*#__PURE__*/function(_libPictTemplate20){/**
|
|
6476
6510
|
* @param {Object} pFable - The Fable Framework instance
|
|
6477
6511
|
* @param {Object} pOptions - The options for the service
|
|
6478
6512
|
* @param {String} pServiceHash - The hash of the service
|
|
6479
|
-
*/function PictTemplateProviderDateTimeFormat(pFable,pOptions,pServiceHash){var
|
|
6480
|
-
return
|
|
6513
|
+
*/function PictTemplateProviderDateTimeFormat(pFable,pOptions,pServiceHash){var _this116;_classCallCheck2(this,PictTemplateProviderDateTimeFormat);_this116=_callSuper(this,PictTemplateProviderDateTimeFormat,[pFable,pOptions,pServiceHash]);/** @type {any} */_this116.options;/** @type {any} */_this116.log;_this116.addPattern('{~DateTimeFormat:','~}');_this116.addPattern('{~DateFormat:','~}');// for backwards compatibility
|
|
6514
|
+
return _this116;}/**
|
|
6481
6515
|
* Render a template expression, returning a string with the resulting content.
|
|
6482
6516
|
*
|
|
6483
6517
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6496,12 +6530,12 @@ try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.
|
|
|
6496
6530
|
```javascript
|
|
6497
6531
|
|
|
6498
6532
|
```
|
|
6499
|
-
*/},{"pict-template":143}],
|
|
6533
|
+
*/},{"pict-template":143}],232:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateTimeYMD=/*#__PURE__*/function(_libPictTemplate21){/**
|
|
6500
6534
|
* @param {Object} pFable - The Fable Framework instance
|
|
6501
6535
|
* @param {Object} pOptions - The options for the service
|
|
6502
6536
|
* @param {String} pServiceHash - The hash of the service
|
|
6503
|
-
*/function PictTemplateProviderDateTimeYMD(pFable,pOptions,pServiceHash){var
|
|
6504
|
-
return
|
|
6537
|
+
*/function PictTemplateProviderDateTimeYMD(pFable,pOptions,pServiceHash){var _this117;_classCallCheck2(this,PictTemplateProviderDateTimeYMD);_this117=_callSuper(this,PictTemplateProviderDateTimeYMD,[pFable,pOptions,pServiceHash]);/** @type {any} */_this117.options;/** @type {any} */_this117.log;_this117.addPattern('{~DateTimeYMD:','~}');_this117.addPattern('{~DateYMD:','~}');// for backwards compatibility
|
|
6538
|
+
return _this117;}/**
|
|
6505
6539
|
* Render a template expression, returning a string with the resulting content.
|
|
6506
6540
|
*
|
|
6507
6541
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6514,11 +6548,11 @@ return _this116;}/**
|
|
|
6514
6548
|
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
|
|
6515
6549
|
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()}].`);
|
|
6516
6550
|
// Day.js will try to guess the user's timezone for us
|
|
6517
|
-
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}],
|
|
6551
|
+
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}],233:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDigits=/*#__PURE__*/function(_libPictTemplate22){/**
|
|
6518
6552
|
* @param {Object} pFable - The Fable Framework instance
|
|
6519
6553
|
* @param {Object} pOptions - The options for the service
|
|
6520
6554
|
* @param {String} pServiceHash - The hash of the service
|
|
6521
|
-
*/function PictTemplateProviderDigits(pFable,pOptions,pServiceHash){var
|
|
6555
|
+
*/function PictTemplateProviderDigits(pFable,pOptions,pServiceHash){var _this118;_classCallCheck2(this,PictTemplateProviderDigits);_this118=_callSuper(this,PictTemplateProviderDigits,[pFable,pOptions,pServiceHash]);/** @type {any} */_this118.options;/** @type {any} */_this118.log;_this118.addPattern('{~Digits:','~}');return _this118;}/**
|
|
6522
6556
|
* Render a template expression, returning a string with the resulting content.
|
|
6523
6557
|
*
|
|
6524
6558
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6527,11 +6561,11 @@ try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.
|
|
|
6527
6561
|
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
6528
6562
|
*
|
|
6529
6563
|
* @return {string} The rendered template
|
|
6530
|
-
*/_inherits(PictTemplateProviderDigits,_libPictTemplate22);return _createClass2(PictTemplateProviderDigits,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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);return this.fable.DataFormat.formatterAddCommasToNumber(this.fable.DataFormat.formatterRoundNumber(tmpColumnData,2));}}]);}(libPictTemplate);module.exports=PictTemplateProviderDigits;},{"pict-template":143}],
|
|
6564
|
+
*/_inherits(PictTemplateProviderDigits,_libPictTemplate22);return _createClass2(PictTemplateProviderDigits,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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);return this.fable.DataFormat.formatterAddCommasToNumber(this.fable.DataFormat.formatterRoundNumber(tmpColumnData,2));}}]);}(libPictTemplate);module.exports=PictTemplateProviderDigits;},{"pict-template":143}],234:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDollars=/*#__PURE__*/function(_libPictTemplate23){/**
|
|
6531
6565
|
* @param {Object} pFable - The Fable Framework instance
|
|
6532
6566
|
* @param {Object} pOptions - The options for the service
|
|
6533
6567
|
* @param {String} pServiceHash - The hash of the service
|
|
6534
|
-
*/function PictTemplateProviderDollars(pFable,pOptions,pServiceHash){var
|
|
6568
|
+
*/function PictTemplateProviderDollars(pFable,pOptions,pServiceHash){var _this119;_classCallCheck2(this,PictTemplateProviderDollars);_this119=_callSuper(this,PictTemplateProviderDollars,[pFable,pOptions,pServiceHash]);/** @type {any} */_this119.options;/** @type {any} */_this119.log;_this119.addPattern('{~Dollars:','~}');return _this119;}/**
|
|
6535
6569
|
* Render a template expression, returning a string with the resulting content.
|
|
6536
6570
|
*
|
|
6537
6571
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6540,11 +6574,11 @@ try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.
|
|
|
6540
6574
|
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
6541
6575
|
*
|
|
6542
6576
|
* @return {string} The rendered template
|
|
6543
|
-
*/_inherits(PictTemplateProviderDollars,_libPictTemplate23);return _createClass2(PictTemplateProviderDollars,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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);return this.fable.DataFormat.formatterDollars(tmpColumnData);}}]);}(libPictTemplate);module.exports=PictTemplateProviderDollars;},{"pict-template":143}],
|
|
6577
|
+
*/_inherits(PictTemplateProviderDollars,_libPictTemplate23);return _createClass2(PictTemplateProviderDollars,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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);return this.fable.DataFormat.formatterDollars(tmpColumnData);}}]);}(libPictTemplate);module.exports=PictTemplateProviderDollars;},{"pict-template":143}],235:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderHTMLCommandEnd=/*#__PURE__*/function(_libPictTemplate24){/**
|
|
6544
6578
|
* @param {Object} pFable - The Fable Framework instance
|
|
6545
6579
|
* @param {Object} pOptions - The options for the service
|
|
6546
6580
|
* @param {String} pServiceHash - The hash of the service
|
|
6547
|
-
*/function PictTemplateProviderHTMLCommandEnd(pFable,pOptions,pServiceHash){var
|
|
6581
|
+
*/function PictTemplateProviderHTMLCommandEnd(pFable,pOptions,pServiceHash){var _this120;_classCallCheck2(this,PictTemplateProviderHTMLCommandEnd);_this120=_callSuper(this,PictTemplateProviderHTMLCommandEnd,[pFable,pOptions,pServiceHash]);/** @type {any} */_this120.log;_this120.addPattern('{~HtmlCommentEnd:','~}');_this120.addPattern('{~HCE:','~}');return _this120;}/**
|
|
6548
6582
|
* Render a template expression, returning a string with the resulting content.
|
|
6549
6583
|
*
|
|
6550
6584
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6553,11 +6587,11 @@ try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.
|
|
|
6553
6587
|
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
6554
6588
|
*
|
|
6555
6589
|
* @return {string} The rendered template
|
|
6556
|
-
*/_inherits(PictTemplateProviderHTMLCommandEnd,_libPictTemplate24);return _createClass2(PictTemplateProviderHTMLCommandEnd,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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);}if(!tmpValue){return' -->';}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderHTMLCommandEnd;},{"pict-template":143}],
|
|
6590
|
+
*/_inherits(PictTemplateProviderHTMLCommandEnd,_libPictTemplate24);return _createClass2(PictTemplateProviderHTMLCommandEnd,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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);}if(!tmpValue){return' -->';}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderHTMLCommandEnd;},{"pict-template":143}],236:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderHTMLCommandStart=/*#__PURE__*/function(_libPictTemplate25){/**
|
|
6557
6591
|
* @param {Object} pFable - The Fable Framework instance
|
|
6558
6592
|
* @param {Object} pOptions - The options for the service
|
|
6559
6593
|
* @param {String} pServiceHash - The hash of the service
|
|
6560
|
-
*/function PictTemplateProviderHTMLCommandStart(pFable,pOptions,pServiceHash){var
|
|
6594
|
+
*/function PictTemplateProviderHTMLCommandStart(pFable,pOptions,pServiceHash){var _this121;_classCallCheck2(this,PictTemplateProviderHTMLCommandStart);_this121=_callSuper(this,PictTemplateProviderHTMLCommandStart,[pFable,pOptions,pServiceHash]);/** @type {any} */_this121.log;_this121.addPattern('{~HtmlCommentStart:','~}');_this121.addPattern('{~HCS:','~}');return _this121;}/**
|
|
6561
6595
|
* Render a template expression, returning a string with the resulting content.
|
|
6562
6596
|
*
|
|
6563
6597
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6566,11 +6600,11 @@ try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.
|
|
|
6566
6600
|
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
6567
6601
|
*
|
|
6568
6602
|
* @return {string} The rendered template
|
|
6569
|
-
*/_inherits(PictTemplateProviderHTMLCommandStart,_libPictTemplate25);return _createClass2(PictTemplateProviderHTMLCommandStart,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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);}if(!tmpValue){return'<!-- ';}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderHTMLCommandStart;},{"pict-template":143}],
|
|
6603
|
+
*/_inherits(PictTemplateProviderHTMLCommandStart,_libPictTemplate25);return _createClass2(PictTemplateProviderHTMLCommandStart,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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);}if(!tmpValue){return'<!-- ';}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderHTMLCommandStart;},{"pict-template":143}],237:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderJoin=/*#__PURE__*/function(_libPictTemplate26){/**
|
|
6570
6604
|
* @param {Object} pFable - The Fable Framework instance
|
|
6571
6605
|
* @param {Object} pOptions - The options for the service
|
|
6572
6606
|
* @param {String} pServiceHash - The hash of the service
|
|
6573
|
-
*/function PictTemplateProviderJoin(pFable,pOptions,pServiceHash){var
|
|
6607
|
+
*/function PictTemplateProviderJoin(pFable,pOptions,pServiceHash){var _this122;_classCallCheck2(this,PictTemplateProviderJoin);_this122=_callSuper(this,PictTemplateProviderJoin,[pFable,pOptions,pServiceHash]);/** @type {any} */_this122.options;/** @type {any} */_this122.log;_this122.addPattern('{~Join:','~}');_this122.addPattern('{~J:','~}');return _this122;}/**
|
|
6574
6608
|
* Render a template expression, returning a string with the resulting content.
|
|
6575
6609
|
*
|
|
6576
6610
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6580,11 +6614,11 @@ try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.
|
|
|
6580
6614
|
*
|
|
6581
6615
|
* @return {string} The rendered template
|
|
6582
6616
|
*/_inherits(PictTemplateProviderJoin,_libPictTemplate26);return _createClass2(PictTemplateProviderJoin,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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
|
|
6583
|
-
var tmpSeparator=tmpDataAddresses.shift();var tmpValueList=[];for(var i=0;i<tmpDataAddresses.length;i++){var tmpValueSet=this.resolveStateFromAddress(tmpDataAddresses[i],tmpData,pContextArray,null,pScope);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}],
|
|
6617
|
+
var tmpSeparator=tmpDataAddresses.shift();var tmpValueList=[];for(var i=0;i<tmpDataAddresses.length;i++){var tmpValueSet=this.resolveStateFromAddress(tmpDataAddresses[i],tmpData,pContextArray,null,pScope);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}],238:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderJoinUnique=/*#__PURE__*/function(_libPictTemplate27){/**
|
|
6584
6618
|
* @param {Object} pFable - The Fable Framework instance
|
|
6585
6619
|
* @param {Object} pOptions - The options for the service
|
|
6586
6620
|
* @param {String} pServiceHash - The hash of the service
|
|
6587
|
-
*/function PictTemplateProviderJoinUnique(pFable,pOptions,pServiceHash){var
|
|
6621
|
+
*/function PictTemplateProviderJoinUnique(pFable,pOptions,pServiceHash){var _this123;_classCallCheck2(this,PictTemplateProviderJoinUnique);_this123=_callSuper(this,PictTemplateProviderJoinUnique,[pFable,pOptions,pServiceHash]);/** @type {any} */_this123.options;/** @type {any} */_this123.log;_this123.addPattern('{~JoinUnique:','~}');_this123.addPattern('{~JU:','~}');return _this123;}/**
|
|
6588
6622
|
* Render a template expression, returning a string with the resulting content.
|
|
6589
6623
|
*
|
|
6590
6624
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6594,11 +6628,11 @@ var tmpSeparator=tmpDataAddresses.shift();var tmpValueList=[];for(var i=0;i<tmpD
|
|
|
6594
6628
|
*
|
|
6595
6629
|
* @return {string} The rendered template
|
|
6596
6630
|
*/_inherits(PictTemplateProviderJoinUnique,_libPictTemplate27);return _createClass2(PictTemplateProviderJoinUnique,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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
|
|
6597
|
-
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);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}],
|
|
6631
|
+
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);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}],239:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderPascalCaseIdentifier=/*#__PURE__*/function(_libPictTemplate28){/**
|
|
6598
6632
|
* @param {Object} pFable - The Fable Framework instance
|
|
6599
6633
|
* @param {Object} pOptions - The options for the service
|
|
6600
6634
|
* @param {String} pServiceHash - The hash of the service
|
|
6601
|
-
*/function PictTemplateProviderPascalCaseIdentifier(pFable,pOptions,pServiceHash){var
|
|
6635
|
+
*/function PictTemplateProviderPascalCaseIdentifier(pFable,pOptions,pServiceHash){var _this124;_classCallCheck2(this,PictTemplateProviderPascalCaseIdentifier);_this124=_callSuper(this,PictTemplateProviderPascalCaseIdentifier,[pFable,pOptions,pServiceHash]);/** @type {any} */_this124.options;/** @type {any} */_this124.log;_this124.addPattern('{~PascalCaseIdentifier:','~}');return _this124;}/**
|
|
6602
6636
|
* Render a template expression, returning a string with the resulting content.
|
|
6603
6637
|
*
|
|
6604
6638
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6613,11 +6647,11 @@ var tmpSeparator=tmpDataAddresses.shift();var tmpValueList=[];var tmpValueMap={}
|
|
|
6613
6647
|
```javascript
|
|
6614
6648
|
|
|
6615
6649
|
```
|
|
6616
|
-
*/},{"pict-template":143}],
|
|
6650
|
+
*/},{"pict-template":143}],240:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderPluckJoinUnique=/*#__PURE__*/function(_libPictTemplate29){/**
|
|
6617
6651
|
* @param {Object} pFable - The Fable Framework instance
|
|
6618
6652
|
* @param {Object} pOptions - The options for the service
|
|
6619
6653
|
* @param {String} pServiceHash - The hash of the service
|
|
6620
|
-
*/function PictTemplateProviderPluckJoinUnique(pFable,pOptions,pServiceHash){var
|
|
6654
|
+
*/function PictTemplateProviderPluckJoinUnique(pFable,pOptions,pServiceHash){var _this125;_classCallCheck2(this,PictTemplateProviderPluckJoinUnique);_this125=_callSuper(this,PictTemplateProviderPluckJoinUnique,[pFable,pOptions,pServiceHash]);/** @type {any} */_this125.options;/** @type {any} */_this125.log;_this125.addPattern('{~PluckJoinUnique:','~}');_this125.addPattern('{~PJU:','~}');return _this125;}/**
|
|
6621
6655
|
* Render a template expression, returning a string with the resulting content.
|
|
6622
6656
|
*
|
|
6623
6657
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6628,11 +6662,11 @@ var tmpSeparator=tmpDataAddresses.shift();var tmpValueList=[];var tmpValueMap={}
|
|
|
6628
6662
|
* @return {string} The rendered template
|
|
6629
6663
|
*/_inherits(PictTemplateProviderPluckJoinUnique,_libPictTemplate29);return _createClass2(PictTemplateProviderPluckJoinUnique,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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
|
|
6630
6664
|
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);if(tmpValueSet&&Array.isArray(tmpValueSet)){// This one only works on arrays of objects.
|
|
6631
|
-
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}],
|
|
6665
|
+
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}],241:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderBreakpoint=/*#__PURE__*/function(_libPictTemplate30){/**
|
|
6632
6666
|
* @param {Object} pFable - The Fable Framework instance
|
|
6633
6667
|
* @param {Object} pOptions - The options for the service
|
|
6634
6668
|
* @param {String} pServiceHash - The hash of the service
|
|
6635
|
-
*/function PictTemplateProviderBreakpoint(pFable,pOptions,pServiceHash){var
|
|
6669
|
+
*/function PictTemplateProviderBreakpoint(pFable,pOptions,pServiceHash){var _this126;_classCallCheck2(this,PictTemplateProviderBreakpoint);_this126=_callSuper(this,PictTemplateProviderBreakpoint,[pFable,pOptions,pServiceHash]);/** @type {any} */_this126.log;_this126.addPattern('{~Breakpoint','~}');return _this126;}/**
|
|
6636
6670
|
* Render a template expression, returning a string with the resulting content.
|
|
6637
6671
|
*
|
|
6638
6672
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6643,11 +6677,11 @@ for(var j=0;j<tmpValueSet.length;j++){if(tmpValueSet[j]===null||_typeof(tmpValue
|
|
|
6643
6677
|
* @return {string} The rendered template
|
|
6644
6678
|
*/_inherits(PictTemplateProviderBreakpoint,_libPictTemplate30);return _createClass2(PictTemplateProviderBreakpoint,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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;
|
|
6645
6679
|
debugger;// eslint-disable-line no-debugger
|
|
6646
|
-
return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderBreakpoint;},{"pict-template":143}],
|
|
6680
|
+
return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderBreakpoint;},{"pict-template":143}],242:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDataValueTree=/*#__PURE__*/function(_libPictTemplate31){/**
|
|
6647
6681
|
* @param {Object} pFable - The Fable Framework instance
|
|
6648
6682
|
* @param {Object} pOptions - The options for the service
|
|
6649
6683
|
* @param {String} pServiceHash - The hash of the service
|
|
6650
|
-
*/function PictTemplateProviderDataValueTree(pFable,pOptions,pServiceHash){var
|
|
6684
|
+
*/function PictTemplateProviderDataValueTree(pFable,pOptions,pServiceHash){var _this127;_classCallCheck2(this,PictTemplateProviderDataValueTree);_this127=_callSuper(this,PictTemplateProviderDataValueTree,[pFable,pOptions,pServiceHash]);/** @type {any} */_this127.log;_this127.addPattern('{~DataTree:','~}');_this127.addPattern('{~DT:','~}');return _this127;}/**
|
|
6651
6685
|
* Render a template expression, returning a string with the resulting content.
|
|
6652
6686
|
*
|
|
6653
6687
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6669,11 +6703,11 @@ tmpPictObjectWrapTemplate="<div class=\"PICT PICTObjectSet\">{~D:Record.ObjectVa
|
|
|
6669
6703
|
*
|
|
6670
6704
|
* @return {string} The rendered template
|
|
6671
6705
|
*/},{key:"dataValueTreeObjectSet",value:function dataValueTreeObjectSet(pObject,pRootObject,pCurrentDepth,pMaxDepth,pContextArray,pScope){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
|
|
6672
|
-
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);}return tmpTemplateResult;}}]);}(libPictTemplate);module.exports=PictTemplateProviderDataValueTree;},{"pict-template":143}],
|
|
6706
|
+
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);}return tmpTemplateResult;}}]);}(libPictTemplate);module.exports=PictTemplateProviderDataValueTree;},{"pict-template":143}],243:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderLogStatement=/*#__PURE__*/function(_libPictTemplate32){/**
|
|
6673
6707
|
* @param {Object} pFable - The Fable Framework instance
|
|
6674
6708
|
* @param {Object} pOptions - The options for the service
|
|
6675
6709
|
* @param {String} pServiceHash - The hash of the service
|
|
6676
|
-
*/function PictTemplateProviderLogStatement(pFable,pOptions,pServiceHash){var
|
|
6710
|
+
*/function PictTemplateProviderLogStatement(pFable,pOptions,pServiceHash){var _this128;_classCallCheck2(this,PictTemplateProviderLogStatement);_this128=_callSuper(this,PictTemplateProviderLogStatement,[pFable,pOptions,pServiceHash]);/** @type {any} */_this128.log;_this128.addPattern('{~LogStatement:','~}');_this128.addPattern('{~LS:','~}');return _this128;}/**
|
|
6677
6711
|
* Render a template expression, returning a string with the resulting content.
|
|
6678
6712
|
*
|
|
6679
6713
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6682,11 +6716,11 @@ tmpPictObjectBranchTemplate="\n<div class=\"PICTObjectBranchDepth_{~D:Record.Cur
|
|
|
6682
6716
|
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
6683
6717
|
*
|
|
6684
6718
|
* @return {string} The rendered template
|
|
6685
|
-
*/_inherits(PictTemplateProviderLogStatement,_libPictTemplate32);return _createClass2(PictTemplateProviderLogStatement,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){var tmpHash=pTemplateHash.trim();this.log.trace("PICT Template Log Message: ".concat(tmpHash));return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderLogStatement;},{"pict-template":143}],
|
|
6719
|
+
*/_inherits(PictTemplateProviderLogStatement,_libPictTemplate32);return _createClass2(PictTemplateProviderLogStatement,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){var tmpHash=pTemplateHash.trim();this.log.trace("PICT Template Log Message: ".concat(tmpHash));return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderLogStatement;},{"pict-template":143}],244:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderLogValue=/*#__PURE__*/function(_libPictTemplate33){/**
|
|
6686
6720
|
* @param {Object} pFable - The Fable Framework instance
|
|
6687
6721
|
* @param {Object} pOptions - The options for the service
|
|
6688
6722
|
* @param {String} pServiceHash - The hash of the service
|
|
6689
|
-
*/function PictTemplateProviderLogValue(pFable,pOptions,pServiceHash){var
|
|
6723
|
+
*/function PictTemplateProviderLogValue(pFable,pOptions,pServiceHash){var _this129;_classCallCheck2(this,PictTemplateProviderLogValue);_this129=_callSuper(this,PictTemplateProviderLogValue,[pFable,pOptions,pServiceHash]);/** @type {any} */_this129.log;_this129.addPattern('{~LogValue:','~}');_this129.addPattern('{~LV:','~}');return _this129;}/**
|
|
6690
6724
|
* Render a template expression, returning a string with the resulting content.
|
|
6691
6725
|
*
|
|
6692
6726
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6695,11 +6729,11 @@ tmpPictObjectBranchTemplate="\n<div class=\"PICTObjectBranchDepth_{~D:Record.Cur
|
|
|
6695
6729
|
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
6696
6730
|
*
|
|
6697
6731
|
* @return {string} The rendered template
|
|
6698
|
-
*/_inherits(PictTemplateProviderLogValue,_libPictTemplate33);return _createClass2(PictTemplateProviderLogValue,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray,null,pScope);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}],
|
|
6732
|
+
*/_inherits(PictTemplateProviderLogValue,_libPictTemplate33);return _createClass2(PictTemplateProviderLogValue,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray,null,pScope);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}],245:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderLogValueTree=/*#__PURE__*/function(_libPictTemplate34){/**
|
|
6699
6733
|
* @param {Object} pFable - The Fable Framework instance
|
|
6700
6734
|
* @param {Object} pOptions - The options for the service
|
|
6701
6735
|
* @param {String} pServiceHash - The hash of the service
|
|
6702
|
-
*/function PictTemplateProviderLogValueTree(pFable,pOptions,pServiceHash){var
|
|
6736
|
+
*/function PictTemplateProviderLogValueTree(pFable,pOptions,pServiceHash){var _this130;_classCallCheck2(this,PictTemplateProviderLogValueTree);_this130=_callSuper(this,PictTemplateProviderLogValueTree,[pFable,pOptions,pServiceHash]);/** @type {any} */_defineProperty2(_this130,"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;}_this130.log.trace("[".concat(pBaseAddress,".").concat(tmpObjectValueKeys[i],"] (").concat(tmpBranchType,"): ").concat(tmpBranchValue));if(pCurrentDepth+1>pMaxDepth){return'';}else if(tmpBranchType=='object'){tmpBranchValue=_this130.logValueTreeObjectSet(pObject[tmpObjectValueKeys[i]],"".concat(pBaseAddress,".").concat(tmpObjectValueKeys[i]),pRootObject,pCurrentDepth+1,pMaxDepth);}}return'';});_this130.log;_this130.addPattern('{~LogValueTree:','~}');_this130.addPattern('{~LVT:','~}');return _this130;}/**
|
|
6703
6737
|
* Render a template expression, returning a string with the resulting content.
|
|
6704
6738
|
*
|
|
6705
6739
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6708,11 +6742,11 @@ tmpPictObjectBranchTemplate="\n<div class=\"PICTObjectBranchDepth_{~D:Record.Cur
|
|
|
6708
6742
|
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
6709
6743
|
*
|
|
6710
6744
|
* @return {string} The rendered template
|
|
6711
|
-
*/_inherits(PictTemplateProviderLogValueTree,_libPictTemplate34);return _createClass2(PictTemplateProviderLogValueTree,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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);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}],
|
|
6745
|
+
*/_inherits(PictTemplateProviderLogValueTree,_libPictTemplate34);return _createClass2(PictTemplateProviderLogValueTree,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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);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}],246:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderNotEmpty=/*#__PURE__*/function(_libPictTemplate35){/**
|
|
6712
6746
|
* @param {Object} pFable - The Fable Framework instance
|
|
6713
6747
|
* @param {Object} pOptions - The options for the service
|
|
6714
6748
|
* @param {String} pServiceHash - The hash of the service
|
|
6715
|
-
*/function PictTemplateProviderNotEmpty(pFable,pOptions,pServiceHash){var
|
|
6749
|
+
*/function PictTemplateProviderNotEmpty(pFable,pOptions,pServiceHash){var _this131;_classCallCheck2(this,PictTemplateProviderNotEmpty);_this131=_callSuper(this,PictTemplateProviderNotEmpty,[pFable,pOptions,pServiceHash]);/** @type {any} */_this131.log;_this131.addPattern('{~NotEmpty:','~}');_this131.addPattern('{~NE:','~}');return _this131;}/**
|
|
6716
6750
|
* Render a template expression, returning a string with the resulting content.
|
|
6717
6751
|
*
|
|
6718
6752
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6722,15 +6756,15 @@ tmpPictObjectBranchTemplate="\n<div class=\"PICTObjectBranchDepth_{~D:Record.Cur
|
|
|
6722
6756
|
*
|
|
6723
6757
|
* @return {string} The rendered template
|
|
6724
6758
|
*/_inherits(PictTemplateProviderNotEmpty,_libPictTemplate35);return _createClass2(PictTemplateProviderNotEmpty,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray,pScope){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.
|
|
6725
|
-
if(this.resolveStateFromAddress(tmpHashParts[0],tmpData,pContextArray,null,pScope)){return tmpHashParts[1];}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderNotEmpty;},{"pict-template":143}],
|
|
6759
|
+
if(this.resolveStateFromAddress(tmpHashParts[0],tmpData,pContextArray,null,pScope)){return tmpHashParts[1];}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderNotEmpty;},{"pict-template":143}],247:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateIfBase=/*#__PURE__*/function(_libPictTemplate36){/**
|
|
6726
6760
|
* @param {Object} pFable - The Fable Framework instance
|
|
6727
6761
|
* @param {Object} pOptions - The options for the service
|
|
6728
6762
|
* @param {String} pServiceHash - The hash of the service
|
|
6729
|
-
*/function PictTemplateProviderTemplateIfBase(pFable,pOptions,pServiceHash){_classCallCheck2(this,PictTemplateProviderTemplateIfBase);return _callSuper(this,PictTemplateProviderTemplateIfBase,[pFable,pOptions,pServiceHash]);}_inherits(PictTemplateProviderTemplateIfBase,_libPictTemplate36);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}],
|
|
6763
|
+
*/function PictTemplateProviderTemplateIfBase(pFable,pOptions,pServiceHash){_classCallCheck2(this,PictTemplateProviderTemplateIfBase);return _callSuper(this,PictTemplateProviderTemplateIfBase,[pFable,pOptions,pServiceHash]);}_inherits(PictTemplateProviderTemplateIfBase,_libPictTemplate36);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}],248:[function(require,module,exports){var libPictTemplateIf=require('./Pict-Template-TemplateIf-Base.js');var PictTemplateProviderTemplateIf=/*#__PURE__*/function(_libPictTemplateIf){/**
|
|
6730
6764
|
* @param {Object} pFable - The Fable Framework instance
|
|
6731
6765
|
* @param {Object} pOptions - The options for the service
|
|
6732
6766
|
* @param {String} pServiceHash - The hash of the service
|
|
6733
|
-
*/function PictTemplateProviderTemplateIf(pFable,pOptions,pServiceHash){var
|
|
6767
|
+
*/function PictTemplateProviderTemplateIf(pFable,pOptions,pServiceHash){var _this132;_classCallCheck2(this,PictTemplateProviderTemplateIf);_this132=_callSuper(this,PictTemplateProviderTemplateIf,[pFable,pOptions,pServiceHash]);/** @type {any} */_this132.log;_this132.addPattern('{~TemplateIf:','~}');_this132.addPattern('{~TIf:','~}');return _this132;}/**
|
|
6734
6768
|
* Render a template expression, returning a string with the resulting content.
|
|
6735
6769
|
*
|
|
6736
6770
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6759,11 +6793,11 @@ if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not reso
|
|
|
6759
6793
|
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...
|
|
6760
6794
|
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
|
|
6761
6795
|
try{// This is the only thing that's different from the absolute value function above. Collapse these.
|
|
6762
|
-
var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray,null,pScope),tmpComparisonParts[1],this.resolveStateFromAddress(tmpComparisonParts[2],tmpData,pContextArray,null,pScope));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);}else{this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}}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":
|
|
6796
|
+
var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray,null,pScope),tmpComparisonParts[1],this.resolveStateFromAddress(tmpComparisonParts[2],tmpData,pContextArray,null,pScope));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);}else{this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}}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":247}],249:[function(require,module,exports){var libPictTemplateIf=require('./Pict-Template-TemplateIf-Base.js');var PictTemplateProviderTemplateIfAbsolute=/*#__PURE__*/function(_libPictTemplateIf2){/**
|
|
6763
6797
|
* @param {Object} pFable - The Fable Framework instance
|
|
6764
6798
|
* @param {Object} pOptions - The options for the service
|
|
6765
6799
|
* @param {String} pServiceHash - The hash of the service
|
|
6766
|
-
*/function PictTemplateProviderTemplateIfAbsolute(pFable,pOptions,pServiceHash){var
|
|
6800
|
+
*/function PictTemplateProviderTemplateIfAbsolute(pFable,pOptions,pServiceHash){var _this133;_classCallCheck2(this,PictTemplateProviderTemplateIfAbsolute);_this133=_callSuper(this,PictTemplateProviderTemplateIfAbsolute,[pFable,pOptions,pServiceHash]);/** @type {any} */_this133.log;_this133.addPattern('{~TemplateIfAbsolute:','~}');_this133.addPattern('{~TIfAbs:','~}');return _this133;}/**
|
|
6767
6801
|
* Render a template expression, returning a string with the resulting content.
|
|
6768
6802
|
*
|
|
6769
6803
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6791,5 +6825,5 @@ return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray,
|
|
|
6791
6825
|
if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return tmpCallback(null,'');}// No comparison operation
|
|
6792
6826
|
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...
|
|
6793
6827
|
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
|
|
6794
|
-
try{var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray,null,pScope),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);}else{this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}}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":
|
|
6828
|
+
try{var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray,null,pScope),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);}else{this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray,pScope);}}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":247}]},{},[199])(199);});
|
|
6795
6829
|
//# sourceMappingURL=pict.compatible.js.map
|