pict 1.0.286 → 1.0.288
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 +10 -5
- 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 +10 -5
- 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 +2 -2
- package/source/filters/Filter.js +1 -1
- package/test/Pict_FilterProvider_tests.js +23 -1
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.17","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
|
|
@@ -869,7 +869,7 @@ _this14._Regex_formatterInsertCommas=/.{1,3}/g;// Match Function:
|
|
|
869
869
|
// Thoughts about below: /^([+-]?)(0*)(\d+)(\.(\d+))?$/;
|
|
870
870
|
_this14._Regex_formatterAddCommasToNumber=/^([-+]?)(0?)(\d+)(.?)(\d+)$/g;_this14._Regex_formatterDollarsRemoveCommas=/,/gi;_this14._Regex_formatterCleanNonAlphaChar=/[^a-zA-Z]/gi;_this14._Regex_formatterCapitalizeEachWord=/([a-zA-Z]+)/g;_this14._Regex_matcherHTMLEntities=/&(#?[a-zA-Z0-9]+);/g;// TODO: Potentially pull these in from a configuration.
|
|
871
871
|
// TODO: Use locale data for this if it's defaults all the way down.
|
|
872
|
-
_this14._Value_MoneySign_Currency='$';_this14._Value_NaN_Currency='--';_this14._Value_GroupSeparator_Number=',';_this14._Value_Prefix_StringHash='HSH';_this14._Value_Clean_formatterCleanNonAlpha='';_this14._UseEngineStringStartsWith=typeof String.prototype.startsWith==='function';_this14._UseEngineStringEndsWith=typeof String.prototype.endsWith==='function';return _this14;}/*************************************************************************
|
|
872
|
+
_this14._Value_MoneySign_Currency='$';_this14._Value_NaN_Currency='--';_this14._Value_GroupSeparator_Number=',';_this14._Value_Prefix_StringHash='HSH';_this14._Value_Clean_formatterCleanNonAlpha='';_this14._UseEngineStringStartsWith=typeof String.prototype.startsWith==='function';_this14._UseEngineStringEndsWith=typeof String.prototype.endsWith==='function';_this14._SanitizeObjectKeyRegex=/[^a-zA-Z0-9_]/gi;_this14._SanitizeObjectKeyReplacement='_';_this14._SanitizeObjectKeyInvalid='INVALID';return _this14;}/*************************************************************************
|
|
873
873
|
* String Manipulation and Comparison Functions
|
|
874
874
|
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*//**
|
|
875
875
|
* Reverse a string
|
|
@@ -982,7 +982,12 @@ if(pString.startsWith(pWrapCharacter)&&pString.endsWith(pWrapCharacter)){return
|
|
|
982
982
|
*
|
|
983
983
|
* @param {*} pString
|
|
984
984
|
* @returns
|
|
985
|
-
*/},{key:"cleanNonAlphaCharacters",value:function cleanNonAlphaCharacters(pString){if(typeof pString=='string'&&pString!=''){return pString.replace(this._Regex_formatterCleanNonAlphaChar,this._Value_Clean_formatterCleanNonAlpha);}return'';}
|
|
985
|
+
*/},{key:"cleanNonAlphaCharacters",value:function cleanNonAlphaCharacters(pString){if(typeof pString=='string'&&pString!=''){return pString.replace(this._Regex_formatterCleanNonAlphaChar,this._Value_Clean_formatterCleanNonAlpha);}return'';}/**
|
|
986
|
+
* Clean a string of any characters to create a consistent object key.
|
|
987
|
+
*
|
|
988
|
+
* @param {string} pString The string to clean.
|
|
989
|
+
* @return {string} the cleaned string, or a placeholder if the input is invalid
|
|
990
|
+
*/},{key:"sanitizeObjectKey",value:function sanitizeObjectKey(pString){if(typeof pString!=='string'||pString.length<1){return this._SanitizeObjectKeyInvalid;}return pString.replace(this._SanitizeObjectKeyRegex,this._SanitizeObjectKeyReplacement);}/*************************************************************************
|
|
986
991
|
* Number Formatting Functions
|
|
987
992
|
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*//**
|
|
988
993
|
* Insert commas every 3 characters from the right. Used by formatterAddCommasToNumber().
|
|
@@ -5101,7 +5106,7 @@ try{if(!global.localStorage)return false;}catch(_){return false;}var val=global.
|
|
|
5101
5106
|
// presumably different callback function.
|
|
5102
5107
|
// This makes sure that own properties are retained, so that
|
|
5103
5108
|
// decorations and such are not lost along the way.
|
|
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.
|
|
5109
|
+
module.exports=wrappy;function wrappy(fn,cb){if(fn&&cb)return wrappy(fn)(cb);if(typeof fn!=='function')throw new TypeError('need wrapper function');Object.keys(fn).forEach(function(k){wrapper[k]=fn[k];});return wrapper;function wrapper(){var args=new Array(arguments.length);for(var i=0;i<args.length;i++){args[i]=arguments[i];}var ret=fn.apply(this,args);var cb=args[args.length-1];if(typeof ret==='function'&&ret!==cb){Object.keys(cb).forEach(function(k){ret[k]=cb[k];});}return ret;}}},{}],190:[function(require,module,exports){module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty;function extend(){var target={};for(var i=0;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;}},{}],191:[function(require,module,exports){module.exports={"name":"pict","version":"1.0.288","description":"Pict browser library.","main":"source/Pict.js","scripts":{"start":"node source/Pict.js","test":"npx mocha -u tdd -R spec","tests":"npx mocha -u tdd --exit -R spec --grep","coverage":"npx nyc --reporter=lcov --reporter=text-lcov npx mocha -- -u tdd -R spec","build":"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-image:local","docker-dev-run":"docker run -it -d --name pict-dev -p 37447:8080 -p 19506:8086 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/pict\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" pict-image:local","docker-dev-shell":"docker exec -it pict-dev /bin/bash","lint":"eslint source/**/*.js test/**/*.js","types":"tsc -p ."},"types":"types/source/Pict.d.ts","mocha":{"diff":true,"extension":["js"],"package":"./package.json","reporter":"spec","slow":"75","timeout":"5000","ui":"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},"repository":{"type":"git","url":"git+https://stevenvelozo@github.com/stevenvelozo/pict.git"},"author":"steven velozo <steven@velozo.com>","license":"MIT","bugs":{"url":"https://github.com/stevenvelozo/pict/issues"},"homepage":"https://github.com/stevenvelozo/pict#readme","devDependencies":{"@eslint/js":"^9.27.0","@types/jquery":"^3.5.32","@types/sinon":"^17.0.4","eslint":"^9.27.0","globals":"^16.2.0","quackage":"^1.0.42","sinon":"^20.0.0","typescript":"^5.8.3"},"dependencies":{"cachetrax":"^1.0.4","fable":"^3.1.17","pict-application":"^1.0.27","pict-provider":"^1.0.6","pict-template":"^1.0.12","pict-view":"^1.0.62"}};},{}],192:[function(require,module,exports){// This assumes Pict has been required in the browser. Delcare these as globals so linter can do its job.
|
|
5105
5110
|
/* global Pict, _Pict: writeable *//**
|
|
5106
5111
|
* Simple function to load a pict Application
|
|
5107
5112
|
*
|
|
@@ -5793,7 +5798,7 @@ return this.contentMap[pAddress];}this.pict.log.warn("Mock read from Address ".c
|
|
|
5793
5798
|
* @param {import('../Pict.js')} pFable
|
|
5794
5799
|
*/function FilterMeadowStanzaTokenGenerator(pFable){_classCallCheck2(this,FilterMeadowStanzaTokenGenerator);this.fable=pFable;this.pict=pFable;this.log=pFable.log;}/**
|
|
5795
5800
|
* @param {FilterState} pFilterState
|
|
5796
|
-
*/return _createClass2(FilterMeadowStanzaTokenGenerator,[{key:"generateMeadowFilterStanzas",value:function generateMeadowFilterStanzas(pFilterState){var tmpResult=[];pFilterState.UserFilters=[];var _iterator13=_createForOfIteratorHelper(pFilterState.FilterConfiguration||[]),_step13;try{for(_iterator13.s();!(_step13=_iterator13.n()).done;){var tmpFilterConfig=_step13.value;/** @type {PreparedFilter} */var tmpFilterResult={GUID:this.pict.getUUID(),Filters:[]};var tmpValuesArray=Array.isArray(tmpFilterConfig.Values)?tmpFilterConfig.Values:tmpFilterConfig.Value!=null?[tmpFilterConfig.Value]:[];switch(tmpFilterConfig.Type){case'ExternalJoinMatch':case'ExternalJoinStringMatch':case'ExternalJoinDateMatch':case'ExternalJoinNumericMatch':/*
|
|
5801
|
+
*/return _createClass2(FilterMeadowStanzaTokenGenerator,[{key:"generateMeadowFilterStanzas",value:function generateMeadowFilterStanzas(pFilterState){var tmpResult=[];pFilterState.UserFilters=[];var _iterator13=_createForOfIteratorHelper(pFilterState.FilterConfiguration||[]),_step13;try{for(_iterator13.s();!(_step13=_iterator13.n()).done;){var tmpFilterConfig=_step13.value;/** @type {PreparedFilter} */var tmpFilterResult={GUID:this.pict.getUUID(),Filters:[]};var tmpValuesArray=Array.isArray(tmpFilterConfig.Values)?tmpFilterConfig.Values:tmpFilterConfig.Value!=null&&tmpFilterConfig.Value!=''&&(tmpFilterConfig.Type!='ExternalJoinDateMatch'||tmpFilterConfig.Value!=0)?[tmpFilterConfig.Value]:[];switch(tmpFilterConfig.Type){case'ExternalJoinMatch':case'ExternalJoinStringMatch':case'ExternalJoinDateMatch':case'ExternalJoinNumericMatch':/*
|
|
5797
5802
|
"Values": [ "John", "Jane" ],
|
|
5798
5803
|
"ExternalFilterByColumns": [ "Name" ],
|
|
5799
5804
|
"ExactMatch": false,
|