@praxisui/crud 9.0.4-rc.3 → 9.0.4-rc.4

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,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
- "generatedAt": "2026-07-31T14:02:14.681Z",
3
+ "generatedAt": "2026-07-31T20:05:40.240Z",
4
4
  "packageName": "@praxisui/crud",
5
- "packageVersion": "9.0.4-rc.3",
5
+ "packageVersion": "9.0.4-rc.4",
6
6
  "sourceRegistry": "praxis-component-registry-ingestion",
7
7
  "sourceRegistryVersion": "1.0.0",
8
8
  "componentCount": 2,
@@ -4393,9 +4393,12 @@ class PraxisCrudComponent {
4393
4393
  mode: this.mapSurfacePresentationToCrudMode(payload?.presentation),
4394
4394
  action,
4395
4395
  });
4396
- void openPromise
4397
- .then((result) => this.handleDiscoveredSurfaceResult(result))
4398
- .catch((err) => this.error.emit(err));
4396
+ try {
4397
+ this.bindDiscoveredSurfaceLifecycle(await openPromise);
4398
+ }
4399
+ catch (err) {
4400
+ this.error.emit(err);
4401
+ }
4399
4402
  return true;
4400
4403
  }
4401
4404
  async resolveDiscoveredSurfaceCatalog(action, row) {
@@ -4600,7 +4603,6 @@ class PraxisCrudComponent {
4600
4603
  return presentation === 'modal' ? 'modal' : 'drawer';
4601
4604
  }
4602
4605
  handleDiscoveredSurfaceResult(result) {
4603
- this.afterClose.emit();
4604
4606
  const data = (result?.data || {});
4605
4607
  const idField = this.getIdField();
4606
4608
  if (result?.type === 'save') {
@@ -4614,6 +4616,34 @@ class PraxisCrudComponent {
4614
4616
  this.refreshTable();
4615
4617
  }
4616
4618
  }
4619
+ bindDiscoveredSurfaceLifecycle(ref) {
4620
+ const surfaceRef = ref;
4621
+ if (!surfaceRef)
4622
+ return;
4623
+ let terminalResultHandled = false;
4624
+ let closeHandled = false;
4625
+ const handleResult = (result) => {
4626
+ const type = String(result?.type || '');
4627
+ if (terminalResultHandled || (type !== 'save' && type !== 'delete'))
4628
+ return;
4629
+ terminalResultHandled = true;
4630
+ this.handleDiscoveredSurfaceResult(result);
4631
+ };
4632
+ surfaceRef.result$?.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(handleResult);
4633
+ const handleClose = (result) => {
4634
+ handleResult(result);
4635
+ if (closeHandled)
4636
+ return;
4637
+ closeHandled = true;
4638
+ this.afterClose.emit();
4639
+ };
4640
+ if (surfaceRef.closed$) {
4641
+ surfaceRef.closed$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(handleClose);
4642
+ }
4643
+ else {
4644
+ surfaceRef.afterClosed?.().pipe(takeUntilDestroyed(this.destroyRef)).subscribe(handleClose);
4645
+ }
4646
+ }
4617
4647
  buildEffectiveTableConfig(meta, capabilities) {
4618
4648
  const base = meta.table;
4619
4649
  const current = this.getCurrentTableConfigSnapshot();
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@praxisui/crud",
3
- "version": "9.0.4-rc.3",
3
+ "version": "9.0.4-rc.4",
4
4
  "description": "CRUD building blocks for Praxis UI: integrates dynamic forms and tables with unified configuration and services.",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^21.0.0",
7
7
  "@angular/core": "^21.0.0",
8
- "@praxisui/dynamic-form": "^9.0.4-rc.3",
9
- "@praxisui/table": "^9.0.4-rc.3",
10
- "@praxisui/core": "^9.0.4-rc.3",
11
- "@praxisui/dynamic-fields": "^9.0.4-rc.3",
12
- "@praxisui/settings-panel": "^9.0.4-rc.3",
8
+ "@praxisui/dynamic-form": "^9.0.4-rc.4",
9
+ "@praxisui/table": "^9.0.4-rc.4",
10
+ "@praxisui/core": "^9.0.4-rc.4",
11
+ "@praxisui/dynamic-fields": "^9.0.4-rc.4",
12
+ "@praxisui/settings-panel": "^9.0.4-rc.4",
13
13
  "@angular/cdk": "^21.0.0",
14
14
  "@angular/forms": "^21.0.0",
15
15
  "@angular/material": "^21.0.0",
16
16
  "@angular/router": "^21.0.0",
17
- "@praxisui/ai": "^9.0.4-rc.3",
17
+ "@praxisui/ai": "^9.0.4-rc.4",
18
18
  "rxjs": "~7.8.0"
19
19
  },
20
20
  "dependencies": {
@@ -294,6 +294,7 @@ declare class PraxisCrudComponent implements OnChanges {
294
294
  private resolveRowResourceId;
295
295
  private mapSurfacePresentationToCrudMode;
296
296
  private handleDiscoveredSurfaceResult;
297
+ private bindDiscoveredSurfaceLifecycle;
297
298
  private buildEffectiveTableConfig;
298
299
  private isAddLike;
299
300
  private normalizeCrudActionName;