ngx-material-entity 15.2.4 → 15.2.5
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/esm2020/components/edit-page/edit-page.component.mjs +5 -3
- package/esm2020/components/input/input.component.mjs +5 -3
- package/esm2020/components/table/edit-dialog/edit-entity-dialog.component.mjs +5 -3
- package/fesm2015/ngx-material-entity.mjs +12 -6
- package/fesm2015/ngx-material-entity.mjs.map +1 -1
- package/fesm2020/ngx-material-entity.mjs +12 -6
- package/fesm2020/ngx-material-entity.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -3283,8 +3283,10 @@ class NgxMatEntityInputComponent {
|
|
|
3283
3283
|
* @returns Whether or not the input is read only.
|
|
3284
3284
|
*/
|
|
3285
3285
|
isPropertyReadOnly(property, key) {
|
|
3286
|
-
|
|
3287
|
-
|
|
3286
|
+
return this.injector.runInContext(() => {
|
|
3287
|
+
const metadata = EntityUtilities.getPropertyMetadata(property, key);
|
|
3288
|
+
return this.internalIsReadOnly || metadata.isReadOnly(property);
|
|
3289
|
+
});
|
|
3288
3290
|
}
|
|
3289
3291
|
/**
|
|
3290
3292
|
* This is needed for the inputs to work inside an ngFor.
|
|
@@ -4120,8 +4122,10 @@ class NgxMatEntityEditPageComponent {
|
|
|
4120
4122
|
* @returns Whether or not the input for the key is read only.
|
|
4121
4123
|
*/
|
|
4122
4124
|
isReadOnly(key) {
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
+
return this.injector.runInContext(() => {
|
|
4126
|
+
const metadata = EntityUtilities.getPropertyMetadata(this.entity, key);
|
|
4127
|
+
return this.isEntityReadOnly || metadata.isReadOnly(this.entity);
|
|
4128
|
+
});
|
|
4125
4129
|
}
|
|
4126
4130
|
async ngOnInit() {
|
|
4127
4131
|
this.data = new PageEditDataBuilder(this.inputData).getResult();
|
|
@@ -4605,8 +4609,10 @@ class NgxMatEntityEditDialogComponent {
|
|
|
4605
4609
|
* @returns Whether or not the input for the key is read only.
|
|
4606
4610
|
*/
|
|
4607
4611
|
isReadOnly(key) {
|
|
4608
|
-
|
|
4609
|
-
|
|
4612
|
+
return this.injector.runInContext(() => {
|
|
4613
|
+
const metadata = EntityUtilities.getPropertyMetadata(this.data.entity, key);
|
|
4614
|
+
return this.isEntityReadOnly || metadata.isReadOnly(this.data.entity);
|
|
4615
|
+
});
|
|
4610
4616
|
}
|
|
4611
4617
|
/**
|
|
4612
4618
|
* Checks if the entity has become invalid or dirty.
|