@memberjunction/react-runtime 5.47.0 → 5.48.0

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.
@@ -1,13 +1,13 @@
1
1
 
2
- > @memberjunction/react-runtime@5.47.0 build
2
+ > @memberjunction/react-runtime@5.48.0 build
3
3
  > npm run build:node && npm run build:umd
4
4
 
5
5
 
6
- > @memberjunction/react-runtime@5.47.0 build:node
6
+ > @memberjunction/react-runtime@5.48.0 build:node
7
7
  > tsc && tsc-alias -f
8
8
 
9
9
 
10
- > @memberjunction/react-runtime@5.47.0 build:umd
10
+ > @memberjunction/react-runtime@5.48.0 build:umd
11
11
  > webpack --config webpack.umd.config.cjs
12
12
 
13
13
  Browserslist: browsers data (caniuse-lite) is 6 months old. Please run:
@@ -31,4 +31,4 @@ cacheable modules 8.72 MiB
31
31
  ../../MJCore/dist/index.js + 88 modules 1.74 MiB [built] [code generated]
32
32
  ../../MJGlobal/dist/index.js + 22 modules 293 KiB [built] [code generated]
33
33
  ../../GraphQLDataProvider/dist/index.mjs 192 KiB [built] [code generated]
34
- webpack 5.105.0 compiled successfully in 65446 ms
34
+ webpack 5.105.0 compiled successfully in 81946 ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @memberjunction/react-runtime
2
2
 
3
+ ## 5.48.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [09e1b4b]
8
+ - Updated dependencies [f613d0d]
9
+ - @memberjunction/core@5.48.0
10
+ - @memberjunction/core-entities@5.48.0
11
+ - @memberjunction/graphql-dataprovider@5.48.0
12
+ - @memberjunction/interactive-component-types@5.48.0
13
+ - @memberjunction/global@5.48.0
14
+
3
15
  ## 5.47.0
4
16
 
5
17
  ### Patch Changes
@@ -361,7 +361,7 @@ var se=Object.defineProperty;var d=(g,e)=>se(g,"name",{value:e,configurable:!0})
361
361
  }
362
362
  }
363
363
  }
364
- `,r={entityDocumentID:e.entityDocumentID};e.maxRecords!==void 0&&(r.maxRecords=e.maxRecords),e.filter!==void 0&&(r.filter=e.filter);const s=await this._dataProvider.ExecuteGQL(t,r);if(!s?.FetchEntityVectors)throw new Error("Invalid response from server");return s.FetchEntityVectors}catch(t){const r=t;return (0,_memberjunction_core__WEBPACK_IMPORTED_MODULE_1__/* .LogError */ .ZI8)("GraphQLAIClient.FetchEntityVectors failed",void 0,r),{Success:!1,Results:[],TotalCount:0,ElapsedMs:0,ErrorMessage:r.message||"Unknown error"}}}}const F="5.47.0",w="default";class X{static{d(this,"BrowserStorageProviderBase")}constructor(){this._storage=new Map}getCategoryMap(e){const t=e||w;let r=this._storage.get(t);return r||(r=new Map,this._storage.set(t,r)),r}async GetItem(e,t){const s=this.getCategoryMap(t||w).get(e);return s===void 0?null:s}async GetItems(e,t){const r=new Map;if(e.length===0)return r;const s=this.getCategoryMap(t||w);for(const n of new Set(e)){const a=s.get(n);r.set(n,a===void 0?null:a)}return r}async SetItem(e,t,r){this.getCategoryMap(r||w).set(e,t)}async Remove(e,t){this.getCategoryMap(t||w).delete(e)}async ClearCategory(e){const t=e||w;this._storage.delete(t)}async GetCategoryKeys(e){const t=this._storage.get(e||w);return t?Array.from(t.keys()):[]}}const $e="MJ_Metadata",Pe=0;function Me(){try{const g=F.split("."),e=parseInt(g[0],10),t=parseInt(g[1],10);if(!Number.isFinite(e)||!Number.isFinite(t))throw new Error(`Could not parse major.minor from version "${F}"`);return e*1e3+t+Pe}catch(g){return (0,_memberjunction_core__WEBPACK_IMPORTED_MODULE_1__/* .LogErrorEx */ .Q1A)({error:g,message:"Failed to derive IDB version from PACKAGE_VERSION; using fallback 99999"}),99999}}d(Me,"computeIdbVersion");const Ae=Me(),Y=["mj:default","mj:Metadata","mj:RunViewCache","mj:RunQueryCache","mj:DatasetCache"];class Z extends X{static{d(this,"BrowserIndexedDBStorageProvider")}constructor(){super(),this._dbReady=!1,this.dbPromise=(0,_tempfix_idb__WEBPACK_IMPORTED_MODULE_10__/* .openDB */ .P2)($e,Ae,{upgrade:d((e,t,r)=>{try{(0,_memberjunction_core__WEBPACK_IMPORTED_MODULE_1__/* .LogStatus */ .b09)(`[IDBCache] Upgrading IndexedDB schema v${t} \u2192 v${r} (package ${F}). Dropping all stores; caches will repopulate on first use.`);for(const s of Array.from(e.objectStoreNames))e.deleteObjectStore(s);for(const s of Y)e.objectStoreNames.contains(s)||e.createObjectStore(s)}catch(s){(0,_memberjunction_core__WEBPACK_IMPORTED_MODULE_1__/* .LogErrorEx */ .Q1A)({error:s,message:s?.message})}},"upgrade"),blocked:d((e,t)=>{(0,_memberjunction_core__WEBPACK_IMPORTED_MODULE_1__/* .LogStatus */ .b09)(`[IDBCache] Upgrade from v${e} to v${t} blocked by another tab. Close other tabs to allow the upgrade to proceed.`)},"blocked")}),this.dbPromise.then(e=>{this._dbReady=!0,e.onversionchange=()=>{(0,_memberjunction_core__WEBPACK_IMPORTED_MODULE_1__/* .LogStatus */ .b09)("[IDBCache] DB schema upgraded in another tab \u2014 closing local connection."),e.close(),this._dbReady=!1}}).catch(e=>{(0,_memberjunction_core__WEBPACK_IMPORTED_MODULE_1__/* .LogErrorEx */ .Q1A)({error:e,message:"IndexedDB initialization failed: "+e?.message})})}get IsReady(){return this._dbReady}isKnownCategory(e){const t=`mj:${e}`;return Y.includes(t)}getStoreName(e){const t=e||w;return this.isKnownCategory(t)?`mj:${t}`:"mj:default"}getStoreKey(e,t){const r=t||w;return this.isKnownCategory(r)?e:`[${r}]:${e}`}async SetItem(e,t,r){try{const s=await this.dbPromise,n=this.getStoreName(r),a=this.getStoreKey(e,r),i=s.transaction(n,"readwrite");await i.objectStore(n).put(t,a),await i.done}catch(s){(0,_memberjunction_core__WEBPACK_IMPORTED_MODULE_1__/* .LogErrorEx */ .Q1A)({error:s,message:s?.message})}}async GetItem(e,t){try{const r=await this.dbPromise,s=this.getStoreName(t),n=this.getStoreKey(e,t),a=await r.transaction(s).objectStore(s).get(n);return a===void 0?null:a}catch(r){return (0,_memberjunction_core__WEBPACK_IMPORTED_MODULE_1__/* .LogErrorEx */ .Q1A)({error:r,message:r?.message}),null}}async GetItems(e,t){const r=new Map;if(e.length===0)return r;try{const s=await this.dbPromise,n=this.getStoreName(t),a=Array.from(new Set(e)),i=a.map(f=>this.getStoreKey(f,t)),o=s.transaction(n,"readonly"),y=o.objectStore(n),u=i.map(f=>y.get(f)),h=await Promise.all(u);await o.done;for(let f=0;f<a.length;f++){const m=h[f];r.set(a[f],m===void 0?null:m)}return r}catch(s){(0,_memberjunction_core__WEBPACK_IMPORTED_MODULE_1__/* .LogErrorEx */ .Q1A)({error:s,message:s?.message});for(const n of new Set(e))r.set(n,null);return r}}async Remove(e,t){try{const r=await this.dbPromise,s=this.getStoreName(t),n=this.getStoreKey(e,t),a=r.transaction(s,"readwrite");await a.objectStore(s).delete(n),await a.done}catch(r){(0,_memberjunction_core__WEBPACK_IMPORTED_MODULE_1__/* .LogErrorEx */ .Q1A)({error:r,message:r?.message})}}async ClearCategory(e){try{const t=await this.dbPromise,r=e||w,s=this.getStoreName(e);if(this.isKnownCategory(r)){const n=t.transaction(s,"readwrite");await n.objectStore(s).clear(),await n.done}else{const n=`[${r}]:`,a=t.transaction("mj:default","readwrite"),i=a.objectStore("mj:default"),o=await i.getAllKeys();for(const y of o)typeof y=="string"&&y.startsWith(n)&&await i.delete(y);await a.done}}catch(t){(0,_memberjunction_core__WEBPACK_IMPORTED_MODULE_1__/* .LogErrorEx */ .Q1A)({error:t,message:t?.message})}}async GetCategoryKeys(e){try{const t=await this.dbPromise,r=e||w,s=this.getStoreName(e),i=await t.transaction(s,"readonly").objectStore(s).getAllKeys();if(this.isKnownCategory(r))return i.map(y=>String(y));const o=`[${r}]:`;return i.map(y=>String(y)).filter(y=>y.startsWith(o)).map(y=>y.slice(o.length))}catch(t){return (0,_memberjunction_core__WEBPACK_IMPORTED_MODULE_1__/* .LogErrorEx */ .Q1A)({error:t,message:t?.message}),[]}}}const b=new M,Ne=(0,graphql_request__WEBPACK_IMPORTED_MODULE_0__/* .gql */ .J1)`subscription RemoteOperationProgress($channelId: ID!) {
364
+ `,r={entityDocumentID:e.entityDocumentID};e.maxRecords!==void 0&&(r.maxRecords=e.maxRecords),e.filter!==void 0&&(r.filter=e.filter);const s=await this._dataProvider.ExecuteGQL(t,r);if(!s?.FetchEntityVectors)throw new Error("Invalid response from server");return s.FetchEntityVectors}catch(t){const r=t;return (0,_memberjunction_core__WEBPACK_IMPORTED_MODULE_1__/* .LogError */ .ZI8)("GraphQLAIClient.FetchEntityVectors failed",void 0,r),{Success:!1,Results:[],TotalCount:0,ElapsedMs:0,ErrorMessage:r.message||"Unknown error"}}}}const F="5.48.0",w="default";class X{static{d(this,"BrowserStorageProviderBase")}constructor(){this._storage=new Map}getCategoryMap(e){const t=e||w;let r=this._storage.get(t);return r||(r=new Map,this._storage.set(t,r)),r}async GetItem(e,t){const s=this.getCategoryMap(t||w).get(e);return s===void 0?null:s}async GetItems(e,t){const r=new Map;if(e.length===0)return r;const s=this.getCategoryMap(t||w);for(const n of new Set(e)){const a=s.get(n);r.set(n,a===void 0?null:a)}return r}async SetItem(e,t,r){this.getCategoryMap(r||w).set(e,t)}async Remove(e,t){this.getCategoryMap(t||w).delete(e)}async ClearCategory(e){const t=e||w;this._storage.delete(t)}async GetCategoryKeys(e){const t=this._storage.get(e||w);return t?Array.from(t.keys()):[]}}const $e="MJ_Metadata",Pe=0;function Me(){try{const g=F.split("."),e=parseInt(g[0],10),t=parseInt(g[1],10);if(!Number.isFinite(e)||!Number.isFinite(t))throw new Error(`Could not parse major.minor from version "${F}"`);return e*1e3+t+Pe}catch(g){return (0,_memberjunction_core__WEBPACK_IMPORTED_MODULE_1__/* .LogErrorEx */ .Q1A)({error:g,message:"Failed to derive IDB version from PACKAGE_VERSION; using fallback 99999"}),99999}}d(Me,"computeIdbVersion");const Ae=Me(),Y=["mj:default","mj:Metadata","mj:RunViewCache","mj:RunQueryCache","mj:DatasetCache"];class Z extends X{static{d(this,"BrowserIndexedDBStorageProvider")}constructor(){super(),this._dbReady=!1,this.dbPromise=(0,_tempfix_idb__WEBPACK_IMPORTED_MODULE_10__/* .openDB */ .P2)($e,Ae,{upgrade:d((e,t,r)=>{try{(0,_memberjunction_core__WEBPACK_IMPORTED_MODULE_1__/* .LogStatus */ .b09)(`[IDBCache] Upgrading IndexedDB schema v${t} \u2192 v${r} (package ${F}). Dropping all stores; caches will repopulate on first use.`);for(const s of Array.from(e.objectStoreNames))e.deleteObjectStore(s);for(const s of Y)e.objectStoreNames.contains(s)||e.createObjectStore(s)}catch(s){(0,_memberjunction_core__WEBPACK_IMPORTED_MODULE_1__/* .LogErrorEx */ .Q1A)({error:s,message:s?.message})}},"upgrade"),blocked:d((e,t)=>{(0,_memberjunction_core__WEBPACK_IMPORTED_MODULE_1__/* .LogStatus */ .b09)(`[IDBCache] Upgrade from v${e} to v${t} blocked by another tab. Close other tabs to allow the upgrade to proceed.`)},"blocked")}),this.dbPromise.then(e=>{this._dbReady=!0,e.onversionchange=()=>{(0,_memberjunction_core__WEBPACK_IMPORTED_MODULE_1__/* .LogStatus */ .b09)("[IDBCache] DB schema upgraded in another tab \u2014 closing local connection."),e.close(),this._dbReady=!1}}).catch(e=>{(0,_memberjunction_core__WEBPACK_IMPORTED_MODULE_1__/* .LogErrorEx */ .Q1A)({error:e,message:"IndexedDB initialization failed: "+e?.message})})}get IsReady(){return this._dbReady}isKnownCategory(e){const t=`mj:${e}`;return Y.includes(t)}getStoreName(e){const t=e||w;return this.isKnownCategory(t)?`mj:${t}`:"mj:default"}getStoreKey(e,t){const r=t||w;return this.isKnownCategory(r)?e:`[${r}]:${e}`}async SetItem(e,t,r){try{const s=await this.dbPromise,n=this.getStoreName(r),a=this.getStoreKey(e,r),i=s.transaction(n,"readwrite");await i.objectStore(n).put(t,a),await i.done}catch(s){(0,_memberjunction_core__WEBPACK_IMPORTED_MODULE_1__/* .LogErrorEx */ .Q1A)({error:s,message:s?.message})}}async GetItem(e,t){try{const r=await this.dbPromise,s=this.getStoreName(t),n=this.getStoreKey(e,t),a=await r.transaction(s).objectStore(s).get(n);return a===void 0?null:a}catch(r){return (0,_memberjunction_core__WEBPACK_IMPORTED_MODULE_1__/* .LogErrorEx */ .Q1A)({error:r,message:r?.message}),null}}async GetItems(e,t){const r=new Map;if(e.length===0)return r;try{const s=await this.dbPromise,n=this.getStoreName(t),a=Array.from(new Set(e)),i=a.map(f=>this.getStoreKey(f,t)),o=s.transaction(n,"readonly"),y=o.objectStore(n),u=i.map(f=>y.get(f)),h=await Promise.all(u);await o.done;for(let f=0;f<a.length;f++){const m=h[f];r.set(a[f],m===void 0?null:m)}return r}catch(s){(0,_memberjunction_core__WEBPACK_IMPORTED_MODULE_1__/* .LogErrorEx */ .Q1A)({error:s,message:s?.message});for(const n of new Set(e))r.set(n,null);return r}}async Remove(e,t){try{const r=await this.dbPromise,s=this.getStoreName(t),n=this.getStoreKey(e,t),a=r.transaction(s,"readwrite");await a.objectStore(s).delete(n),await a.done}catch(r){(0,_memberjunction_core__WEBPACK_IMPORTED_MODULE_1__/* .LogErrorEx */ .Q1A)({error:r,message:r?.message})}}async ClearCategory(e){try{const t=await this.dbPromise,r=e||w,s=this.getStoreName(e);if(this.isKnownCategory(r)){const n=t.transaction(s,"readwrite");await n.objectStore(s).clear(),await n.done}else{const n=`[${r}]:`,a=t.transaction("mj:default","readwrite"),i=a.objectStore("mj:default"),o=await i.getAllKeys();for(const y of o)typeof y=="string"&&y.startsWith(n)&&await i.delete(y);await a.done}}catch(t){(0,_memberjunction_core__WEBPACK_IMPORTED_MODULE_1__/* .LogErrorEx */ .Q1A)({error:t,message:t?.message})}}async GetCategoryKeys(e){try{const t=await this.dbPromise,r=e||w,s=this.getStoreName(e),i=await t.transaction(s,"readonly").objectStore(s).getAllKeys();if(this.isKnownCategory(r))return i.map(y=>String(y));const o=`[${r}]:`;return i.map(y=>String(y)).filter(y=>y.startsWith(o)).map(y=>y.slice(o.length))}catch(t){return (0,_memberjunction_core__WEBPACK_IMPORTED_MODULE_1__/* .LogErrorEx */ .Q1A)({error:t,message:t?.message}),[]}}}const b=new M,Ne=(0,graphql_request__WEBPACK_IMPORTED_MODULE_0__/* .gql */ .J1)`subscription RemoteOperationProgress($channelId: ID!) {
365
365
  RemoteOperationProgress(channelId: $channelId) {
366
366
  ChannelId
367
367
  ProgressJSON
@@ -42186,7 +42186,13 @@ var ProviderBase = /*#__PURE__*/function () {
42186
42186
  this._localMetadata = new AllMetadata();
42187
42187
  this._entityMapByName = new Map();
42188
42188
  this._entityMapByID = new Map();
42189
- this._entityRecordNameCache = new Map();
42189
+ // Bounded LRU (unlike its siblings above, this cache holds one entry per distinct
42190
+ // *record* touched via Load()/Save()/LoadFromData() — not per entity definition — so
42191
+ // it can't be reset on metadata refresh; it needs its own eviction policy.
42192
+ this._entityRecordNameCache = new dist/* MJLruCache */.HE({
42193
+ maxSize: 10000,
42194
+ ttlMs: 60 * 60 * 1000
42195
+ });
42190
42196
  this._refresh = false;
42191
42197
  this._lastRefreshCheckAt = 0;
42192
42198
  /**
@@ -42352,7 +42358,7 @@ var ProviderBase = /*#__PURE__*/function () {
42352
42358
  return providerBase_regenerator().w(function (_context) {
42353
42359
  while (1) switch (_context.n) {
42354
42360
  case 0:
42355
- cachedEntry = this._entityRecordNameCache.get(this.getCacheKey(entityName, compositeKey));
42361
+ cachedEntry = this._entityRecordNameCache.Get(this.getCacheKey(entityName, compositeKey));
42356
42362
  if (!(!cachedEntry && loadIfNeeded)) {
42357
42363
  _context.n = 2;
42358
42364
  break;
@@ -42382,7 +42388,7 @@ var ProviderBase = /*#__PURE__*/function () {
42382
42388
  }, {
42383
42389
  key: "SetCachedRecordName",
42384
42390
  value: function SetCachedRecordName(entityName, compositeKey, recordName) {
42385
- this._entityRecordNameCache.set(this.getCacheKey(entityName, compositeKey), recordName);
42391
+ this._entityRecordNameCache.Set(this.getCacheKey(entityName, compositeKey), recordName);
42386
42392
  }
42387
42393
  /**
42388
42394
  * Gets the display name for a single entity record with caching.
@@ -42411,7 +42417,7 @@ var ProviderBase = /*#__PURE__*/function () {
42411
42417
  _context2.n = 1;
42412
42418
  break;
42413
42419
  }
42414
- cached = this._entityRecordNameCache.get(cacheKey);
42420
+ cached = this._entityRecordNameCache.Get(cacheKey);
42415
42421
  if (!(cached !== undefined)) {
42416
42422
  _context2.n = 1;
42417
42423
  break;
@@ -42423,7 +42429,7 @@ var ProviderBase = /*#__PURE__*/function () {
42423
42429
  case 2:
42424
42430
  name = _context2.v;
42425
42431
  if (name) {
42426
- this._entityRecordNameCache.set(cacheKey, name);
42432
+ this._entityRecordNameCache.Set(cacheKey, name);
42427
42433
  }
42428
42434
  return _context2.a(2, name);
42429
42435
  }
@@ -42481,7 +42487,7 @@ var ProviderBase = /*#__PURE__*/function () {
42481
42487
  for (i = 0; i < info.length; i++) {
42482
42488
  item = info[i];
42483
42489
  cacheKey = this.getCacheKey(item.EntityName, item.CompositeKey);
42484
- cached = this._entityRecordNameCache.get(cacheKey);
42490
+ cached = this._entityRecordNameCache.Get(cacheKey);
42485
42491
  if (cached !== undefined) {
42486
42492
  // Cache hit
42487
42493
  results[i] = {
@@ -42514,7 +42520,7 @@ var ProviderBase = /*#__PURE__*/function () {
42514
42520
  // Cache successful results
42515
42521
  if (result.Success && result.RecordName) {
42516
42522
  _cacheKey = this.getCacheKey(result.EntityName, result.CompositeKey);
42517
- this._entityRecordNameCache.set(_cacheKey, result.RecordName);
42523
+ this._entityRecordNameCache.Set(_cacheKey, result.RecordName);
42518
42524
  }
42519
42525
  }
42520
42526
  case 2:
@@ -42531,7 +42537,7 @@ var ProviderBase = /*#__PURE__*/function () {
42531
42537
  _result = _step5.value;
42532
42538
  if (_result.Success && _result.RecordName) {
42533
42539
  _cacheKey2 = this.getCacheKey(_result.EntityName, _result.CompositeKey);
42534
- this._entityRecordNameCache.set(_cacheKey2, _result.RecordName);
42540
+ this._entityRecordNameCache.Set(_cacheKey2, _result.RecordName);
42535
42541
  }
42536
42542
  }
42537
42543
  } catch (err) {
@@ -43235,19 +43241,10 @@ var ProviderBase = /*#__PURE__*/function () {
43235
43241
  var _iterator0 = providerBase_createForOfIteratorHelper(preferredNames),
43236
43242
  _step0;
43237
43243
  try {
43238
- var _loop = function _loop() {
43239
- var name = _step0.value;
43240
- var field = entity.Fields.find(function (f) {
43241
- return f.Name === name;
43242
- });
43243
- if (field) return {
43244
- v: field.Name
43245
- };
43246
- },
43247
- _ret;
43248
43244
  for (_iterator0.s(); !(_step0 = _iterator0.n()).done;) {
43249
- _ret = _loop();
43250
- if (_ret) return _ret.v;
43245
+ var name = _step0.value;
43246
+ var field = entity.FieldByName(name);
43247
+ if (field) return field.Name;
43251
43248
  }
43252
43249
  // Fallback to first text field
43253
43250
  } catch (err) {
@@ -47079,7 +47076,7 @@ var ProviderBase = /*#__PURE__*/function () {
47079
47076
  key: "GetEntityDependencies",
47080
47077
  value: (function () {
47081
47078
  var _GetEntityDependencies = providerBase_asyncToGenerator(/*#__PURE__*/providerBase_regenerator().m(function _callee44(entityName) {
47082
- var eName, result, _iterator26, _step26, _loop2, _t16, _t17;
47079
+ var eName, result, _iterator26, _step26, _loop, _t16, _t17;
47083
47080
  return providerBase_regenerator().w(function (_context45) {
47084
47081
  while (1) switch (_context45.p = _context45.n) {
47085
47082
  case 0:
@@ -47088,7 +47085,7 @@ var ProviderBase = /*#__PURE__*/function () {
47088
47085
  result = [];
47089
47086
  _iterator26 = providerBase_createForOfIteratorHelper(this.Entities);
47090
47087
  _context45.p = 1;
47091
- _loop2 = /*#__PURE__*/providerBase_regenerator().m(function _loop2() {
47088
+ _loop = /*#__PURE__*/providerBase_regenerator().m(function _loop() {
47092
47089
  var re, relatedFields;
47093
47090
  return providerBase_regenerator().w(function (_context44) {
47094
47091
  while (1) switch (_context44.n) {
@@ -47108,7 +47105,7 @@ var ProviderBase = /*#__PURE__*/function () {
47108
47105
  case 1:
47109
47106
  return _context44.a(2);
47110
47107
  }
47111
- }, _loop2);
47108
+ }, _loop);
47112
47109
  });
47113
47110
  _iterator26.s();
47114
47111
  case 2:
@@ -47116,7 +47113,7 @@ var ProviderBase = /*#__PURE__*/function () {
47116
47113
  _context45.n = 4;
47117
47114
  break;
47118
47115
  }
47119
- return _context45.d(providerBase_regeneratorValues(_loop2()), 3);
47116
+ return _context45.d(providerBase_regeneratorValues(_loop()), 3);
47120
47117
  case 3:
47121
47118
  _context45.n = 2;
47122
47119
  break;
@@ -47159,7 +47156,7 @@ var ProviderBase = /*#__PURE__*/function () {
47159
47156
  key: "GetAndCacheDatasetByName",
47160
47157
  value: (function () {
47161
47158
  var _GetAndCacheDatasetByName = providerBase_asyncToGenerator(/*#__PURE__*/providerBase_regenerator().m(function _callee45(datasetName, itemFilters, contextUser, providerToUse) {
47162
- var ls, key, dateKey, cachedDataset, cachedDateStr, both, rawData, rawDate, localDate, status, allCountsMatch, _iterator27, _step27, _loop3, dataset, _t18;
47159
+ var ls, key, dateKey, cachedDataset, cachedDateStr, both, rawData, rawDate, localDate, status, allCountsMatch, _iterator27, _step27, _loop2, dataset, _t18;
47163
47160
  return providerBase_regenerator().w(function (_context47) {
47164
47161
  while (1) switch (_context47.p = _context47.n) {
47165
47162
  case 0:
@@ -47206,7 +47203,7 @@ var ProviderBase = /*#__PURE__*/function () {
47206
47203
  allCountsMatch = true;
47207
47204
  _iterator27 = providerBase_createForOfIteratorHelper(status.EntityUpdateDates);
47208
47205
  _context47.p = 4;
47209
- _loop3 = /*#__PURE__*/providerBase_regenerator().m(function _loop3() {
47206
+ _loop2 = /*#__PURE__*/providerBase_regenerator().m(function _loop2() {
47210
47207
  var eu, localEntity;
47211
47208
  return providerBase_regenerator().w(function (_context46) {
47212
47209
  while (1) switch (_context46.n) {
@@ -47224,7 +47221,7 @@ var ProviderBase = /*#__PURE__*/function () {
47224
47221
  case 1:
47225
47222
  return _context46.a(2);
47226
47223
  }
47227
- }, _loop3);
47224
+ }, _loop2);
47228
47225
  });
47229
47226
  _iterator27.s();
47230
47227
  case 5:
@@ -47232,7 +47229,7 @@ var ProviderBase = /*#__PURE__*/function () {
47232
47229
  _context47.n = 8;
47233
47230
  break;
47234
47231
  }
47235
- return _context47.d(providerBase_regeneratorValues(_loop3()), 6);
47232
+ return _context47.d(providerBase_regeneratorValues(_loop2()), 6);
47236
47233
  case 6:
47237
47234
  if (!_context47.v) {
47238
47235
  _context47.n = 7;
@@ -47328,7 +47325,7 @@ var ProviderBase = /*#__PURE__*/function () {
47328
47325
  key: "IsDatasetCacheUpToDate",
47329
47326
  value: (function () {
47330
47327
  var _IsDatasetCacheUpToDate = providerBase_asyncToGenerator(/*#__PURE__*/providerBase_regenerator().m(function _callee47(datasetName, itemFilters) {
47331
- var localDate, status, serverTimestamp, localDataset, _iterator28, _step28, _loop4, _ret2, _t19;
47328
+ var localDate, status, serverTimestamp, localDataset, _iterator28, _step28, _loop3, _ret, _t19;
47332
47329
  return providerBase_regenerator().w(function (_context50) {
47333
47330
  while (1) switch (_context50.p = _context50.n) {
47334
47331
  case 0:
@@ -47359,7 +47356,7 @@ var ProviderBase = /*#__PURE__*/function () {
47359
47356
  localDataset = _context50.v;
47360
47357
  _iterator28 = providerBase_createForOfIteratorHelper(status.EntityUpdateDates);
47361
47358
  _context50.p = 4;
47362
- _loop4 = /*#__PURE__*/providerBase_regenerator().m(function _loop4() {
47359
+ _loop3 = /*#__PURE__*/providerBase_regenerator().m(function _loop3() {
47363
47360
  var eu, localEntity;
47364
47361
  return providerBase_regenerator().w(function (_context49) {
47365
47362
  while (1) switch (_context49.n) {
@@ -47378,7 +47375,7 @@ var ProviderBase = /*#__PURE__*/function () {
47378
47375
  case 1:
47379
47376
  return _context49.a(2);
47380
47377
  }
47381
- }, _loop4);
47378
+ }, _loop3);
47382
47379
  });
47383
47380
  _iterator28.s();
47384
47381
  case 5:
@@ -47386,14 +47383,14 @@ var ProviderBase = /*#__PURE__*/function () {
47386
47383
  _context50.n = 8;
47387
47384
  break;
47388
47385
  }
47389
- return _context50.d(providerBase_regeneratorValues(_loop4()), 6);
47386
+ return _context50.d(providerBase_regeneratorValues(_loop3()), 6);
47390
47387
  case 6:
47391
- _ret2 = _context50.v;
47392
- if (!_ret2) {
47388
+ _ret = _context50.v;
47389
+ if (!_ret) {
47393
47390
  _context50.n = 7;
47394
47391
  break;
47395
47392
  }
47396
- return _context50.a(2, _ret2.v);
47393
+ return _context50.a(2, _ret.v);
47397
47394
  case 7:
47398
47395
  _context50.n = 5;
47399
47396
  break;
@@ -47727,7 +47724,7 @@ var ProviderBase = /*#__PURE__*/function () {
47727
47724
  var mdLocal = this.LatestLocalMetadata;
47728
47725
  var mdRemote = this.LatestRemoteMetadata;
47729
47726
  if (!mdLocal || !mdRemote || !mdLocal.length || !mdRemote.length || mdLocal.length === 0 || mdRemote.length === 0) return true;
47730
- var _loop5 = function _loop5(i) {
47727
+ var _loop4 = function _loop4(i) {
47731
47728
  var bProcess = true;
47732
47729
  if (type && type.length > 0) bProcess = mdRemote[i].Type.toLowerCase().trim() === type.trim().toLowerCase();
47733
47730
  if (bProcess) {
@@ -47767,10 +47764,10 @@ var ProviderBase = /*#__PURE__*/function () {
47767
47764
  }
47768
47765
  }
47769
47766
  },
47770
- _ret3;
47767
+ _ret2;
47771
47768
  for (var i = 0; i < mdRemote.length; ++i) {
47772
- _ret3 = _loop5(i);
47773
- if (_ret3) return _ret3.v;
47769
+ _ret2 = _loop4(i);
47770
+ if (_ret2) return _ret2.v;
47774
47771
  }
47775
47772
  // if we get here, we're not obsolete!!
47776
47773
  return false;
@@ -111430,8 +111427,32 @@ var UserInfoEngine = /*#__PURE__*/function (_BaseEngine) {
111430
111427
  return setting.Save();
111431
111428
  case 5:
111432
111429
  saved = _context2.v;
111430
+ if (!(!saved && setting.IsSaved)) {
111431
+ _context2.n = 8;
111432
+ break;
111433
+ }
111434
+ // The cached entity's underlying row no longer exists (deleted from another
111435
+ // session/device, or out-of-band) — the UPDATE matched nothing. Recover by
111436
+ // recreating the setting instead of failing the write.
111437
+ console.warn("UserInfoEngine.SetSetting: update for '".concat(settingKey, "' matched no row \u2014 recreating"));
111438
+ this._UserSettings = this._UserSettings.filter(function (s) {
111439
+ return !(0,MJGlobal_dist/* UUIDsEqual */.jd)(s.ID, setting.ID);
111440
+ });
111441
+ _context2.n = 6;
111442
+ return md.GetEntityObject('MJ: User Settings', contextUser);
111443
+ case 6:
111444
+ setting = _context2.v;
111445
+ setting.NewRecord();
111446
+ setting.UserID = userId;
111447
+ setting.Setting = settingKey;
111448
+ setting.Value = value;
111449
+ _context2.n = 7;
111450
+ return setting.Save();
111451
+ case 7:
111452
+ saved = _context2.v;
111453
+ case 8:
111433
111454
  if (!saved) {
111434
- _context2.n = 6;
111455
+ _context2.n = 9;
111435
111456
  break;
111436
111457
  }
111437
111458
  // If it was a new record, add to cache
@@ -111441,21 +111462,21 @@ var UserInfoEngine = /*#__PURE__*/function (_BaseEngine) {
111441
111462
  this._UserSettings.push(setting);
111442
111463
  }
111443
111464
  return _context2.a(2, true);
111444
- case 6:
111445
- console.error('UserInfoEngine.SetSetting: Failed to save:', (_setting$LatestResult = setting.LatestResult) === null || _setting$LatestResult === void 0 ? void 0 : _setting$LatestResult.Message);
111465
+ case 9:
111466
+ console.error('UserInfoEngine.SetSetting: Failed to save:', (_setting$LatestResult = setting.LatestResult) === null || _setting$LatestResult === void 0 ? void 0 : _setting$LatestResult.CompleteMessage);
111446
111467
  return _context2.a(2, false);
111447
- case 7:
111448
- _context2.n = 9;
111468
+ case 10:
111469
+ _context2.n = 12;
111449
111470
  break;
111450
- case 8:
111451
- _context2.p = 8;
111471
+ case 11:
111472
+ _context2.p = 11;
111452
111473
  _t = _context2.v;
111453
111474
  console.error('UserInfoEngine.SetSetting: Error:', _t instanceof Error ? _t.message : String(_t));
111454
111475
  return _context2.a(2, false);
111455
- case 9:
111476
+ case 12:
111456
111477
  return _context2.a(2);
111457
111478
  }
111458
- }, _callee2, this, [[1, 8]]);
111479
+ }, _callee2, this, [[1, 11]]);
111459
111480
  }));
111460
111481
  function SetSetting(_x4, _x5, _x6) {
111461
111482
  return _SetSetting.apply(this, arguments);
@@ -122219,6 +122240,7 @@ __webpack_require__.d(__webpack_exports__, {
122219
122240
  Ip: () => (/* reexport */ util_GetGlobalObjectStore),
122220
122241
  UK: () => (/* reexport */ MJEventType),
122221
122242
  rt: () => (/* reexport */ MJGlobal),
122243
+ HE: () => (/* reexport */ MJLruCache),
122222
122244
  Xw: () => (/* reexport */ NormalizeUUID),
122223
122245
  Y5: () => (/* reexport */ RegisterClass),
122224
122246
  rH: () => (/* reexport */ SQLExpressionValidator),
@@ -122231,7 +122253,7 @@ __webpack_require__.d(__webpack_exports__, {
122231
122253
  gZ: () => (/* reexport */ uuidv4)
122232
122254
  });
122233
122255
 
122234
- // UNUSED EXPORTS: ALLOWED_SQL_FUNCTIONS, BuildCronExpression, CRON_DAY_NAMES, ClassFactory, ClassRegistration, CleanJSON, CleanJavaScript, ConvertMarkdownStringToHtmlList, CopyScalarsAndArrays, DANGEROUS_SQL_KEYWORDS, DEFAULT_RICH_TEXT_SCAN_LENGTH, DeepDiffer, DefaultCronSchedule, DeprecationWarningManager, DescribeCronExpression, DiffChangeType, ENCRYPTED_SENTINEL, EscapeHTML, FULL_QUERY_ALLOWED_KEYWORDS, FieldRulesEvaluator, FieldTransformEngine, FormatTimeOfDay, GetClassInheritance, GetClassName, GetFieldTransform, GetFullClassHierarchy, GetRootClass, GetSuperclass, HighlightSearchMatches, InvokeManualResize, IsClassConstructor, IsDescendantClassOf, IsEncryptedSentinel, IsOnlyTimezoneShift, IsPlausibleCronExpression, IsRootClass, IsSubclassOf, IsValidUUID, IsValueEncrypted, JSONValidator, KeyedSerialTaskQueue, MJEvent, MJGlobalProperty, MJLruCache, ObjectCache, ObjectCacheEntry, Ordinal, ParseCronExpression, ParseJSONRecursive, RegisterClassEx, RegisterFieldTransform, SafeExpressionEvaluator, ShutdownRegistry, ToJSONSafe, adjustCasing, compareStringsByLine, convertCamelCaseToHaveSpaces, createDisplayName, defaultExpressionEvaluator, detectRichTextFormat, ensureRegExp, ensureRegExps, generatePluralName, getIrregularPlural, getValueAtPath, matchesAllPatterns, matchesAnyPattern, parsePattern, parsePatterns, replaceAllSpaces, resolveMappingRef, resolveValueMapping, stripTrailingChars, stripWhitespace
122256
+ // UNUSED EXPORTS: ALLOWED_SQL_FUNCTIONS, BuildCronExpression, CRON_DAY_NAMES, ClassFactory, ClassRegistration, CleanJSON, CleanJavaScript, ConvertMarkdownStringToHtmlList, CopyScalarsAndArrays, DANGEROUS_SQL_KEYWORDS, DEFAULT_RICH_TEXT_SCAN_LENGTH, DeepDiffer, DefaultCronSchedule, DeprecationWarningManager, DescribeCronExpression, DiffChangeType, ENCRYPTED_SENTINEL, EscapeHTML, FULL_QUERY_ALLOWED_KEYWORDS, FieldRulesEvaluator, FieldTransformEngine, FormatTimeOfDay, GetClassInheritance, GetClassName, GetFieldTransform, GetFullClassHierarchy, GetRootClass, GetSuperclass, HighlightSearchMatches, InvokeManualResize, IsClassConstructor, IsDescendantClassOf, IsEncryptedSentinel, IsOnlyTimezoneShift, IsPlausibleCronExpression, IsRootClass, IsSubclassOf, IsValidUUID, IsValueEncrypted, JSONValidator, KeyedSerialTaskQueue, MJEvent, MJGlobalProperty, ObjectCache, ObjectCacheEntry, Ordinal, ParseCronExpression, ParseJSONRecursive, RegisterClassEx, RegisterFieldTransform, SafeExpressionEvaluator, ShutdownRegistry, ToJSONSafe, adjustCasing, compareStringsByLine, convertCamelCaseToHaveSpaces, createDisplayName, defaultExpressionEvaluator, detectRichTextFormat, ensureRegExp, ensureRegExps, generatePluralName, getIrregularPlural, getValueAtPath, matchesAllPatterns, matchesAnyPattern, parsePattern, parsePatterns, replaceAllSpaces, resolveMappingRef, resolveValueMapping, stripTrailingChars, stripWhitespace
122235
122257
 
122236
122258
  ;// ../../MJGlobal/dist/interface.js
122237
122259
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
@@ -123598,6 +123620,217 @@ function recursiveReplaceString(str, options, depth, path) {
123598
123620
  // If we get here, return the original string
123599
123621
  return str;
123600
123622
  }
123623
+ ;// ../../MJGlobal/dist/MJLruCache.js
123624
+ function MJLruCache_typeof(o) { "@babel/helpers - typeof"; return MJLruCache_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, MJLruCache_typeof(o); }
123625
+ function MJLruCache_slicedToArray(r, e) { return MJLruCache_arrayWithHoles(r) || MJLruCache_iterableToArrayLimit(r, e) || MJLruCache_unsupportedIterableToArray(r, e) || MJLruCache_nonIterableRest(); }
123626
+ function MJLruCache_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
123627
+ function MJLruCache_iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
123628
+ function MJLruCache_arrayWithHoles(r) { if (Array.isArray(r)) return r; }
123629
+ function MJLruCache_createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = MJLruCache_unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
123630
+ function MJLruCache_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return MJLruCache_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? MJLruCache_arrayLikeToArray(r, a) : void 0; } }
123631
+ function MJLruCache_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
123632
+ function MJLruCache_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
123633
+ function MJLruCache_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, MJLruCache_toPropertyKey(o.key), o); } }
123634
+ function MJLruCache_createClass(e, r, t) { return r && MJLruCache_defineProperties(e.prototype, r), t && MJLruCache_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
123635
+ function MJLruCache_toPropertyKey(t) { var i = MJLruCache_toPrimitive(t, "string"); return "symbol" == MJLruCache_typeof(i) ? i : i + ""; }
123636
+ function MJLruCache_toPrimitive(t, r) { if ("object" != MJLruCache_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != MJLruCache_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
123637
+ /**
123638
+ * Bounded LRU cache with optional TTL — designed to replace the unbounded `Map`
123639
+ * fields that proliferate across MJ singletons (per-credential SDK client caches,
123640
+ * issuer caches, script caches, etc.). Built on `Map`'s preserved insertion order:
123641
+ * touching an entry deletes-and-reinserts to move it to the end, so eviction is
123642
+ * trivially the first key.
123643
+ *
123644
+ * - `Get` returns `undefined` for missing or expired entries and lazily evicts
123645
+ * expired ones (firing `onEvict` once).
123646
+ * - `Set` updates an existing entry in place (resetting recency + TTL) or evicts
123647
+ * the least-recently-used when `size === maxSize`.
123648
+ * - `onEvict` is called for **every** removal — overflow, expiry, explicit delete,
123649
+ * or `Clear()` — so callers can release SDK clients, sockets, etc.
123650
+ *
123651
+ * Thread-safety: same single-threaded JS guarantees as `Map`. Not safe across
123652
+ * worker threads — pin one cache per worker.
123653
+ *
123654
+ * NOTE: this is intentionally minimal. We don't expose `keys()`/`values()`
123655
+ * iterators because LRU semantics interact poorly with iteration order — callers
123656
+ * who need those should use `Map` directly.
123657
+ */
123658
+ var MJLruCache = /*#__PURE__*/function () {
123659
+ function MJLruCache() {
123660
+ var _options$maxSize;
123661
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
123662
+ MJLruCache_classCallCheck(this, MJLruCache);
123663
+ this._map = new Map();
123664
+ var maxSize = (_options$maxSize = options.maxSize) !== null && _options$maxSize !== void 0 ? _options$maxSize : 1000;
123665
+ if (!Number.isFinite(maxSize) || maxSize < 1) {
123666
+ throw new Error("MJLruCache: maxSize must be a positive integer (got ".concat(maxSize, ")"));
123667
+ }
123668
+ this._maxSize = Math.floor(maxSize);
123669
+ this._ttlMs = options.ttlMs && options.ttlMs > 0 ? options.ttlMs : 0;
123670
+ this._onEvict = options.onEvict;
123671
+ }
123672
+ /**
123673
+ * Configured maximum entry count. Read-only after construction.
123674
+ */
123675
+ return MJLruCache_createClass(MJLruCache, [{
123676
+ key: "MaxSize",
123677
+ get: function get() {
123678
+ return this._maxSize;
123679
+ }
123680
+ /**
123681
+ * Current entry count (including any expired entries that haven't been
123682
+ * lazily evicted yet — call `Prune()` to force eviction first).
123683
+ */
123684
+ }, {
123685
+ key: "Size",
123686
+ get: function get() {
123687
+ return this._map.size;
123688
+ }
123689
+ /**
123690
+ * Look up a value, refreshing its recency. Returns `undefined` if the key is
123691
+ * absent or the entry has expired. Expired entries are evicted lazily on the
123692
+ * miss (firing `onEvict` with reason `'ttl'`).
123693
+ */
123694
+ }, {
123695
+ key: "Get",
123696
+ value: function Get(key) {
123697
+ var entry = this._map.get(key);
123698
+ if (!entry) {
123699
+ return undefined;
123700
+ }
123701
+ if (entry.expiresAt <= Date.now()) {
123702
+ var _this$_onEvict;
123703
+ this._map.delete(key);
123704
+ (_this$_onEvict = this._onEvict) === null || _this$_onEvict === void 0 || _this$_onEvict.call(this, key, entry.value, 'ttl');
123705
+ return undefined;
123706
+ }
123707
+ // Refresh recency — Map preserves insertion order, so delete + re-insert
123708
+ // moves to the back.
123709
+ this._map.delete(key);
123710
+ this._map.set(key, entry);
123711
+ return entry.value;
123712
+ }
123713
+ /**
123714
+ * Whether the key is present and unexpired. Does **not** refresh recency.
123715
+ */
123716
+ }, {
123717
+ key: "Has",
123718
+ value: function Has(key) {
123719
+ var entry = this._map.get(key);
123720
+ if (!entry) return false;
123721
+ if (entry.expiresAt <= Date.now()) {
123722
+ var _this$_onEvict2;
123723
+ this._map.delete(key);
123724
+ (_this$_onEvict2 = this._onEvict) === null || _this$_onEvict2 === void 0 || _this$_onEvict2.call(this, key, entry.value, 'ttl');
123725
+ return false;
123726
+ }
123727
+ return true;
123728
+ }
123729
+ /**
123730
+ * Insert or replace an entry. If replacing, the old value is evicted with
123731
+ * reason `'delete'` so SDK-client style resources can be cleaned up. If
123732
+ * inserting and the cache is full, the LRU entry is evicted with reason
123733
+ * `'lru'`.
123734
+ */
123735
+ }, {
123736
+ key: "Set",
123737
+ value: function Set(key, value) {
123738
+ var expiresAt = this._ttlMs > 0 ? Date.now() + this._ttlMs : Number.POSITIVE_INFINITY;
123739
+ var existing = this._map.get(key);
123740
+ if (existing) {
123741
+ var _this$_onEvict3;
123742
+ this._map.delete(key);
123743
+ (_this$_onEvict3 = this._onEvict) === null || _this$_onEvict3 === void 0 || _this$_onEvict3.call(this, key, existing.value, 'delete');
123744
+ } else if (this._map.size >= this._maxSize) {
123745
+ // Evict the LRU (first) entry to make room.
123746
+ var oldestKey = this._map.keys().next().value;
123747
+ if (oldestKey !== undefined) {
123748
+ var _this$_onEvict4;
123749
+ var old = this._map.get(oldestKey);
123750
+ this._map.delete(oldestKey);
123751
+ (_this$_onEvict4 = this._onEvict) === null || _this$_onEvict4 === void 0 || _this$_onEvict4.call(this, oldestKey, old.value, 'lru');
123752
+ }
123753
+ }
123754
+ this._map.set(key, {
123755
+ value: value,
123756
+ expiresAt: expiresAt
123757
+ });
123758
+ }
123759
+ /**
123760
+ * Remove a key. Returns true if removed. Fires `onEvict` with reason
123761
+ * `'delete'`.
123762
+ */
123763
+ }, {
123764
+ key: "Delete",
123765
+ value: function Delete(key) {
123766
+ var _this$_onEvict5;
123767
+ var entry = this._map.get(key);
123768
+ if (!entry) return false;
123769
+ this._map.delete(key);
123770
+ (_this$_onEvict5 = this._onEvict) === null || _this$_onEvict5 === void 0 || _this$_onEvict5.call(this, key, entry.value, 'delete');
123771
+ return true;
123772
+ }
123773
+ /**
123774
+ * Remove every entry, firing `onEvict` for each with reason `'clear'`.
123775
+ */
123776
+ }, {
123777
+ key: "Clear",
123778
+ value: function Clear() {
123779
+ if (!this._onEvict) {
123780
+ this._map.clear();
123781
+ return;
123782
+ }
123783
+ var _iterator = MJLruCache_createForOfIteratorHelper(this._map),
123784
+ _step;
123785
+ try {
123786
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
123787
+ var _step$value = MJLruCache_slicedToArray(_step.value, 2),
123788
+ key = _step$value[0],
123789
+ entry = _step$value[1];
123790
+ this._onEvict(key, entry.value, 'clear');
123791
+ }
123792
+ } catch (err) {
123793
+ _iterator.e(err);
123794
+ } finally {
123795
+ _iterator.f();
123796
+ }
123797
+ this._map.clear();
123798
+ }
123799
+ /**
123800
+ * Eagerly evict all expired entries. Useful from a periodic timer when
123801
+ * lazy eviction (only on `Get`/`Has`) isn't sufficient — for example, when
123802
+ * entries hold expensive resources you want released even if no one reads
123803
+ * them again.
123804
+ */
123805
+ }, {
123806
+ key: "Prune",
123807
+ value: function Prune() {
123808
+ if (this._ttlMs <= 0) return 0;
123809
+ var now = Date.now();
123810
+ var count = 0;
123811
+ var _iterator2 = MJLruCache_createForOfIteratorHelper(this._map),
123812
+ _step2;
123813
+ try {
123814
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
123815
+ var _step2$value = MJLruCache_slicedToArray(_step2.value, 2),
123816
+ key = _step2$value[0],
123817
+ entry = _step2$value[1];
123818
+ if (entry.expiresAt <= now) {
123819
+ var _this$_onEvict6;
123820
+ this._map.delete(key);
123821
+ (_this$_onEvict6 = this._onEvict) === null || _this$_onEvict6 === void 0 || _this$_onEvict6.call(this, key, entry.value, 'ttl');
123822
+ count++;
123823
+ }
123824
+ }
123825
+ } catch (err) {
123826
+ _iterator2.e(err);
123827
+ } finally {
123828
+ _iterator2.f();
123829
+ }
123830
+ return count;
123831
+ }
123832
+ }]);
123833
+ }();
123601
123834
  ;// ../../MJGlobal/dist/BaseSingleton.js
123602
123835
  function BaseSingleton_typeof(o) { "@babel/helpers - typeof"; return BaseSingleton_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, BaseSingleton_typeof(o); }
123603
123836
  var _BaseSingleton;
@@ -124809,217 +125042,6 @@ var JSONValidator = /*#__PURE__*/(/* unused pure expression or super */ null &&
124809
125042
  }
124810
125043
  }]);
124811
125044
  }()));
124812
- ;// ../../MJGlobal/dist/MJLruCache.js
124813
- function MJLruCache_typeof(o) { "@babel/helpers - typeof"; return MJLruCache_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, MJLruCache_typeof(o); }
124814
- function MJLruCache_slicedToArray(r, e) { return MJLruCache_arrayWithHoles(r) || MJLruCache_iterableToArrayLimit(r, e) || MJLruCache_unsupportedIterableToArray(r, e) || MJLruCache_nonIterableRest(); }
124815
- function MJLruCache_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
124816
- function MJLruCache_iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
124817
- function MJLruCache_arrayWithHoles(r) { if (Array.isArray(r)) return r; }
124818
- function MJLruCache_createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = MJLruCache_unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
124819
- function MJLruCache_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return MJLruCache_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? MJLruCache_arrayLikeToArray(r, a) : void 0; } }
124820
- function MJLruCache_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
124821
- function MJLruCache_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
124822
- function MJLruCache_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, MJLruCache_toPropertyKey(o.key), o); } }
124823
- function MJLruCache_createClass(e, r, t) { return r && MJLruCache_defineProperties(e.prototype, r), t && MJLruCache_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
124824
- function MJLruCache_toPropertyKey(t) { var i = MJLruCache_toPrimitive(t, "string"); return "symbol" == MJLruCache_typeof(i) ? i : i + ""; }
124825
- function MJLruCache_toPrimitive(t, r) { if ("object" != MJLruCache_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != MJLruCache_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
124826
- /**
124827
- * Bounded LRU cache with optional TTL — designed to replace the unbounded `Map`
124828
- * fields that proliferate across MJ singletons (per-credential SDK client caches,
124829
- * issuer caches, script caches, etc.). Built on `Map`'s preserved insertion order:
124830
- * touching an entry deletes-and-reinserts to move it to the end, so eviction is
124831
- * trivially the first key.
124832
- *
124833
- * - `Get` returns `undefined` for missing or expired entries and lazily evicts
124834
- * expired ones (firing `onEvict` once).
124835
- * - `Set` updates an existing entry in place (resetting recency + TTL) or evicts
124836
- * the least-recently-used when `size === maxSize`.
124837
- * - `onEvict` is called for **every** removal — overflow, expiry, explicit delete,
124838
- * or `Clear()` — so callers can release SDK clients, sockets, etc.
124839
- *
124840
- * Thread-safety: same single-threaded JS guarantees as `Map`. Not safe across
124841
- * worker threads — pin one cache per worker.
124842
- *
124843
- * NOTE: this is intentionally minimal. We don't expose `keys()`/`values()`
124844
- * iterators because LRU semantics interact poorly with iteration order — callers
124845
- * who need those should use `Map` directly.
124846
- */
124847
- var MJLruCache = /*#__PURE__*/function () {
124848
- function MJLruCache() {
124849
- var _options$maxSize;
124850
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
124851
- MJLruCache_classCallCheck(this, MJLruCache);
124852
- this._map = new Map();
124853
- var maxSize = (_options$maxSize = options.maxSize) !== null && _options$maxSize !== void 0 ? _options$maxSize : 1000;
124854
- if (!Number.isFinite(maxSize) || maxSize < 1) {
124855
- throw new Error("MJLruCache: maxSize must be a positive integer (got ".concat(maxSize, ")"));
124856
- }
124857
- this._maxSize = Math.floor(maxSize);
124858
- this._ttlMs = options.ttlMs && options.ttlMs > 0 ? options.ttlMs : 0;
124859
- this._onEvict = options.onEvict;
124860
- }
124861
- /**
124862
- * Configured maximum entry count. Read-only after construction.
124863
- */
124864
- return MJLruCache_createClass(MJLruCache, [{
124865
- key: "MaxSize",
124866
- get: function get() {
124867
- return this._maxSize;
124868
- }
124869
- /**
124870
- * Current entry count (including any expired entries that haven't been
124871
- * lazily evicted yet — call `Prune()` to force eviction first).
124872
- */
124873
- }, {
124874
- key: "Size",
124875
- get: function get() {
124876
- return this._map.size;
124877
- }
124878
- /**
124879
- * Look up a value, refreshing its recency. Returns `undefined` if the key is
124880
- * absent or the entry has expired. Expired entries are evicted lazily on the
124881
- * miss (firing `onEvict` with reason `'ttl'`).
124882
- */
124883
- }, {
124884
- key: "Get",
124885
- value: function Get(key) {
124886
- var entry = this._map.get(key);
124887
- if (!entry) {
124888
- return undefined;
124889
- }
124890
- if (entry.expiresAt <= Date.now()) {
124891
- var _this$_onEvict;
124892
- this._map.delete(key);
124893
- (_this$_onEvict = this._onEvict) === null || _this$_onEvict === void 0 || _this$_onEvict.call(this, key, entry.value, 'ttl');
124894
- return undefined;
124895
- }
124896
- // Refresh recency — Map preserves insertion order, so delete + re-insert
124897
- // moves to the back.
124898
- this._map.delete(key);
124899
- this._map.set(key, entry);
124900
- return entry.value;
124901
- }
124902
- /**
124903
- * Whether the key is present and unexpired. Does **not** refresh recency.
124904
- */
124905
- }, {
124906
- key: "Has",
124907
- value: function Has(key) {
124908
- var entry = this._map.get(key);
124909
- if (!entry) return false;
124910
- if (entry.expiresAt <= Date.now()) {
124911
- var _this$_onEvict2;
124912
- this._map.delete(key);
124913
- (_this$_onEvict2 = this._onEvict) === null || _this$_onEvict2 === void 0 || _this$_onEvict2.call(this, key, entry.value, 'ttl');
124914
- return false;
124915
- }
124916
- return true;
124917
- }
124918
- /**
124919
- * Insert or replace an entry. If replacing, the old value is evicted with
124920
- * reason `'delete'` so SDK-client style resources can be cleaned up. If
124921
- * inserting and the cache is full, the LRU entry is evicted with reason
124922
- * `'lru'`.
124923
- */
124924
- }, {
124925
- key: "Set",
124926
- value: function Set(key, value) {
124927
- var expiresAt = this._ttlMs > 0 ? Date.now() + this._ttlMs : Number.POSITIVE_INFINITY;
124928
- var existing = this._map.get(key);
124929
- if (existing) {
124930
- var _this$_onEvict3;
124931
- this._map.delete(key);
124932
- (_this$_onEvict3 = this._onEvict) === null || _this$_onEvict3 === void 0 || _this$_onEvict3.call(this, key, existing.value, 'delete');
124933
- } else if (this._map.size >= this._maxSize) {
124934
- // Evict the LRU (first) entry to make room.
124935
- var oldestKey = this._map.keys().next().value;
124936
- if (oldestKey !== undefined) {
124937
- var _this$_onEvict4;
124938
- var old = this._map.get(oldestKey);
124939
- this._map.delete(oldestKey);
124940
- (_this$_onEvict4 = this._onEvict) === null || _this$_onEvict4 === void 0 || _this$_onEvict4.call(this, oldestKey, old.value, 'lru');
124941
- }
124942
- }
124943
- this._map.set(key, {
124944
- value: value,
124945
- expiresAt: expiresAt
124946
- });
124947
- }
124948
- /**
124949
- * Remove a key. Returns true if removed. Fires `onEvict` with reason
124950
- * `'delete'`.
124951
- */
124952
- }, {
124953
- key: "Delete",
124954
- value: function Delete(key) {
124955
- var _this$_onEvict5;
124956
- var entry = this._map.get(key);
124957
- if (!entry) return false;
124958
- this._map.delete(key);
124959
- (_this$_onEvict5 = this._onEvict) === null || _this$_onEvict5 === void 0 || _this$_onEvict5.call(this, key, entry.value, 'delete');
124960
- return true;
124961
- }
124962
- /**
124963
- * Remove every entry, firing `onEvict` for each with reason `'clear'`.
124964
- */
124965
- }, {
124966
- key: "Clear",
124967
- value: function Clear() {
124968
- if (!this._onEvict) {
124969
- this._map.clear();
124970
- return;
124971
- }
124972
- var _iterator = MJLruCache_createForOfIteratorHelper(this._map),
124973
- _step;
124974
- try {
124975
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
124976
- var _step$value = MJLruCache_slicedToArray(_step.value, 2),
124977
- key = _step$value[0],
124978
- entry = _step$value[1];
124979
- this._onEvict(key, entry.value, 'clear');
124980
- }
124981
- } catch (err) {
124982
- _iterator.e(err);
124983
- } finally {
124984
- _iterator.f();
124985
- }
124986
- this._map.clear();
124987
- }
124988
- /**
124989
- * Eagerly evict all expired entries. Useful from a periodic timer when
124990
- * lazy eviction (only on `Get`/`Has`) isn't sufficient — for example, when
124991
- * entries hold expensive resources you want released even if no one reads
124992
- * them again.
124993
- */
124994
- }, {
124995
- key: "Prune",
124996
- value: function Prune() {
124997
- if (this._ttlMs <= 0) return 0;
124998
- var now = Date.now();
124999
- var count = 0;
125000
- var _iterator2 = MJLruCache_createForOfIteratorHelper(this._map),
125001
- _step2;
125002
- try {
125003
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
125004
- var _step2$value = MJLruCache_slicedToArray(_step2.value, 2),
125005
- key = _step2$value[0],
125006
- entry = _step2$value[1];
125007
- if (entry.expiresAt <= now) {
125008
- var _this$_onEvict6;
125009
- this._map.delete(key);
125010
- (_this$_onEvict6 = this._onEvict) === null || _this$_onEvict6 === void 0 || _this$_onEvict6.call(this, key, entry.value, 'ttl');
125011
- count++;
125012
- }
125013
- }
125014
- } catch (err) {
125015
- _iterator2.e(err);
125016
- } finally {
125017
- _iterator2.f();
125018
- }
125019
- return count;
125020
- }
125021
- }]);
125022
- }();
125023
125045
  ;// ../../MJGlobal/dist/SafeExpressionEvaluator.js
125024
125046
  var _SafeExpressionEvaluator;
125025
125047
  function SafeExpressionEvaluator_typeof(o) { "@babel/helpers - typeof"; return SafeExpressionEvaluator_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, SafeExpressionEvaluator_typeof(o); }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/react-runtime",
3
- "version": "5.47.0",
3
+ "version": "5.48.0",
4
4
  "description": "Platform-agnostic React component runtime for MemberJunction. Provides core compilation, registry, and execution capabilities for React components in any JavaScript environment.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -29,11 +29,11 @@
29
29
  },
30
30
  "homepage": "https://github.com/MemberJunction/MJ#readme",
31
31
  "dependencies": {
32
- "@memberjunction/core": "5.47.0",
33
- "@memberjunction/global": "5.47.0",
34
- "@memberjunction/interactive-component-types": "5.47.0",
35
- "@memberjunction/core-entities": "5.47.0",
36
- "@memberjunction/graphql-dataprovider": "5.47.0",
32
+ "@memberjunction/core": "5.48.0",
33
+ "@memberjunction/global": "5.48.0",
34
+ "@memberjunction/interactive-component-types": "5.48.0",
35
+ "@memberjunction/core-entities": "5.48.0",
36
+ "@memberjunction/graphql-dataprovider": "5.48.0",
37
37
  "@babel/standalone": "^7.29.1",
38
38
  "rxjs": "^7.8.2"
39
39
  },