@acorex/platform 20.7.20 → 20.7.22
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/common/index.d.ts +4 -1
- package/fesm2022/{acorex-platform-common-common-settings.provider-gyb6ohAE.mjs → acorex-platform-common-common-settings.provider-73370m-b.mjs} +43 -1
- package/fesm2022/acorex-platform-common-common-settings.provider-73370m-b.mjs.map +1 -0
- package/fesm2022/acorex-platform-common.mjs +5 -2
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +16 -8
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +369 -151
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +19 -66
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widgets.mjs +31 -6
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-DDd7YryZ.mjs → acorex-platform-themes-default-entity-master-list-view.component-3djSN0h5.mjs} +1 -2
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-3djSN0h5.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +2 -2
- package/layout/entity/index.d.ts +31 -1
- package/layout/views/index.d.ts +6 -1
- package/layout/widgets/index.d.ts +14 -1
- package/package.json +9 -9
- package/fesm2022/acorex-platform-common-common-settings.provider-gyb6ohAE.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DDd7YryZ.mjs.map +0 -1
|
@@ -933,6 +933,7 @@ class AXPLayoutDetailsViewComponent extends AXPPageLayoutBaseComponent {
|
|
|
933
933
|
this.route = inject(ActivatedRoute);
|
|
934
934
|
this.eventService = inject(AXPBroadcastEventService);
|
|
935
935
|
this.deviceService = inject(AXPDeviceService);
|
|
936
|
+
this.settingsService = inject(AXPSettingsService);
|
|
936
937
|
this.destroyed$ = new Subject();
|
|
937
938
|
this.form = viewChild('form', ...(ngDevMode ? [{ debugName: "form" }] : []));
|
|
938
939
|
this.widgetContainer = viewChild(AXPWidgetContainerComponent, ...(ngDevMode ? [{ debugName: "widgetContainer" }] : []));
|
|
@@ -1082,72 +1083,24 @@ class AXPLayoutDetailsViewComponent extends AXPPageLayoutBaseComponent {
|
|
|
1082
1083
|
};
|
|
1083
1084
|
}
|
|
1084
1085
|
}
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
// const [moduleName, entityName] = adapter.name.split('.');
|
|
1104
|
-
// if (!moduleName || !entityName) {
|
|
1105
|
-
// return null;
|
|
1106
|
-
// }
|
|
1107
|
-
// try {
|
|
1108
|
-
// // Get entity definition
|
|
1109
|
-
// const entityDefinition = await this.entityRegistry.resolve(moduleName, entityName);
|
|
1110
|
-
// if (!entityDefinition) {
|
|
1111
|
-
// return null;
|
|
1112
|
-
// }
|
|
1113
|
-
// // Find status plugin
|
|
1114
|
-
// const statusPlugin = entityDefinition.plugins?.find((p: any) => p.name === 'status');
|
|
1115
|
-
// if (!statusPlugin?.options) {
|
|
1116
|
-
// return null;
|
|
1117
|
-
// }
|
|
1118
|
-
// const statusOptions = statusPlugin.options as any;
|
|
1119
|
-
// const statusField = statusOptions.field ?? 'statusId';
|
|
1120
|
-
// const statusDefinitionKey = statusOptions.definition;
|
|
1121
|
-
// // Get status definition key from property widget options if not in plugin options
|
|
1122
|
-
// let definitionKey: string | undefined = typeof statusDefinitionKey === 'string' ? statusDefinitionKey : undefined;
|
|
1123
|
-
// if (!definitionKey) {
|
|
1124
|
-
// // Try to get from status property widget options
|
|
1125
|
-
// const statusProperty = entityDefinition.properties?.find((p: any) => p.name === statusField);
|
|
1126
|
-
// const widgetOptions = statusProperty?.schema?.interface?.options;
|
|
1127
|
-
// if (widgetOptions?.['definitionKey']) {
|
|
1128
|
-
// definitionKey = widgetOptions['definitionKey'];
|
|
1129
|
-
// }
|
|
1130
|
-
// }
|
|
1131
|
-
// if (!definitionKey) {
|
|
1132
|
-
// return null;
|
|
1133
|
-
// }
|
|
1134
|
-
// // Get current status value from entity context
|
|
1135
|
-
// const entity = this.vm.context();
|
|
1136
|
-
// const statusValue = entity?.[statusField];
|
|
1137
|
-
// if (!statusValue) {
|
|
1138
|
-
// return null;
|
|
1139
|
-
// }
|
|
1140
|
-
// return {
|
|
1141
|
-
// definitionKey,
|
|
1142
|
-
// value: typeof statusValue === 'string' ? statusValue : statusValue?.name ?? statusValue,
|
|
1143
|
-
// dataPath: statusField,
|
|
1144
|
-
// readonly: this.vm.currentPage()?.isReadonly ?? false,
|
|
1145
|
-
// };
|
|
1146
|
-
// } catch (error) {
|
|
1147
|
-
// console.warn('Failed to get page status:', error);
|
|
1148
|
-
// return null;
|
|
1149
|
-
// }
|
|
1150
|
-
// }
|
|
1086
|
+
async getPageBadge() {
|
|
1087
|
+
const showPageBadge = await this.settingsService.get(AXPCommonSettings.ShowPageBadge);
|
|
1088
|
+
if (!showPageBadge) {
|
|
1089
|
+
return null;
|
|
1090
|
+
}
|
|
1091
|
+
const adapter = this.vm.adapter();
|
|
1092
|
+
if (!adapter?.getPageBadge) {
|
|
1093
|
+
return null;
|
|
1094
|
+
}
|
|
1095
|
+
return adapter.getPageBadge(this.vm.context(), this.vm.isDirty());
|
|
1096
|
+
}
|
|
1097
|
+
async getPageStatus() {
|
|
1098
|
+
const adapter = this.vm.adapter();
|
|
1099
|
+
if (!adapter?.getPageStatus) {
|
|
1100
|
+
return null;
|
|
1101
|
+
}
|
|
1102
|
+
return adapter.getPageStatus(this.vm.context(), this.vm.currentPage());
|
|
1103
|
+
}
|
|
1151
1104
|
/**
|
|
1152
1105
|
* Get entity data for status chip component
|
|
1153
1106
|
*/
|