pict 1.0.276 → 1.0.278
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 +142 -100
- package/dist/pict.compatible.js.map +1 -1
- package/dist/pict.compatible.min.js +2 -2
- package/dist/pict.compatible.min.js.map +1 -1
- package/dist/pict.js +97 -55
- 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 +5 -5
- package/source/Pict.js +2 -0
- package/source/providers/Provider-DataBroker.js +89 -0
- package/test/Pict_DataBroker_tests.js +82 -0
- package/test/Pict_provider_tests.js +2 -2
package/dist/pict.compatible.js
CHANGED
|
@@ -751,7 +751,7 @@ return[this._HexLookup[pBuffer[i++]],this._HexLookup[pBuffer[i++]],this._HexLook
|
|
|
751
751
|
tmpRandomBytes[6]=tmpRandomBytes[6]&0x0f|0x40;tmpRandomBytes[8]=tmpRandomBytes[8]&0x3f|0x80;return this.bytesToUUID(tmpRandomBytes);}// Simple random UUID generation
|
|
752
752
|
},{key:"generateRandom",value:function generateRandom(){var tmpUUID='';for(var i=0;i<this._UUIDLength;i++){tmpUUID+=this._UUIDRandomDictionary.charAt(Math.floor(Math.random()*(this._UUIDRandomDictionary.length-1)));}return tmpUUID;}// Adapted from node-uuid (https://github.com/kelektiv/node-uuid)
|
|
753
753
|
},{key:"getUUID",value:function getUUID(){if(this._UUIDModeRandom){return this.generateRandom();}else{return this.generateUUIDv4();}}}]);}(libFableServiceProviderBase);// This is for backwards compatibility
|
|
754
|
-
function autoConstruct(pSettings){return new FableUUID(pSettings);}module.exports=FableUUID;module.exports["new"]=autoConstruct;},{"../package.json":64,"./Fable-UUID-Random.js":65,"fable-serviceproviderbase":59}],67:[function(require,module,exports){module.exports={"name":"fable","version":"3.1.
|
|
754
|
+
function autoConstruct(pSettings){return new FableUUID(pSettings);}module.exports=FableUUID;module.exports["new"]=autoConstruct;},{"../package.json":64,"./Fable-UUID-Random.js":65,"fable-serviceproviderbase":59}],67:[function(require,module,exports){module.exports={"name":"fable","version":"3.1.16","description":"A service dependency injection, configuration and logging library.","main":"source/Fable.js","scripts":{"start":"node source/Fable.js","coverage":"./node_modules/.bin/nyc --reporter=lcov --reporter=text-lcov ./node_modules/mocha/bin/_mocha -- -u tdd -R spec","test":"./node_modules/.bin/mocha -u tdd -R spec","build":"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t fable-image:local","docker-dev-run":"docker run -it -d --name fable-dev -p 30001:8080 -p 38086:8086 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/fable\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" fable-image:local","docker-dev-shell":"docker exec -it fable-dev /bin/bash","tests":"./node_modules/mocha/bin/_mocha -u tdd --exit -R spec --grep"},"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"]},"browser":{"./source/service/Fable-Service-EnvironmentData.js":"./source/service/Fable-Service-EnvironmentData-Web.js","./source/service/Fable-Service-FilePersistence.js":"./source/service/Fable-Service-FilePersistence-Web.js"},"repository":{"type":"git","url":"https://github.com/stevenvelozo/fable.git"},"keywords":["entity","behavior"],"author":"Steven Velozo <steven@velozo.com> (http://velozo.com/)","license":"MIT","bugs":{"url":"https://github.com/stevenvelozo/fable/issues"},"homepage":"https://github.com/stevenvelozo/fable","devDependencies":{"quackage":"^1.0.42"},"dependencies":{"async.eachlimit":"^0.5.2","async.waterfall":"^0.5.2","big.js":"^6.2.2","cachetrax":"^1.0.4","cookie":"^0.6.0","data-arithmatic":"^1.0.7","dayjs":"^1.11.13","fable-log":"^3.0.16","fable-serviceproviderbase":"^3.0.15","fable-settings":"^3.0.12","fable-uuid":"^3.0.11","manyfest":"^1.0.41","simple-get":"^4.0.1"}};},{}],68:[function(require,module,exports){/**
|
|
755
755
|
* Fable Application Services Support Library
|
|
756
756
|
* @author <steven@velozo.com>
|
|
757
757
|
*/// Pre-init services
|
|
@@ -2361,7 +2361,8 @@ var _MockFable={DataFormat:require('./Manyfest-ObjectAddress-Parser.js')};/**
|
|
|
2361
2361
|
*
|
|
2362
2362
|
*
|
|
2363
2363
|
* @class ManyfestObjectAddressResolverCheckAddressExists
|
|
2364
|
-
*/var ManyfestObjectAddressResolverCheckAddressExists=/*#__PURE__*/function(){function ManyfestObjectAddressResolverCheckAddressExists(){_classCallCheck2(this,ManyfestObjectAddressResolverCheckAddressExists)
|
|
2364
|
+
*/var ManyfestObjectAddressResolverCheckAddressExists=/*#__PURE__*/function(){function ManyfestObjectAddressResolverCheckAddressExists(pInfoLog,pErrorLog){_classCallCheck2(this,ManyfestObjectAddressResolverCheckAddressExists);// Wire in logging
|
|
2365
|
+
this.logInfo=typeof pInfoLog=='function'?pInfoLog:libSimpleLog;this.logError=typeof pErrorLog=='function'?pErrorLog:libSimpleLog;this.getObjectValueClass=new libGetObjectValue(this.logInfo,this.logError);}// Check if an address exists.
|
|
2365
2366
|
//
|
|
2366
2367
|
// This is necessary because the getValueAtAddress function is ambiguous on
|
|
2367
2368
|
// whether the element/property is actually there or not (it returns
|
|
@@ -3083,10 +3084,20 @@ var tmpManyfestSchemaDescriptors=JSON.parse(JSON.stringify(pManyfestSchemaDescri
|
|
|
3083
3084
|
var tmpDescriptorAddresses=Object.keys(tmpSource);tmpDescriptorAddresses.forEach(function(pDescriptorAddress){if(!(pDescriptorAddress in tmpNewManyfestSchemaDescriptors)){tmpNewManyfestSchemaDescriptors[pDescriptorAddress]=tmpSource[pDescriptorAddress];}});return tmpNewManyfestSchemaDescriptors;}}]);}();module.exports=ManyfestSchemaManipulation;},{"./Manyfest-LogToConsole.js":117}],126:[function(require,module,exports){/**
|
|
3084
3085
|
* @author <steven@velozo.com>
|
|
3085
3086
|
*/var libFableServiceProviderBase=require('fable-serviceproviderbase');var libSimpleLog=require('./Manyfest-LogToConsole.js');var libHashTranslation=require('./Manyfest-HashTranslation.js');var libObjectAddressCheckAddressExists=require('./Manyfest-ObjectAddress-CheckAddressExists.js');var libObjectAddressGetValue=require('./Manyfest-ObjectAddress-GetValue.js');var libObjectAddressSetValue=require('./Manyfest-ObjectAddress-SetValue.js');var libObjectAddressDeleteValue=require('./Manyfest-ObjectAddress-DeleteValue.js');var libObjectAddressGeneration=require('./Manyfest-ObjectAddressGeneration.js');var libSchemaManipulation=require('./Manyfest-SchemaManipulation.js');var _DefaultConfiguration={Scope:'DEFAULT',Descriptors:{}};/**
|
|
3087
|
+
* @typedef {{
|
|
3088
|
+
* Hash?: string,
|
|
3089
|
+
* Name?: string,
|
|
3090
|
+
* DataType?: string,
|
|
3091
|
+
* Required?: boolean,
|
|
3092
|
+
* Address?: string,
|
|
3093
|
+
* Description?: string,
|
|
3094
|
+
* [key: string]: any,
|
|
3095
|
+
* }} ManifestDescriptor
|
|
3096
|
+
*//**
|
|
3086
3097
|
* Manyfest object address-based descriptions and manipulations.
|
|
3087
3098
|
*
|
|
3088
3099
|
* @class Manyfest
|
|
3089
|
-
*/var Manyfest=/*#__PURE__*/function(_libFableServiceProvi0){function Manyfest(pFable,pManifest,pServiceHash){var _this48;_classCallCheck2(this,Manyfest);if(pFable===undefined){_this48=_callSuper(this,Manyfest,[{}]);}else{_this48=_callSuper(this,Manyfest,[pFable,pManifest,pServiceHash]);}_this48.serviceType='Manifest';// Wire in logging
|
|
3100
|
+
*/var Manyfest=/*#__PURE__*/function(_libFableServiceProvi0){function Manyfest(pFable,pManifest,pServiceHash){var _this48;_classCallCheck2(this,Manyfest);if(pFable===undefined){_this48=_callSuper(this,Manyfest,[{}]);}else{_this48=_callSuper(this,Manyfest,[pFable,pManifest,pServiceHash]);}/** @type {Record<string, any>} */_this48.options;_this48.serviceType='Manifest';// Wire in logging
|
|
3090
3101
|
_this48.logInfo=libSimpleLog;_this48.logError=libSimpleLog;// Create an object address resolver and map in the functions
|
|
3091
3102
|
_this48.objectAddressCheckAddressExists=new libObjectAddressCheckAddressExists(_this48.logInfo,_this48.logError);_this48.objectAddressGetValue=new libObjectAddressGetValue(_this48.logInfo,_this48.logError);_this48.objectAddressSetValue=new libObjectAddressSetValue(_this48.logInfo,_this48.logError);_this48.objectAddressDeleteValue=new libObjectAddressDeleteValue(_this48.logInfo,_this48.logError);if(!('defaultValues'in _this48.options)){_this48.options.defaultValues={"String":"","Number":0,"Float":0.0,"Integer":0,"PreciseNumber":"0.0","Boolean":false,"Binary":0,"DateTime":0,"Array":[],"Object":{},"Null":null};}if(!('strict'in _this48.options)){_this48.options.strict=false;}_this48.scope=undefined;_this48.elementAddresses=undefined;_this48.elementHashes=undefined;_this48.elementDescriptors=undefined;_this48.reset();if(_typeof(_this48.options)==='object'){_this48.loadManifest(_this48.options);}_this48.schemaManipulations=new libSchemaManipulation(_this48.logInfo,_this48.logError);_this48.objectAddressGeneration=new libObjectAddressGeneration(_this48.logInfo,_this48.logError);_this48.hashTranslations=new libHashTranslation(_this48.logInfo,_this48.logError);_this48.numberRegex=/^[+-]?(\d+(\.\d*)?|\.\d+)([eE][+-]?\d+)?$/;return _assertThisInitialized(_this48);}/*************************************************************************
|
|
3092
3103
|
* Schema Manifest Loading, Reading, Manipulation and Serialization Functions
|
|
@@ -3098,14 +3109,28 @@ tmpNewManyfest.hashTranslations.addTranslation(this.hashTranslations.translation
|
|
|
3098
3109
|
return this.loadManifest(JSON.parse(pManifestString));}// Load a manifest from an object
|
|
3099
3110
|
},{key:"loadManifest",value:function loadManifest(pManifest){if(_typeof(pManifest)!=='object'){this.logError("(".concat(this.scope,") Error loading manifest; expecting an object but parameter was type ").concat(_typeof(pManifest),"."));}var tmpManifest=_typeof(pManifest)=='object'?pManifest:{};var tmpDescriptorKeys=Object.keys(_DefaultConfiguration);for(var i=0;i<tmpDescriptorKeys.length;i++){if(!(tmpDescriptorKeys[i]in tmpManifest)){tmpManifest[tmpDescriptorKeys[i]]=JSON.parse(JSON.stringify(_DefaultConfiguration[tmpDescriptorKeys[i]]));}}if('Scope'in tmpManifest){if(typeof tmpManifest.Scope==='string'){this.scope=tmpManifest.Scope;}else{this.logError("(".concat(this.scope,") Error loading scope from manifest; expecting a string but property was type ").concat(_typeof(tmpManifest.Scope),"."),tmpManifest);}}else{this.logError("(".concat(this.scope,") Error loading scope from manifest object. Property \"Scope\" does not exist in the root of the object."),tmpManifest);}if('Descriptors'in tmpManifest){if(_typeof(tmpManifest.Descriptors)==='object'){var tmpDescriptionAddresses=Object.keys(tmpManifest.Descriptors);for(var _i31=0;_i31<tmpDescriptionAddresses.length;_i31++){this.addDescriptor(tmpDescriptionAddresses[_i31],tmpManifest.Descriptors[tmpDescriptionAddresses[_i31]]);}}else{this.logError("(".concat(this.scope,") Error loading description object from manifest object. Expecting an object in 'Manifest.Descriptors' but the property was type ").concat(_typeof(tmpManifest.Descriptors),"."),tmpManifest);}}else{this.logError("(".concat(this.scope,") Error loading object description from manifest object. Property \"Descriptors\" does not exist in the root of the Manifest object."),tmpManifest);}if('HashTranslations'in tmpManifest){if(_typeof(tmpManifest.HashTranslations)==='object'){for(var _i32=0;_i32<tmpManifest.HashTranslations.length;_i32++){// Each translation is
|
|
3100
3111
|
}}}}// Serialize the Manifest to a string
|
|
3101
|
-
},{key:"serialize",value:function serialize(){return JSON.stringify(this.getManifest());}},{key:"getManifest",value:function getManifest(){return{Scope:this.scope,Descriptors:JSON.parse(JSON.stringify(this.elementDescriptors)),HashTranslations:JSON.parse(JSON.stringify(this.hashTranslations.translationTable))};}
|
|
3102
|
-
|
|
3112
|
+
},{key:"serialize",value:function serialize(){return JSON.stringify(this.getManifest());}},{key:"getManifest",value:function getManifest(){return{Scope:this.scope,Descriptors:JSON.parse(JSON.stringify(this.elementDescriptors)),HashTranslations:JSON.parse(JSON.stringify(this.hashTranslations.translationTable))};}/**
|
|
3113
|
+
* Add a descriptor to the manifest
|
|
3114
|
+
*
|
|
3115
|
+
* @param {string} pAddress - The address of the element to add the descriptor for.
|
|
3116
|
+
* @param {ManifestDescriptor} pDescriptor - The descriptor object to add.
|
|
3117
|
+
*/},{key:"addDescriptor",value:function addDescriptor(pAddress,pDescriptor){if(_typeof(pDescriptor)==='object'){// Add the Address into the Descriptor if it doesn't exist:
|
|
3103
3118
|
if(!('Address'in pDescriptor)){pDescriptor.Address=pAddress;}if(!(pAddress in this.elementDescriptors)){this.elementAddresses.push(pAddress);}// Add the element descriptor to the schema
|
|
3104
3119
|
this.elementDescriptors[pAddress]=pDescriptor;// Always add the address as a hash
|
|
3105
3120
|
this.elementHashes[pAddress]=pAddress;if('Hash'in pDescriptor){// TODO: Check if this is a good idea or not..
|
|
3106
3121
|
// Collisions are bound to happen with both representations of the address/hash in here and developers being able to create their own hashes.
|
|
3107
|
-
this.elementHashes[pDescriptor.Hash]=pAddress;}else{pDescriptor.Hash=pAddress;}return true;}else{this.logError("(".concat(this.scope,") Error loading object descriptor for address '").concat(pAddress,"' from manifest object. Expecting an object but property was type ").concat(_typeof(pDescriptor),"."));return false;}}
|
|
3108
|
-
|
|
3122
|
+
this.elementHashes[pDescriptor.Hash]=pAddress;}else{pDescriptor.Hash=pAddress;}return true;}else{this.logError("(".concat(this.scope,") Error loading object descriptor for address '").concat(pAddress,"' from manifest object. Expecting an object but property was type ").concat(_typeof(pDescriptor),"."));return false;}}/**
|
|
3123
|
+
* @param {string} pHash - The hash of the address to resolve.
|
|
3124
|
+
*
|
|
3125
|
+
* @return {ManifestDescriptor} The descriptor for the address
|
|
3126
|
+
*/},{key:"getDescriptorByHash",value:function getDescriptorByHash(pHash){return this.getDescriptor(this.resolveHashAddress(pHash));}/**
|
|
3127
|
+
* @param {string} pAddress - The address of the element to get the descriptor for.
|
|
3128
|
+
*
|
|
3129
|
+
* @return {ManifestDescriptor} The descriptor for the address
|
|
3130
|
+
*/},{key:"getDescriptor",value:function getDescriptor(pAddress){return this.elementDescriptors[pAddress];}/**
|
|
3131
|
+
* execute an action function for each descriptor
|
|
3132
|
+
* @param {(d: ManifestDescriptor) => void} fAction - The action function to execute for each descriptor.
|
|
3133
|
+
*/},{key:"eachDescriptor",value:function eachDescriptor(fAction){var tmpDescriptorAddresses=Object.keys(this.elementDescriptors);for(var i=0;i<tmpDescriptorAddresses.length;i++){fAction(this.elementDescriptors[tmpDescriptorAddresses[i]]);}}/*************************************************************************
|
|
3109
3134
|
* Beginning of Object Manipulation (read & write) Functions
|
|
3110
3135
|
*/// Check if an element exists by its hash
|
|
3111
3136
|
},{key:"checkAddressExistsByHash",value:function checkAddressExistsByHash(pObject,pHash){return this.checkAddressExists(pObject,this.resolveHashAddress(pHash));}// Check if an element exists at an address
|
|
@@ -3131,8 +3156,11 @@ tmpValidationData.MissingElements.push(tmpDescriptor.Address);if(tmpDescriptor.R
|
|
|
3131
3156
|
if(tmpDescriptor.DataType){var tmpElementType=_typeof(tmpValue);switch(tmpDescriptor.DataType.toString().trim().toLowerCase()){case'string':if(tmpElementType!='string'){addValidationError(tmpDescriptor.Address,"has a DataType ".concat(tmpDescriptor.DataType," but is of the type ").concat(tmpElementType));}break;case"precisenumber":if(tmpElementType!='string'){addValidationError(tmpDescriptor.Address,"has a DataType ".concat(tmpDescriptor.DataType," but is of the type ").concat(tmpElementType));}else if(!this.numberRegex.test(tmpValue)){addValidationError(tmpDescriptor.Address,"has a DataType ".concat(tmpDescriptor.DataType," but is not a valid number"));}break;case'number':if(tmpElementType!='number'){addValidationError(tmpDescriptor.Address,"has a DataType ".concat(tmpDescriptor.DataType," but is of the type ").concat(tmpElementType));}break;case'integer':if(tmpElementType!='number'){addValidationError(tmpDescriptor.Address,"has a DataType ".concat(tmpDescriptor.DataType," but is of the type ").concat(tmpElementType));}else{var tmpValueString=tmpValue.toString();if(tmpValueString.indexOf('.')>-1){// TODO: Is this an error?
|
|
3132
3157
|
addValidationError(tmpDescriptor.Address,"has a DataType ".concat(tmpDescriptor.DataType," but has a decimal point in the number."));}}break;case'float':if(tmpElementType!='number'){addValidationError(tmpDescriptor.Address,"has a DataType ".concat(tmpDescriptor.DataType," but is of the type ").concat(tmpElementType));}break;case'datetime':var tmpValueDate=new Date(tmpValue);if(tmpValueDate.toString()=='Invalid Date'){addValidationError(tmpDescriptor.Address,"has a DataType ".concat(tmpDescriptor.DataType," but is not parsable as a Date by Javascript"));}default:// Check if this is a string, in the default case
|
|
3133
3158
|
// Note this is only when a DataType is specified and it is an unrecognized data type.
|
|
3134
|
-
if(tmpElementType!='string'){addValidationError(tmpDescriptor.Address,"has a DataType ".concat(tmpDescriptor.DataType," (which auto-converted to String because it was unrecognized) but is of the type ").concat(tmpElementType));}break;}}}return tmpValidationData;}
|
|
3135
|
-
|
|
3159
|
+
if(tmpElementType!='string'){addValidationError(tmpDescriptor.Address,"has a DataType ".concat(tmpDescriptor.DataType," (which auto-converted to String because it was unrecognized) but is of the type ").concat(tmpElementType));}break;}}}return tmpValidationData;}/**
|
|
3160
|
+
* Returns a default value, or, the default value for the data type (which is overridable with configuration)
|
|
3161
|
+
*
|
|
3162
|
+
* @param {ManifestDescriptor} pDescriptor - The descriptor definition.
|
|
3163
|
+
*/},{key:"getDefaultValue",value:function getDefaultValue(pDescriptor){if(_typeof(pDescriptor)!='object'){return undefined;}if('Default'in pDescriptor){return pDescriptor.Default;}else{// Default to a null if it doesn't have a type specified.
|
|
3136
3164
|
// This will ensure a placeholder is created but isn't misinterpreted.
|
|
3137
3165
|
var tmpDataType='DataType'in pDescriptor?pDescriptor.DataType:'String';if(tmpDataType in this.options.defaultValues){return this.options.defaultValues[tmpDataType];}else{// give up and return null
|
|
3138
3166
|
return null;}}}// Enumerate through the schema and populate default values if they don't exist.
|
|
@@ -5073,7 +5101,7 @@ try{if(!global.localStorage)return false;}catch(_){return false;}var val=global.
|
|
|
5073
5101
|
// presumably different callback function.
|
|
5074
5102
|
// This makes sure that own properties are retained, so that
|
|
5075
5103
|
// decorations and such are not lost along the way.
|
|
5076
|
-
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.
|
|
5104
|
+
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.278","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.16","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.
|
|
5077
5105
|
/* global Pict, _Pict: writeable *//**
|
|
5078
5106
|
* Simple function to load a pict Application
|
|
5079
5107
|
*
|
|
@@ -5406,7 +5434,7 @@ if(!(pTemplateHash in this.templates)){this.checkDefaultTemplateHash(pTemplateHa
|
|
|
5406
5434
|
* },
|
|
5407
5435
|
* MetaTemplate: any,
|
|
5408
5436
|
* }} Fable
|
|
5409
|
-
*//** @type {{ new(...args: any[]): Fable }} */var libFable=require('fable');var libPackage=require('../package.json');var libProviderFilterManager=require('./providers/Provider-Filter-Manager.js');var PictTemplateProvider=require('./Pict-Template-Provider.js');var PictContentAssignment=require('./Pict-Content-Assignment.js');var PictDataProvider=require('./Pict-DataProvider.js');var PictCSS=require('./Pict-CSS.js');var PictMeadowEntityProvider=require('./Pict-Meadow-EntityProvider.js');/**
|
|
5437
|
+
*//** @type {{ new(...args: any[]): Fable }} */var libFable=require('fable');var libPackage=require('../package.json');var libProviderFilterManager=require('./providers/Provider-Filter-Manager.js');var libProviderDataBroker=require('./providers/Provider-DataBroker.js');var PictTemplateProvider=require('./Pict-Template-Provider.js');var PictContentAssignment=require('./Pict-Content-Assignment.js');var PictDataProvider=require('./Pict-DataProvider.js');var PictCSS=require('./Pict-CSS.js');var PictMeadowEntityProvider=require('./Pict-Meadow-EntityProvider.js');/**
|
|
5410
5438
|
* Pict management object.
|
|
5411
5439
|
*/var Pict=/*#__PURE__*/function(_libFable){/**
|
|
5412
5440
|
* @param {Object<String, any>} pSettings - The settings for the Pict instance.
|
|
@@ -5438,7 +5466,7 @@ _this82.LogNoisiness=0;// Although we have log noisiness, sometimes we need cont
|
|
|
5438
5466
|
_this82.LogControlFlow=false;// And an easy way to be introspective about data at various locations
|
|
5439
5467
|
_this82.LogControlFlowWatchAddressList=[];// Load manifest sets
|
|
5440
5468
|
if(_this82.settings.Manifests){_this82.loadManifestSet(_this82.settings.Manifests);}_this82._DefaultPictTemplatesInitialized=false;_this82.initializePictTemplateEngine();_this82.addServiceType("PictView",require("pict-view"));_this82.addServiceType("PictProvider",require("pict-provider"));_this82.addServiceType("PictApplication",require("pict-application"));// Expose the named views directly, through a convenience accessor
|
|
5441
|
-
/** @type {{ FilterManager: libProviderFilterManager, [key: string]: any }} */_this82.providers=_this82.servicesMap.PictProvider;_this82.views=_this82.servicesMap.PictView;_this82.addProvider('FilterManager',{},libProviderFilterManager);return _this82;}/**
|
|
5469
|
+
/** @type {{ FilterManager: libProviderFilterManager, [key: string]: any }} */_this82.providers=_this82.servicesMap.PictProvider;_this82.views=_this82.servicesMap.PictView;_this82.addProvider('FilterManager',{},libProviderFilterManager);_this82.addProvider('DataBroker',{},libProviderDataBroker);return _this82;}/**
|
|
5442
5470
|
* Load manifests in as Hashed services
|
|
5443
5471
|
*
|
|
5444
5472
|
* @param {Object<String, String>} pManifestSet - The manifest set to load.
|
|
@@ -5623,7 +5651,7 @@ var tmpValue="";if(typeof fCallback=="function"){if(Array.isArray(pDataSet)||_ty
|
|
|
5623
5651
|
* @return {String?} The parsed template string, or undefined if a callback was provided
|
|
5624
5652
|
*/},{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
|
|
5625
5653
|
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
|
|
5626
|
-
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-Filter-Manager.js":
|
|
5654
|
+
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":209,"./templates/Pict-Template-DataValueByKey.js":210,"./templates/Pict-Template-DataWithTemplateFallback.js":211,"./templates/Pict-Template-Entity.js":212,"./templates/Pict-Template-Self.js":213,"./templates/Pict-Template-SolveByReference.js":214,"./templates/Pict-Template-Template.js":215,"./templates/Pict-Template-TemplateByDataAddress.js":216,"./templates/Pict-Template-TemplateByReference.js":217,"./templates/Pict-Template-TemplateFromMap.js":218,"./templates/Pict-Template-TemplateSet.js":219,"./templates/Pict-Template-TemplateSetFromMap.js":220,"./templates/Pict-Template-TemplateSetWithPayload.js":221,"./templates/Pict-Template-TemplateValueSet.js":222,"./templates/Pict-Template-View.js":223,"./templates/data-generation/Pict-Template-RandomNumber.js":224,"./templates/data-generation/Pict-Template-RandomNumberString.js":225,"./templates/data/Pict-Template-DataEncodeJavascriptString.js":226,"./templates/data/Pict-Template-DataJson.js":227,"./templates/data/Pict-Template-DateOnlyFormat.js":228,"./templates/data/Pict-Template-DateOnlyYMD.js":229,"./templates/data/Pict-Template-DateTimeFormat.js":230,"./templates/data/Pict-Template-DateTimeYMD.js":231,"./templates/data/Pict-Template-Digits.js":232,"./templates/data/Pict-Template-Dollars.js":233,"./templates/data/Pict-Template-HtmlCommentEnd.js":234,"./templates/data/Pict-Template-HtmlCommentStart.js":235,"./templates/data/Pict-Template-Join.js":236,"./templates/data/Pict-Template-JoinUnique.js":237,"./templates/data/Pict-Template-PascalCaseIdentifier.js":238,"./templates/data/Pict-Template-PluckJoinUnique.js":239,"./templates/debugging/Pict-Template-Breakpoint.js":240,"./templates/debugging/Pict-Template-DataValueTree.js":241,"./templates/debugging/Pict-Template-LogStatement.js":242,"./templates/debugging/Pict-Template-LogValue.js":243,"./templates/debugging/Pict-Template-LogValueTree.js":244,"./templates/logic/Pict-Template-NotEmpty.js":245,"./templates/logic/Pict-Template-TemplateIf.js":247,"./templates/logic/Pict-Template-TemplateIfAbsolute.js":248,"fable":68,"pict-application":139,"pict-provider":141,"pict-template":143,"pict-view":145}],200:[function(require,module,exports){/**
|
|
5627
5655
|
* Pict browser shim loader
|
|
5628
5656
|
* @author <steven@velozo.com>
|
|
5629
5657
|
*
|
|
@@ -5892,12 +5920,26 @@ if(!pFilterState.Filter){pFilterState.Filter="".concat(pFilterState.Entity||'Unk
|
|
|
5892
5920
|
* @param {import('../Pict.js')} pFable
|
|
5893
5921
|
*/function FilterClauseLocal(pFable){var _this89;_classCallCheck2(this,FilterClauseLocal);_this89=_callSuper(this,FilterClauseLocal,[pFable]);/** @type {import('./Filter.js').FilterType} */_this89._type='Match';/** @type {string} */_this89.filterByColumn;/** @type {boolean?} */_this89.exactMatch;/** @type {boolean?} */_this89.startExclusive;/** @type {boolean?} */_this89.endExclusive;return _this89;}/**
|
|
5894
5922
|
* @return {import('./FilterClauseBase.js').FilterClauseConfig}
|
|
5895
|
-
*/_inherits(FilterClauseLocal,_libFilterClauseBase3);return _createClass2(FilterClauseLocal,[{key:"generateFilterClauseConfig",value:function generateFilterClauseConfig(){switch(this._type){case'Match':case'StringMatch':case'DateMatch':case'NumericMatch':return{Type:this._type,Values:Array.isArray(this.values)?this.values:[],ExactMatch:this.exactMatch,FilterByColumn:this.filterByColumn};case'Range':case'StringRange':case'DateRange':case'NumericRange':return{Type:this._type,Values:Array.isArray(this.values)?{Start:undefined,End:undefined}:Object.assign({},this.values),StartExclusive:this.startExclusive,EndExclusive:this.endExclusive,FilterByColumn:this.filterByColumn};default:throw new Error("Unsupported filter type: ".concat(this.type));}}}]);}(libFilterClauseBase);module.exports=FilterClauseLocal;},{"./FilterClauseBase.js":203}],207:[function(require,module,exports){var libPictProvider=require('pict-provider')
|
|
5923
|
+
*/_inherits(FilterClauseLocal,_libFilterClauseBase3);return _createClass2(FilterClauseLocal,[{key:"generateFilterClauseConfig",value:function generateFilterClauseConfig(){switch(this._type){case'Match':case'StringMatch':case'DateMatch':case'NumericMatch':return{Type:this._type,Values:Array.isArray(this.values)?this.values:[],ExactMatch:this.exactMatch,FilterByColumn:this.filterByColumn};case'Range':case'StringRange':case'DateRange':case'NumericRange':return{Type:this._type,Values:Array.isArray(this.values)?{Start:undefined,End:undefined}:Object.assign({},this.values),StartExclusive:this.startExclusive,EndExclusive:this.endExclusive,FilterByColumn:this.filterByColumn};default:throw new Error("Unsupported filter type: ".concat(this.type));}}}]);}(libFilterClauseBase);module.exports=FilterClauseLocal;},{"./FilterClauseBase.js":203}],207:[function(require,module,exports){var libPictProvider=require('pict-provider');/** @type {Record<string, any>} */var _DEFAULT_PROVIDER_CONFIGURATION={ProviderIdentifier:'Pict-Provider-DataBroker',AutoInitialize:true,AutoInitializeOrdinal:0};var PictDataBrokerProvider=/*#__PURE__*/function(_libPictProvider){function PictDataBrokerProvider(pFable,pOptions,pServiceHash){var _this90;_classCallCheck2(this,PictDataBrokerProvider);var tmpOptions=Object.assign({},_DEFAULT_PROVIDER_CONFIGURATION,pOptions);_this90=_callSuper(this,PictDataBrokerProvider,[pFable,tmpOptions,pServiceHash]);/** @type {Record<string, any>} */_this90.options;/** @type {import('../Pict.js')} */_this90.pict;_this90.marshalDestination='AppData';return _this90;}/**
|
|
5924
|
+
* @param {string} pHash - The hash of the value to retrieve.
|
|
5925
|
+
*/_inherits(PictDataBrokerProvider,_libPictProvider);return _createClass2(PictDataBrokerProvider,[{key:"getValue",value:function getValue(pHash){return this.getValueByHash(pHash);}/**
|
|
5926
|
+
* @param {string} pHash - The hash of the value to retrieve.
|
|
5927
|
+
*/},{key:"getValueByHash",value:function getValueByHash(pHash){return this.pict.manifest.getValueByHash(this.getMarshalDestinationObject(),pHash);}/**
|
|
5928
|
+
* @param {string} pHash - The hash of the value to retrieve.
|
|
5929
|
+
* @param {any} pValue - The value to set.
|
|
5930
|
+
*/},{key:"setValue",value:function setValue(pHash,pValue){return this.setValueByHash(pHash,pValue);}/**
|
|
5931
|
+
* @param {string} pHash - The hash of the value to retrieve.
|
|
5932
|
+
* @param {any} pValue - The value to set.
|
|
5933
|
+
*/},{key:"setValueByHash",value:function setValueByHash(pHash,pValue){return this.pict.manifest.setValueByHash(this.getMarshalDestinationObject(),pHash,pValue);}/**
|
|
5934
|
+
* @param {string} pMarshalDestinationAddress - The address of the marshal destination.
|
|
5935
|
+
*/},{key:"marshalDestination",set:function set(pMarshalDestinationAddress){this._marshalDestination=pMarshalDestinationAddress;this._marshalDestinationObject=this.pict.resolveStateFromAddress(pMarshalDestinationAddress);if(!this._marshalDestinationObject){throw new Error("Invalid marshal destination address: ".concat(pMarshalDestinationAddress));}}/**
|
|
5936
|
+
* @return {Record<string, any>} - The marshal destination object.
|
|
5937
|
+
*/},{key:"marshalDestinationObject",get:function get(){return this._marshalDestinationObject;}},{key:"getMarshalDestinationObject",value:function getMarshalDestinationObject(){return this.marshalDestinationObject;}}]);}(libPictProvider);module.exports=PictDataBrokerProvider;module.exports.default_configuration=_DEFAULT_PROVIDER_CONFIGURATION;},{"pict-provider":141}],208:[function(require,module,exports){var libPictProvider=require('pict-provider');var libFilter=require('../filters/Filter.js');/** @type {Record<string, any>} */var _DEFAULT_PROVIDER_CONFIGURATION={ProviderIdentifier:'Pict-RecordSet-FilterManager',AutoInitialize:true,AutoInitializeOrdinal:0};var PictRecordSetFilterManager=/*#__PURE__*/function(_libPictProvider2){function PictRecordSetFilterManager(pFable,pOptions,pServiceHash){var _this91;_classCallCheck2(this,PictRecordSetFilterManager);var tmpOptions=Object.assign({},_DEFAULT_PROVIDER_CONFIGURATION,pOptions);_this91=_callSuper(this,PictRecordSetFilterManager,[pFable,tmpOptions,pServiceHash]);/** @type {Record<string, any>} */_this91.options;/** @type {import('../Pict.js')} */_this91.pict;_this91.filters={};_this91.filterCriteria={};return _this91;}/**
|
|
5896
5938
|
* @param {string} pFilterHash
|
|
5897
5939
|
* @param {Record<string, any>} pFilterConfig
|
|
5898
5940
|
*
|
|
5899
5941
|
* @return {void}
|
|
5900
|
-
*/_inherits(PictRecordSetFilterManager,
|
|
5942
|
+
*/_inherits(PictRecordSetFilterManager,_libPictProvider2);return _createClass2(PictRecordSetFilterManager,[{key:"addFilter",value:function addFilter(pFilterHash,pFilterConfig){if(!pFilterHash||typeof pFilterHash!=='string'){this.log.error('Invalid filter hash provided. It must be a non-empty string.');return;}if(!pFilterConfig||_typeof(pFilterConfig)!=='object'||!pFilterConfig.Type){this.log.error('Invalid filter configuration provided. It must be an object with a Type property.');return;}var tmpFilterConfig=JSON.parse(JSON.stringify(pFilterConfig));if(tmpFilterConfig.Hash&&tmpFilterConfig.Hash!==pFilterHash){this.log.warn("Filter configuration hash mismatch: provided ".concat(tmpFilterConfig.Hash,", expected ").concat(pFilterHash,". Overriding with provided hash."));}tmpFilterConfig.Hash=pFilterHash;this.filters[tmpFilterConfig.Hash]=tmpFilterConfig;}/**
|
|
5901
5943
|
* @param {string} pFilterCriteriaHash
|
|
5902
5944
|
* @param {Record<string, any>} pFilterCriteriaConfig
|
|
5903
5945
|
*
|
|
@@ -5937,11 +5979,11 @@ tmpPageSize=10000;}/** @type {import('../filters/Filter.js').FilterState} */var
|
|
|
5937
5979
|
* @param {number | ((pError?: Error) => void)} pRecordOffset
|
|
5938
5980
|
* @param {number | ((pError?: Error) => void)} pPageSize
|
|
5939
5981
|
* @param {(pError?: Error) => void} fCallback
|
|
5940
|
-
*/},{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}],
|
|
5982
|
+
*/},{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 libPictTemplate=require('pict-template');var PictTemplateProviderData=/*#__PURE__*/function(_libPictTemplate){/**
|
|
5941
5983
|
* @param {Object} pFable - The Fable Framework instance
|
|
5942
5984
|
* @param {Object} pOptions - The options for the service
|
|
5943
5985
|
* @param {String} pServiceHash - The hash of the service
|
|
5944
|
-
*/function PictTemplateProviderData(pFable,pOptions,pServiceHash){var
|
|
5986
|
+
*/function PictTemplateProviderData(pFable,pOptions,pServiceHash){var _this92;_classCallCheck2(this,PictTemplateProviderData);_this92=_callSuper(this,PictTemplateProviderData,[pFable,pOptions,pServiceHash]);/** @type {any} */_this92.log;_this92.addPattern('{~Data:','~}');_this92.addPattern('{~D:','~}');return _this92;}/**
|
|
5945
5987
|
* Render a template expression, returning a string with the resulting content or an optional default value.
|
|
5946
5988
|
*
|
|
5947
5989
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -5950,11 +5992,11 @@ tmpPageSize=10000;}/** @type {import('../filters/Filter.js').FilterState} */var
|
|
|
5950
5992
|
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
5951
5993
|
*
|
|
5952
5994
|
* @return {string} The rendered template
|
|
5953
|
-
*/_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}],
|
|
5995
|
+
*/_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}],210:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDataValueByKey=/*#__PURE__*/function(_libPictTemplate2){/**
|
|
5954
5996
|
* @param {Object} pFable - The Fable Framework instance
|
|
5955
5997
|
* @param {Object} pOptions - The options for the service
|
|
5956
5998
|
* @param {String} pServiceHash - The hash of the service
|
|
5957
|
-
*/function PictTemplateProviderDataValueByKey(pFable,pOptions,pServiceHash){var
|
|
5999
|
+
*/function PictTemplateProviderDataValueByKey(pFable,pOptions,pServiceHash){var _this93;_classCallCheck2(this,PictTemplateProviderDataValueByKey);_this93=_callSuper(this,PictTemplateProviderDataValueByKey,[pFable,pOptions,pServiceHash]);/** @type {any} */_this93.log;_this93.addPattern('{~DataValueByKey:','~}');_this93.addPattern('{~DVBK:','~}');return _this93;}/**
|
|
5958
6000
|
* Render a template expression, returning a string with the resulting content.
|
|
5959
6001
|
*
|
|
5960
6002
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -5963,11 +6005,11 @@ tmpPageSize=10000;}/** @type {import('../filters/Filter.js').FilterState} */var
|
|
|
5963
6005
|
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
5964
6006
|
*
|
|
5965
6007
|
* @return {string} The rendered template
|
|
5966
|
-
*/_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}],
|
|
6008
|
+
*/_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}],211:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderData=/*#__PURE__*/function(_libPictTemplate3){/**
|
|
5967
6009
|
* @param {Object} pFable - The Fable Framework instance
|
|
5968
6010
|
* @param {Object} pOptions - The options for the service
|
|
5969
6011
|
* @param {String} pServiceHash - The hash of the service
|
|
5970
|
-
*/function PictTemplateProviderData(pFable,pOptions,pServiceHash){var
|
|
6012
|
+
*/function PictTemplateProviderData(pFable,pOptions,pServiceHash){var _this94;_classCallCheck2(this,PictTemplateProviderData);_this94=_callSuper(this,PictTemplateProviderData,[pFable,pOptions,pServiceHash]);/** @type {any} */_this94.log;_this94.addPattern('{~DataWithTemplateFallback:','~}');_this94.addPattern('{~DWTF:','~}');return _this94;}/**
|
|
5971
6013
|
* Render a template expression, returning a string with the resulting content or an optional default template string from an address.
|
|
5972
6014
|
*
|
|
5973
6015
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -5989,13 +6031,13 @@ return'';}if(this.pict.LogNoisiness>3){this.log.trace("PICT DataWithTemplateFall
|
|
|
5989
6031
|
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
5990
6032
|
*
|
|
5991
6033
|
* @return {void} The result is passed to the callback function
|
|
5992
|
-
*/},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope){var
|
|
5993
|
-
this.pict.parseTemplateByHash(tmpTemplateFallbackAddress,tmpRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}if(pValue==null||pValue===''){
|
|
5994
|
-
return tmpCallback(null,'');}if(
|
|
6034
|
+
*/},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope){var _this95=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
|
|
6035
|
+
this.pict.parseTemplateByHash(tmpTemplateFallbackAddress,tmpRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}if(pValue==null||pValue===''){_this95.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
|
|
6036
|
+
return tmpCallback(null,'');}if(_this95.pict.LogNoisiness>3){_this95.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}],212:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderEntity=/*#__PURE__*/function(_libPictTemplate4){/**
|
|
5995
6037
|
* @param {Object} pFable - The Fable Framework instance
|
|
5996
6038
|
* @param {Object} pOptions - The options for the service
|
|
5997
6039
|
* @param {String} pServiceHash - The hash of the service
|
|
5998
|
-
*/function PictTemplateProviderEntity(pFable,pOptions,pServiceHash){var
|
|
6040
|
+
*/function PictTemplateProviderEntity(pFable,pOptions,pServiceHash){var _this96;_classCallCheck2(this,PictTemplateProviderEntity);_this96=_callSuper(this,PictTemplateProviderEntity,[pFable,pOptions,pServiceHash]);/** @type {any} */_this96.log;_this96.addPattern('{~E:','~}');_this96.addPattern('{~Entity:','~}');return _this96;}/**
|
|
5999
6041
|
* Render a template expression, returning a string with the resulting content.
|
|
6000
6042
|
*
|
|
6001
6043
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6020,11 +6062,11 @@ var tmpAddressParts=tmpHash.split('^');if(tmpAddressParts.length<2){this.log.war
|
|
|
6020
6062
|
tmpEntityID=this.resolveStateFromAddress(String(tmpEntityID),tmpData,pContextArray,null,pScope);}// No Entity or EntityID
|
|
6021
6063
|
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
|
|
6022
6064
|
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
|
|
6023
|
-
if(tmpEntityTemplate){this.pict.parseTemplateByHash(tmpEntityTemplate,pRecord,tmpCallback,pContextArray,pScope);}else{tmpCallback(null,'');}}.bind(this));}}]);}(libPictTemplate);module.exports=PictTemplateProviderEntity;},{"pict-template":143}],
|
|
6065
|
+
if(tmpEntityTemplate){this.pict.parseTemplateByHash(tmpEntityTemplate,pRecord,tmpCallback,pContextArray,pScope);}else{tmpCallback(null,'');}}.bind(this));}}]);}(libPictTemplate);module.exports=PictTemplateProviderEntity;},{"pict-template":143}],213:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderSelf=/*#__PURE__*/function(_libPictTemplate5){/**
|
|
6024
6066
|
* @param {Object} pFable - The Fable Framework instance
|
|
6025
6067
|
* @param {Object} pOptions - The options for the service
|
|
6026
6068
|
* @param {String} pServiceHash - The hash of the service
|
|
6027
|
-
*/function PictTemplateProviderSelf(pFable,pOptions,pServiceHash){var
|
|
6069
|
+
*/function PictTemplateProviderSelf(pFable,pOptions,pServiceHash){var _this97;_classCallCheck2(this,PictTemplateProviderSelf);_this97=_callSuper(this,PictTemplateProviderSelf,[pFable,pOptions,pServiceHash]);_this97.addPattern('{~Pict','~}');_this97.addPattern('{~P','~}');_this97.addPattern('{~p','~}');return _this97;}/**
|
|
6028
6070
|
* Render a template expression, returning a string with the resulting content.
|
|
6029
6071
|
*
|
|
6030
6072
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6033,11 +6075,11 @@ if(tmpEntityTemplate){this.pict.parseTemplateByHash(tmpEntityTemplate,pRecord,tm
|
|
|
6033
6075
|
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
6034
6076
|
*
|
|
6035
6077
|
* @return {string} The rendered template
|
|
6036
|
-
*/_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}],
|
|
6078
|
+
*/_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}],214:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderSolveByReference=/*#__PURE__*/function(_libPictTemplate6){/**
|
|
6037
6079
|
* @param {Object} pFable - The Fable Framework instance
|
|
6038
6080
|
* @param {Object} pOptions - The options for the service
|
|
6039
6081
|
* @param {String} pServiceHash - The hash of the service
|
|
6040
|
-
*/function PictTemplateProviderSolveByReference(pFable,pOptions,pServiceHash){var
|
|
6082
|
+
*/function PictTemplateProviderSolveByReference(pFable,pOptions,pServiceHash){var _this98;_classCallCheck2(this,PictTemplateProviderSolveByReference);_this98=_callSuper(this,PictTemplateProviderSolveByReference,[pFable,pOptions,pServiceHash]);/** @type {any} */_this98.log;_this98.addPattern('{~SolveByReference:','~}');_this98.addPattern('{~SBR:','~}');return _this98;}/**
|
|
6041
6083
|
* Render a template expression, returning a string with the resulting content.
|
|
6042
6084
|
*
|
|
6043
6085
|
* @param {string} pSolveParams - The solver parameters.
|
|
@@ -6047,11 +6089,11 @@ if(tmpEntityTemplate){this.pict.parseTemplateByHash(tmpEntityTemplate,pRecord,tm
|
|
|
6047
6089
|
*
|
|
6048
6090
|
* @return {string} The rendered template
|
|
6049
6091
|
*/_inherits(PictTemplateProviderSolveByReference,_libPictTemplate6);return _createClass2(PictTemplateProviderSolveByReference,[{key:"render",value:function render(pSolveParams,pRecord,pContextArray,pScope){// {~SBR:AppData.Equation:AppData.HomeworkRectangleSize:AppData.HomeworkManifest~}
|
|
6050
|
-
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}],
|
|
6092
|
+
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}],215:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplate=/*#__PURE__*/function(_libPictTemplate7){/**
|
|
6051
6093
|
* @param {Object} pFable - The Fable Framework instance
|
|
6052
6094
|
* @param {Object} pOptions - The options for the service
|
|
6053
6095
|
* @param {String} pServiceHash - The hash of the service
|
|
6054
|
-
*/function PictTemplateProviderTemplate(pFable,pOptions,pServiceHash){var
|
|
6096
|
+
*/function PictTemplateProviderTemplate(pFable,pOptions,pServiceHash){var _this99;_classCallCheck2(this,PictTemplateProviderTemplate);_this99=_callSuper(this,PictTemplateProviderTemplate,[pFable,pOptions,pServiceHash]);/** @type {any} */_this99.log;_this99.addPattern('{~Template:','~}');_this99.addPattern('{~T:','~}');return _this99;}/**
|
|
6055
6097
|
* Render a template expression, returning a string with the resulting content.
|
|
6056
6098
|
*
|
|
6057
6099
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6077,11 +6119,11 @@ return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray,
|
|
|
6077
6119
|
var tmpHashTemplateSeparator=tmpHash.indexOf(':');tmpTemplateHash=tmpHash.substring(0,tmpHashTemplateSeparator);if(tmpHashTemplateSeparator>-1){tmpAddressOfData=tmpHash.substring(tmpHashTemplateSeparator+1);}else{tmpTemplateHash=tmpHash;}// No template hash
|
|
6078
6120
|
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.
|
|
6079
6121
|
// The async portion of this is a mind bender because of how entry can happen dynamically from templates
|
|
6080
|
-
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}],
|
|
6122
|
+
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}],216:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateByDataAddress=/*#__PURE__*/function(_libPictTemplate8){/**
|
|
6081
6123
|
* @param {Object} pFable - The Fable Framework instance
|
|
6082
6124
|
* @param {Object} pOptions - The options for the service
|
|
6083
6125
|
* @param {String} pServiceHash - The hash of the service
|
|
6084
|
-
*/function PictTemplateProviderTemplateByDataAddress(pFable,pOptions,pServiceHash){var
|
|
6126
|
+
*/function PictTemplateProviderTemplateByDataAddress(pFable,pOptions,pServiceHash){var _this100;_classCallCheck2(this,PictTemplateProviderTemplateByDataAddress);_this100=_callSuper(this,PictTemplateProviderTemplateByDataAddress,[pFable,pOptions,pServiceHash]);/** @type {any} */_this100.log;_this100.addPattern('{~TemplateByDataAddress:','~}');_this100.addPattern('{~TBDA:','~}');return _this100;}/**
|
|
6085
6127
|
* Render a template expression, returning a string with the resulting content.
|
|
6086
6128
|
*
|
|
6087
6129
|
* @param {string} pTemplateDataAddress - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6107,11 +6149,11 @@ return this.pict.parseTemplate(tmpTemplate,pRecord,null,pContextArray,pScope);}e
|
|
|
6107
6149
|
var tmpHashTemplateSeparator=tmpDataAddress.indexOf(':');tmpTemplateDataAddress=tmpDataAddress.substring(0,tmpHashTemplateSeparator);if(tmpHashTemplateSeparator>-1){tmpAddressOfData=tmpDataAddress.substring(tmpHashTemplateSeparator+1);}else{tmpTemplateDataAddress=tmpDataAddress;}// No template hash
|
|
6108
6150
|
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.
|
|
6109
6151
|
// The async portion of this is a mind bender because of how entry can happen dynamically from templates
|
|
6110
|
-
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}],
|
|
6152
|
+
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}],217:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplate=/*#__PURE__*/function(_libPictTemplate9){/**
|
|
6111
6153
|
* @param {Object} pFable - The Fable Framework instance
|
|
6112
6154
|
* @param {Object} pOptions - The options for the service
|
|
6113
6155
|
* @param {String} pServiceHash - The hash of the service
|
|
6114
|
-
*/function PictTemplateProviderTemplate(pFable,pOptions,pServiceHash){var
|
|
6156
|
+
*/function PictTemplateProviderTemplate(pFable,pOptions,pServiceHash){var _this101;_classCallCheck2(this,PictTemplateProviderTemplate);_this101=_callSuper(this,PictTemplateProviderTemplate,[pFable,pOptions,pServiceHash]);/** @type {any} */_this101.log;_this101.addPattern('{~TemplateByReference:','~}');_this101.addPattern('{~TBR:','~}');return _this101;}/**
|
|
6115
6157
|
* Render a template expression, returning a string with the resulting content.
|
|
6116
6158
|
*
|
|
6117
6159
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6141,11 +6183,11 @@ if(!tmpTemplateHashReferenceLocation){this.log.warn("Pict: Template Render Async
|
|
|
6141
6183
|
var tmpTemplateHash=this.resolveStateFromAddress(tmpTemplateHashReferenceLocation,pRecord,pContextArray,null,pScope);// No template hash
|
|
6142
6184
|
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.
|
|
6143
6185
|
// The async portion of this is a mind bender because of how entry can happen dynamically from templates
|
|
6144
|
-
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}],
|
|
6186
|
+
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}],218:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateFromMap=/*#__PURE__*/function(_libPictTemplate0){/**
|
|
6145
6187
|
* @param {Object} pFable - The Fable Framework instance
|
|
6146
6188
|
* @param {Object} pOptions - The options for the service
|
|
6147
6189
|
* @param {String} pServiceHash - The hash of the service
|
|
6148
|
-
*/function PictTemplateProviderTemplateFromMap(pFable,pOptions,pServiceHash){var
|
|
6190
|
+
*/function PictTemplateProviderTemplateFromMap(pFable,pOptions,pServiceHash){var _this102;_classCallCheck2(this,PictTemplateProviderTemplateFromMap);_this102=_callSuper(this,PictTemplateProviderTemplateFromMap,[pFable,pOptions,pServiceHash]);/** @type {any} */_this102.log;_this102.addPattern('{~TFM:','~}');_this102.addPattern('{~TemplateFromMap:','~}');return _this102;}/**
|
|
6149
6191
|
* Render a template expression, returning a string with the resulting content.
|
|
6150
6192
|
*
|
|
6151
6193
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6173,11 +6215,11 @@ var tmpTemplateHashPart=tmpHash.split(':');if(tmpTemplateHashPart.length<3){this
|
|
|
6173
6215
|
if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}// Now resolve the data
|
|
6174
6216
|
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.
|
|
6175
6217
|
// The async portion of this is a mind bender because of how entry can happen dynamically from TemplateFromMaps
|
|
6176
|
-
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}],
|
|
6218
|
+
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}],219:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateSet=/*#__PURE__*/function(_libPictTemplate1){/**
|
|
6177
6219
|
* @param {Object} pFable - The Fable Framework instance
|
|
6178
6220
|
* @param {Object} pOptions - The options for the service
|
|
6179
6221
|
* @param {String} pServiceHash - The hash of the service
|
|
6180
|
-
*/function PictTemplateProviderTemplateSet(pFable,pOptions,pServiceHash){var
|
|
6222
|
+
*/function PictTemplateProviderTemplateSet(pFable,pOptions,pServiceHash){var _this103;_classCallCheck2(this,PictTemplateProviderTemplateSet);_this103=_callSuper(this,PictTemplateProviderTemplateSet,[pFable,pOptions,pServiceHash]);/** @type {any} */_this103.log;_this103.addPattern('{~TemplateSet:','~}');_this103.addPattern('{~TS:','~}');return _this103;}/**
|
|
6181
6223
|
* Render a template expression, returning a string with the resulting content.
|
|
6182
6224
|
*
|
|
6183
6225
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6204,11 +6246,11 @@ var tmpTemplateHashPart=tmpHash.split(':');if(tmpTemplateHashPart.length<2){this
|
|
|
6204
6246
|
if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}// Now resolve the data
|
|
6205
6247
|
tmpData=this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray,null,pScope);if(!tmpData){// No address was provided, just render the template with what this template has.
|
|
6206
6248
|
// The async portion of this is a mind bender because of how entry can happen dynamically from templates
|
|
6207
|
-
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}],
|
|
6249
|
+
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}],220:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateSetFromMap=/*#__PURE__*/function(_libPictTemplate10){/**
|
|
6208
6250
|
* @param {Object} pFable - The Fable Framework instance
|
|
6209
6251
|
* @param {Object} pOptions - The options for the service
|
|
6210
6252
|
* @param {String} pServiceHash - The hash of the service
|
|
6211
|
-
*/function PictTemplateProviderTemplateSetFromMap(pFable,pOptions,pServiceHash){var
|
|
6253
|
+
*/function PictTemplateProviderTemplateSetFromMap(pFable,pOptions,pServiceHash){var _this104;_classCallCheck2(this,PictTemplateProviderTemplateSetFromMap);_this104=_callSuper(this,PictTemplateProviderTemplateSetFromMap,[pFable,pOptions,pServiceHash]);/** @type {any} */_this104.log;_this104.addPattern('{~TSFM:','~}');_this104.addPattern('{~TemplateSetFromMap:','~}');return _this104;}/**
|
|
6212
6254
|
* Render a template expression, returning a string with the resulting content.
|
|
6213
6255
|
*
|
|
6214
6256
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6236,11 +6278,11 @@ var tmpTemplateHashPart=tmpHash.split(':');if(tmpTemplateHashPart.length<3){this
|
|
|
6236
6278
|
if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMapSet Render Async: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}// Now resolve the data
|
|
6237
6279
|
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.
|
|
6238
6280
|
// The async portion of this is a mind bender because of how entry can happen dynamically from TemplateFromMaps
|
|
6239
|
-
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}],
|
|
6281
|
+
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}],221:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateSetWithPayload=/*#__PURE__*/function(_libPictTemplate11){/**
|
|
6240
6282
|
* @param {Object} pFable - The Fable Framework instance
|
|
6241
6283
|
* @param {Object} pOptions - The options for the service
|
|
6242
6284
|
* @param {String} pServiceHash - The hash of the service
|
|
6243
|
-
*/function PictTemplateProviderTemplateSetWithPayload(pFable,pOptions,pServiceHash){var
|
|
6285
|
+
*/function PictTemplateProviderTemplateSetWithPayload(pFable,pOptions,pServiceHash){var _this105;_classCallCheck2(this,PictTemplateProviderTemplateSetWithPayload);_this105=_callSuper(this,PictTemplateProviderTemplateSetWithPayload,[pFable,pOptions,pServiceHash]);/** @type {any} */_this105.log;_this105.addPattern('{~TemplateSetWithPayload:','~}');_this105.addPattern('{~TSWP:','~}');return _this105;}/**
|
|
6244
6286
|
* Render a template expression, returning a string with the resulting content.
|
|
6245
6287
|
*
|
|
6246
6288
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6261,11 +6303,11 @@ var tmpTemplateHashes=tmpHash.trim().split(':');if(tmpTemplateHashes.length<3){t
|
|
|
6261
6303
|
*
|
|
6262
6304
|
* @return {void}
|
|
6263
6305
|
*/},{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)
|
|
6264
|
-
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}],
|
|
6306
|
+
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}],222:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateValueSet=/*#__PURE__*/function(_libPictTemplate12){/**
|
|
6265
6307
|
* @param {Object} pFable - The Fable Framework instance
|
|
6266
6308
|
* @param {Object} pOptions - The options for the service
|
|
6267
6309
|
* @param {String} pServiceHash - The hash of the service
|
|
6268
|
-
*/function PictTemplateProviderTemplateValueSet(pFable,pOptions,pServiceHash){var
|
|
6310
|
+
*/function PictTemplateProviderTemplateValueSet(pFable,pOptions,pServiceHash){var _this106;_classCallCheck2(this,PictTemplateProviderTemplateValueSet);_this106=_callSuper(this,PictTemplateProviderTemplateValueSet,[pFable,pOptions,pServiceHash]);/** @type {any} */_this106.log;_this106.addPattern('{~TemplateValueSet:','~}');_this106.addPattern('{~TVS:','~}');return _this106;}/**
|
|
6269
6311
|
* Render a template expression, returning a string with the resulting content.
|
|
6270
6312
|
*
|
|
6271
6313
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6292,11 +6334,11 @@ var tmpTemplateHashPart=tmpHash.split(':');if(tmpTemplateHashPart.length<2){this
|
|
|
6292
6334
|
if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}// Now resolve the data
|
|
6293
6335
|
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.
|
|
6294
6336
|
// The async portion of this is a mind bender because of how entry can happen dynamically from templates
|
|
6295
|
-
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}],
|
|
6337
|
+
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}],223:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderView=/*#__PURE__*/function(_libPictTemplate13){/**
|
|
6296
6338
|
* @param {Object} pFable - The Fable Framework instance
|
|
6297
6339
|
* @param {Object} pOptions - The options for the service
|
|
6298
6340
|
* @param {String} pServiceHash - The hash of the service
|
|
6299
|
-
*/function PictTemplateProviderView(pFable,pOptions,pServiceHash){var
|
|
6341
|
+
*/function PictTemplateProviderView(pFable,pOptions,pServiceHash){var _this107;_classCallCheck2(this,PictTemplateProviderView);_this107=_callSuper(this,PictTemplateProviderView,[pFable,pOptions,pServiceHash]);/** @type {any} */_this107.log;_this107.addPattern('{~V:','~}');_this107.addPattern('{~View:','~}');if(!('__TemplateOutputCache'in _this107.pict)){_this107.pict.__TemplateOutputCache={};}return _this107;}/**
|
|
6300
6342
|
* Render a template expression, returning a string with the resulting content.
|
|
6301
6343
|
*
|
|
6302
6344
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6315,13 +6357,13 @@ return tmpResult;}/**
|
|
|
6315
6357
|
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
6316
6358
|
*
|
|
6317
6359
|
* @return {void}
|
|
6318
|
-
*/},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope){var
|
|
6360
|
+
*/},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray,pScope){var _this108=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){_this108.log.warn("Pict: View Template Render: Error rendering view [".concat(tmpViewHash,"]"),pError);return fCallback(pError,'');}var tmpResult=_this108.pict.__TemplateOutputCache[tmpRenderGUID];// TODO: Uncomment this when we like how it's working
|
|
6319
6361
|
//delete this.pict.__TemplateOutputCache[tmpRenderGUID];
|
|
6320
|
-
return fCallback(null,tmpResult);});}}]);}(libPictTemplate);module.exports=PictTemplateProviderView;},{"pict-template":143}],
|
|
6362
|
+
return fCallback(null,tmpResult);});}}]);}(libPictTemplate);module.exports=PictTemplateProviderView;},{"pict-template":143}],224:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderRandomNumber=/*#__PURE__*/function(_libPictTemplate14){/**
|
|
6321
6363
|
* @param {Object} pFable - The Fable Framework instance
|
|
6322
6364
|
* @param {Object} pOptions - The options for the service
|
|
6323
6365
|
* @param {String} pServiceHash - The hash of the service
|
|
6324
|
-
*/function PictTemplateProviderRandomNumber(pFable,pOptions,pServiceHash){var
|
|
6366
|
+
*/function PictTemplateProviderRandomNumber(pFable,pOptions,pServiceHash){var _this109;_classCallCheck2(this,PictTemplateProviderRandomNumber);_this109=_callSuper(this,PictTemplateProviderRandomNumber,[pFable,pOptions,pServiceHash]);/** @type {any} */_this109.log;_this109.addPattern('{~RandomNumber:','~}');_this109.addPattern('{~RN:','~}');return _this109;}/**
|
|
6325
6367
|
* Render a template expression, returning a string with the resulting content.
|
|
6326
6368
|
*
|
|
6327
6369
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6330,11 +6372,11 @@ return fCallback(null,tmpResult);});}}]);}(libPictTemplate);module.exports=PictT
|
|
|
6330
6372
|
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
6331
6373
|
*
|
|
6332
6374
|
* @return {string} The rendered template
|
|
6333
|
-
*/_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}],
|
|
6375
|
+
*/_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}],225:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderRandomNumberString=/*#__PURE__*/function(_libPictTemplate15){/**
|
|
6334
6376
|
* @param {Object} pFable - The Fable Framework instance
|
|
6335
6377
|
* @param {Object} pOptions - The options for the service
|
|
6336
6378
|
* @param {String} pServiceHash - The hash of the service
|
|
6337
|
-
*/function PictTemplateProviderRandomNumberString(pFable,pOptions,pServiceHash){var
|
|
6379
|
+
*/function PictTemplateProviderRandomNumberString(pFable,pOptions,pServiceHash){var _this110;_classCallCheck2(this,PictTemplateProviderRandomNumberString);_this110=_callSuper(this,PictTemplateProviderRandomNumberString,[pFable,pOptions,pServiceHash]);/** @type {any} */_this110.log;_this110.addPattern('{~RandomNumberString:','~}');_this110.addPattern('{~RNS:','~}');return _this110;}/**
|
|
6338
6380
|
* Render a template expression, returning a string with the resulting content.
|
|
6339
6381
|
*
|
|
6340
6382
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6343,11 +6385,11 @@ return fCallback(null,tmpResult);});}}]);}(libPictTemplate);module.exports=PictT
|
|
|
6343
6385
|
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
6344
6386
|
*
|
|
6345
6387
|
* @return {string} The rendered template
|
|
6346
|
-
*/_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}],
|
|
6388
|
+
*/_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}],226:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDataEncodeJavascriptString=/*#__PURE__*/function(_libPictTemplate16){/**
|
|
6347
6389
|
* @param {Object} pFable - The Fable Framework instance
|
|
6348
6390
|
* @param {Object} pOptions - The options for the service
|
|
6349
6391
|
* @param {String} pServiceHash - The hash of the service
|
|
6350
|
-
*/function PictTemplateProviderDataEncodeJavascriptString(pFable,pOptions,pServiceHash){var
|
|
6392
|
+
*/function PictTemplateProviderDataEncodeJavascriptString(pFable,pOptions,pServiceHash){var _this111;_classCallCheck2(this,PictTemplateProviderDataEncodeJavascriptString);_this111=_callSuper(this,PictTemplateProviderDataEncodeJavascriptString,[pFable,pOptions,pServiceHash]);/** @type {any} */_this111.log;_this111.addPattern('{~DataEncodeJavascriptString:','~}');_this111.addPattern('{~DEJS:','~}');return _this111;}/**
|
|
6351
6393
|
* Render a template expression, returning a string with the resulting content.
|
|
6352
6394
|
*
|
|
6353
6395
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6356,11 +6398,11 @@ return fCallback(null,tmpResult);});}}]);}(libPictTemplate);module.exports=PictT
|
|
|
6356
6398
|
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
6357
6399
|
*
|
|
6358
6400
|
* @return {string} The rendered template
|
|
6359
|
-
*/_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}],
|
|
6401
|
+
*/_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}],227:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderJSONOutput=/*#__PURE__*/function(_libPictTemplate17){/**
|
|
6360
6402
|
* @param {Object} pFable - The Fable Framework instance
|
|
6361
6403
|
* @param {Object} pOptions - The options for the service
|
|
6362
6404
|
* @param {String} pServiceHash - The hash of the service
|
|
6363
|
-
*/function PictTemplateProviderJSONOutput(pFable,pOptions,pServiceHash){var
|
|
6405
|
+
*/function PictTemplateProviderJSONOutput(pFable,pOptions,pServiceHash){var _this112;_classCallCheck2(this,PictTemplateProviderJSONOutput);_this112=_callSuper(this,PictTemplateProviderJSONOutput,[pFable,pOptions,pServiceHash]);/** @type {any} */_this112.log;_this112.addPattern('{~DataJson:','~}');_this112.addPattern('{~DJ:','~}');return _this112;}/**
|
|
6364
6406
|
* Render a template expression, returning a string with the resulting content.
|
|
6365
6407
|
*
|
|
6366
6408
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6369,11 +6411,11 @@ return fCallback(null,tmpResult);});}}]);}(libPictTemplate);module.exports=PictT
|
|
|
6369
6411
|
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
6370
6412
|
*
|
|
6371
6413
|
* @return {string} The rendered template
|
|
6372
|
-
*/_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}],
|
|
6414
|
+
*/_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}],228:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateOnlyFormat=/*#__PURE__*/function(_libPictTemplate18){/**
|
|
6373
6415
|
* @param {import('fable')} pFable - The Fable Framework instance
|
|
6374
6416
|
* @param {any} pOptions - The options for the service
|
|
6375
6417
|
* @param {String} pServiceHash - The hash of the service
|
|
6376
|
-
*/function PictTemplateProviderDateOnlyFormat(pFable,pOptions,pServiceHash){var
|
|
6418
|
+
*/function PictTemplateProviderDateOnlyFormat(pFable,pOptions,pServiceHash){var _this113;_classCallCheck2(this,PictTemplateProviderDateOnlyFormat);_this113=_callSuper(this,PictTemplateProviderDateOnlyFormat,[pFable,pOptions,pServiceHash]);/** @type {any} */_this113.options;/** @type {any} */_this113.log;_this113.addPattern('{~DateOnlyFormat:','~}');return _this113;}/**
|
|
6377
6419
|
* Render a template expression, returning a string with the resulting content.
|
|
6378
6420
|
*
|
|
6379
6421
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6389,11 +6431,11 @@ var tmpDayJS=this.fable.Dates.dayJS.utc(tmpDateValue).tz('UTC');return tmpDayJS.
|
|
|
6389
6431
|
```javascript
|
|
6390
6432
|
|
|
6391
6433
|
```
|
|
6392
|
-
*/},{"pict-template":143}],
|
|
6434
|
+
*/},{"pict-template":143}],229:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateOnlyYMD=/*#__PURE__*/function(_libPictTemplate19){/**
|
|
6393
6435
|
* @param {Object} pFable - The Fable Framework instance
|
|
6394
6436
|
* @param {Object} pOptions - The options for the service
|
|
6395
6437
|
* @param {String} pServiceHash - The hash of the service
|
|
6396
|
-
*/function PictTemplateProviderDateOnlyYMD(pFable,pOptions,pServiceHash){var
|
|
6438
|
+
*/function PictTemplateProviderDateOnlyYMD(pFable,pOptions,pServiceHash){var _this114;_classCallCheck2(this,PictTemplateProviderDateOnlyYMD);_this114=_callSuper(this,PictTemplateProviderDateOnlyYMD,[pFable,pOptions,pServiceHash]);/** @type {any} */_this114.options;/** @type {any} */_this114.log;_this114.addPattern('{~DateOnlyYMD:','~}');return _this114;}/**
|
|
6397
6439
|
* Render a template expression, returning a string with the resulting content.
|
|
6398
6440
|
*
|
|
6399
6441
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6405,12 +6447,12 @@ var tmpDayJS=this.fable.Dates.dayJS.utc(tmpDateValue).tz('UTC');return tmpDayJS.
|
|
|
6405
6447
|
*/_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
|
|
6406
6448
|
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
|
|
6407
6449
|
// not even sure showing negative is right; showing the era is probably better (BCE vs CE)
|
|
6408
|
-
var prefix=tmpDayJS.valueOf()<-62167219200000?'-':'';return prefix+tmpDayJS.format('YYYY-MM-DD');}}]);}(libPictTemplate);module.exports=PictTemplateProviderDateOnlyYMD;},{"pict-template":143}],
|
|
6450
|
+
var prefix=tmpDayJS.valueOf()<-62167219200000?'-':'';return prefix+tmpDayJS.format('YYYY-MM-DD');}}]);}(libPictTemplate);module.exports=PictTemplateProviderDateOnlyYMD;},{"pict-template":143}],230:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateTimeFormat=/*#__PURE__*/function(_libPictTemplate20){/**
|
|
6409
6451
|
* @param {Object} pFable - The Fable Framework instance
|
|
6410
6452
|
* @param {Object} pOptions - The options for the service
|
|
6411
6453
|
* @param {String} pServiceHash - The hash of the service
|
|
6412
|
-
*/function PictTemplateProviderDateTimeFormat(pFable,pOptions,pServiceHash){var
|
|
6413
|
-
return
|
|
6454
|
+
*/function PictTemplateProviderDateTimeFormat(pFable,pOptions,pServiceHash){var _this115;_classCallCheck2(this,PictTemplateProviderDateTimeFormat);_this115=_callSuper(this,PictTemplateProviderDateTimeFormat,[pFable,pOptions,pServiceHash]);/** @type {any} */_this115.options;/** @type {any} */_this115.log;_this115.addPattern('{~DateTimeFormat:','~}');_this115.addPattern('{~DateFormat:','~}');// for backwards compatibility
|
|
6455
|
+
return _this115;}/**
|
|
6414
6456
|
* Render a template expression, returning a string with the resulting content.
|
|
6415
6457
|
*
|
|
6416
6458
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6429,12 +6471,12 @@ try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.
|
|
|
6429
6471
|
```javascript
|
|
6430
6472
|
|
|
6431
6473
|
```
|
|
6432
|
-
*/},{"pict-template":143}],
|
|
6474
|
+
*/},{"pict-template":143}],231:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateTimeYMD=/*#__PURE__*/function(_libPictTemplate21){/**
|
|
6433
6475
|
* @param {Object} pFable - The Fable Framework instance
|
|
6434
6476
|
* @param {Object} pOptions - The options for the service
|
|
6435
6477
|
* @param {String} pServiceHash - The hash of the service
|
|
6436
|
-
*/function PictTemplateProviderDateTimeYMD(pFable,pOptions,pServiceHash){var
|
|
6437
|
-
return
|
|
6478
|
+
*/function PictTemplateProviderDateTimeYMD(pFable,pOptions,pServiceHash){var _this116;_classCallCheck2(this,PictTemplateProviderDateTimeYMD);_this116=_callSuper(this,PictTemplateProviderDateTimeYMD,[pFable,pOptions,pServiceHash]);/** @type {any} */_this116.options;/** @type {any} */_this116.log;_this116.addPattern('{~DateTimeYMD:','~}');_this116.addPattern('{~DateYMD:','~}');// for backwards compatibility
|
|
6479
|
+
return _this116;}/**
|
|
6438
6480
|
* Render a template expression, returning a string with the resulting content.
|
|
6439
6481
|
*
|
|
6440
6482
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6447,11 +6489,11 @@ return _this115;}/**
|
|
|
6447
6489
|
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
|
|
6448
6490
|
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()}].`);
|
|
6449
6491
|
// Day.js will try to guess the user's timezone for us
|
|
6450
|
-
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}],
|
|
6492
|
+
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}],232:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDigits=/*#__PURE__*/function(_libPictTemplate22){/**
|
|
6451
6493
|
* @param {Object} pFable - The Fable Framework instance
|
|
6452
6494
|
* @param {Object} pOptions - The options for the service
|
|
6453
6495
|
* @param {String} pServiceHash - The hash of the service
|
|
6454
|
-
*/function PictTemplateProviderDigits(pFable,pOptions,pServiceHash){var
|
|
6496
|
+
*/function PictTemplateProviderDigits(pFable,pOptions,pServiceHash){var _this117;_classCallCheck2(this,PictTemplateProviderDigits);_this117=_callSuper(this,PictTemplateProviderDigits,[pFable,pOptions,pServiceHash]);/** @type {any} */_this117.options;/** @type {any} */_this117.log;_this117.addPattern('{~Digits:','~}');return _this117;}/**
|
|
6455
6497
|
* Render a template expression, returning a string with the resulting content.
|
|
6456
6498
|
*
|
|
6457
6499
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6460,11 +6502,11 @@ try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.
|
|
|
6460
6502
|
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
6461
6503
|
*
|
|
6462
6504
|
* @return {string} The rendered template
|
|
6463
|
-
*/_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}],
|
|
6505
|
+
*/_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}],233:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDollars=/*#__PURE__*/function(_libPictTemplate23){/**
|
|
6464
6506
|
* @param {Object} pFable - The Fable Framework instance
|
|
6465
6507
|
* @param {Object} pOptions - The options for the service
|
|
6466
6508
|
* @param {String} pServiceHash - The hash of the service
|
|
6467
|
-
*/function PictTemplateProviderDollars(pFable,pOptions,pServiceHash){var
|
|
6509
|
+
*/function PictTemplateProviderDollars(pFable,pOptions,pServiceHash){var _this118;_classCallCheck2(this,PictTemplateProviderDollars);_this118=_callSuper(this,PictTemplateProviderDollars,[pFable,pOptions,pServiceHash]);/** @type {any} */_this118.options;/** @type {any} */_this118.log;_this118.addPattern('{~Dollars:','~}');return _this118;}/**
|
|
6468
6510
|
* Render a template expression, returning a string with the resulting content.
|
|
6469
6511
|
*
|
|
6470
6512
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6473,11 +6515,11 @@ try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.
|
|
|
6473
6515
|
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
6474
6516
|
*
|
|
6475
6517
|
* @return {string} The rendered template
|
|
6476
|
-
*/_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}],
|
|
6518
|
+
*/_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}],234:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderHTMLCommandEnd=/*#__PURE__*/function(_libPictTemplate24){/**
|
|
6477
6519
|
* @param {Object} pFable - The Fable Framework instance
|
|
6478
6520
|
* @param {Object} pOptions - The options for the service
|
|
6479
6521
|
* @param {String} pServiceHash - The hash of the service
|
|
6480
|
-
*/function PictTemplateProviderHTMLCommandEnd(pFable,pOptions,pServiceHash){var
|
|
6522
|
+
*/function PictTemplateProviderHTMLCommandEnd(pFable,pOptions,pServiceHash){var _this119;_classCallCheck2(this,PictTemplateProviderHTMLCommandEnd);_this119=_callSuper(this,PictTemplateProviderHTMLCommandEnd,[pFable,pOptions,pServiceHash]);/** @type {any} */_this119.log;_this119.addPattern('{~HtmlCommentEnd:','~}');_this119.addPattern('{~HCE:','~}');return _this119;}/**
|
|
6481
6523
|
* Render a template expression, returning a string with the resulting content.
|
|
6482
6524
|
*
|
|
6483
6525
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6486,11 +6528,11 @@ try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.
|
|
|
6486
6528
|
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
6487
6529
|
*
|
|
6488
6530
|
* @return {string} The rendered template
|
|
6489
|
-
*/_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}],
|
|
6531
|
+
*/_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}],235:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderHTMLCommandStart=/*#__PURE__*/function(_libPictTemplate25){/**
|
|
6490
6532
|
* @param {Object} pFable - The Fable Framework instance
|
|
6491
6533
|
* @param {Object} pOptions - The options for the service
|
|
6492
6534
|
* @param {String} pServiceHash - The hash of the service
|
|
6493
|
-
*/function PictTemplateProviderHTMLCommandStart(pFable,pOptions,pServiceHash){var
|
|
6535
|
+
*/function PictTemplateProviderHTMLCommandStart(pFable,pOptions,pServiceHash){var _this120;_classCallCheck2(this,PictTemplateProviderHTMLCommandStart);_this120=_callSuper(this,PictTemplateProviderHTMLCommandStart,[pFable,pOptions,pServiceHash]);/** @type {any} */_this120.log;_this120.addPattern('{~HtmlCommentStart:','~}');_this120.addPattern('{~HCS:','~}');return _this120;}/**
|
|
6494
6536
|
* Render a template expression, returning a string with the resulting content.
|
|
6495
6537
|
*
|
|
6496
6538
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6499,11 +6541,11 @@ try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.
|
|
|
6499
6541
|
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
6500
6542
|
*
|
|
6501
6543
|
* @return {string} The rendered template
|
|
6502
|
-
*/_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}],
|
|
6544
|
+
*/_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}],236:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderJoin=/*#__PURE__*/function(_libPictTemplate26){/**
|
|
6503
6545
|
* @param {Object} pFable - The Fable Framework instance
|
|
6504
6546
|
* @param {Object} pOptions - The options for the service
|
|
6505
6547
|
* @param {String} pServiceHash - The hash of the service
|
|
6506
|
-
*/function PictTemplateProviderJoin(pFable,pOptions,pServiceHash){var
|
|
6548
|
+
*/function PictTemplateProviderJoin(pFable,pOptions,pServiceHash){var _this121;_classCallCheck2(this,PictTemplateProviderJoin);_this121=_callSuper(this,PictTemplateProviderJoin,[pFable,pOptions,pServiceHash]);/** @type {any} */_this121.options;/** @type {any} */_this121.log;_this121.addPattern('{~Join:','~}');_this121.addPattern('{~J:','~}');return _this121;}/**
|
|
6507
6549
|
* Render a template expression, returning a string with the resulting content.
|
|
6508
6550
|
*
|
|
6509
6551
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6513,11 +6555,11 @@ try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.
|
|
|
6513
6555
|
*
|
|
6514
6556
|
* @return {string} The rendered template
|
|
6515
6557
|
*/_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
|
|
6516
|
-
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}],
|
|
6558
|
+
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}],237:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderJoinUnique=/*#__PURE__*/function(_libPictTemplate27){/**
|
|
6517
6559
|
* @param {Object} pFable - The Fable Framework instance
|
|
6518
6560
|
* @param {Object} pOptions - The options for the service
|
|
6519
6561
|
* @param {String} pServiceHash - The hash of the service
|
|
6520
|
-
*/function PictTemplateProviderJoinUnique(pFable,pOptions,pServiceHash){var
|
|
6562
|
+
*/function PictTemplateProviderJoinUnique(pFable,pOptions,pServiceHash){var _this122;_classCallCheck2(this,PictTemplateProviderJoinUnique);_this122=_callSuper(this,PictTemplateProviderJoinUnique,[pFable,pOptions,pServiceHash]);/** @type {any} */_this122.options;/** @type {any} */_this122.log;_this122.addPattern('{~JoinUnique:','~}');_this122.addPattern('{~JU:','~}');return _this122;}/**
|
|
6521
6563
|
* Render a template expression, returning a string with the resulting content.
|
|
6522
6564
|
*
|
|
6523
6565
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6527,11 +6569,11 @@ var tmpSeparator=tmpDataAddresses.shift();var tmpValueList=[];for(var i=0;i<tmpD
|
|
|
6527
6569
|
*
|
|
6528
6570
|
* @return {string} The rendered template
|
|
6529
6571
|
*/_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
|
|
6530
|
-
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}],
|
|
6572
|
+
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}],238:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderPascalCaseIdentifier=/*#__PURE__*/function(_libPictTemplate28){/**
|
|
6531
6573
|
* @param {Object} pFable - The Fable Framework instance
|
|
6532
6574
|
* @param {Object} pOptions - The options for the service
|
|
6533
6575
|
* @param {String} pServiceHash - The hash of the service
|
|
6534
|
-
*/function PictTemplateProviderPascalCaseIdentifier(pFable,pOptions,pServiceHash){var
|
|
6576
|
+
*/function PictTemplateProviderPascalCaseIdentifier(pFable,pOptions,pServiceHash){var _this123;_classCallCheck2(this,PictTemplateProviderPascalCaseIdentifier);_this123=_callSuper(this,PictTemplateProviderPascalCaseIdentifier,[pFable,pOptions,pServiceHash]);/** @type {any} */_this123.options;/** @type {any} */_this123.log;_this123.addPattern('{~PascalCaseIdentifier:','~}');return _this123;}/**
|
|
6535
6577
|
* Render a template expression, returning a string with the resulting content.
|
|
6536
6578
|
*
|
|
6537
6579
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6546,11 +6588,11 @@ var tmpSeparator=tmpDataAddresses.shift();var tmpValueList=[];var tmpValueMap={}
|
|
|
6546
6588
|
```javascript
|
|
6547
6589
|
|
|
6548
6590
|
```
|
|
6549
|
-
*/},{"pict-template":143}],
|
|
6591
|
+
*/},{"pict-template":143}],239:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderPluckJoinUnique=/*#__PURE__*/function(_libPictTemplate29){/**
|
|
6550
6592
|
* @param {Object} pFable - The Fable Framework instance
|
|
6551
6593
|
* @param {Object} pOptions - The options for the service
|
|
6552
6594
|
* @param {String} pServiceHash - The hash of the service
|
|
6553
|
-
*/function PictTemplateProviderPluckJoinUnique(pFable,pOptions,pServiceHash){var
|
|
6595
|
+
*/function PictTemplateProviderPluckJoinUnique(pFable,pOptions,pServiceHash){var _this124;_classCallCheck2(this,PictTemplateProviderPluckJoinUnique);_this124=_callSuper(this,PictTemplateProviderPluckJoinUnique,[pFable,pOptions,pServiceHash]);/** @type {any} */_this124.options;/** @type {any} */_this124.log;_this124.addPattern('{~PluckJoinUnique:','~}');_this124.addPattern('{~PJU:','~}');return _this124;}/**
|
|
6554
6596
|
* Render a template expression, returning a string with the resulting content.
|
|
6555
6597
|
*
|
|
6556
6598
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6561,11 +6603,11 @@ var tmpSeparator=tmpDataAddresses.shift();var tmpValueList=[];var tmpValueMap={}
|
|
|
6561
6603
|
* @return {string} The rendered template
|
|
6562
6604
|
*/_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
|
|
6563
6605
|
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.
|
|
6564
|
-
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}],
|
|
6606
|
+
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}],240:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderBreakpoint=/*#__PURE__*/function(_libPictTemplate30){/**
|
|
6565
6607
|
* @param {Object} pFable - The Fable Framework instance
|
|
6566
6608
|
* @param {Object} pOptions - The options for the service
|
|
6567
6609
|
* @param {String} pServiceHash - The hash of the service
|
|
6568
|
-
*/function PictTemplateProviderBreakpoint(pFable,pOptions,pServiceHash){var
|
|
6610
|
+
*/function PictTemplateProviderBreakpoint(pFable,pOptions,pServiceHash){var _this125;_classCallCheck2(this,PictTemplateProviderBreakpoint);_this125=_callSuper(this,PictTemplateProviderBreakpoint,[pFable,pOptions,pServiceHash]);/** @type {any} */_this125.log;_this125.addPattern('{~Breakpoint','~}');return _this125;}/**
|
|
6569
6611
|
* Render a template expression, returning a string with the resulting content.
|
|
6570
6612
|
*
|
|
6571
6613
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6576,11 +6618,11 @@ for(var j=0;j<tmpValueSet.length;j++){if(tmpValueSet[j]===null||_typeof(tmpValue
|
|
|
6576
6618
|
* @return {string} The rendered template
|
|
6577
6619
|
*/_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;
|
|
6578
6620
|
debugger;// eslint-disable-line no-debugger
|
|
6579
|
-
return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderBreakpoint;},{"pict-template":143}],
|
|
6621
|
+
return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderBreakpoint;},{"pict-template":143}],241:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDataValueTree=/*#__PURE__*/function(_libPictTemplate31){/**
|
|
6580
6622
|
* @param {Object} pFable - The Fable Framework instance
|
|
6581
6623
|
* @param {Object} pOptions - The options for the service
|
|
6582
6624
|
* @param {String} pServiceHash - The hash of the service
|
|
6583
|
-
*/function PictTemplateProviderDataValueTree(pFable,pOptions,pServiceHash){var
|
|
6625
|
+
*/function PictTemplateProviderDataValueTree(pFable,pOptions,pServiceHash){var _this126;_classCallCheck2(this,PictTemplateProviderDataValueTree);_this126=_callSuper(this,PictTemplateProviderDataValueTree,[pFable,pOptions,pServiceHash]);/** @type {any} */_this126.log;_this126.addPattern('{~DataTree:','~}');_this126.addPattern('{~DT:','~}');return _this126;}/**
|
|
6584
6626
|
* Render a template expression, returning a string with the resulting content.
|
|
6585
6627
|
*
|
|
6586
6628
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6602,11 +6644,11 @@ tmpPictObjectWrapTemplate="<div class=\"PICT PICTObjectSet\">{~D:Record.ObjectVa
|
|
|
6602
6644
|
*
|
|
6603
6645
|
* @return {string} The rendered template
|
|
6604
6646
|
*/},{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
|
|
6605
|
-
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}],
|
|
6647
|
+
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}],242:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderLogStatement=/*#__PURE__*/function(_libPictTemplate32){/**
|
|
6606
6648
|
* @param {Object} pFable - The Fable Framework instance
|
|
6607
6649
|
* @param {Object} pOptions - The options for the service
|
|
6608
6650
|
* @param {String} pServiceHash - The hash of the service
|
|
6609
|
-
*/function PictTemplateProviderLogStatement(pFable,pOptions,pServiceHash){var
|
|
6651
|
+
*/function PictTemplateProviderLogStatement(pFable,pOptions,pServiceHash){var _this127;_classCallCheck2(this,PictTemplateProviderLogStatement);_this127=_callSuper(this,PictTemplateProviderLogStatement,[pFable,pOptions,pServiceHash]);/** @type {any} */_this127.log;_this127.addPattern('{~LogStatement:','~}');_this127.addPattern('{~LS:','~}');return _this127;}/**
|
|
6610
6652
|
* Render a template expression, returning a string with the resulting content.
|
|
6611
6653
|
*
|
|
6612
6654
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6615,11 +6657,11 @@ tmpPictObjectBranchTemplate="\n<div class=\"PICTObjectBranchDepth_{~D:Record.Cur
|
|
|
6615
6657
|
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
6616
6658
|
*
|
|
6617
6659
|
* @return {string} The rendered template
|
|
6618
|
-
*/_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}],
|
|
6660
|
+
*/_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}],243:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderLogValue=/*#__PURE__*/function(_libPictTemplate33){/**
|
|
6619
6661
|
* @param {Object} pFable - The Fable Framework instance
|
|
6620
6662
|
* @param {Object} pOptions - The options for the service
|
|
6621
6663
|
* @param {String} pServiceHash - The hash of the service
|
|
6622
|
-
*/function PictTemplateProviderLogValue(pFable,pOptions,pServiceHash){var
|
|
6664
|
+
*/function PictTemplateProviderLogValue(pFable,pOptions,pServiceHash){var _this128;_classCallCheck2(this,PictTemplateProviderLogValue);_this128=_callSuper(this,PictTemplateProviderLogValue,[pFable,pOptions,pServiceHash]);/** @type {any} */_this128.log;_this128.addPattern('{~LogValue:','~}');_this128.addPattern('{~LV:','~}');return _this128;}/**
|
|
6623
6665
|
* Render a template expression, returning a string with the resulting content.
|
|
6624
6666
|
*
|
|
6625
6667
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6628,11 +6670,11 @@ tmpPictObjectBranchTemplate="\n<div class=\"PICTObjectBranchDepth_{~D:Record.Cur
|
|
|
6628
6670
|
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
6629
6671
|
*
|
|
6630
6672
|
* @return {string} The rendered template
|
|
6631
|
-
*/_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}],
|
|
6673
|
+
*/_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}],244:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderLogValueTree=/*#__PURE__*/function(_libPictTemplate34){/**
|
|
6632
6674
|
* @param {Object} pFable - The Fable Framework instance
|
|
6633
6675
|
* @param {Object} pOptions - The options for the service
|
|
6634
6676
|
* @param {String} pServiceHash - The hash of the service
|
|
6635
|
-
*/function PictTemplateProviderLogValueTree(pFable,pOptions,pServiceHash){var
|
|
6677
|
+
*/function PictTemplateProviderLogValueTree(pFable,pOptions,pServiceHash){var _this129;_classCallCheck2(this,PictTemplateProviderLogValueTree);_this129=_callSuper(this,PictTemplateProviderLogValueTree,[pFable,pOptions,pServiceHash]);/** @type {any} */_defineProperty2(_this129,"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;}_this129.log.trace("[".concat(pBaseAddress,".").concat(tmpObjectValueKeys[i],"] (").concat(tmpBranchType,"): ").concat(tmpBranchValue));if(pCurrentDepth+1>pMaxDepth){return'';}else if(tmpBranchType=='object'){tmpBranchValue=_this129.logValueTreeObjectSet(pObject[tmpObjectValueKeys[i]],"".concat(pBaseAddress,".").concat(tmpObjectValueKeys[i]),pRootObject,pCurrentDepth+1,pMaxDepth);}}return'';});_this129.log;_this129.addPattern('{~LogValueTree:','~}');_this129.addPattern('{~LVT:','~}');return _this129;}/**
|
|
6636
6678
|
* Render a template expression, returning a string with the resulting content.
|
|
6637
6679
|
*
|
|
6638
6680
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6641,11 +6683,11 @@ tmpPictObjectBranchTemplate="\n<div class=\"PICTObjectBranchDepth_{~D:Record.Cur
|
|
|
6641
6683
|
* @param {any} [pScope] - A sticky scope that can be used to carry state and simplify template
|
|
6642
6684
|
*
|
|
6643
6685
|
* @return {string} The rendered template
|
|
6644
|
-
*/_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}],
|
|
6686
|
+
*/_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}],245:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderNotEmpty=/*#__PURE__*/function(_libPictTemplate35){/**
|
|
6645
6687
|
* @param {Object} pFable - The Fable Framework instance
|
|
6646
6688
|
* @param {Object} pOptions - The options for the service
|
|
6647
6689
|
* @param {String} pServiceHash - The hash of the service
|
|
6648
|
-
*/function PictTemplateProviderNotEmpty(pFable,pOptions,pServiceHash){var
|
|
6690
|
+
*/function PictTemplateProviderNotEmpty(pFable,pOptions,pServiceHash){var _this130;_classCallCheck2(this,PictTemplateProviderNotEmpty);_this130=_callSuper(this,PictTemplateProviderNotEmpty,[pFable,pOptions,pServiceHash]);/** @type {any} */_this130.log;_this130.addPattern('{~NotEmpty:','~}');_this130.addPattern('{~NE:','~}');return _this130;}/**
|
|
6649
6691
|
* Render a template expression, returning a string with the resulting content.
|
|
6650
6692
|
*
|
|
6651
6693
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6655,15 +6697,15 @@ tmpPictObjectBranchTemplate="\n<div class=\"PICTObjectBranchDepth_{~D:Record.Cur
|
|
|
6655
6697
|
*
|
|
6656
6698
|
* @return {string} The rendered template
|
|
6657
6699
|
*/_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.
|
|
6658
|
-
if(this.resolveStateFromAddress(tmpHashParts[0],tmpData,pContextArray,null,pScope)){return tmpHashParts[1];}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderNotEmpty;},{"pict-template":143}],
|
|
6700
|
+
if(this.resolveStateFromAddress(tmpHashParts[0],tmpData,pContextArray,null,pScope)){return tmpHashParts[1];}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderNotEmpty;},{"pict-template":143}],246:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateIfBase=/*#__PURE__*/function(_libPictTemplate36){/**
|
|
6659
6701
|
* @param {Object} pFable - The Fable Framework instance
|
|
6660
6702
|
* @param {Object} pOptions - The options for the service
|
|
6661
6703
|
* @param {String} pServiceHash - The hash of the service
|
|
6662
|
-
*/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}],
|
|
6704
|
+
*/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}],247:[function(require,module,exports){var libPictTemplateIf=require('./Pict-Template-TemplateIf-Base.js');var PictTemplateProviderTemplateIf=/*#__PURE__*/function(_libPictTemplateIf){/**
|
|
6663
6705
|
* @param {Object} pFable - The Fable Framework instance
|
|
6664
6706
|
* @param {Object} pOptions - The options for the service
|
|
6665
6707
|
* @param {String} pServiceHash - The hash of the service
|
|
6666
|
-
*/function PictTemplateProviderTemplateIf(pFable,pOptions,pServiceHash){var
|
|
6708
|
+
*/function PictTemplateProviderTemplateIf(pFable,pOptions,pServiceHash){var _this131;_classCallCheck2(this,PictTemplateProviderTemplateIf);_this131=_callSuper(this,PictTemplateProviderTemplateIf,[pFable,pOptions,pServiceHash]);/** @type {any} */_this131.log;_this131.addPattern('{~TemplateIf:','~}');_this131.addPattern('{~TIf:','~}');return _this131;}/**
|
|
6667
6709
|
* Render a template expression, returning a string with the resulting content.
|
|
6668
6710
|
*
|
|
6669
6711
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6692,11 +6734,11 @@ if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not reso
|
|
|
6692
6734
|
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...
|
|
6693
6735
|
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
|
|
6694
6736
|
try{// This is the only thing that's different from the absolute value function above. Collapse these.
|
|
6695
|
-
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":
|
|
6737
|
+
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":246}],248:[function(require,module,exports){var libPictTemplateIf=require('./Pict-Template-TemplateIf-Base.js');var PictTemplateProviderTemplateIfAbsolute=/*#__PURE__*/function(_libPictTemplateIf2){/**
|
|
6696
6738
|
* @param {Object} pFable - The Fable Framework instance
|
|
6697
6739
|
* @param {Object} pOptions - The options for the service
|
|
6698
6740
|
* @param {String} pServiceHash - The hash of the service
|
|
6699
|
-
*/function PictTemplateProviderTemplateIfAbsolute(pFable,pOptions,pServiceHash){var
|
|
6741
|
+
*/function PictTemplateProviderTemplateIfAbsolute(pFable,pOptions,pServiceHash){var _this132;_classCallCheck2(this,PictTemplateProviderTemplateIfAbsolute);_this132=_callSuper(this,PictTemplateProviderTemplateIfAbsolute,[pFable,pOptions,pServiceHash]);/** @type {any} */_this132.log;_this132.addPattern('{~TemplateIfAbsolute:','~}');_this132.addPattern('{~TIfAbs:','~}');return _this132;}/**
|
|
6700
6742
|
* Render a template expression, returning a string with the resulting content.
|
|
6701
6743
|
*
|
|
6702
6744
|
* @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
|
|
@@ -6724,5 +6766,5 @@ return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray,
|
|
|
6724
6766
|
if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return tmpCallback(null,'');}// No comparison operation
|
|
6725
6767
|
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...
|
|
6726
6768
|
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
|
|
6727
|
-
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":
|
|
6769
|
+
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":246}]},{},[199])(199);});
|
|
6728
6770
|
//# sourceMappingURL=pict.compatible.js.map
|