@acorex/platform 20.8.5 → 20.8.7
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 +17 -2
- package/fesm2022/{acorex-platform-common-common-settings.provider-41RhWqb4.mjs → acorex-platform-common-common-settings.provider-DqdSjjp6.mjs} +15 -1
- package/fesm2022/acorex-platform-common-common-settings.provider-DqdSjjp6.mjs.map +1 -0
- package/fesm2022/acorex-platform-common.mjs +3 -2
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +78 -2
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +70 -4
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widgets.mjs +50 -7
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-CLDoygoI.mjs → acorex-platform-themes-default-entity-master-list-view.component-DZeByyDy.mjs} +3 -3
- package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-CLDoygoI.mjs.map → acorex-platform-themes-default-entity-master-list-view.component-DZeByyDy.mjs.map} +1 -1
- package/fesm2022/acorex-platform-themes-default.mjs +5 -4
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/layout/entity/index.d.ts +18 -0
- package/layout/widget-core/index.d.ts +15 -0
- package/layout/widgets/index.d.ts +5 -2
- package/package.json +16 -16
- package/fesm2022/acorex-platform-common-common-settings.provider-41RhWqb4.mjs.map +0 -1
|
@@ -3002,6 +3002,11 @@ class AXPEntityDetailListViewModel {
|
|
|
3002
3002
|
this.filterOperatorMiddleware = this.injector.get(AXPFilterOperatorMiddlewareService);
|
|
3003
3003
|
this.expressionEvaluator = this.injector.get(AXPExpressionEvaluatorService);
|
|
3004
3004
|
this.queryExecutor = this.injector.get(AXPQueryExecutor);
|
|
3005
|
+
this.settingsService = this.injector.get(AXPSettingsService);
|
|
3006
|
+
this.destroyed = new Subject();
|
|
3007
|
+
this.showRowIndexColumnEnabled = signal(false, ...(ngDevMode ? [{ debugName: "showRowIndexColumnEnabled" }] : []));
|
|
3008
|
+
/** Whether the row index column is shown (user setting). */
|
|
3009
|
+
this.showIndexColumn = computed(() => this.showRowIndexColumnEnabled(), ...(ngDevMode ? [{ debugName: "showIndexColumn" }] : []));
|
|
3005
3010
|
this.dataSource = new AXDataSource({
|
|
3006
3011
|
byKey: async (key) => {
|
|
3007
3012
|
const execute = this.detailEntity()?.queries?.byKey?.execute;
|
|
@@ -3141,8 +3146,28 @@ class AXPEntityDetailListViewModel {
|
|
|
3141
3146
|
};
|
|
3142
3147
|
return await this.expressionEvaluator.evaluate(actionData, scope);
|
|
3143
3148
|
};
|
|
3149
|
+
void this.syncShowRowIndexColumnSetting();
|
|
3150
|
+
this.settingsService.onLoaded.pipe(takeUntil(this.destroyed)).subscribe(() => {
|
|
3151
|
+
void this.syncShowRowIndexColumnSetting();
|
|
3152
|
+
});
|
|
3153
|
+
this.settingsService.onChanged.pipe(takeUntil(this.destroyed)).subscribe(() => {
|
|
3154
|
+
void this.syncShowRowIndexColumnSetting();
|
|
3155
|
+
});
|
|
3144
3156
|
this.initialize();
|
|
3145
3157
|
}
|
|
3158
|
+
async syncShowRowIndexColumnSetting() {
|
|
3159
|
+
try {
|
|
3160
|
+
const value = await this.settingsService.get(AXPCommonSettings.ShowRowIndexColumn);
|
|
3161
|
+
this.showRowIndexColumnEnabled.set(value ?? false);
|
|
3162
|
+
}
|
|
3163
|
+
catch {
|
|
3164
|
+
this.showRowIndexColumnEnabled.set(false);
|
|
3165
|
+
}
|
|
3166
|
+
}
|
|
3167
|
+
destroy() {
|
|
3168
|
+
this.destroyed.next();
|
|
3169
|
+
this.destroyed.complete();
|
|
3170
|
+
}
|
|
3146
3171
|
async initialize() {
|
|
3147
3172
|
const entityResolver = this.injector.get(AXPEntityDefinitionRegistryService);
|
|
3148
3173
|
const [moduleName, entityName] = this.detailEntityConfig.entity.split('.');
|
|
@@ -3621,6 +3646,18 @@ class AXPEntityMasterListViewModel {
|
|
|
3621
3646
|
});
|
|
3622
3647
|
}, ...(ngDevMode ? [{ debugName: "views" }] : []));
|
|
3623
3648
|
this.view = signal(this.views()[0], ...(ngDevMode ? [{ debugName: "view" }] : []));
|
|
3649
|
+
this.showRowIndexColumnEnabled = signal(false, ...(ngDevMode ? [{ debugName: "showRowIndexColumnEnabled" }] : []));
|
|
3650
|
+
/**
|
|
3651
|
+
* Row index column: if the list view defines `indexCol` (true/false), that overrides the user setting;
|
|
3652
|
+
* if `indexCol` is omitted, visibility follows {@link AXPCommonSettings.ShowRowIndexColumn}.
|
|
3653
|
+
*/
|
|
3654
|
+
this.showIndexColumn = computed(() => {
|
|
3655
|
+
const indexCol = this.view().indexCol;
|
|
3656
|
+
if (indexCol !== undefined) {
|
|
3657
|
+
return indexCol;
|
|
3658
|
+
}
|
|
3659
|
+
return this.showRowIndexColumnEnabled();
|
|
3660
|
+
}, ...(ngDevMode ? [{ debugName: "showIndexColumn" }] : []));
|
|
3624
3661
|
this.dataSource = new AXDataSource({
|
|
3625
3662
|
byKey: async (key) => {
|
|
3626
3663
|
const execute = this.entityDef.queries?.byKey?.execute;
|
|
@@ -3775,6 +3812,23 @@ class AXPEntityMasterListViewModel {
|
|
|
3775
3812
|
}
|
|
3776
3813
|
});
|
|
3777
3814
|
this.sortedFields.set(this.sortableFields());
|
|
3815
|
+
void this.syncShowRowIndexColumnSetting();
|
|
3816
|
+
this.settings.onLoaded.pipe(takeUntil(this.destroyed)).subscribe(() => {
|
|
3817
|
+
void this.syncShowRowIndexColumnSetting();
|
|
3818
|
+
});
|
|
3819
|
+
this.settings.onChanged.pipe(takeUntil(this.destroyed)).subscribe(() => {
|
|
3820
|
+
void this.syncShowRowIndexColumnSetting();
|
|
3821
|
+
});
|
|
3822
|
+
}
|
|
3823
|
+
async syncShowRowIndexColumnSetting() {
|
|
3824
|
+
try {
|
|
3825
|
+
const value = await this.settings.get(AXPCommonSettings.ShowRowIndexColumn);
|
|
3826
|
+
this.showRowIndexColumnEnabled.set(value ?? false);
|
|
3827
|
+
}
|
|
3828
|
+
catch {
|
|
3829
|
+
console.log('catch');
|
|
3830
|
+
this.showRowIndexColumnEnabled.set(false);
|
|
3831
|
+
}
|
|
3778
3832
|
}
|
|
3779
3833
|
async applySettings() {
|
|
3780
3834
|
this.saveSettings('view');
|
|
@@ -11469,6 +11523,7 @@ class AXPEntityListTableService {
|
|
|
11469
11523
|
this.workflow = inject(AXPWorkflowService);
|
|
11470
11524
|
this.commandService = inject(AXPCommandService);
|
|
11471
11525
|
this.expressionEvaluator = inject(AXPExpressionEvaluatorService);
|
|
11526
|
+
this.settings = inject(AXPSettingsService);
|
|
11472
11527
|
this.evaluateExpressions = async (options, data) => {
|
|
11473
11528
|
if (!options) {
|
|
11474
11529
|
return {};
|
|
@@ -11489,6 +11544,20 @@ class AXPEntityListTableService {
|
|
|
11489
11544
|
* Convert Entity to List Widget Options
|
|
11490
11545
|
*/
|
|
11491
11546
|
async convertEntityToListOptions(entity, options, allActions) {
|
|
11547
|
+
const viewIndexCol = entity.interfaces?.master?.list?.views?.[0]?.indexCol;
|
|
11548
|
+
let showIndex = false;
|
|
11549
|
+
if (viewIndexCol !== undefined) {
|
|
11550
|
+
showIndex = viewIndexCol;
|
|
11551
|
+
}
|
|
11552
|
+
else {
|
|
11553
|
+
try {
|
|
11554
|
+
const fromSetting = await this.settings.get(AXPCommonSettings.ShowRowIndexColumn);
|
|
11555
|
+
showIndex = fromSetting ?? false;
|
|
11556
|
+
}
|
|
11557
|
+
catch {
|
|
11558
|
+
showIndex = false;
|
|
11559
|
+
}
|
|
11560
|
+
}
|
|
11492
11561
|
const listOptions = {
|
|
11493
11562
|
// 📊 Data Source
|
|
11494
11563
|
dataSource: this.createDataSource(entity),
|
|
@@ -11498,7 +11567,7 @@ class AXPEntityListTableService {
|
|
|
11498
11567
|
primaryCommands: this.createRowCommands(allActions, 'primary'),
|
|
11499
11568
|
secondaryCommands: this.createRowCommands(allActions, 'secondary'),
|
|
11500
11569
|
// ⚙️ Table Features
|
|
11501
|
-
showIndex
|
|
11570
|
+
showIndex,
|
|
11502
11571
|
allowSelection: this.hasSelectedScopeActions(entity),
|
|
11503
11572
|
paging: true,
|
|
11504
11573
|
showHeader: true,
|
|
@@ -11515,7 +11584,6 @@ class AXPEntityListTableService {
|
|
|
11515
11584
|
// 🎪 Events
|
|
11516
11585
|
...this.createDefaultEvents(entity, allActions),
|
|
11517
11586
|
};
|
|
11518
|
-
console.log('listOptions', listOptions);
|
|
11519
11587
|
return listOptions;
|
|
11520
11588
|
}
|
|
11521
11589
|
//#endregion
|
|
@@ -13763,6 +13831,14 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
13763
13831
|
this.contextService.patch(itemToExpose, true);
|
|
13764
13832
|
});
|
|
13765
13833
|
}
|
|
13834
|
+
outputs() {
|
|
13835
|
+
return [
|
|
13836
|
+
{
|
|
13837
|
+
name: 'selectedItems',
|
|
13838
|
+
value: this.selectedItems(),
|
|
13839
|
+
},
|
|
13840
|
+
];
|
|
13841
|
+
}
|
|
13766
13842
|
singleOrMultiple(values) {
|
|
13767
13843
|
return this.multiple() ? values : values[0];
|
|
13768
13844
|
}
|