@memberjunction/react-runtime 5.46.0 → 5.47.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.
- package/.turbo/turbo-build.log +7 -7
- package/CHANGELOG.md +11 -0
- package/dist/324.runtime.umd.js +1 -1
- package/dist/runtime.umd.js +108 -24
- package/package.json +6 -6
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
|
|
2
|
-
> @memberjunction/react-runtime@5.
|
|
2
|
+
> @memberjunction/react-runtime@5.47.0 build
|
|
3
3
|
> npm run build:node && npm run build:umd
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @memberjunction/react-runtime@5.
|
|
6
|
+
> @memberjunction/react-runtime@5.47.0 build:node
|
|
7
7
|
> tsc && tsc-alias -f
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
> @memberjunction/react-runtime@5.
|
|
10
|
+
> @memberjunction/react-runtime@5.47.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:
|
|
14
14
|
npx update-browserslist-db@latest
|
|
15
15
|
Why you should do it regularly: https://github.com/browserslist/update-db#readme
|
|
16
16
|
[BABEL] Note: The code generator has deoptimised the styling of /home/runner/work/MJ/MJ/packages/MJCoreEntities/dist/generated/entity_subclasses.js as it exceeds the max of 500KB.
|
|
17
|
-
asset [1m[33mruntime.umd.js[39m[22m [1m[33m8.
|
|
17
|
+
asset [1m[33mruntime.umd.js[39m[22m [1m[33m8.57 MiB[39m[22m [1m[33m[compared for emit][39m[22m [1m[33m[big][39m[22m (name: main)
|
|
18
18
|
asset [1m[32m324.runtime.umd.js[39m[22m 216 KiB [1m[33m[compared for emit][39m[22m
|
|
19
19
|
asset [1m[32m490.runtime.umd.js[39m[22m 182 KiB [1m[33m[compared for emit][39m[22m (id hint: vendors)
|
|
20
20
|
orphan modules 8.57 MiB [1m[33m[orphan][39m[22m 558 modules
|
|
21
21
|
runtime modules 6.94 KiB 10 modules
|
|
22
|
-
cacheable modules 8.
|
|
22
|
+
cacheable modules 8.72 MiB
|
|
23
23
|
modules by path [1m../../../node_modules/[39m[22m 781 KiB
|
|
24
24
|
modules by path [1m../../../node_modules/rxjs/dist/esm5/internal/[39m[22m 30.4 KiB 16 modules
|
|
25
25
|
modules by path [1m../../../node_modules/debug/src/*.js[39m[22m 12.7 KiB 2 modules
|
|
@@ -28,7 +28,7 @@ cacheable modules 8.71 MiB
|
|
|
28
28
|
[1m../../MJCoreEntities/dist/index.js + 59 modules[39m[22m 5.3 MiB [1m[33m[built][39m[22m [1m[33m[code generated][39m[22m
|
|
29
29
|
[1m../../MJCoreEntities/dist/engines/UserViewEngine.js[39m[22m 19.6 KiB [1m[33m[built][39m[22m [1m[33m[code generated][39m[22m
|
|
30
30
|
[1m./dist/index.js + 28 modules[39m[22m 432 KiB [1m[33m[built][39m[22m [1m[33m[code generated][39m[22m
|
|
31
|
-
[1m../../MJCore/dist/index.js + 88 modules[39m[22m 1.
|
|
31
|
+
[1m../../MJCore/dist/index.js + 88 modules[39m[22m 1.74 MiB [1m[33m[built][39m[22m [1m[33m[code generated][39m[22m
|
|
32
32
|
[1m../../MJGlobal/dist/index.js + 22 modules[39m[22m 293 KiB [1m[33m[built][39m[22m [1m[33m[code generated][39m[22m
|
|
33
33
|
[1m../../GraphQLDataProvider/dist/index.mjs[39m[22m 192 KiB [1m[33m[built][39m[22m [1m[33m[code generated][39m[22m
|
|
34
|
-
webpack 5.105.0 compiled [1m[32msuccessfully[39m[22m in
|
|
34
|
+
webpack 5.105.0 compiled [1m[32msuccessfully[39m[22m in 65446 ms
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @memberjunction/react-runtime
|
|
2
2
|
|
|
3
|
+
## 5.47.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [b216f2b]
|
|
8
|
+
- @memberjunction/core@5.47.0
|
|
9
|
+
- @memberjunction/graphql-dataprovider@5.47.0
|
|
10
|
+
- @memberjunction/interactive-component-types@5.47.0
|
|
11
|
+
- @memberjunction/core-entities@5.47.0
|
|
12
|
+
- @memberjunction/global@5.47.0
|
|
13
|
+
|
|
3
14
|
## 5.46.0
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
package/dist/324.runtime.umd.js
CHANGED
|
@@ -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.
|
|
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!) {
|
|
365
365
|
RemoteOperationProgress(channelId: $channelId) {
|
|
366
366
|
ChannelId
|
|
367
367
|
ProgressJSON
|
package/dist/runtime.umd.js
CHANGED
|
@@ -20629,6 +20629,29 @@ var SQLServerDialect = /*#__PURE__*/function (_SQLDialect) {
|
|
|
20629
20629
|
objectExists: "SELECT OBJECT_ID(@objectName) AS object_id"
|
|
20630
20630
|
};
|
|
20631
20631
|
}
|
|
20632
|
+
/**
|
|
20633
|
+
* SQL Server FK-graph query for cascade planning — reads the `sys.foreign_keys` catalog.
|
|
20634
|
+
* Returns one row per FK column with `childNullable` (from `sys.columns.is_nullable`) and
|
|
20635
|
+
* `colCount` (columns in the constraint, for composite exclusion). Both parent + child are
|
|
20636
|
+
* filtered to `schema`. Schema is embedded as a literal (no bind params) so it runs via
|
|
20637
|
+
* `ExecuteSQL(sql)`.
|
|
20638
|
+
*/
|
|
20639
|
+
}, {
|
|
20640
|
+
key: "ForeignKeyGraphSQL",
|
|
20641
|
+
value: function ForeignKeyGraphSQL(schema) {
|
|
20642
|
+
var s = this.QuoteStringLiteral(schema);
|
|
20643
|
+
// Disabled FKs (fk.is_disabled = 1) are intentionally NOT filtered: a disabled FK can't block
|
|
20644
|
+
// the Entity delete, so including it only yields an extra, conservative-safe child clear.
|
|
20645
|
+
// ORDER BY fk.name makes edge order — and therefore statement + dry-run order — deterministic.
|
|
20646
|
+
return 'SELECT rt.name AS parentTable, rc.name AS parentRefCol, pt.name AS childTable, ' + 'pc.name AS childCol, pc.is_nullable AS childNullable, fk.name AS fkName, ' + '(SELECT COUNT(*) FROM sys.foreign_key_columns x WHERE x.constraint_object_id = fk.object_id) AS colCount ' + 'FROM sys.foreign_keys fk ' + 'JOIN sys.foreign_key_columns fkc ON fkc.constraint_object_id = fk.object_id ' + 'JOIN sys.objects rt ON rt.object_id = fk.referenced_object_id ' + 'JOIN sys.schemas rs ON rs.schema_id = rt.schema_id ' + 'JOIN sys.columns rc ON rc.object_id = fk.referenced_object_id AND rc.column_id = fkc.referenced_column_id ' + 'JOIN sys.objects pt ON pt.object_id = fk.parent_object_id ' + 'JOIN sys.schemas ps ON ps.schema_id = pt.schema_id ' + 'JOIN sys.columns pc ON pc.object_id = fk.parent_object_id AND pc.column_id = fkc.parent_column_id ' + "WHERE rs.name = ".concat(s, " AND ps.name = ").concat(s, " ") + 'ORDER BY fk.name';
|
|
20647
|
+
}
|
|
20648
|
+
}, {
|
|
20649
|
+
key: "AtomicBatchScript",
|
|
20650
|
+
value: function AtomicBatchScript(statements) {
|
|
20651
|
+
if (!statements || !statements.length) return '';
|
|
20652
|
+
var body = statements.join(';\n');
|
|
20653
|
+
return "SET QUOTED_IDENTIFIER ON;\nSET ANSI_NULLS ON;\nSET XACT_ABORT ON;\nBEGIN TRANSACTION;\n".concat(body, ";\nCOMMIT TRANSACTION;");
|
|
20654
|
+
}
|
|
20632
20655
|
// ─── IIF ─────────────────────────────────────────────────────────
|
|
20633
20656
|
}, {
|
|
20634
20657
|
key: "IIF",
|
|
@@ -21617,6 +21640,37 @@ var PostgreSQLDialect = /*#__PURE__*/function (_SQLDialect) {
|
|
|
21617
21640
|
objectExists: "\n SELECT EXISTS (\n SELECT 1 FROM pg_catalog.pg_class c\n JOIN pg_catalog.pg_namespace n ON c.relnamespace = n.oid\n WHERE n.nspname = $1 AND c.relname = $2\n ) AS exists"
|
|
21618
21641
|
};
|
|
21619
21642
|
}
|
|
21643
|
+
/**
|
|
21644
|
+
* PostgreSQL FK-graph query for cascade planning — reads `pg_catalog.pg_constraint`
|
|
21645
|
+
* (`contype = 'f'`). Returns one row per FK column (via `unnest(conkey, confkey)`, which
|
|
21646
|
+
* preserves column pairing/order), with `childNullable` (`NOT attnotnull`) and `colCount`
|
|
21647
|
+
* (`array_length(conkey, 1)`, for composite exclusion). Column aliases and semantics MATCH
|
|
21648
|
+
* the SQL Server variant so a single caller parses both. `relname`/`attname` preserve the
|
|
21649
|
+
* quoted mixed-case identifiers MJ creates on PG, so they feed straight into QuoteIdentifier.
|
|
21650
|
+
* Both parent + child are filtered to `schema`; the schema is embedded as a literal.
|
|
21651
|
+
*/
|
|
21652
|
+
}, {
|
|
21653
|
+
key: "ForeignKeyGraphSQL",
|
|
21654
|
+
value: function ForeignKeyGraphSQL(schema) {
|
|
21655
|
+
var s = this.QuoteStringLiteral(schema);
|
|
21656
|
+
// NOTE: deliberately avoids `unnest(...) WITH ORDINALITY` / `LATERAL`. This query is executed
|
|
21657
|
+
// through PostgreSQLDataProvider.ExecuteSQL, whose autoQuoteIdentifiers tokenizer quotes the
|
|
21658
|
+
// bare uppercase word `ORDINALITY` (not in its keyword set) → `WITH "ORDINALITY"` → a syntax
|
|
21659
|
+
// error. Using `= any(con.conkey)` (all-lowercase, autoQuote-safe) resolves the FK column via
|
|
21660
|
+
// array membership instead. For SINGLE-column FKs (the only ones the planner keeps, colCount=1)
|
|
21661
|
+
// this yields exactly one correctly-paired row; composite FKs (colCount>1) produce a cross
|
|
21662
|
+
// product of rows that the caller skips wholesale by fkName — so the mispairing is irrelevant.
|
|
21663
|
+
return 'SELECT pt.relname AS "parentTable", pa.attname AS "parentRefCol", ct.relname AS "childTable", ' + 'ca.attname AS "childCol", (NOT ca.attnotnull) AS "childNullable", con.conname AS "fkName", ' + 'array_length(con.conkey, 1) AS "colCount" ' + 'FROM pg_catalog.pg_constraint con ' + 'JOIN pg_catalog.pg_class ct ON ct.oid = con.conrelid ' + 'JOIN pg_catalog.pg_namespace cn ON cn.oid = ct.relnamespace ' + 'JOIN pg_catalog.pg_class pt ON pt.oid = con.confrelid ' + 'JOIN pg_catalog.pg_namespace pn ON pn.oid = pt.relnamespace ' + 'JOIN pg_catalog.pg_attribute ca ON ca.attrelid = con.conrelid AND ca.attnum = any(con.conkey) ' + 'JOIN pg_catalog.pg_attribute pa ON pa.attrelid = con.confrelid AND pa.attnum = any(con.confkey) ' + "WHERE con.contype = 'f' AND cn.nspname = ".concat(s, " AND pn.nspname = ").concat(s, " ") + 'ORDER BY con.conname';
|
|
21664
|
+
}
|
|
21665
|
+
}, {
|
|
21666
|
+
key: "AtomicBatchScript",
|
|
21667
|
+
value: function AtomicBatchScript(statements) {
|
|
21668
|
+
if (!statements || !statements.length) return '';
|
|
21669
|
+
var body = statements.join(';\n');
|
|
21670
|
+
// No session pragmas (QUOTED_IDENTIFIER/ANSI_NULLS are SQL-Server concepts) and PostgreSQL
|
|
21671
|
+
// already aborts the whole transaction on any error, so plain BEGIN … COMMIT is all-or-nothing.
|
|
21672
|
+
return "BEGIN;\n".concat(body, ";\nCOMMIT;");
|
|
21673
|
+
}
|
|
21620
21674
|
// ─── IIF ─────────────────────────────────────────────────────────
|
|
21621
21675
|
}, {
|
|
21622
21676
|
key: "IIF",
|
|
@@ -31864,18 +31918,37 @@ var BaseEntity = /*#__PURE__*/function () {
|
|
|
31864
31918
|
var success = _ref.success,
|
|
31865
31919
|
results = _ref.results,
|
|
31866
31920
|
error = _ref.error;
|
|
31867
|
-
|
|
31868
|
-
|
|
31869
|
-
|
|
31870
|
-
|
|
31871
|
-
|
|
31872
|
-
_this8.finalizeSave(transItem.Result, saveSubType); // we get the resulting data from the transaction result, not data above as that will be blank when in a TG
|
|
31873
|
-
} else {
|
|
31874
|
-
// should never get here, but if we do, we need to throw an error
|
|
31875
|
-
throw new Error('Transaction group did not return a result for the entity object');
|
|
31876
|
-
}
|
|
31921
|
+
var transItem = success && results ? results.find(function (r) {
|
|
31922
|
+
return r.Transaction.BaseEntity === _this8;
|
|
31923
|
+
}) : undefined;
|
|
31924
|
+
if (transItem) {
|
|
31925
|
+
_this8.finalizeSave(transItem.Result, saveSubType); // we get the resulting data from the transaction result, not data above as that will be blank when in a TG
|
|
31877
31926
|
} else {
|
|
31878
|
-
|
|
31927
|
+
// The transaction group failed / rolled back, OR (should never happen) reported success
|
|
31928
|
+
// without a result for this entity. Either way, RECORD the failure on ResultHistory rather
|
|
31929
|
+
// than throwing. This handler runs ASYNCHRONOUSLY — after Save() has already returned true and
|
|
31930
|
+
// its enclosing try/catch has unwound — so a throw here has no catch to reach: rxjs routes a
|
|
31931
|
+
// throwing next-handler to reportUnhandledError, which re-throws it on a fresh tick, producing
|
|
31932
|
+
// an uncaughtException that exits the whole host process (MJServer only guards
|
|
31933
|
+
// unhandledRejection). The transaction has already rolled back and Submit() returns false; the
|
|
31934
|
+
// caller's error handling still runs. Mirrors the Delete() transaction-group-failure path below.
|
|
31935
|
+
var err = error !== null && error !== void 0 ? error : success ? new Error('Transaction group did not return a result for the entity object') : undefined;
|
|
31936
|
+
if (currentResultCount === _this8.ResultHistory.length) {
|
|
31937
|
+
var _err$message;
|
|
31938
|
+
// no new result was recorded elsewhere, so add one here (mirrors Save()'s own catch block)
|
|
31939
|
+
newResult.Success = false;
|
|
31940
|
+
newResult.Type = saveSubType !== null && saveSubType !== void 0 ? saveSubType : _this8.IsSaved ? 'update' : 'create';
|
|
31941
|
+
newResult.Message = (_err$message = err === null || err === void 0 ? void 0 : err.message) !== null && _err$message !== void 0 ? _err$message : err != null ? String(err) : 'Transaction group failed';
|
|
31942
|
+
newResult.Errors = (err === null || err === void 0 ? void 0 : err.Errors) || [];
|
|
31943
|
+
newResult.OriginalValues = _this8.Fields.map(function (f) {
|
|
31944
|
+
return {
|
|
31945
|
+
FieldName: f.CodeName,
|
|
31946
|
+
Value: f.OldValue
|
|
31947
|
+
};
|
|
31948
|
+
});
|
|
31949
|
+
newResult.EndedAt = new Date();
|
|
31950
|
+
_this8.RegisterResultHistoryEntry(newResult);
|
|
31951
|
+
}
|
|
31879
31952
|
}
|
|
31880
31953
|
});
|
|
31881
31954
|
return _context11.a(2, true);
|
|
@@ -32898,19 +32971,30 @@ var BaseEntity = /*#__PURE__*/function () {
|
|
|
32898
32971
|
// wipe out the current data to flush out the DIRTY flags by calling NewRecord()
|
|
32899
32972
|
_this0.NewRecord(); // will trigger a new record event here too
|
|
32900
32973
|
} else {
|
|
32901
|
-
//
|
|
32902
|
-
|
|
32903
|
-
|
|
32904
|
-
|
|
32905
|
-
|
|
32906
|
-
|
|
32907
|
-
|
|
32908
|
-
|
|
32909
|
-
|
|
32910
|
-
|
|
32911
|
-
|
|
32912
|
-
|
|
32913
|
-
|
|
32974
|
+
// Transaction group failed / rolled back. RECORD the failure instead of
|
|
32975
|
+
// letting this async handler throw — exactly like the Save() subscriber above.
|
|
32976
|
+
// `error` may be UNDEFINED: the GraphQL-client transaction group signals
|
|
32977
|
+
// failure by RETURNING failed result items (no thrown error), so the old
|
|
32978
|
+
// `error.Errors` was a TypeError, which rxjs re-throws on a fresh tick as an
|
|
32979
|
+
// uncaughtException that exits the host process. Treat `error` as
|
|
32980
|
+
// possibly-absent, and guard on currentResultCount so a provider that already
|
|
32981
|
+
// recorded the failure (real providers do, before the notification fires)
|
|
32982
|
+
// isn't double-recorded.
|
|
32983
|
+
if (currentResultCount === _this0.ResultHistory.length) {
|
|
32984
|
+
var _error$message;
|
|
32985
|
+
newResult.Success = false;
|
|
32986
|
+
newResult.Type = 'delete';
|
|
32987
|
+
newResult.Message = (_error$message = error === null || error === void 0 ? void 0 : error.message) !== null && _error$message !== void 0 ? _error$message : error != null ? String(error) : 'Transaction group failed';
|
|
32988
|
+
newResult.Errors = (error === null || error === void 0 ? void 0 : error.Errors) || [];
|
|
32989
|
+
newResult.OriginalValues = _this0.Fields.map(function (f) {
|
|
32990
|
+
return {
|
|
32991
|
+
FieldName: f.CodeName,
|
|
32992
|
+
Value: f.OldValue
|
|
32993
|
+
};
|
|
32994
|
+
});
|
|
32995
|
+
newResult.EndedAt = new Date();
|
|
32996
|
+
_this0.RegisterResultHistoryEntry(newResult);
|
|
32997
|
+
}
|
|
32914
32998
|
}
|
|
32915
32999
|
});
|
|
32916
33000
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/react-runtime",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.47.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.
|
|
33
|
-
"@memberjunction/global": "5.
|
|
34
|
-
"@memberjunction/interactive-component-types": "5.
|
|
35
|
-
"@memberjunction/core-entities": "5.
|
|
36
|
-
"@memberjunction/graphql-dataprovider": "5.
|
|
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",
|
|
37
37
|
"@babel/standalone": "^7.29.1",
|
|
38
38
|
"rxjs": "^7.8.2"
|
|
39
39
|
},
|