@acorex/platform 20.6.0-next.2 → 20.6.0-next.4
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 +2 -1
- package/core/index.d.ts +2 -2
- package/fesm2022/{acorex-platform-common-common-settings.provider-CLb2KMfv.mjs → acorex-platform-common-common-settings.provider-CGVarshJ.mjs} +25 -1
- package/fesm2022/acorex-platform-common-common-settings.provider-CGVarshJ.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-components.mjs +207 -40
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +294 -145
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +17 -3
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +12 -0
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-file-list-popup.component-BOP7jFp4.mjs → acorex-platform-layout-widgets-file-list-popup.component-2q4whXBx.mjs} +3 -3
- package/fesm2022/{acorex-platform-layout-widgets-file-list-popup.component-BOP7jFp4.mjs.map → acorex-platform-layout-widgets-file-list-popup.component-2q4whXBx.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-fr77M8Z0.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-DGDLHbaR.mjs} +3 -3
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-fr77M8Z0.mjs.map → acorex-platform-layout-widgets-tabular-data-edit-popup.component-DGDLHbaR.mjs.map} +1 -1
- package/fesm2022/acorex-platform-layout-widgets.mjs +866 -260
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-BkY9HXcT.mjs → acorex-platform-themes-default-entity-master-list-view.component-Beba9db5.mjs} +29 -8
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-Beba9db5.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +3 -3
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-shared.mjs +2 -2
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +13 -76
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/layout/components/index.d.ts +7 -1
- package/layout/entity/index.d.ts +25 -10
- package/layout/views/index.d.ts +1 -0
- package/layout/widget-core/index.d.ts +6 -0
- package/layout/widgets/index.d.ts +139 -28
- package/package.json +5 -5
- package/workflow/index.d.ts +884 -433
- package/fesm2022/acorex-platform-common-common-settings.provider-CLb2KMfv.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-BkY9HXcT.mjs.map +0 -1
|
@@ -3577,7 +3577,7 @@ class AXPMainEntityContentBuilder {
|
|
|
3577
3577
|
? this.createExpressionEvaluator(rootContext, dependencies.expressionEvaluator)
|
|
3578
3578
|
: null;
|
|
3579
3579
|
// Prepare merge-details structures (sections and properties per section)
|
|
3580
|
-
let evaluatedRelatedEntities =
|
|
3580
|
+
let evaluatedRelatedEntities = [...(entity?.relatedEntities ?? [])];
|
|
3581
3581
|
if (evaluatedRelatedEntities && evaluateExpressions) {
|
|
3582
3582
|
// Only evaluate the 'hidden' property for each related entity
|
|
3583
3583
|
evaluatedRelatedEntities = await Promise.all((entity.relatedEntities ?? []).map(async (re) => {
|
|
@@ -3657,6 +3657,7 @@ class AXPMainEntityContentBuilder {
|
|
|
3657
3657
|
return;
|
|
3658
3658
|
}
|
|
3659
3659
|
const relSingle = entityDef?.interfaces?.master?.single;
|
|
3660
|
+
const relUpdate = entityDef?.interfaces?.master?.update;
|
|
3660
3661
|
const relGroups = entityDef?.groups ?? [];
|
|
3661
3662
|
// Merge related groups into allGroups (avoid duplicates by id)
|
|
3662
3663
|
for (const rg of relGroups) {
|
|
@@ -3705,6 +3706,7 @@ class AXPMainEntityContentBuilder {
|
|
|
3705
3706
|
const propClone = { ...p };
|
|
3706
3707
|
propClone.__dataPath = relatedEntity?.persistence?.dataPath || entityName;
|
|
3707
3708
|
propClone.__layout = relSingle?.properties?.find((x) => x.name === p.name)?.layout;
|
|
3709
|
+
propClone.__isEditable = !!relUpdate?.properties?.some((x) => x.name === p.name);
|
|
3708
3710
|
acc[p.groupId].push(propClone);
|
|
3709
3711
|
return acc;
|
|
3710
3712
|
}, {});
|
|
@@ -3991,12 +3993,19 @@ class AXPMainEntityContentBuilder {
|
|
|
3991
3993
|
},
|
|
3992
3994
|
},
|
|
3993
3995
|
children: (await getVisiblePropertyByGroupId(s.id))
|
|
3994
|
-
.filter((p) =>
|
|
3996
|
+
.filter((p) => {
|
|
3997
|
+
const isFromRelated = p.__dataPath != null;
|
|
3998
|
+
const visibleInMain = visiblePropertyNames.has(p.name);
|
|
3999
|
+
const visibleInRelated = isFromRelated ? !!p.__layout : false;
|
|
4000
|
+
return visibleInMain || visibleInRelated;
|
|
4001
|
+
})
|
|
3995
4002
|
.map((p) => {
|
|
3996
4003
|
const layout = getPropertyLayout(p.name, p);
|
|
3997
4004
|
const prefixed = p.__dataPath ? `${p.__dataPath}.${p.name}` : p.name;
|
|
3998
4005
|
// Check if property is editable (exists in update interface)
|
|
3999
|
-
const isEditable =
|
|
4006
|
+
const isEditable = p.__isEditable != null
|
|
4007
|
+
? p.__isEditable
|
|
4008
|
+
: editablePropertyNames.has(p.name);
|
|
4000
4009
|
// Check if property has its own disabled option
|
|
4001
4010
|
const hasOwnDisabled = p.schema.interface?.options?.disabled !== undefined;
|
|
4002
4011
|
return {
|
|
@@ -4113,6 +4122,7 @@ class AXPMainEntityContentBuilder {
|
|
|
4113
4122
|
disabled: disabled || false,
|
|
4114
4123
|
zone: 'header',
|
|
4115
4124
|
priority: action.priority,
|
|
4125
|
+
scope: action.scope,
|
|
4116
4126
|
command: {
|
|
4117
4127
|
name: action.name,
|
|
4118
4128
|
options: options,
|
|
@@ -4999,6 +5009,9 @@ class AXPEntityListWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
4999
5009
|
this.context = {};
|
|
5000
5010
|
this.previousQueries = null;
|
|
5001
5011
|
}
|
|
5012
|
+
handleUnselectAll() {
|
|
5013
|
+
this.selectedItems.set([]);
|
|
5014
|
+
}
|
|
5002
5015
|
handleActionClick(item) {
|
|
5003
5016
|
if (item.command && (item.items?.length ?? 0) == 0) {
|
|
5004
5017
|
this.execute(item.command.name, null);
|
|
@@ -5277,6 +5290,17 @@ class AXPEntityListWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
5277
5290
|
[mode]="this.mode"
|
|
5278
5291
|
></ng-container>
|
|
5279
5292
|
}
|
|
5293
|
+
<!-- <div class="ax-flex ax-items-center ax-justify-between ax-gap-1 ">
|
|
5294
|
+
<span
|
|
5295
|
+
>{{ selectedItems().length }}
|
|
5296
|
+
<span>{{ '@general:terms.interface.items-selected' | translate | async }}</span>
|
|
5297
|
+
</span>
|
|
5298
|
+
<ax-button
|
|
5299
|
+
text="@general:terms.interface.unselect-all"
|
|
5300
|
+
class="ax-xs"
|
|
5301
|
+
(onClick)="handleUnselectAll()"
|
|
5302
|
+
></ax-button>
|
|
5303
|
+
</div> -->
|
|
5280
5304
|
@if (listNode() != null) {
|
|
5281
5305
|
<ng-container
|
|
5282
5306
|
#list
|
|
@@ -5383,6 +5407,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImpo
|
|
|
5383
5407
|
[mode]="this.mode"
|
|
5384
5408
|
></ng-container>
|
|
5385
5409
|
}
|
|
5410
|
+
<!-- <div class="ax-flex ax-items-center ax-justify-between ax-gap-1 ">
|
|
5411
|
+
<span
|
|
5412
|
+
>{{ selectedItems().length }}
|
|
5413
|
+
<span>{{ '@general:terms.interface.items-selected' | translate | async }}</span>
|
|
5414
|
+
</span>
|
|
5415
|
+
<ax-button
|
|
5416
|
+
text="@general:terms.interface.unselect-all"
|
|
5417
|
+
class="ax-xs"
|
|
5418
|
+
(onClick)="handleUnselectAll()"
|
|
5419
|
+
></ax-button>
|
|
5420
|
+
</div> -->
|
|
5386
5421
|
@if (listNode() != null) {
|
|
5387
5422
|
<ng-container
|
|
5388
5423
|
#list
|
|
@@ -5585,6 +5620,7 @@ class AXPLookupFilterWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
5585
5620
|
super(...arguments);
|
|
5586
5621
|
//#region ---- Computed Properties ----
|
|
5587
5622
|
this.editorPath = `__${this.path}EditorValue`;
|
|
5623
|
+
this.lookupWidgetRenderer = viewChild('widgetRenderer', ...(ngDevMode ? [{ debugName: "lookupWidgetRenderer" }] : []));
|
|
5588
5624
|
this.entity = computed(() => this.options()['entity'], ...(ngDevMode ? [{ debugName: "entity" }] : []));
|
|
5589
5625
|
this.textField = computed(() => this.options()['textField'] ?? 'title', ...(ngDevMode ? [{ debugName: "textField" }] : []));
|
|
5590
5626
|
this.valueField = computed(() => this.options()['valueField'] ?? 'id', ...(ngDevMode ? [{ debugName: "valueField" }] : []));
|
|
@@ -5629,7 +5665,6 @@ class AXPLookupFilterWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
5629
5665
|
this.lookupNode.set(node);
|
|
5630
5666
|
}, ...(ngDevMode ? [{ debugName: "#efUpdateLookupNode" }] : []));
|
|
5631
5667
|
this.#efUpdateValue = effect(() => {
|
|
5632
|
-
debugger;
|
|
5633
5668
|
const newValueObj = this.contextService.getValue(`${this.path}EditorObj`);
|
|
5634
5669
|
const prevValue = untracked(() => this.getValue()?.value);
|
|
5635
5670
|
const newValue = this.multiple()
|
|
@@ -5653,18 +5688,73 @@ class AXPLookupFilterWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
5653
5688
|
displayText: displayText,
|
|
5654
5689
|
});
|
|
5655
5690
|
}, ...(ngDevMode ? [{ debugName: "#efUpdateValue" }] : []));
|
|
5691
|
+
//#endregion
|
|
5692
|
+
//#region ---- Focus Management ----
|
|
5693
|
+
this.shouldFocus = signal(false, ...(ngDevMode ? [{ debugName: "shouldFocus" }] : []));
|
|
5694
|
+
/**
|
|
5695
|
+
* Reactive effect to auto-focus the lookup editor when component is ready
|
|
5696
|
+
*/
|
|
5697
|
+
this.#focusEffect = effect(() => {
|
|
5698
|
+
const renderer = this.lookupWidgetRenderer();
|
|
5699
|
+
const shouldFocus = this.shouldFocus();
|
|
5700
|
+
// Early return if no renderer or shouldn't focus
|
|
5701
|
+
if (!renderer || !shouldFocus) {
|
|
5702
|
+
return;
|
|
5703
|
+
}
|
|
5704
|
+
// Listen to componentRefSignal reactively
|
|
5705
|
+
const componentRef = renderer.componentRefSignal();
|
|
5706
|
+
// When componentRef is set (not null), focus the widget
|
|
5707
|
+
if (componentRef) {
|
|
5708
|
+
const componentInstance = componentRef.instance;
|
|
5709
|
+
// Try to use the component's native focus method
|
|
5710
|
+
if (componentInstance && typeof componentInstance.focus === 'function') {
|
|
5711
|
+
try {
|
|
5712
|
+
componentInstance.focus();
|
|
5713
|
+
// Reset focus flag after successful focus
|
|
5714
|
+
this.shouldFocus.set(false);
|
|
5715
|
+
}
|
|
5716
|
+
catch (error) {
|
|
5717
|
+
// console.error('Error focusing lookup widget component:', error);
|
|
5718
|
+
}
|
|
5719
|
+
}
|
|
5720
|
+
}
|
|
5721
|
+
}, ...(ngDevMode ? [{ debugName: "#focusEffect" }] : []));
|
|
5656
5722
|
}
|
|
5657
5723
|
//#endregion
|
|
5658
5724
|
//#region ---- Effects ----
|
|
5659
5725
|
#efUpdateLookupNode;
|
|
5660
5726
|
#efUpdateValue;
|
|
5727
|
+
/**
|
|
5728
|
+
* Reactive effect to auto-focus the lookup editor when component is ready
|
|
5729
|
+
*/
|
|
5730
|
+
#focusEffect;
|
|
5731
|
+
/**
|
|
5732
|
+
* Public focus method to trigger focusing
|
|
5733
|
+
*/
|
|
5734
|
+
focus() {
|
|
5735
|
+
this.shouldFocus.set(true);
|
|
5736
|
+
}
|
|
5661
5737
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AXPLookupFilterWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
5662
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
5738
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.10", type: AXPLookupFilterWidgetEditComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "lookupWidgetRenderer", first: true, predicate: ["widgetRenderer"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
5739
|
+
<ng-container
|
|
5740
|
+
axp-widget-renderer
|
|
5741
|
+
#widgetRenderer="widgetRenderer"
|
|
5742
|
+
[node]="lookupNode()"
|
|
5743
|
+
[mode]="'edit'"
|
|
5744
|
+
></ng-container>
|
|
5745
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "directive", type: i3$1.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged"], exportAs: ["widgetRenderer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5663
5746
|
}
|
|
5664
5747
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AXPLookupFilterWidgetEditComponent, decorators: [{
|
|
5665
5748
|
type: Component,
|
|
5666
5749
|
args: [{
|
|
5667
|
-
template: `
|
|
5750
|
+
template: `
|
|
5751
|
+
<ng-container
|
|
5752
|
+
axp-widget-renderer
|
|
5753
|
+
#widgetRenderer="widgetRenderer"
|
|
5754
|
+
[node]="lookupNode()"
|
|
5755
|
+
[mode]="'edit'"
|
|
5756
|
+
></ng-container>
|
|
5757
|
+
`,
|
|
5668
5758
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5669
5759
|
imports: [
|
|
5670
5760
|
FormsModule,
|
|
@@ -5678,7 +5768,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImpo
|
|
|
5678
5768
|
AXPWidgetCoreModule,
|
|
5679
5769
|
],
|
|
5680
5770
|
}]
|
|
5681
|
-
}] });
|
|
5771
|
+
}], propDecorators: { lookupWidgetRenderer: [{ type: i0.ViewChild, args: ['widgetRenderer', { isSignal: true }] }] } });
|
|
5682
5772
|
|
|
5683
5773
|
var lookupFilterWidgetEdit_component = /*#__PURE__*/Object.freeze({
|
|
5684
5774
|
__proto__: null,
|
|
@@ -6018,6 +6108,9 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
6018
6108
|
this.popupService = inject(AXPopupService);
|
|
6019
6109
|
this.entityDataSelectorService = inject(AXPEntityDataSelectorService);
|
|
6020
6110
|
this.translateService = inject(AXTranslationService);
|
|
6111
|
+
this.selectBox = viewChild('selectBox', ...(ngDevMode ? [{ debugName: "selectBox" }] : []));
|
|
6112
|
+
this.tagBox = viewChild('tagBox', ...(ngDevMode ? [{ debugName: "tagBox" }] : []));
|
|
6113
|
+
this.shouldFocus = signal(false, ...(ngDevMode ? [{ debugName: "shouldFocus" }] : []));
|
|
6021
6114
|
this.expose = computed(() => this.options()['expose'], ...(ngDevMode ? [{ debugName: "expose" }] : []));
|
|
6022
6115
|
this.entity = computed(() => this.options()['entity'], ...(ngDevMode ? [{ debugName: "entity" }] : []));
|
|
6023
6116
|
this.disabled = computed(() => this.options()['disabled'], ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
@@ -6038,7 +6131,9 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
6038
6131
|
return this.defaultTextField();
|
|
6039
6132
|
}, ...(ngDevMode ? [{ debugName: "displayField" }] : []));
|
|
6040
6133
|
this.selectedItemsText = computed(() => {
|
|
6041
|
-
return this.selectedItems()
|
|
6134
|
+
return this.selectedItems()
|
|
6135
|
+
.map((item) => get(item, this.displayField()))
|
|
6136
|
+
.join(', ');
|
|
6042
6137
|
}, ...(ngDevMode ? [{ debugName: "selectedItemsText" }] : []));
|
|
6043
6138
|
this.valueField = computed(() => this.entityDef()?.properties.find((c) => c.name == 'id')?.name ?? 'id', ...(ngDevMode ? [{ debugName: "valueField" }] : []));
|
|
6044
6139
|
this.entityDef = signal(null, ...(ngDevMode ? [{ debugName: "entityDef" }] : []));
|
|
@@ -6066,9 +6161,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
6066
6161
|
this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
|
|
6067
6162
|
this.isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : []));
|
|
6068
6163
|
this.placeholder = computed(() => {
|
|
6069
|
-
return this.selectedItems().length
|
|
6070
|
-
? ''
|
|
6071
|
-
: this.translateService.translateSync('@general:widgets.lookup.search');
|
|
6164
|
+
return this.selectedItems().length ? '' : this.translateService.translateSync('@general:widgets.lookup.search');
|
|
6072
6165
|
}, ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
|
|
6073
6166
|
this.#efEntity = effect(async () => {
|
|
6074
6167
|
const [module, entity] = this.entity().split('.');
|
|
@@ -6082,6 +6175,46 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
6082
6175
|
this.clear();
|
|
6083
6176
|
}
|
|
6084
6177
|
}, ...(ngDevMode ? [{ debugName: "#efValue" }] : []));
|
|
6178
|
+
//#region ---- Focus Management ----
|
|
6179
|
+
/**
|
|
6180
|
+
* Reactive effect to auto-focus when viewChild is ready
|
|
6181
|
+
* This handles the case where selectBox/tagBox are inside @if conditions
|
|
6182
|
+
*/
|
|
6183
|
+
this.#focusEffect = effect(() => {
|
|
6184
|
+
const shouldFocus = this.shouldFocus();
|
|
6185
|
+
// Early return if shouldn't focus
|
|
6186
|
+
if (!shouldFocus) {
|
|
6187
|
+
return;
|
|
6188
|
+
}
|
|
6189
|
+
// Check which viewChild is available based on look type
|
|
6190
|
+
const look = this.look();
|
|
6191
|
+
if (look === 'select') {
|
|
6192
|
+
const selectBox = this.selectBox();
|
|
6193
|
+
if (selectBox) {
|
|
6194
|
+
try {
|
|
6195
|
+
selectBox.focus();
|
|
6196
|
+
// Reset focus flag after successful focus
|
|
6197
|
+
this.shouldFocus.set(false);
|
|
6198
|
+
}
|
|
6199
|
+
catch (error) {
|
|
6200
|
+
// console.error('Error focusing select box:', error);
|
|
6201
|
+
}
|
|
6202
|
+
}
|
|
6203
|
+
}
|
|
6204
|
+
else {
|
|
6205
|
+
const tagBox = this.tagBox();
|
|
6206
|
+
if (tagBox) {
|
|
6207
|
+
try {
|
|
6208
|
+
tagBox.focus();
|
|
6209
|
+
// Reset focus flag after successful focus
|
|
6210
|
+
this.shouldFocus.set(false);
|
|
6211
|
+
}
|
|
6212
|
+
catch (error) {
|
|
6213
|
+
// console.error('Error focusing tag box:', error);
|
|
6214
|
+
}
|
|
6215
|
+
}
|
|
6216
|
+
}
|
|
6217
|
+
}, ...(ngDevMode ? [{ debugName: "#focusEffect" }] : []));
|
|
6085
6218
|
}
|
|
6086
6219
|
#efEntity;
|
|
6087
6220
|
#efValue;
|
|
@@ -6119,7 +6252,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
6119
6252
|
filters: this.customFilter(),
|
|
6120
6253
|
parentFilters: this.filter,
|
|
6121
6254
|
columns: this.columns(),
|
|
6122
|
-
allowCreate: true
|
|
6255
|
+
allowCreate: true,
|
|
6123
6256
|
});
|
|
6124
6257
|
if (result && 'items' in result) {
|
|
6125
6258
|
this.setItems(result.items);
|
|
@@ -6232,7 +6365,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
6232
6365
|
if (!this.entityDef())
|
|
6233
6366
|
return null;
|
|
6234
6367
|
const entity = this.entityDef();
|
|
6235
|
-
const searchFields = entity.properties.filter(p => p.options?.filter?.inline?.enabled);
|
|
6368
|
+
const searchFields = entity.properties.filter((p) => p.options?.filter?.inline?.enabled);
|
|
6236
6369
|
const inlineFilters = {
|
|
6237
6370
|
field: null,
|
|
6238
6371
|
logic: 'or',
|
|
@@ -6258,7 +6391,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
6258
6391
|
if (request.filter) {
|
|
6259
6392
|
request.filter = {
|
|
6260
6393
|
logic: 'and',
|
|
6261
|
-
filters: [...[request.filter], ...(filter.filters ?? [])]
|
|
6394
|
+
filters: [...[request.filter], ...(filter.filters ?? [])],
|
|
6262
6395
|
};
|
|
6263
6396
|
}
|
|
6264
6397
|
else {
|
|
@@ -6269,149 +6402,165 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
6269
6402
|
singleOrMultiple(values) {
|
|
6270
6403
|
return this.multiple() ? values : values[0];
|
|
6271
6404
|
}
|
|
6405
|
+
//#region ---- Focus Management ----
|
|
6406
|
+
/**
|
|
6407
|
+
* Reactive effect to auto-focus when viewChild is ready
|
|
6408
|
+
* This handles the case where selectBox/tagBox are inside @if conditions
|
|
6409
|
+
*/
|
|
6410
|
+
#focusEffect;
|
|
6411
|
+
/**
|
|
6412
|
+
* Public focus method to trigger focusing
|
|
6413
|
+
*/
|
|
6414
|
+
focus() {
|
|
6415
|
+
this.shouldFocus.set(true);
|
|
6416
|
+
}
|
|
6272
6417
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AXPLookupWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
6273
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.10", type: AXPLookupWidgetEditComponent, isStandalone: true, selector: "axp-lookup-widget-edit", viewQueries: [{ propertyName: "textbox", first: true, predicate: AXTagBoxComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
|
|
6282
|
-
|
|
6283
|
-
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
<ax-
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6301
|
-
|
|
6302
|
-
|
|
6303
|
-
|
|
6304
|
-
|
|
6305
|
-
|
|
6306
|
-
|
|
6307
|
-
|
|
6308
|
-
|
|
6309
|
-
|
|
6310
|
-
|
|
6311
|
-
|
|
6312
|
-
|
|
6313
|
-
|
|
6314
|
-
|
|
6315
|
-
|
|
6316
|
-
|
|
6317
|
-
|
|
6318
|
-
|
|
6319
|
-
|
|
6320
|
-
|
|
6321
|
-
|
|
6418
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.10", type: AXPLookupWidgetEditComponent, isStandalone: true, selector: "axp-lookup-widget-edit", viewQueries: [{ propertyName: "selectBox", first: true, predicate: ["selectBox"], descendants: true, isSignal: true }, { propertyName: "tagBox", first: true, predicate: ["tagBox"], descendants: true, isSignal: true }, { propertyName: "textbox", first: true, predicate: AXTagBoxComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
6419
|
+
@if (dataSource()) {
|
|
6420
|
+
@if (look() == 'select') {
|
|
6421
|
+
<ax-select-box
|
|
6422
|
+
#selectBox
|
|
6423
|
+
[dataSource]="dataSource()!"
|
|
6424
|
+
[ngModel]="selectedItems()"
|
|
6425
|
+
[textField]="displayField()"
|
|
6426
|
+
[valueField]="valueField()"
|
|
6427
|
+
[disabled]="disabled()"
|
|
6428
|
+
[multiple]="multiple()"
|
|
6429
|
+
(onValueChanged)="selectBoxValueChange($event)"
|
|
6430
|
+
>
|
|
6431
|
+
<ax-search-box>
|
|
6432
|
+
<ax-clear-button></ax-clear-button>
|
|
6433
|
+
</ax-search-box>
|
|
6434
|
+
@for (validation of validationRules(); track $index) {
|
|
6435
|
+
<ax-validation-rule
|
|
6436
|
+
[rule]="validation.rule"
|
|
6437
|
+
[message]="validation.options?.message"
|
|
6438
|
+
[options]="validation.options"
|
|
6439
|
+
></ax-validation-rule>
|
|
6440
|
+
}
|
|
6441
|
+
@if (allowClear()) {
|
|
6442
|
+
<ax-clear-button (click)="handleClearClick()"></ax-clear-button>
|
|
6443
|
+
}
|
|
6444
|
+
</ax-select-box>
|
|
6445
|
+
} @else {
|
|
6446
|
+
<ax-tag-box
|
|
6447
|
+
#tagBox
|
|
6448
|
+
[ngModel]="selectedItems()"
|
|
6449
|
+
[textField]="displayField()"
|
|
6450
|
+
[valueField]="valueField()"
|
|
6451
|
+
(onValueChanged)="handleValueChange($event)"
|
|
6452
|
+
[placeholder]="placeholder() | translate | async"
|
|
6453
|
+
[addOnEnter]="false"
|
|
6454
|
+
[addOnComma]="false"
|
|
6455
|
+
[disabled]="disabled()"
|
|
6456
|
+
(onKeyUp)="handleKeyUp($event)"
|
|
6457
|
+
(onBlur)="handleOnBlur($event)"
|
|
6458
|
+
>
|
|
6459
|
+
@for (validation of validationRules(); track $index) {
|
|
6460
|
+
<ax-validation-rule
|
|
6461
|
+
[rule]="validation.rule"
|
|
6462
|
+
[message]="validation.options?.message"
|
|
6463
|
+
[options]="validation.options"
|
|
6464
|
+
></ax-validation-rule>
|
|
6465
|
+
}
|
|
6466
|
+
@if (selectedItems().length > 1 || allowClear()) {
|
|
6467
|
+
<ax-clear-button (click)="handleClearClick()"></ax-clear-button>
|
|
6468
|
+
}
|
|
6322
6469
|
|
|
6323
|
-
|
|
6324
|
-
|
|
6325
|
-
|
|
6326
|
-
|
|
6327
|
-
|
|
6328
|
-
|
|
6329
|
-
|
|
6330
|
-
|
|
6331
|
-
|
|
6332
|
-
|
|
6333
|
-
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
|
-
|
|
6337
|
-
|
|
6470
|
+
<ax-suffix>
|
|
6471
|
+
<ax-button
|
|
6472
|
+
color="ghost"
|
|
6473
|
+
look="blank"
|
|
6474
|
+
[disabled]="isLoading() || disabled()"
|
|
6475
|
+
(onClick)="handleOnClick($event)"
|
|
6476
|
+
>
|
|
6477
|
+
@if (isLoading()) {
|
|
6478
|
+
<ax-loading></ax-loading>
|
|
6479
|
+
} @else {
|
|
6480
|
+
<ax-icon icon="far fa-search"> </ax-icon>
|
|
6481
|
+
}
|
|
6482
|
+
</ax-button>
|
|
6483
|
+
</ax-suffix>
|
|
6484
|
+
</ax-tag-box>
|
|
6485
|
+
}
|
|
6338
6486
|
}
|
|
6339
|
-
}
|
|
6340
6487
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type:
|
|
6341
6488
|
//
|
|
6342
|
-
AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3$2.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i3$2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i4.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "directive", type: i5$1.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message", "disabled"] }, { kind: "ngmodule", type: AXTagBoxModule }, { kind: "component", type: i6$1.AXTagBoxComponent, selector: "ax-tag-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "allowNull", "type", "look", "addOnComma", "addOnEnter", "valueField", "textField", "readonlyField", "allowDuplicateValues", "tagTemplate"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress", "onTagClick", "onTagDblClick", "onTagContextMenu"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i7.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "disabledField", "textTemplate", "selectedItems", "isItemTruncated", "showItemTooltip", "itemHeight", "maxVisibleItems", "dataSource", "minRecordsForSearch", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth", "searchBoxAutoFocus"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed", "onItemSelected", "onItemClick"] }, { kind: "component", type: AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "class", "delayTime", "type"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
6489
|
+
AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3$2.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i3$2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i4.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "directive", type: i5$1.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message", "disabled"] }, { kind: "ngmodule", type: AXTagBoxModule }, { kind: "component", type: i6$1.AXTagBoxComponent, selector: "ax-tag-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "allowNull", "type", "look", "addOnComma", "addOnEnter", "valueField", "textField", "readonlyField", "allowDuplicateValues", "tagTemplate"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress", "onTagClick", "onTagDblClick", "onTagContextMenu"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i7.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "disabledField", "textTemplate", "selectedItems", "isItemTruncated", "showItemTooltip", "itemHeight", "maxVisibleItems", "dataSource", "minRecordsForSearch", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth", "searchBoxAutoFocus"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed", "onItemSelected", "onItemClick"] }, { kind: "component", type: AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "class", "delayTime", "type", "autoSearch"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
6343
6490
|
}
|
|
6344
6491
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AXPLookupWidgetEditComponent, decorators: [{
|
|
6345
6492
|
type: Component,
|
|
6346
6493
|
args: [{
|
|
6347
6494
|
selector: 'axp-lookup-widget-edit',
|
|
6348
6495
|
template: `
|
|
6349
|
-
|
|
6350
|
-
|
|
6351
|
-
|
|
6352
|
-
|
|
6353
|
-
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
<ax-
|
|
6362
|
-
|
|
6363
|
-
|
|
6364
|
-
|
|
6365
|
-
|
|
6366
|
-
|
|
6367
|
-
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6371
|
-
|
|
6372
|
-
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
|
|
6376
|
-
|
|
6377
|
-
|
|
6378
|
-
|
|
6379
|
-
|
|
6380
|
-
|
|
6381
|
-
|
|
6382
|
-
|
|
6383
|
-
|
|
6384
|
-
|
|
6385
|
-
|
|
6386
|
-
|
|
6387
|
-
|
|
6388
|
-
|
|
6389
|
-
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
|
|
6393
|
-
|
|
6394
|
-
|
|
6395
|
-
|
|
6396
|
-
|
|
6496
|
+
@if (dataSource()) {
|
|
6497
|
+
@if (look() == 'select') {
|
|
6498
|
+
<ax-select-box
|
|
6499
|
+
#selectBox
|
|
6500
|
+
[dataSource]="dataSource()!"
|
|
6501
|
+
[ngModel]="selectedItems()"
|
|
6502
|
+
[textField]="displayField()"
|
|
6503
|
+
[valueField]="valueField()"
|
|
6504
|
+
[disabled]="disabled()"
|
|
6505
|
+
[multiple]="multiple()"
|
|
6506
|
+
(onValueChanged)="selectBoxValueChange($event)"
|
|
6507
|
+
>
|
|
6508
|
+
<ax-search-box>
|
|
6509
|
+
<ax-clear-button></ax-clear-button>
|
|
6510
|
+
</ax-search-box>
|
|
6511
|
+
@for (validation of validationRules(); track $index) {
|
|
6512
|
+
<ax-validation-rule
|
|
6513
|
+
[rule]="validation.rule"
|
|
6514
|
+
[message]="validation.options?.message"
|
|
6515
|
+
[options]="validation.options"
|
|
6516
|
+
></ax-validation-rule>
|
|
6517
|
+
}
|
|
6518
|
+
@if (allowClear()) {
|
|
6519
|
+
<ax-clear-button (click)="handleClearClick()"></ax-clear-button>
|
|
6520
|
+
}
|
|
6521
|
+
</ax-select-box>
|
|
6522
|
+
} @else {
|
|
6523
|
+
<ax-tag-box
|
|
6524
|
+
#tagBox
|
|
6525
|
+
[ngModel]="selectedItems()"
|
|
6526
|
+
[textField]="displayField()"
|
|
6527
|
+
[valueField]="valueField()"
|
|
6528
|
+
(onValueChanged)="handleValueChange($event)"
|
|
6529
|
+
[placeholder]="placeholder() | translate | async"
|
|
6530
|
+
[addOnEnter]="false"
|
|
6531
|
+
[addOnComma]="false"
|
|
6532
|
+
[disabled]="disabled()"
|
|
6533
|
+
(onKeyUp)="handleKeyUp($event)"
|
|
6534
|
+
(onBlur)="handleOnBlur($event)"
|
|
6535
|
+
>
|
|
6536
|
+
@for (validation of validationRules(); track $index) {
|
|
6537
|
+
<ax-validation-rule
|
|
6538
|
+
[rule]="validation.rule"
|
|
6539
|
+
[message]="validation.options?.message"
|
|
6540
|
+
[options]="validation.options"
|
|
6541
|
+
></ax-validation-rule>
|
|
6542
|
+
}
|
|
6543
|
+
@if (selectedItems().length > 1 || allowClear()) {
|
|
6544
|
+
<ax-clear-button (click)="handleClearClick()"></ax-clear-button>
|
|
6545
|
+
}
|
|
6397
6546
|
|
|
6398
|
-
|
|
6399
|
-
|
|
6400
|
-
|
|
6401
|
-
|
|
6402
|
-
|
|
6403
|
-
|
|
6404
|
-
|
|
6405
|
-
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
|
|
6409
|
-
|
|
6410
|
-
|
|
6411
|
-
|
|
6412
|
-
|
|
6547
|
+
<ax-suffix>
|
|
6548
|
+
<ax-button
|
|
6549
|
+
color="ghost"
|
|
6550
|
+
look="blank"
|
|
6551
|
+
[disabled]="isLoading() || disabled()"
|
|
6552
|
+
(onClick)="handleOnClick($event)"
|
|
6553
|
+
>
|
|
6554
|
+
@if (isLoading()) {
|
|
6555
|
+
<ax-loading></ax-loading>
|
|
6556
|
+
} @else {
|
|
6557
|
+
<ax-icon icon="far fa-search"> </ax-icon>
|
|
6558
|
+
}
|
|
6559
|
+
</ax-button>
|
|
6560
|
+
</ax-suffix>
|
|
6561
|
+
</ax-tag-box>
|
|
6562
|
+
}
|
|
6413
6563
|
}
|
|
6414
|
-
}
|
|
6415
6564
|
`,
|
|
6416
6565
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
6417
6566
|
imports: [
|
|
@@ -6429,7 +6578,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImpo
|
|
|
6429
6578
|
AXSearchBoxComponent,
|
|
6430
6579
|
],
|
|
6431
6580
|
}]
|
|
6432
|
-
}], propDecorators: { textbox: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXTagBoxComponent), { isSignal: true }] }] } });
|
|
6581
|
+
}], propDecorators: { selectBox: [{ type: i0.ViewChild, args: ['selectBox', { isSignal: true }] }], tagBox: [{ type: i0.ViewChild, args: ['tagBox', { isSignal: true }] }], textbox: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXTagBoxComponent), { isSignal: true }] }] } });
|
|
6433
6582
|
|
|
6434
6583
|
var lookupWidgetEdit_component = /*#__PURE__*/Object.freeze({
|
|
6435
6584
|
__proto__: null,
|