@praxisui/crud 10.0.0-rc.20 → 10.0.0-rc.21
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/ai/component-registry.json +2 -2
- package/fesm2022/praxisui-crud.mjs +109 -38
- package/package.json +7 -7
- package/types/praxisui-crud.d.ts +7 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
|
-
"generatedAt": "2026-10-
|
|
3
|
+
"generatedAt": "2026-10-15T04:35:19.773Z",
|
|
4
4
|
"packageName": "@praxisui/crud",
|
|
5
|
-
"packageVersion": "10.0.0-rc.
|
|
5
|
+
"packageVersion": "10.0.0-rc.21",
|
|
6
6
|
"sourceRegistry": "praxis-component-registry-ingestion",
|
|
7
7
|
"sourceRegistryVersion": "1.0.0",
|
|
8
8
|
"componentCount": 2,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, DestroyRef, signal, HostListener, ViewChild, Inject, ViewEncapsulation, Component, EventEmitter, ChangeDetectorRef, Output, Input, ChangeDetectionStrategy, Injectable, InjectionToken, input, ElementRef, computed, effect, output, Injector, booleanAttribute, Optional, ENVIRONMENT_INITIALIZER } from '@angular/core';
|
|
2
|
+
import { inject, DestroyRef, signal, HostListener, ViewChild, Inject, ViewEncapsulation, Component, EventEmitter, ChangeDetectorRef, Output, Input, ChangeDetectionStrategy, Injectable, InjectionToken, input, ElementRef, computed, linkedSignal, effect, output, Injector, booleanAttribute, Optional, ENVIRONMENT_INITIALIZER } from '@angular/core';
|
|
3
3
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
4
|
import { HttpClient } from '@angular/common/http';
|
|
5
5
|
import { Router, ActivatedRoute, RouterLink } from '@angular/router';
|
|
@@ -7,7 +7,7 @@ import { MatSnackBar } from '@angular/material/snack-bar';
|
|
|
7
7
|
import { firstValueFrom, BehaviorSubject, Subscription } from 'rxjs';
|
|
8
8
|
import { take, filter } from 'rxjs/operators';
|
|
9
9
|
import * as i2$1 from '@praxisui/core';
|
|
10
|
-
import { PraxisBulkClientService, generateBulkIdempotencyKey, API_URL, SafeExpressionEvaluator, buildApiUrl, ASYNC_CONFIG_STORAGE, GlobalConfigService, CrudOperationResolutionService, LoggerService, SurfaceNavigationError, fillUndefined, GenericCrudService, SETTINGS_PANEL_DATA, PraxisI18nService, buildBaseColumnFromDef, PraxisIconDirective, providePraxisI18nConfig, createDefaultTableConfig, PraxisWidgetEventBus, EnterpriseRuntimeContextService, GLOBAL_SURFACE_SERVICE, SurfaceOutletRegistryService, ComponentKeyService, ResourceDiscoveryService, ResourceActionOpenAdapterService, ResourceSurfaceOpenAdapterService, composeHeadersWithVersion, normalizeSurfaceOperationContext, translateUnavailableWorkflowMessage, isSurfaceNavigationError, translateSurfaceNavigationRejected, normalizeUnknownError, EmptyStateCardComponent, RESOURCE_DISCOVERY_I18N_CONFIG, SURFACE_DRAWER_REF, SURFACE_DRAWER_CONTENT_DATA, PraxisIconButtonComponent, PraxisResourceIdentityComponent, ComponentMetadataRegistry, PraxisCustomizationModeService } from '@praxisui/core';
|
|
10
|
+
import { PraxisBulkClientService, generateBulkIdempotencyKey, API_URL, SafeExpressionEvaluator, buildApiUrl, ASYNC_CONFIG_STORAGE, GlobalConfigService, CrudOperationResolutionService, LoggerService, SurfaceNavigationError, fillUndefined, GenericCrudService, SETTINGS_PANEL_DATA, PraxisI18nService, buildBaseColumnFromDef, PraxisIconDirective, providePraxisI18nConfig, SchemaNormalizerService, createDefaultTableConfig, PraxisWidgetEventBus, EnterpriseRuntimeContextService, GLOBAL_SURFACE_SERVICE, SurfaceOutletRegistryService, ComponentKeyService, ResourceDiscoveryService, ResourceActionOpenAdapterService, ResourceSurfaceOpenAdapterService, composeHeadersWithVersion, normalizeSurfaceOperationContext, translateUnavailableWorkflowMessage, isSurfaceNavigationError, translateSurfaceNavigationRejected, normalizeUnknownError, EmptyStateCardComponent, RESOURCE_DISCOVERY_I18N_CONFIG, SURFACE_DRAWER_REF, SURFACE_DRAWER_CONTENT_DATA, PraxisIconButtonComponent, PraxisResourceIdentityComponent, ComponentMetadataRegistry, PraxisCustomizationModeService } from '@praxisui/core';
|
|
11
11
|
export { createDynamicRecord, extractRecordId, isDynamicDataRecord, resolveDataField } from '@praxisui/core';
|
|
12
12
|
import * as i1 from '@angular/common';
|
|
13
13
|
import { CommonModule } from '@angular/common';
|
|
@@ -4971,9 +4971,17 @@ class CrudMetadataEditorComponent {
|
|
|
4971
4971
|
lastExternalSignature = null;
|
|
4972
4972
|
lastLoadedResourceSignature = '';
|
|
4973
4973
|
schemaSub;
|
|
4974
|
+
schemaScopeSignature = null;
|
|
4975
|
+
schemaGeneration = 0;
|
|
4976
|
+
destroyed = false;
|
|
4974
4977
|
effectiveCrudId = computed(() => this.crudIdInput() || this.injectedData?.crudId || null, ...(ngDevMode ? [{ debugName: "effectiveCrudId" }] : /* istanbul ignore next */ []));
|
|
4975
4978
|
isReadonly = computed(() => !!(this.readonlyInput() || this.injectedData?.readonly), ...(ngDevMode ? [{ debugName: "isReadonly" }] : /* istanbul ignore next */ []));
|
|
4976
4979
|
providedEffectiveTableConfig = computed(() => this.effectiveTableConfigInput() || this.injectedData?.effectiveTableConfig || null, ...(ngDevMode ? [{ debugName: "providedEffectiveTableConfig" }] : /* istanbul ignore next */ []));
|
|
4980
|
+
providedSnapshotOwner = linkedSignal({ ...(ngDevMode ? { debugName: "providedSnapshotOwner" } : /* istanbul ignore next */ {}), source: () => ({
|
|
4981
|
+
snapshot: this.providedEffectiveTableConfig(),
|
|
4982
|
+
resourceIdentity: this.resourceSchemaIdentity(parseLegacyOrCrudDocument(this.resolveExternalSeed()).metadata),
|
|
4983
|
+
}),
|
|
4984
|
+
computation: (source, previous) => previous && source.snapshot === previous.source.snapshot ? previous.value : source });
|
|
4977
4985
|
diagnostics = computed(() => validateCrudAuthoringDocument(this.currentDocument(), { requireCanonicalActions: true }), ...(ngDevMode ? [{ debugName: "diagnostics" }] : /* istanbul ignore next */ []));
|
|
4978
4986
|
errorCount = computed(() => this.diagnostics().filter((issue) => issue.level === 'error').length, ...(ngDevMode ? [{ debugName: "errorCount" }] : /* istanbul ignore next */ []));
|
|
4979
4987
|
warningCount = computed(() => this.diagnostics().filter((issue) => issue.level !== 'error').length, ...(ngDevMode ? [{ debugName: "warningCount" }] : /* istanbul ignore next */ []));
|
|
@@ -4988,20 +4996,16 @@ class CrudMetadataEditorComponent {
|
|
|
4988
4996
|
resourcePath = computed(() => this.currentDocument().metadata.resource?.path || '', ...(ngDevMode ? [{ debugName: "resourcePath" }] : /* istanbul ignore next */ []));
|
|
4989
4997
|
resourceIdField = computed(() => String(this.currentDocument().metadata.resource?.idField ?? ''), ...(ngDevMode ? [{ debugName: "resourceIdField" }] : /* istanbul ignore next */ []));
|
|
4990
4998
|
resourceEndpointKey = computed(() => String(this.currentDocument().metadata.resource?.endpointKey ?? ''), ...(ngDevMode ? [{ debugName: "resourceEndpointKey" }] : /* istanbul ignore next */ []));
|
|
4991
|
-
resourceChangedSinceInit = computed(() =>
|
|
4992
|
-
|
|
4993
|
-
const currentResource = this.currentDocument().metadata.resource;
|
|
4994
|
-
return (String(initialResource?.path || '').trim() !== String(currentResource?.path || '').trim() ||
|
|
4995
|
-
String(initialResource?.endpointKey || '').trim() !==
|
|
4996
|
-
String(currentResource?.endpointKey || '').trim());
|
|
4997
|
-
}, ...(ngDevMode ? [{ debugName: "resourceChangedSinceInit" }] : /* istanbul ignore next */ []));
|
|
4999
|
+
resourceChangedSinceInit = computed(() => this.resourceSchemaIdentity(this.initialDocument().metadata) !==
|
|
5000
|
+
this.resourceSchemaIdentity(this.currentDocument().metadata), ...(ngDevMode ? [{ debugName: "resourceChangedSinceInit" }] : /* istanbul ignore next */ []));
|
|
4998
5001
|
authoredTableColumns = computed(() => {
|
|
4999
5002
|
const raw = this.currentDocument().metadata.table?.columns;
|
|
5000
5003
|
return Array.isArray(raw) ? raw : [];
|
|
5001
5004
|
}, ...(ngDevMode ? [{ debugName: "authoredTableColumns" }] : /* istanbul ignore next */ []));
|
|
5002
5005
|
resolvedInheritedColumns = computed(() => {
|
|
5003
|
-
|
|
5004
|
-
|
|
5006
|
+
const provided = this.providedSnapshotOwner();
|
|
5007
|
+
if (provided.resourceIdentity === this.resourceSchemaIdentity(this.currentDocument().metadata)) {
|
|
5008
|
+
const runtimeColumns = provided.snapshot?.columns;
|
|
5005
5009
|
if (Array.isArray(runtimeColumns) && runtimeColumns.length > 0) {
|
|
5006
5010
|
return runtimeColumns;
|
|
5007
5011
|
}
|
|
@@ -5157,6 +5161,9 @@ class CrudMetadataEditorComponent {
|
|
|
5157
5161
|
const parsed = parseLegacyOrCrudDocument(seed);
|
|
5158
5162
|
this.initialDocument.set(parsed);
|
|
5159
5163
|
this.currentDocument.set(parsed);
|
|
5164
|
+
// Observe the supplied snapshot with its external resource, before local edits.
|
|
5165
|
+
this.providedSnapshotOwner();
|
|
5166
|
+
this.synchronizeSchemaScope();
|
|
5160
5167
|
this.kpiFilterJsonDrafts.set({});
|
|
5161
5168
|
this.quickFilterExpressionDrafts.set({});
|
|
5162
5169
|
this.syncState();
|
|
@@ -5165,13 +5172,10 @@ class CrudMetadataEditorComponent {
|
|
|
5165
5172
|
const path = this.resourcePath().trim();
|
|
5166
5173
|
const endpointKey = this.resourceEndpointKey().trim();
|
|
5167
5174
|
const apiUrlEntry = this.currentDocument().metadata.resource?.apiUrlEntry ?? null;
|
|
5168
|
-
const signature =
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
this.schemaResolvedColumnsSignal.set([]);
|
|
5172
|
-
this.schemaResolvedFilterFieldsSignal.set([]);
|
|
5175
|
+
const signature = this.resourceSchemaIdentity(this.currentDocument().metadata);
|
|
5176
|
+
this.synchronizeSchemaScope();
|
|
5177
|
+
if (!path)
|
|
5173
5178
|
return;
|
|
5174
|
-
}
|
|
5175
5179
|
if (signature === this.lastLoadedResourceSignature) {
|
|
5176
5180
|
return;
|
|
5177
5181
|
}
|
|
@@ -5179,7 +5183,8 @@ class CrudMetadataEditorComponent {
|
|
|
5179
5183
|
this.loadResourceSchemaColumns(path, endpointKey || undefined, apiUrlEntry);
|
|
5180
5184
|
});
|
|
5181
5185
|
this.destroyRef.onDestroy(() => {
|
|
5182
|
-
this.
|
|
5186
|
+
this.destroyed = true;
|
|
5187
|
+
this.invalidateSchemaScope();
|
|
5183
5188
|
});
|
|
5184
5189
|
}
|
|
5185
5190
|
getSettingsValue() {
|
|
@@ -5190,6 +5195,7 @@ class CrudMetadataEditorComponent {
|
|
|
5190
5195
|
}
|
|
5191
5196
|
reset() {
|
|
5192
5197
|
this.currentDocument.set(this.initialDocument());
|
|
5198
|
+
this.synchronizeSchemaScope();
|
|
5193
5199
|
this.initialValueDrafts.set({});
|
|
5194
5200
|
this.kpiFilterJsonDrafts.set({});
|
|
5195
5201
|
this.quickFilterExpressionDrafts.set({});
|
|
@@ -6681,43 +6687,81 @@ class CrudMetadataEditorComponent {
|
|
|
6681
6687
|
};
|
|
6682
6688
|
});
|
|
6683
6689
|
}
|
|
6684
|
-
|
|
6685
|
-
|
|
6690
|
+
resourceSchemaIdentity(metadata) {
|
|
6691
|
+
const resource = metadata.resource;
|
|
6692
|
+
return JSON.stringify([
|
|
6693
|
+
String(resource?.path ?? '').trim(),
|
|
6694
|
+
String(resource?.endpointKey ?? '').trim(),
|
|
6695
|
+
resource?.apiUrlEntry ?? null,
|
|
6696
|
+
]);
|
|
6697
|
+
}
|
|
6698
|
+
synchronizeSchemaScope() {
|
|
6699
|
+
const signature = this.resourceSchemaIdentity(this.currentDocument().metadata);
|
|
6700
|
+
if (signature === this.schemaScopeSignature)
|
|
6686
6701
|
return;
|
|
6687
|
-
|
|
6702
|
+
this.invalidateSchemaScope();
|
|
6703
|
+
this.schemaScopeSignature = signature;
|
|
6704
|
+
}
|
|
6705
|
+
invalidateSchemaScope() {
|
|
6706
|
+
++this.schemaGeneration;
|
|
6688
6707
|
this.schemaSub?.unsubscribe();
|
|
6708
|
+
this.schemaSub = undefined;
|
|
6709
|
+
this.lastLoadedResourceSignature = '';
|
|
6710
|
+
this.schemaResolvedColumnsSignal.set([]);
|
|
6711
|
+
this.schemaResolvedFilterFieldsSignal.set([]);
|
|
6712
|
+
this.isBusy$.next(false);
|
|
6713
|
+
}
|
|
6714
|
+
loadResourceSchemaColumns(resourcePath, endpointKey, apiUrlEntry) {
|
|
6715
|
+
if (!this.crudService)
|
|
6716
|
+
return;
|
|
6717
|
+
const generation = this.schemaGeneration;
|
|
6718
|
+
const signature = this.resourceSchemaIdentity(this.currentDocument().metadata);
|
|
6719
|
+
const externalSignature = () => this.resourceSchemaIdentity(parseLegacyOrCrudDocument(this.resolveExternalSeed()).metadata);
|
|
6720
|
+
const requestExternalSignature = externalSignature();
|
|
6721
|
+
const isCurrent = () => {
|
|
6722
|
+
const external = externalSignature();
|
|
6723
|
+
return !this.destroyed && generation === this.schemaGeneration &&
|
|
6724
|
+
signature === this.resourceSchemaIdentity(this.currentDocument().metadata) &&
|
|
6725
|
+
// An editorial seed update or owner echo of the edited resource keeps this read.
|
|
6726
|
+
(external === requestExternalSignature || external === signature);
|
|
6727
|
+
};
|
|
6728
|
+
this.isBusy$.next(true);
|
|
6689
6729
|
try {
|
|
6690
6730
|
this.crudService.configure(resourcePath, {
|
|
6691
6731
|
endpointKey: endpointKey,
|
|
6692
6732
|
apiUrlEntry: apiUrlEntry ?? undefined,
|
|
6693
6733
|
});
|
|
6694
|
-
|
|
6695
|
-
if (!schema$ || typeof schema$.subscribe !== 'function') {
|
|
6696
|
-
return;
|
|
6697
|
-
}
|
|
6698
|
-
this.schemaSub = schema$.subscribe({
|
|
6734
|
+
this.schemaSub = this.crudService.getSchema().subscribe({
|
|
6699
6735
|
next: (fields) => {
|
|
6700
|
-
if (!
|
|
6736
|
+
if (!isCurrent())
|
|
6701
6737
|
return;
|
|
6702
|
-
|
|
6703
|
-
|
|
6738
|
+
const resolved = Array.isArray(fields) ? fields : [];
|
|
6739
|
+
this.schemaResolvedColumnsSignal.set(resolved
|
|
6704
6740
|
.filter((field) => !field.tableHidden && !field.hidden)
|
|
6705
|
-
.map((field) => buildBaseColumnFromDef(field));
|
|
6706
|
-
this.
|
|
6707
|
-
this.schemaResolvedFilterFieldsSignal.set(fields
|
|
6741
|
+
.map((field) => buildBaseColumnFromDef(field)));
|
|
6742
|
+
this.schemaResolvedFilterFieldsSignal.set(resolved
|
|
6708
6743
|
.filter((field) => !!String(field?.name || '').trim())
|
|
6709
6744
|
.map((field) => ({
|
|
6710
6745
|
field: String(field.name).trim(),
|
|
6711
6746
|
header: String(field.label || field.name).trim(),
|
|
6712
6747
|
})));
|
|
6748
|
+
this.isBusy$.next(false);
|
|
6713
6749
|
},
|
|
6714
6750
|
error: () => {
|
|
6715
|
-
|
|
6751
|
+
if (!isCurrent())
|
|
6752
|
+
return;
|
|
6753
|
+
this.schemaResolvedColumnsSignal.set([]);
|
|
6754
|
+
this.schemaResolvedFilterFieldsSignal.set([]);
|
|
6755
|
+
this.isBusy$.next(false);
|
|
6716
6756
|
},
|
|
6757
|
+
complete: () => { if (isCurrent())
|
|
6758
|
+
this.isBusy$.next(false); },
|
|
6717
6759
|
});
|
|
6718
6760
|
}
|
|
6719
6761
|
catch {
|
|
6720
|
-
//
|
|
6762
|
+
// An unavailable reader must not preserve another resource's inferred fields.
|
|
6763
|
+
if (isCurrent())
|
|
6764
|
+
this.isBusy$.next(false);
|
|
6721
6765
|
}
|
|
6722
6766
|
}
|
|
6723
6767
|
patchAction(actionName, patcher) {
|
|
@@ -6743,6 +6787,7 @@ class CrudMetadataEditorComponent {
|
|
|
6743
6787
|
metadata: updater(this.currentDocument().metadata),
|
|
6744
6788
|
});
|
|
6745
6789
|
this.currentDocument.set(next);
|
|
6790
|
+
this.synchronizeSchemaScope();
|
|
6746
6791
|
this.syncState();
|
|
6747
6792
|
}
|
|
6748
6793
|
buildPayload() {
|
|
@@ -6763,9 +6808,9 @@ class CrudMetadataEditorComponent {
|
|
|
6763
6808
|
syncState() {
|
|
6764
6809
|
const currentSignature = JSON.stringify(serializeCrudAuthoringDocument(this.currentDocument()));
|
|
6765
6810
|
const initialSignature = JSON.stringify(serializeCrudAuthoringDocument(this.initialDocument()));
|
|
6766
|
-
this.isDirty$.next(currentSignature !== initialSignature);
|
|
6767
|
-
const hasErrorDiagnostics = this.diagnostics().some((issue) => issue.level === 'error');
|
|
6768
6811
|
const hasInvalidKpiJson = Object.keys(this.kpiFilterJsonDrafts()).length > 0;
|
|
6812
|
+
this.isDirty$.next(currentSignature !== initialSignature || hasInvalidKpiJson);
|
|
6813
|
+
const hasErrorDiagnostics = this.diagnostics().some((issue) => issue.level === 'error');
|
|
6769
6814
|
this.isValid$.next(!hasErrorDiagnostics && !hasInvalidKpiJson);
|
|
6770
6815
|
}
|
|
6771
6816
|
tx(key, fallback) {
|
|
@@ -6839,7 +6884,20 @@ class CrudMetadataEditorComponent {
|
|
|
6839
6884
|
}[section];
|
|
6840
6885
|
}
|
|
6841
6886
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: CrudMetadataEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6842
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: CrudMetadataEditorComponent, isStandalone: true, selector: "praxis-crud-metadata-editor", inputs: { documentInput: { classPropertyName: "documentInput", publicName: "document", isSignal: true, isRequired: false, transformFunction: null }, metadataInput: { classPropertyName: "metadataInput", publicName: "metadata", isSignal: true, isRequired: false, transformFunction: null }, crudIdInput: { classPropertyName: "crudIdInput", publicName: "crudId", isSignal: true, isRequired: false, transformFunction: null }, readonlyInput: { classPropertyName: "readonlyInput", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, effectiveTableConfigInput: { classPropertyName: "effectiveTableConfigInput", publicName: "effectiveTableConfig", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
6887
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: CrudMetadataEditorComponent, isStandalone: true, selector: "praxis-crud-metadata-editor", inputs: { documentInput: { classPropertyName: "documentInput", publicName: "document", isSignal: true, isRequired: false, transformFunction: null }, metadataInput: { classPropertyName: "metadataInput", publicName: "metadata", isSignal: true, isRequired: false, transformFunction: null }, crudIdInput: { classPropertyName: "crudIdInput", publicName: "crudId", isSignal: true, isRequired: false, transformFunction: null }, readonlyInput: { classPropertyName: "readonlyInput", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, effectiveTableConfigInput: { classPropertyName: "effectiveTableConfigInput", publicName: "effectiveTableConfig", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
6888
|
+
providePraxisI18nConfig(PRAXIS_CRUD_AUTHORING_I18N_CONFIG),
|
|
6889
|
+
{
|
|
6890
|
+
provide: GenericCrudService,
|
|
6891
|
+
useFactory: () => {
|
|
6892
|
+
const http = inject(HttpClient, { optional: true });
|
|
6893
|
+
const apiUrl = inject(API_URL, { optional: true });
|
|
6894
|
+
// Offline authoring has no transport; a configured editor owns its mutable reader.
|
|
6895
|
+
if (http === null || apiUrl === null)
|
|
6896
|
+
return null;
|
|
6897
|
+
return new GenericCrudService(http, inject(SchemaNormalizerService), inject(GlobalConfigService), apiUrl);
|
|
6898
|
+
},
|
|
6899
|
+
},
|
|
6900
|
+
], ngImport: i0, template: `
|
|
6843
6901
|
<section class="editor-shell" data-testid="crud-metadata-editor">
|
|
6844
6902
|
<header class="editor-header">
|
|
6845
6903
|
<div>
|
|
@@ -7998,7 +8056,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
7998
8056
|
PraxisIconDirective,
|
|
7999
8057
|
PraxisKpiBandComponent,
|
|
8000
8058
|
PraxisTableInlineAuthoringEditorComponent,
|
|
8001
|
-
], providers: [
|
|
8059
|
+
], providers: [
|
|
8060
|
+
providePraxisI18nConfig(PRAXIS_CRUD_AUTHORING_I18N_CONFIG),
|
|
8061
|
+
{
|
|
8062
|
+
provide: GenericCrudService,
|
|
8063
|
+
useFactory: () => {
|
|
8064
|
+
const http = inject(HttpClient, { optional: true });
|
|
8065
|
+
const apiUrl = inject(API_URL, { optional: true });
|
|
8066
|
+
// Offline authoring has no transport; a configured editor owns its mutable reader.
|
|
8067
|
+
if (http === null || apiUrl === null)
|
|
8068
|
+
return null;
|
|
8069
|
+
return new GenericCrudService(http, inject(SchemaNormalizerService), inject(GlobalConfigService), apiUrl);
|
|
8070
|
+
},
|
|
8071
|
+
},
|
|
8072
|
+
], template: `
|
|
8002
8073
|
<section class="editor-shell" data-testid="crud-metadata-editor">
|
|
8003
8074
|
<header class="editor-header">
|
|
8004
8075
|
<div>
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/crud",
|
|
3
|
-
"version": "10.0.0-rc.
|
|
3
|
+
"version": "10.0.0-rc.21",
|
|
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": "^10.0.0-rc.
|
|
9
|
-
"@praxisui/table": "^10.0.0-rc.
|
|
10
|
-
"@praxisui/core": "^10.0.0-rc.
|
|
11
|
-
"@praxisui/dynamic-fields": "^10.0.0-rc.
|
|
12
|
-
"@praxisui/settings-panel": "^10.0.0-rc.
|
|
8
|
+
"@praxisui/dynamic-form": "^10.0.0-rc.21",
|
|
9
|
+
"@praxisui/table": "^10.0.0-rc.21",
|
|
10
|
+
"@praxisui/core": "^10.0.0-rc.21",
|
|
11
|
+
"@praxisui/dynamic-fields": "^10.0.0-rc.21",
|
|
12
|
+
"@praxisui/settings-panel": "^10.0.0-rc.21",
|
|
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": "^10.0.0-rc.
|
|
17
|
+
"@praxisui/ai": "^10.0.0-rc.21",
|
|
18
18
|
"rxjs": "~7.8.0"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
package/types/praxisui-crud.d.ts
CHANGED
|
@@ -800,9 +800,13 @@ declare class CrudMetadataEditorComponent implements SettingsValueProvider {
|
|
|
800
800
|
private lastExternalSignature;
|
|
801
801
|
private lastLoadedResourceSignature;
|
|
802
802
|
private schemaSub?;
|
|
803
|
+
private schemaScopeSignature;
|
|
804
|
+
private schemaGeneration;
|
|
805
|
+
private destroyed;
|
|
803
806
|
readonly effectiveCrudId: _angular_core.Signal<string | null>;
|
|
804
807
|
readonly isReadonly: _angular_core.Signal<boolean>;
|
|
805
808
|
readonly providedEffectiveTableConfig: _angular_core.Signal<_praxisui_core.TableConfigModern | null>;
|
|
809
|
+
private readonly providedSnapshotOwner;
|
|
806
810
|
readonly diagnostics: _angular_core.Signal<_praxisui_crud.CrudEditorDiagnostic[]>;
|
|
807
811
|
readonly errorCount: _angular_core.Signal<number>;
|
|
808
812
|
readonly warningCount: _angular_core.Signal<number>;
|
|
@@ -994,6 +998,9 @@ declare class CrudMetadataEditorComponent implements SettingsValueProvider {
|
|
|
994
998
|
private clearKpiFilterJsonDraft;
|
|
995
999
|
private updateFilterBar;
|
|
996
1000
|
private patchQuickFilter;
|
|
1001
|
+
private resourceSchemaIdentity;
|
|
1002
|
+
private synchronizeSchemaScope;
|
|
1003
|
+
private invalidateSchemaScope;
|
|
997
1004
|
private loadResourceSchemaColumns;
|
|
998
1005
|
private patchAction;
|
|
999
1006
|
private updateMetadata;
|