pict 1.0.375 → 1.0.376

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.js CHANGED
@@ -6105,7 +6105,7 @@ try{if(!global.localStorage)return false;}catch(_){return false;}var val=global.
6105
6105
  // presumably different callback function.
6106
6106
  // This makes sure that own properties are retained, so that
6107
6107
  // decorations and such are not lost along the way.
6108
- 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;}}},{}],191:[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;}},{}],192:[function(require,module,exports){module.exports={"name":"pict","version":"1.0.375","description":"Pict browser library.","main":"source/Pict.js","scripts":{"start":"node source/Pict.js","test":"npx quack test","tests":"npx quack test -g","coverage":"npx quack coverage","build":"npx quack build","prepublishOnly":"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 ."},"files":["source/","dist/","types/"],"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/fable-retold/pict/issues"},"homepage":"https://github.com/fable-retold/pict#readme","devDependencies":{"@eslint/js":"^9.39.1","@types/jquery":"^3.5.33","@types/sinon":"^17.0.4","eslint":"^9.39.1","globals":"^16.5.0","pict-docuserve":"^1.4.19","quackage":"^1.3.0","sinon":"^20.0.0","typescript":"^5.9.3"},"dependencies":{"cachetrax":"^1.0.6","fable":"^3.1.75","pict-application":"^1.0.34","pict-provider":"^1.0.13","pict-template":"^1.0.15","pict-view":"^1.0.68"}};},{}],193:[function(require,module,exports){// This assumes Pict has been required in the browser. Delcare these as globals so linter can do its job.
6108
+ 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;}}},{}],191:[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;}},{}],192:[function(require,module,exports){module.exports={"name":"pict","version":"1.0.376","description":"Pict browser library.","main":"source/Pict.js","scripts":{"start":"node source/Pict.js","test":"npx quack test","tests":"npx quack test -g","coverage":"npx quack coverage","build":"npx quack build","prepublishOnly":"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 ."},"files":["source/","dist/","types/"],"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/fable-retold/pict/issues"},"homepage":"https://github.com/fable-retold/pict#readme","devDependencies":{"@eslint/js":"^9.39.1","@types/jquery":"^3.5.33","@types/sinon":"^17.0.4","eslint":"^9.39.1","globals":"^16.5.0","pict-docuserve":"^1.4.19","quackage":"^1.3.0","sinon":"^20.0.0","typescript":"^5.9.3"},"dependencies":{"cachetrax":"^1.0.6","fable":"^3.1.75","pict-application":"^1.0.34","pict-provider":"^1.0.13","pict-template":"^1.0.15","pict-view":"^1.0.68"}};},{}],193:[function(require,module,exports){// This assumes Pict has been required in the browser. Delcare these as globals so linter can do its job.
6109
6109
  /* global Pict, _Pict: writeable *//**
6110
6110
  * Simple function to load a pict Application
6111
6111
  *
@@ -7277,7 +7277,15 @@ tmpFilter.Operator='EQ';tmpFilter.Value=tmpValue;}else{tmpFilter.Operator='LK';t
7277
7277
  */compileMeadowFilterStanzas(pFilterState){const tmpBundleConfig=[];//TODO: mathematically solve the number line
7278
7278
  // planned synthesized syntax for running on the server
7279
7279
  // FBV-3_Author~Name~LK~%25Ann%25~FBL-2_BookAuthorJoin~IDAuthor~INN~{~PJU:,^State[Step-3]^IDAuthor~}~FBV-1~User~NameFirst~LK~%25Bob%25~FBVOR-1~User~NameLast~LK~%25Bob%25~FBV~CreateDate~GT~2023-01-01T00:00:00Z~FBV~CreateDate~LT~2024-01-01T00:00:00Z~FBL~IDBook~INN~{~PJU:,^State[Step-2]^IDBook~}
7280
- if(!pFilterState.Filter){pFilterState.Filter=`${pFilterState.Entity||'Unknown'}-${this.pict.getUUID()}`;}tmpBundleConfig.push({Type:'SetStateAddress',StateAddress:`Bundle[${pFilterState.Filter}]`});const tmpGroupedFilters={};const tmpGroupedFilterKeys=[];const tmpGroupedCoreFilters=[];const tmpGroupedCoreFilterKeys=[];let tmpCoreEntity;const tmpCoreFilterStrings=[];for(const tmpFilterGroup of pFilterState.PreparedFilters){for(const tmpFilter of tmpFilterGroup.Filters){if(tmpFilter.CoreEntity){tmpCoreEntity=tmpFilter.Entity;const tmpFilterGUID=`${tmpFilterGroup.GUID}-${tmpFilter.ComputedIndex}`;if(!tmpGroupedCoreFilterKeys.find(v=>v==tmpFilterGUID)){tmpGroupedCoreFilterKeys.push(tmpFilterGUID);}if(!tmpGroupedCoreFilters[tmpFilterGUID]){tmpGroupedCoreFilters[tmpFilterGUID]={Stanzas:[],ComputedIndex:tmpFilter.ComputedIndex,Entity:tmpFilter.Entity,Junction:tmpFilterGroup.Junction||'AND',GroupOpen:tmpFilterGroup.GroupOpen||false,GroupJunction:tmpFilterGroup.GroupJunction||'AND',GroupClose:tmpFilterGroup.GroupClose||false};}tmpGroupedCoreFilters[tmpFilterGUID].Stanzas.push(this._compileSimpleFilterToString(tmpFilter));}else{const tmpFilterGroupGUID=`${tmpFilterGroup.GUID}-${tmpFilter.ComputedIndex}`;if(!tmpGroupedFilterKeys.find(v=>v==tmpFilterGroupGUID)){tmpGroupedFilterKeys.push(tmpFilterGroupGUID);}if(!tmpGroupedFilters[tmpFilterGroupGUID]){tmpGroupedFilters[tmpFilterGroupGUID]={Stanzas:[],ComputedIndex:tmpFilter.ComputedIndex,Entity:tmpFilter.Entity};}tmpGroupedFilters[tmpFilterGroupGUID].Stanzas.push(this._compileSimpleFilterToString(tmpFilter));}}for(const tmpFilterGroupKey of tmpGroupedFilterKeys){tmpGroupedFilters[tmpFilterGroupKey].Stanzas=tmpGroupedFilters[tmpFilterGroupKey].Stanzas.filter(f=>f.length>0);if(tmpGroupedFilters[tmpFilterGroupKey].Stanzas.length>0){tmpBundleConfig.push({Type:'MeadowEntity',AllRecords:true,Entity:tmpGroupedFilters[tmpFilterGroupKey].Entity,Filter:tmpGroupedFilters[tmpFilterGroupKey].Stanzas.join('~'),Destination:`State[Step${tmpGroupedFilters[tmpFilterGroupKey].ComputedIndex}]`});}}}for(const tmpCoreFilterKey of tmpGroupedCoreFilterKeys){tmpGroupedCoreFilters[tmpCoreFilterKey].Stanzas=tmpGroupedCoreFilters[tmpCoreFilterKey].Stanzas.filter(f=>f.length>0);if(tmpGroupedCoreFilters[tmpCoreFilterKey].Stanzas.length>0){let stringConstruct='';if(tmpGroupedCoreFilters[tmpCoreFilterKey].GroupOpen){stringConstruct+=tmpGroupedCoreFilters[tmpCoreFilterKey].GroupJunction=='OR'?'FOPOR~0~(~0~':'FOP~0~(~0~';}stringConstruct+=[tmpGroupedCoreFilters[tmpCoreFilterKey].Junction=='OR'?'FOPOR~0~(~0':'FOP~0~(~0',...tmpGroupedCoreFilters[tmpCoreFilterKey].Stanzas,'FCP~0~)~0'].join('~');if(tmpGroupedCoreFilters[tmpCoreFilterKey].GroupClose){stringConstruct+='~FCP~0~)~0';}tmpCoreFilterStrings.push(stringConstruct);}}if(!tmpCoreEntity){tmpCoreEntity=pFilterState.Entity;}const tmpCoreLoadStep={Type:pFilterState.Mode==='Count'?'MeadowEntityCount':'MeadowEntity',Entity:tmpCoreEntity,Filter:tmpCoreFilterStrings.join('~'),AllRecords:typeof pFilterState.PageSize==='undefined',RecordStartCursor:pFilterState.RecordOffset,Postfix:pFilterState.Postfix||'',Scope:pFilterState.Scope||'',Projection:pFilterState.Projection,PageSize:pFilterState.PageSize,Destination:pFilterState.ResultDestinationAddress};if(pFilterState.UserFilters.length>0){let tmpAllSorts='';let tmpFilter='';for(const tmpUserFilter of pFilterState.UserFilters){let tmpSorts;let tmpSanitizedUserFilter=tmpUserFilter;if(pFilterState.Mode==='Count'){tmpSanitizedUserFilter=this._sanitizeFilterForCount(tmpUserFilter);}else{var _this$_extractSortsFr=this._extractSortsFromFilter(tmpUserFilter);var _this$_extractSortsFr2=_slicedToArray(_this$_extractSortsFr,2);tmpSanitizedUserFilter=_this$_extractSortsFr2[0];tmpSorts=_this$_extractSortsFr2[1];if(tmpSorts){if(tmpAllSorts.length>0){tmpAllSorts+='~';}tmpAllSorts+=tmpSorts;}if(!tmpSanitizedUserFilter){continue;}}if(!tmpSanitizedUserFilter){continue;}if(tmpFilter.length>0){tmpFilter+='~';}tmpFilter+='FOP~0~(~0~';tmpFilter+=tmpSanitizedUserFilter;tmpFilter+='~FCP~0~)~0';}if(tmpCoreLoadStep.Filter){if(tmpFilter.length>0){tmpFilter+='~';}tmpFilter+='FOP~0~(~0~';tmpFilter+=tmpCoreLoadStep.Filter;tmpFilter+='~FCP~0~)~0';}if(tmpAllSorts){if(tmpFilter.length>0){tmpFilter+='~';}tmpFilter+=tmpAllSorts;}tmpCoreLoadStep.Filter=tmpFilter;}tmpBundleConfig.push(tmpCoreLoadStep);pFilterState.BundleConfig=tmpBundleConfig;}/**
7280
+ if(!pFilterState.Filter){pFilterState.Filter=`${pFilterState.Entity||'Unknown'}-${this.pict.getUUID()}`;}tmpBundleConfig.push({Type:'SetStateAddress',StateAddress:`Bundle[${pFilterState.Filter}]`});const tmpGroupedFilters={};const tmpGroupedFilterKeys=[];const tmpGroupedCoreFilters=[];const tmpGroupedCoreFilterKeys=[];let tmpCoreEntity;const tmpCoreFilterStrings=[];for(const tmpFilterGroup of pFilterState.PreparedFilters){for(const tmpFilter of tmpFilterGroup.Filters){if(tmpFilter.CoreEntity){tmpCoreEntity=tmpFilter.Entity;const tmpFilterGUID=`${tmpFilterGroup.GUID}-${tmpFilter.ComputedIndex}`;if(!tmpGroupedCoreFilterKeys.find(v=>v==tmpFilterGUID)){tmpGroupedCoreFilterKeys.push(tmpFilterGUID);}if(!tmpGroupedCoreFilters[tmpFilterGUID]){tmpGroupedCoreFilters[tmpFilterGUID]={Stanzas:[],ComputedIndex:tmpFilter.ComputedIndex,Entity:tmpFilter.Entity,Junction:tmpFilterGroup.Junction||'AND',GroupOpen:tmpFilterGroup.GroupOpen||false,GroupJunction:tmpFilterGroup.GroupJunction||'AND',GroupClose:tmpFilterGroup.GroupClose||false};}tmpGroupedCoreFilters[tmpFilterGUID].Stanzas.push(this._compileSimpleFilterToString(tmpFilter));}else{const tmpFilterGroupGUID=`${tmpFilterGroup.GUID}-${tmpFilter.ComputedIndex}`;if(!tmpGroupedFilterKeys.find(v=>v==tmpFilterGroupGUID)){tmpGroupedFilterKeys.push(tmpFilterGroupGUID);}if(!tmpGroupedFilters[tmpFilterGroupGUID]){tmpGroupedFilters[tmpFilterGroupGUID]={Stanzas:[],ComputedIndex:tmpFilter.ComputedIndex,Entity:tmpFilter.Entity};}tmpGroupedFilters[tmpFilterGroupGUID].Stanzas.push(this._compileSimpleFilterToString(tmpFilter));}}for(const tmpFilterGroupKey of tmpGroupedFilterKeys){tmpGroupedFilters[tmpFilterGroupKey].Stanzas=tmpGroupedFilters[tmpFilterGroupKey].Stanzas.filter(f=>f.length>0);if(tmpGroupedFilters[tmpFilterGroupKey].Stanzas.length>0){tmpBundleConfig.push({Type:'MeadowEntity',AllRecords:true,Entity:tmpGroupedFilters[tmpFilterGroupKey].Entity,Filter:tmpGroupedFilters[tmpFilterGroupKey].Stanzas.join('~'),Destination:`State[Step${tmpGroupedFilters[tmpFilterGroupKey].ComputedIndex}]`});}}}for(const tmpCoreFilterKey of tmpGroupedCoreFilterKeys){tmpGroupedCoreFilters[tmpCoreFilterKey].Stanzas=tmpGroupedCoreFilters[tmpCoreFilterKey].Stanzas.filter(f=>f.length>0);if(tmpGroupedCoreFilters[tmpCoreFilterKey].Stanzas.length>0){let stringConstruct='';if(tmpGroupedCoreFilters[tmpCoreFilterKey].GroupOpen){stringConstruct+=tmpGroupedCoreFilters[tmpCoreFilterKey].GroupJunction=='OR'?'FOPOR~0~(~0~':'FOP~0~(~0~';}stringConstruct+=[tmpGroupedCoreFilters[tmpCoreFilterKey].Junction=='OR'?'FOPOR~0~(~0':'FOP~0~(~0',...tmpGroupedCoreFilters[tmpCoreFilterKey].Stanzas,'FCP~0~)~0'].join('~');if(tmpGroupedCoreFilters[tmpCoreFilterKey].GroupClose){stringConstruct+='~FCP~0~)~0';}tmpCoreFilterStrings.push(stringConstruct);}}if(!tmpCoreEntity){tmpCoreEntity=pFilterState.Entity;}const tmpCoreLoadStep={Type:pFilterState.Mode==='Count'?'MeadowEntityCount':'MeadowEntity',Entity:tmpCoreEntity,Filter:tmpCoreFilterStrings.join('~'),AllRecords:typeof pFilterState.PageSize==='undefined',RecordStartCursor:pFilterState.RecordOffset,Postfix:pFilterState.Postfix||'',Scope:pFilterState.Scope||'',Projection:pFilterState.Projection,PageSize:pFilterState.PageSize,Destination:pFilterState.ResultDestinationAddress};if(pFilterState.UserFilters.length>0){let tmpAllSorts='';let tmpFilter='';for(const tmpUserFilter of pFilterState.UserFilters){let tmpSorts;let tmpSanitizedUserFilter=tmpUserFilter;if(pFilterState.Mode==='Count'){tmpSanitizedUserFilter=this._sanitizeFilterForCount(tmpUserFilter);}else{var _this$_extractSortsFr=this._extractSortsFromFilter(tmpUserFilter);var _this$_extractSortsFr2=_slicedToArray(_this$_extractSortsFr,2);tmpSanitizedUserFilter=_this$_extractSortsFr2[0];tmpSorts=_this$_extractSortsFr2[1];if(tmpSorts){if(tmpAllSorts.length>0){tmpAllSorts+='~';}tmpAllSorts+=tmpSorts;}if(!tmpSanitizedUserFilter){continue;}}if(!tmpSanitizedUserFilter){continue;}if(tmpFilter.length>0){tmpFilter+='~';}// The user-filter and core-filter strings already carry their
7281
+ // own paren grouping from the per-group serializer above (the
7282
+ // `FOP(stanzas)` wrap at line 822). Wrapping a SECOND time here
7283
+ // produces `FOP(FOP(...))` which meadow-endpoints'
7284
+ // MeadowEndpoints dialect (used by the lake's
7285
+ // /PrivateDataLake/* routes) treats as malformed — the route
7286
+ // 404s instead of filtering. The right shape is one paren per
7287
+ // logical group, concatenated flat at the top level.
7288
+ tmpFilter+=tmpSanitizedUserFilter;}if(tmpCoreLoadStep.Filter){if(tmpFilter.length>0){tmpFilter+='~';}tmpFilter+=tmpCoreLoadStep.Filter;}if(tmpAllSorts){if(tmpFilter.length>0){tmpFilter+='~';}tmpFilter+=tmpAllSorts;}tmpCoreLoadStep.Filter=tmpFilter;}tmpBundleConfig.push(tmpCoreLoadStep);pFilterState.BundleConfig=tmpBundleConfig;}/**
7281
7289
  * @param {string} pFilter
7282
7290
  *
7283
7291
  * @return {string}