@praxisui/crud 9.0.4-rc.32 → 9.0.4-rc.34
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-08-
|
|
3
|
+
"generatedAt": "2026-08-05T14:45:22.888Z",
|
|
4
4
|
"packageName": "@praxisui/crud",
|
|
5
|
-
"packageVersion": "9.0.4-rc.
|
|
5
|
+
"packageVersion": "9.0.4-rc.34",
|
|
6
6
|
"sourceRegistry": "praxis-component-registry-ingestion",
|
|
7
7
|
"sourceRegistryVersion": "1.0.0",
|
|
8
8
|
"componentCount": 2,
|
|
@@ -5185,7 +5185,8 @@ class PraxisCrudComponent {
|
|
|
5185
5185
|
return [];
|
|
5186
5186
|
}
|
|
5187
5187
|
return (capabilities.actions || [])
|
|
5188
|
-
.filter((action) => action.scope === 'COLLECTION'
|
|
5188
|
+
.filter((action) => action.scope === 'COLLECTION' &&
|
|
5189
|
+
this.isCatalogActionAvailable(capabilities, action.id))
|
|
5189
5190
|
.sort((left, right) => (left.order ?? 0) - (right.order ?? 0))
|
|
5190
5191
|
.map((action) => ({
|
|
5191
5192
|
action: action.id,
|
|
@@ -5206,28 +5207,49 @@ class PraxisCrudComponent {
|
|
|
5206
5207
|
appearance: 'outlined',
|
|
5207
5208
|
position: 'end',
|
|
5208
5209
|
action: action.id,
|
|
5209
|
-
disabled: action.
|
|
5210
|
+
disabled: !this.isCatalogActionAvailable(capabilities, action.id),
|
|
5210
5211
|
tooltip: action.description ||
|
|
5211
|
-
(action.
|
|
5212
|
-
? translateUnavailableWorkflowMessage(this.i18n, action.availability)
|
|
5212
|
+
(!this.isCatalogActionAvailable(capabilities, action.id)
|
|
5213
|
+
? translateUnavailableWorkflowMessage(this.i18n, capabilities.operations?.[action.id]?.availability || action.availability)
|
|
5213
5214
|
: undefined),
|
|
5214
5215
|
}));
|
|
5215
5216
|
}
|
|
5216
5217
|
supportsCreateCapability(snapshot) {
|
|
5217
|
-
|
|
5218
|
-
|
|
5218
|
+
const operationAvailability = this.resolveOperationAvailability(snapshot, 'create');
|
|
5219
|
+
if (operationAvailability !== null) {
|
|
5220
|
+
return operationAvailability;
|
|
5221
|
+
}
|
|
5222
|
+
return (this.hasCanonicalOperation(snapshot, 'create') ||
|
|
5219
5223
|
snapshot.surfaces.some((surface) => surface.scope === 'COLLECTION' &&
|
|
5220
5224
|
this.isWritableCrudSurface(surface) &&
|
|
5221
5225
|
surface.availability?.allowed !== false));
|
|
5222
5226
|
}
|
|
5223
5227
|
supportsViewCapability(snapshot) {
|
|
5224
|
-
|
|
5228
|
+
const operationAvailability = this.resolveOperationAvailability(snapshot, 'view');
|
|
5229
|
+
return operationAvailability ?? this.hasCanonicalOperation(snapshot, 'byId');
|
|
5225
5230
|
}
|
|
5226
5231
|
supportsEditCapability(snapshot) {
|
|
5227
|
-
|
|
5232
|
+
const operationAvailability = this.resolveOperationAvailability(snapshot, 'edit');
|
|
5233
|
+
return operationAvailability ?? this.hasCanonicalOperation(snapshot, 'update');
|
|
5228
5234
|
}
|
|
5229
5235
|
supportsDeleteCapability(snapshot) {
|
|
5230
|
-
|
|
5236
|
+
const operationAvailability = this.resolveOperationAvailability(snapshot, 'delete');
|
|
5237
|
+
return operationAvailability ?? this.hasCanonicalOperation(snapshot, 'delete');
|
|
5238
|
+
}
|
|
5239
|
+
resolveOperationAvailability(snapshot, operationId) {
|
|
5240
|
+
const operation = snapshot.operations?.[operationId];
|
|
5241
|
+
if (!operation) {
|
|
5242
|
+
return null;
|
|
5243
|
+
}
|
|
5244
|
+
return operation.supported === true && operation.availability?.allowed !== false;
|
|
5245
|
+
}
|
|
5246
|
+
isCatalogActionAvailable(snapshot, actionId) {
|
|
5247
|
+
const action = (snapshot.actions || []).find((candidate) => candidate.id === actionId);
|
|
5248
|
+
if (action?.availability?.allowed === false) {
|
|
5249
|
+
return false;
|
|
5250
|
+
}
|
|
5251
|
+
const operationAvailability = this.resolveOperationAvailability(snapshot, actionId);
|
|
5252
|
+
return operationAvailability ?? true;
|
|
5231
5253
|
}
|
|
5232
5254
|
hasCanonicalOperation(snapshot, operation) {
|
|
5233
5255
|
return snapshot.canonicalOperations?.[operation] === true;
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/crud",
|
|
3
|
-
"version": "9.0.4-rc.
|
|
3
|
+
"version": "9.0.4-rc.34",
|
|
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.
|
|
9
|
-
"@praxisui/table": "^9.0.4-rc.
|
|
10
|
-
"@praxisui/core": "^9.0.4-rc.
|
|
11
|
-
"@praxisui/dynamic-fields": "^9.0.4-rc.
|
|
12
|
-
"@praxisui/settings-panel": "^9.0.4-rc.
|
|
8
|
+
"@praxisui/dynamic-form": "^9.0.4-rc.34",
|
|
9
|
+
"@praxisui/table": "^9.0.4-rc.34",
|
|
10
|
+
"@praxisui/core": "^9.0.4-rc.34",
|
|
11
|
+
"@praxisui/dynamic-fields": "^9.0.4-rc.34",
|
|
12
|
+
"@praxisui/settings-panel": "^9.0.4-rc.34",
|
|
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.
|
|
17
|
+
"@praxisui/ai": "^9.0.4-rc.34",
|
|
18
18
|
"rxjs": "~7.8.0"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
package/types/praxisui-crud.d.ts
CHANGED
|
@@ -322,6 +322,8 @@ declare class PraxisCrudComponent implements OnChanges {
|
|
|
322
322
|
private supportsViewCapability;
|
|
323
323
|
private supportsEditCapability;
|
|
324
324
|
private supportsDeleteCapability;
|
|
325
|
+
private resolveOperationAvailability;
|
|
326
|
+
private isCatalogActionAvailable;
|
|
325
327
|
private hasCanonicalOperation;
|
|
326
328
|
private resolveCollectionCapabilitiesHref;
|
|
327
329
|
private resolveCrudResourceIdentity;
|