@acorex/platform 21.0.0-next.76 → 21.0.0-next.79
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/fesm2022/{acorex-platform-common-common-settings.provider-ChoT4m4k.mjs → acorex-platform-common-common-settings.provider-Ytey9uhY.mjs} +1 -42
- package/fesm2022/acorex-platform-common-common-settings.provider-Ytey9uhY.mjs.map +1 -0
- package/fesm2022/acorex-platform-common.mjs +580 -1445
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-contracts.mjs +1 -1330
- package/fesm2022/acorex-platform-contracts.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +5 -208
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-entity-attachments-page.component-B0EkdqvH.mjs → acorex-platform-layout-entity-attachments-page.component-CwG6n_Yb.mjs} +3 -3
- package/fesm2022/{acorex-platform-layout-entity-attachments-page.component-B0EkdqvH.mjs.map → acorex-platform-layout-entity-attachments-page.component-CwG6n_Yb.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-layout-entity-file-list-popup.component-_yrP5SQe.mjs → acorex-platform-layout-entity-file-list-popup.component--IeMZLIr.mjs} +4 -4
- package/fesm2022/{acorex-platform-layout-entity-file-list-popup.component-_yrP5SQe.mjs.map → acorex-platform-layout-entity-file-list-popup.component--IeMZLIr.mjs.map} +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +694 -733
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +171 -372
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +103 -3
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-J0zcGKBX.mjs +116 -0
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-J0zcGKBX.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets.mjs +6 -11
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-DrUwqKKA.mjs → acorex-platform-themes-default-entity-master-single-view.component-Br9p5aXT.mjs} +3 -2
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-Br9p5aXT.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +52 -643
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +8 -5
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/package.json +1 -1
- package/types/acorex-platform-common.d.ts +1056 -337
- package/types/acorex-platform-contracts.d.ts +4 -1679
- package/types/acorex-platform-core.d.ts +181 -92
- package/types/acorex-platform-layout-components.d.ts +1 -2
- package/types/acorex-platform-layout-entity.d.ts +221 -99
- package/types/acorex-platform-layout-views.d.ts +5 -39
- package/types/acorex-platform-layout-widget-core.d.ts +3 -2
- package/types/acorex-platform-layout-widgets.d.ts +4 -11
- package/types/acorex-platform-themes-default.d.ts +57 -120
- package/types/acorex-platform-workflow.d.ts +18 -5
- package/fesm2022/acorex-platform-common-common-settings.provider-ChoT4m4k.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-CFyfix31.mjs +0 -513
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-CFyfix31.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-DrUwqKKA.mjs.map +0 -1
|
@@ -1,31 +1,30 @@
|
|
|
1
1
|
import { AXToastService } from '@acorex/components/toast';
|
|
2
|
-
import * as
|
|
3
|
-
import { AXTranslationService,
|
|
4
|
-
import * as i4$
|
|
5
|
-
import { AXPNotFoundError, AXPEntityCommandScope, axpNavigateAppPath, AXPSettingsService, AXPCommonSettings,
|
|
2
|
+
import * as i3$1 from '@acorex/core/translation';
|
|
3
|
+
import { AXTranslationService, AXTranslationModule, resolveMultiLanguageString, translateSync } from '@acorex/core/translation';
|
|
4
|
+
import * as i4$2 from '@acorex/platform/common';
|
|
5
|
+
import { AXPNotFoundError, AXPEntityCommandScope, axpNavigateAppPath, AXPSettingsService, AXPCommonSettings, normalizeEntityDisplayTemplate, isUnresolvedEntityDisplayTemplate, AXPFilterOperatorMiddlewareService, isCardFieldBadgeDisplay, resolveCardFieldBadgeColor, getEntityInfo, resolveEnabledMasterListLayouts, resolveDefaultMasterListLayout, AXPRefreshEvent, AXPReloadEvent, axpRedirectToNotFound, ENTITY_ROW_POPUP_TITLE_OPTION, AXPCleanNestedFilters, AXPFileTypeProviderService, AXPFileStorageService, resolveEntityRowDisplayTitle, AXPFileActionsService, axpIsEntityRecordNotFound, AXPDefaultMultiLanguageConfigService, withDefaultMultiLanguageOnWidgetNodeTree, AXPEntityQueryType, buildEntitySearchTitleContext, AXPWorkflowNavigateAction, AXP_NOT_FOUND_ROUTE, AXP_PROTECTED_ROUTE_GUARDS, AXPToastAction, AXP_SEARCH_DEFINITION_PROVIDER, AXPMenuItemsDataSourceDefinition } from '@acorex/platform/common';
|
|
6
6
|
import * as i0 from '@angular/core';
|
|
7
|
-
import { InjectionToken, inject, Injector, runInInjectionContext, Injectable,
|
|
8
|
-
import {
|
|
9
|
-
import { Subject, takeUntil } from 'rxjs';
|
|
7
|
+
import { InjectionToken, inject, Injector, runInInjectionContext, Injectable, ChangeDetectorRef, input, signal, computed, ChangeDetectionStrategy, Component, ElementRef, NgModule, viewChild, effect, Input, afterNextRender, untracked, ViewEncapsulation, viewChildren, linkedSignal, HostBinding, output, EnvironmentInjector, makeEnvironmentProviders } from '@angular/core';
|
|
8
|
+
import { Subject, filter, takeUntil } from 'rxjs';
|
|
10
9
|
import { AXPLayoutBuilderService, LayoutBuilderModule } from '@acorex/platform/layout/builder';
|
|
11
|
-
import * as
|
|
10
|
+
import * as i2 from '@acorex/platform/layout/widget-core';
|
|
12
11
|
import { AXPWidgetsCatalog, AXPWidgetCoreModule, AXPPageStatus, AXPWidgetRegistryService, AXPColumnWidgetComponent, AXPValueWidgetComponent, AXPWidgetGroupEnum, createBooleanProperty, AXPWidgetRendererDirective, AXPBaseWidgetComponent, AXPWidgetStatus, createStringProperty, createNumberProperty, AXP_WIDGETS_ADVANCE_SUB_MEDIA, AXP_WIDGETS_ADVANCE_CATEGORY, createSelectProperty, AXP_WIDGETS_EDITOR_CATEGORY, AXP_WIDGET_DEFINITION_PROVIDER } from '@acorex/platform/layout/widget-core';
|
|
13
|
-
import { AXPDeviceService, AXPExpressionEvaluatorService,
|
|
14
|
-
import {
|
|
15
|
-
export { AXPEntityDataSourceKeys, collectNestedCreateHiddenProperties, entityDetailsCreateActions, entityDetailsCreateActionsDeferredParent, entityDetailsCrudActions, entityDetailsEditAction, entityDetailsNewEditAction, entityDetailsReferenceCondition, entityDetailsReferenceCreateActions, entityDetailsSimpleCondition, entityMasterBulkDeleteAction, entityMasterCreateAction, entityMasterCrudActions, entityMasterDeleteAction, entityMasterEditAction, entityMasterRecordActions, entityMasterViewAction, entityOverrideDetailsViewAction, mergeForeignKeyFieldIntoCreateActions } from '@acorex/platform/contracts';
|
|
12
|
+
import { AXPSystemActionType, AXPDeviceService, AXPExpressionEvaluatorService, AXPBroadcastEventService, applyFilterArray, applySortArray, resolveActionLook, AXPDistributedEventListenerService, AXPPlatformScope, AXHighlightService, extractValue, setSmart, getChangedPaths, objectKeyValueTransforms, AXPHookService, AXPDataGenerator, AXPComponentSlotModule, AXPContextStore, AXPColumnWidthService, AXPModuleManifestRegistry, defaultColumnWidthProvider, AXP_COLUMN_WIDTH_PROVIDER, AXP_DATASOURCE_DEFINITION_PROVIDER, AXPModuleManifestsDataSourceDefinition } from '@acorex/platform/core';
|
|
13
|
+
import { cloneDeep, merge, get, castArray, set, orderBy, omit, isNil, isEmpty, isEqual as isEqual$1, isArray, isString } from 'lodash-es';
|
|
16
14
|
import { transform, isEqual } from 'lodash';
|
|
17
15
|
import { AXPSessionService, AXPPermissionDefinitionsDataSourceDefinition } from '@acorex/platform/auth';
|
|
18
|
-
import { Router, ActivatedRoute, RouterModule, ROUTES } from '@angular/router';
|
|
16
|
+
import { Router, NavigationStart, ActivatedRoute, RouterModule, ROUTES } from '@angular/router';
|
|
19
17
|
import { defineCommand, AXP_COMMAND_DEFINITION_CATEGORY_ENTITY, AXPCommandService, AXPQueryService, AXPQueryExecutor, AXPCommandExecutor, provideCommandSetups, provideQuerySetups, AXPCommandRegistry, AXPQueryRegistry } from '@acorex/platform/runtime';
|
|
20
|
-
import { AXFormatService } from '@acorex/core/format';
|
|
21
18
|
import * as i1 from '@acorex/components/button';
|
|
22
19
|
import { AXButtonModule } from '@acorex/components/button';
|
|
23
|
-
import * as
|
|
20
|
+
import * as i3 from '@acorex/components/skeleton';
|
|
24
21
|
import { AXSkeletonModule } from '@acorex/components/skeleton';
|
|
25
|
-
import
|
|
26
|
-
import { AXPopoverModule } from '@acorex/components/popover';
|
|
22
|
+
import { AXFormatService } from '@acorex/core/format';
|
|
27
23
|
import * as i5 from '@angular/common';
|
|
28
|
-
import { CommonModule, AsyncPipe, NgClass } from '@angular/common';
|
|
24
|
+
import { CommonModule, DOCUMENT, AsyncPipe, NgClass } from '@angular/common';
|
|
25
|
+
import { AXOverlayService } from '@acorex/cdk/overlay';
|
|
26
|
+
import { AXLocaleService } from '@acorex/core/locale';
|
|
27
|
+
import { AXPlatform } from '@acorex/core/platform';
|
|
29
28
|
import { AXPThemeLayoutBlockComponent, AXPPreloadFiltersComponent, AXP_PAGE_COMPONENT_PROVIDER, AXPStateMessageComponent, AXPColumnItemListComponent, AXPDataSelectorService, AXPPageComponentRegistryService } from '@acorex/platform/layout/components';
|
|
30
29
|
import { AXPPageLayoutBaseComponent, AXPPageLayoutComponent, AXPPageComponentRendererDirective, AXPPageComponentInstanceRegistryService, axpDetailsViewCanDeactivateGuard } from '@acorex/platform/layout/views';
|
|
31
30
|
import { AXDataSource } from '@acorex/cdk/common';
|
|
@@ -38,33 +37,34 @@ import { moveItemInArray } from '@angular/cdk/drag-drop';
|
|
|
38
37
|
import { AXDialogService } from '@acorex/components/dialog';
|
|
39
38
|
import { AXLoadingDialogService } from '@acorex/components/loading-dialog';
|
|
40
39
|
import { AXPopupService } from '@acorex/components/popup';
|
|
41
|
-
import { AXPlatform } from '@acorex/core/platform';
|
|
42
|
-
import { AXP_DISABLED_PROPERTY, AXP_ALLOW_CLEAR_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_DATA_PROPERTY_GROUP, AXP_ALLOW_MULTIPLE_PROPERTY, AXP_NAME_PROPERTY, AXP_READONLY_PROPERTY, AXP_PLACEHOLDER_PROPERTY, AXP_BEHAVIOR_PROPERTY_GROUP, AXPProviderSelectWidgetEditBase, AXP_ROW_EXPR_PREFIX, AXP_DOWNLOADABLE_PROPERTY, AXP_DESCRIPTION_PROPERTY, AXP_REPEATER_ENTITY_BY_KEY_LOOKUP } from '@acorex/platform/layout/widgets';
|
|
43
40
|
import * as i2$1 from '@acorex/components/badge';
|
|
44
41
|
import { AXBadgeModule } from '@acorex/components/badge';
|
|
45
42
|
import { AXCheckBoxModule } from '@acorex/components/check-box';
|
|
46
|
-
import * as i3$
|
|
43
|
+
import * as i3$2 from '@acorex/components/decorators';
|
|
47
44
|
import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
48
45
|
import { AXBasePageComponent } from '@acorex/components/page';
|
|
49
|
-
import * as i4
|
|
46
|
+
import * as i4 from '@acorex/components/search-box';
|
|
50
47
|
import { AXSearchBoxModule, AXSearchBoxComponent } from '@acorex/components/search-box';
|
|
51
48
|
import { AXTreeViewComponent } from '@acorex/components/tree-view';
|
|
52
49
|
import * as i1$1 from '@angular/forms';
|
|
53
50
|
import { FormsModule } from '@angular/forms';
|
|
54
|
-
import * as i3$
|
|
51
|
+
import * as i3$3 from '@acorex/components/tooltip';
|
|
55
52
|
import { AXTooltipModule } from '@acorex/components/tooltip';
|
|
56
53
|
import * as i5$1 from '@acorex/components/form';
|
|
57
54
|
import { AXFormModule } from '@acorex/components/form';
|
|
58
55
|
import * as i1$2 from '@acorex/components/loading';
|
|
59
56
|
import { AXLoadingModule } from '@acorex/components/loading';
|
|
60
|
-
import * as i6
|
|
57
|
+
import * as i6 from '@acorex/components/tag-box';
|
|
61
58
|
import { AXTagBoxModule } from '@acorex/components/tag-box';
|
|
62
59
|
import { AXValidationModule } from '@acorex/core/validation';
|
|
60
|
+
import { AXP_DISABLED_PROPERTY, AXP_ALLOW_CLEAR_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_DATA_PROPERTY_GROUP, AXP_ALLOW_MULTIPLE_PROPERTY, AXP_NAME_PROPERTY, AXP_READONLY_PROPERTY, AXP_PLACEHOLDER_PROPERTY, AXP_BEHAVIOR_PROPERTY_GROUP, AXPProviderSelectWidgetEditBase, AXP_ROW_EXPR_PREFIX, AXP_DOWNLOADABLE_PROPERTY, AXP_DESCRIPTION_PROPERTY } from '@acorex/platform/layout/widgets';
|
|
63
61
|
import * as i2$2 from '@acorex/components/select-box';
|
|
64
62
|
import { AXSelectBoxModule } from '@acorex/components/select-box';
|
|
65
|
-
import * as i3$
|
|
63
|
+
import * as i3$4 from '@acorex/components/dropdown';
|
|
66
64
|
import { AXDropdownModule } from '@acorex/components/dropdown';
|
|
67
|
-
import * as i2$3 from '@acorex/components/
|
|
65
|
+
import * as i2$3 from '@acorex/components/popover';
|
|
66
|
+
import { AXPopoverModule } from '@acorex/components/popover';
|
|
67
|
+
import * as i2$4 from '@acorex/components/tabs';
|
|
68
68
|
import { AXTabsModule } from '@acorex/components/tabs';
|
|
69
69
|
import * as i5$2 from '@acorex/components/label';
|
|
70
70
|
import { AXLabelModule } from '@acorex/components/label';
|
|
@@ -73,7 +73,7 @@ import { AXTextBoxModule } from '@acorex/components/text-box';
|
|
|
73
73
|
import { AXFileService } from '@acorex/core/file';
|
|
74
74
|
import { AXUploaderZoneDirective } from '@acorex/cdk/uploader';
|
|
75
75
|
import { AXUploaderModule } from '@acorex/components/uploader';
|
|
76
|
-
import * as i4$
|
|
76
|
+
import * as i4$1 from '@acorex/components/collapse';
|
|
77
77
|
import { AXCollapseModule } from '@acorex/components/collapse';
|
|
78
78
|
|
|
79
79
|
function ensureListActions(ctx) {
|
|
@@ -854,6 +854,276 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
854
854
|
}]
|
|
855
855
|
}] });
|
|
856
856
|
|
|
857
|
+
// #region Master
|
|
858
|
+
function entityMasterCreateAction() {
|
|
859
|
+
return {
|
|
860
|
+
title: '@general:actions.create.title',
|
|
861
|
+
command: {
|
|
862
|
+
name: 'Entity:Create',
|
|
863
|
+
},
|
|
864
|
+
priority: 'primary',
|
|
865
|
+
type: AXPSystemActionType.Create,
|
|
866
|
+
scope: AXPEntityCommandScope.TypeLevel,
|
|
867
|
+
};
|
|
868
|
+
}
|
|
869
|
+
function entityMasterEditAction() {
|
|
870
|
+
return {
|
|
871
|
+
title: '@general:actions.edit.title',
|
|
872
|
+
command: 'Entity:Update',
|
|
873
|
+
priority: 'secondary',
|
|
874
|
+
type: AXPSystemActionType.Update,
|
|
875
|
+
scope: AXPEntityCommandScope.Individual,
|
|
876
|
+
default: true,
|
|
877
|
+
};
|
|
878
|
+
}
|
|
879
|
+
function entityMasterBulkDeleteAction() {
|
|
880
|
+
return {
|
|
881
|
+
title: '@general:actions.delete-items.title',
|
|
882
|
+
command: 'delete-entity',
|
|
883
|
+
priority: 'primary',
|
|
884
|
+
type: AXPSystemActionType.Delete,
|
|
885
|
+
scope: AXPEntityCommandScope.Selected,
|
|
886
|
+
order: 100,
|
|
887
|
+
};
|
|
888
|
+
}
|
|
889
|
+
function entityMasterViewAction() {
|
|
890
|
+
return {
|
|
891
|
+
title: '@general:actions.view.title',
|
|
892
|
+
command: 'open-entity',
|
|
893
|
+
priority: 'secondary',
|
|
894
|
+
type: AXPSystemActionType.View,
|
|
895
|
+
scope: AXPEntityCommandScope.Individual,
|
|
896
|
+
default: true,
|
|
897
|
+
};
|
|
898
|
+
}
|
|
899
|
+
function entityMasterDeleteAction() {
|
|
900
|
+
return {
|
|
901
|
+
title: '@general:actions.delete.title',
|
|
902
|
+
command: 'delete-entity',
|
|
903
|
+
priority: 'secondary',
|
|
904
|
+
type: AXPSystemActionType.Delete,
|
|
905
|
+
scope: AXPEntityCommandScope.Individual,
|
|
906
|
+
order: 100,
|
|
907
|
+
shortcuts: ['ctrl+shift+delete'],
|
|
908
|
+
};
|
|
909
|
+
}
|
|
910
|
+
function entityMasterCrudActions(options) {
|
|
911
|
+
const opts = {
|
|
912
|
+
create: true,
|
|
913
|
+
delete: true,
|
|
914
|
+
view: true,
|
|
915
|
+
edit: false,
|
|
916
|
+
...options,
|
|
917
|
+
};
|
|
918
|
+
const actions = [];
|
|
919
|
+
if (opts.create) {
|
|
920
|
+
actions.push(entityMasterCreateAction());
|
|
921
|
+
}
|
|
922
|
+
if (opts.delete) {
|
|
923
|
+
actions.push(entityMasterBulkDeleteAction());
|
|
924
|
+
actions.push(entityMasterDeleteAction());
|
|
925
|
+
}
|
|
926
|
+
if (opts.view) {
|
|
927
|
+
actions.push(entityMasterViewAction());
|
|
928
|
+
}
|
|
929
|
+
if (opts.edit) {
|
|
930
|
+
actions.push(entityMasterEditAction());
|
|
931
|
+
}
|
|
932
|
+
return actions;
|
|
933
|
+
}
|
|
934
|
+
function entityMasterRecordActions() {
|
|
935
|
+
return [entityMasterDeleteAction()];
|
|
936
|
+
}
|
|
937
|
+
// #endregion
|
|
938
|
+
// #region Details
|
|
939
|
+
function entityDetailsCreateActions(parentId) {
|
|
940
|
+
return {
|
|
941
|
+
title: '@general:actions.create.title',
|
|
942
|
+
command: {
|
|
943
|
+
name: 'Entity:Create',
|
|
944
|
+
options: {
|
|
945
|
+
process: {
|
|
946
|
+
redirect: false,
|
|
947
|
+
canCreateNewOne: true,
|
|
948
|
+
data: {
|
|
949
|
+
[parentId]: '{{context.eval("id")}}',
|
|
950
|
+
},
|
|
951
|
+
},
|
|
952
|
+
},
|
|
953
|
+
},
|
|
954
|
+
priority: 'primary',
|
|
955
|
+
type: AXPSystemActionType.Create,
|
|
956
|
+
scope: AXPEntityCommandScope.TypeLevel,
|
|
957
|
+
};
|
|
958
|
+
}
|
|
959
|
+
/**
|
|
960
|
+
* Type-level Create with empty `process.data`; the FK is supplied from `relatedEntity.persistence.foreignKeyField`
|
|
961
|
+
* when the related list is built (see `mergeForeignKeyFieldIntoCreateActions`).
|
|
962
|
+
*/
|
|
963
|
+
function entityDetailsCreateActionsDeferredParent() {
|
|
964
|
+
return {
|
|
965
|
+
title: '@general:actions.create.title',
|
|
966
|
+
command: {
|
|
967
|
+
name: 'Entity:Create',
|
|
968
|
+
options: {
|
|
969
|
+
process: {
|
|
970
|
+
redirect: false,
|
|
971
|
+
canCreateNewOne: true,
|
|
972
|
+
data: {},
|
|
973
|
+
},
|
|
974
|
+
},
|
|
975
|
+
},
|
|
976
|
+
priority: 'primary',
|
|
977
|
+
type: AXPSystemActionType.Create,
|
|
978
|
+
scope: AXPEntityCommandScope.TypeLevel,
|
|
979
|
+
};
|
|
980
|
+
}
|
|
981
|
+
/**
|
|
982
|
+
* Ensures each type-level `Entity:Create` action includes `process.data[foreignKeyField]` bound to the parent row id.
|
|
983
|
+
*/
|
|
984
|
+
function mergeForeignKeyFieldIntoCreateActions(foreignKeyField, actions) {
|
|
985
|
+
if (!foreignKeyField || !actions?.length) {
|
|
986
|
+
return actions ?? [];
|
|
987
|
+
}
|
|
988
|
+
return actions.map((a) => {
|
|
989
|
+
const cmd = a.command;
|
|
990
|
+
if (typeof cmd !== 'object' ||
|
|
991
|
+
!cmd ||
|
|
992
|
+
cmd.name !== 'Entity:Create' ||
|
|
993
|
+
a.scope !== AXPEntityCommandScope.TypeLevel) {
|
|
994
|
+
return a;
|
|
995
|
+
}
|
|
996
|
+
const opts = (cmd.options ?? {});
|
|
997
|
+
const proc = (opts['process'] ?? {});
|
|
998
|
+
const data = { ...(proc['data'] ?? {}) };
|
|
999
|
+
if (data[foreignKeyField] === undefined || data[foreignKeyField] === null || data[foreignKeyField] === '') {
|
|
1000
|
+
data[foreignKeyField] = '{{ context.eval("id") }}';
|
|
1001
|
+
}
|
|
1002
|
+
return {
|
|
1003
|
+
...a,
|
|
1004
|
+
command: {
|
|
1005
|
+
...cmd,
|
|
1006
|
+
options: { ...opts, process: { ...proc, data } },
|
|
1007
|
+
},
|
|
1008
|
+
};
|
|
1009
|
+
});
|
|
1010
|
+
}
|
|
1011
|
+
/** Property names hidden on nested Create from a related list (`excludeProperties` plus `foreignKeyField` when set). */
|
|
1012
|
+
function collectNestedCreateHiddenProperties(relatedEntity) {
|
|
1013
|
+
const fk = relatedEntity.persistence?.foreignKeyField;
|
|
1014
|
+
const merged = [...(relatedEntity.excludeProperties ?? [])];
|
|
1015
|
+
if (fk) {
|
|
1016
|
+
merged.push(fk);
|
|
1017
|
+
}
|
|
1018
|
+
const unique = [...new Set(merged)];
|
|
1019
|
+
return unique.length ? unique : undefined;
|
|
1020
|
+
}
|
|
1021
|
+
function entityDetailsSimpleCondition(fk) {
|
|
1022
|
+
return {
|
|
1023
|
+
name: fk,
|
|
1024
|
+
operator: { type: 'equal' },
|
|
1025
|
+
value: '{{context.eval("id")}}',
|
|
1026
|
+
};
|
|
1027
|
+
}
|
|
1028
|
+
function entityDetailsReferenceCondition(type) {
|
|
1029
|
+
return [
|
|
1030
|
+
{
|
|
1031
|
+
name: 'reference.id',
|
|
1032
|
+
operator: { type: 'equal' },
|
|
1033
|
+
value: '{{context.eval("id")}}',
|
|
1034
|
+
},
|
|
1035
|
+
{
|
|
1036
|
+
name: 'reference.type',
|
|
1037
|
+
operator: { type: 'equal' },
|
|
1038
|
+
value: type,
|
|
1039
|
+
},
|
|
1040
|
+
];
|
|
1041
|
+
}
|
|
1042
|
+
function entityDetailsEditAction() {
|
|
1043
|
+
return {
|
|
1044
|
+
title: '@general:actions.edit.title',
|
|
1045
|
+
// command: 'quick-modify-entity',
|
|
1046
|
+
command: 'Entity:Update',
|
|
1047
|
+
priority: 'secondary',
|
|
1048
|
+
type: AXPSystemActionType.Update,
|
|
1049
|
+
default: true,
|
|
1050
|
+
scope: AXPEntityCommandScope.Individual,
|
|
1051
|
+
};
|
|
1052
|
+
}
|
|
1053
|
+
function entityDetailsNewEditAction() {
|
|
1054
|
+
return {
|
|
1055
|
+
title: 'New Edit',
|
|
1056
|
+
command: {
|
|
1057
|
+
name: 'Entity:Update',
|
|
1058
|
+
},
|
|
1059
|
+
priority: 'secondary',
|
|
1060
|
+
type: AXPSystemActionType.Update,
|
|
1061
|
+
default: true,
|
|
1062
|
+
scope: AXPEntityCommandScope.Individual,
|
|
1063
|
+
};
|
|
1064
|
+
}
|
|
1065
|
+
function entityOverrideDetailsViewAction() {
|
|
1066
|
+
return {
|
|
1067
|
+
title: '@general:actions.view.title',
|
|
1068
|
+
command: 'open-entity',
|
|
1069
|
+
priority: 'secondary',
|
|
1070
|
+
hidden: true,
|
|
1071
|
+
type: AXPSystemActionType.View,
|
|
1072
|
+
scope: AXPEntityCommandScope.Individual,
|
|
1073
|
+
};
|
|
1074
|
+
}
|
|
1075
|
+
function entityDetailsCrudActions(parentId, options) {
|
|
1076
|
+
const opts = {
|
|
1077
|
+
create: true,
|
|
1078
|
+
delete: true,
|
|
1079
|
+
view: true,
|
|
1080
|
+
edit: true,
|
|
1081
|
+
...options,
|
|
1082
|
+
};
|
|
1083
|
+
const actions = [];
|
|
1084
|
+
if (opts.create) {
|
|
1085
|
+
if (parentId) {
|
|
1086
|
+
actions.push(entityDetailsCreateActions(parentId));
|
|
1087
|
+
}
|
|
1088
|
+
else {
|
|
1089
|
+
actions.push(entityDetailsCreateActionsDeferredParent());
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
if (opts.edit) {
|
|
1093
|
+
actions.push(entityDetailsEditAction());
|
|
1094
|
+
}
|
|
1095
|
+
if (opts.view) {
|
|
1096
|
+
actions.push(entityOverrideDetailsViewAction());
|
|
1097
|
+
}
|
|
1098
|
+
return actions;
|
|
1099
|
+
}
|
|
1100
|
+
function entityDetailsReferenceCreateActions(type) {
|
|
1101
|
+
return [
|
|
1102
|
+
{
|
|
1103
|
+
title: '@general:actions.create.title',
|
|
1104
|
+
command: {
|
|
1105
|
+
name: 'Entity:Create',
|
|
1106
|
+
options: {
|
|
1107
|
+
process: {
|
|
1108
|
+
redirect: false,
|
|
1109
|
+
canCreateNewOne: true,
|
|
1110
|
+
data: {
|
|
1111
|
+
reference: {
|
|
1112
|
+
id: '{{context.eval("id")}}',
|
|
1113
|
+
type: type,
|
|
1114
|
+
},
|
|
1115
|
+
},
|
|
1116
|
+
},
|
|
1117
|
+
},
|
|
1118
|
+
},
|
|
1119
|
+
priority: 'primary',
|
|
1120
|
+
type: AXPSystemActionType.Create,
|
|
1121
|
+
scope: AXPEntityCommandScope.TypeLevel,
|
|
1122
|
+
},
|
|
1123
|
+
entityDetailsEditAction(),
|
|
1124
|
+
entityOverrideDetailsViewAction(),
|
|
1125
|
+
];
|
|
1126
|
+
}
|
|
857
1127
|
/**
|
|
858
1128
|
* Computes a diff between two plain objects with array-aware semantics.
|
|
859
1129
|
* - For arrays of objects with an id field, computes added/removed by id.
|
|
@@ -1211,7 +1481,7 @@ class PropertyFilter {
|
|
|
1211
1481
|
const viewLayout = mainViewLayoutMap.get(prop.name);
|
|
1212
1482
|
const mergedProp = {
|
|
1213
1483
|
...prop,
|
|
1214
|
-
__layout: viewLayout?.layout
|
|
1484
|
+
__layout: viewLayout?.layout,
|
|
1215
1485
|
__order: viewLayout?.layout?.order,
|
|
1216
1486
|
};
|
|
1217
1487
|
if (this.readonlyList?.has(prop.name)) {
|
|
@@ -1274,7 +1544,7 @@ class PropertyFilter {
|
|
|
1274
1544
|
const mergedProp = {
|
|
1275
1545
|
...prop,
|
|
1276
1546
|
__dataPath: dataPath,
|
|
1277
|
-
__layout: viewLayout?.layout
|
|
1547
|
+
__layout: viewLayout?.layout,
|
|
1278
1548
|
__order: viewLayout?.layout?.order,
|
|
1279
1549
|
};
|
|
1280
1550
|
// Apply generic propertyOverrides extension (e.g. for identifier defaultValue on nested paths)
|
|
@@ -1783,9 +2053,6 @@ const GRID_COLUMNS = 12;
|
|
|
1783
2053
|
function getColSpanAt(layout, breakpoint) {
|
|
1784
2054
|
return layout?.positions?.[breakpoint]?.colSpan ?? GRID_COLUMNS;
|
|
1785
2055
|
}
|
|
1786
|
-
function getColStartAt(layout, breakpoint) {
|
|
1787
|
-
return layout?.positions?.[breakpoint]?.colStart;
|
|
1788
|
-
}
|
|
1789
2056
|
function setColSpanAt(layout, breakpoint, colSpan) {
|
|
1790
2057
|
if (!layout)
|
|
1791
2058
|
return;
|
|
@@ -1810,56 +2077,23 @@ function normalizeLayoutFillRowGaps(items, getLayout, getItemId) {
|
|
|
1810
2077
|
if (items.length === 0)
|
|
1811
2078
|
return scaleFactors;
|
|
1812
2079
|
for (const breakpoint of LAYOUT_BREAKPOINTS) {
|
|
2080
|
+
const colSpans = items.map((item) => getColSpanAt(getLayout(item), breakpoint));
|
|
1813
2081
|
let i = 0;
|
|
1814
|
-
while (i <
|
|
2082
|
+
while (i < colSpans.length) {
|
|
2083
|
+
let rowSum = 0;
|
|
1815
2084
|
const rowStart = i;
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
let explicitRowEnd = 0;
|
|
1819
|
-
while (i < items.length) {
|
|
1820
|
-
const layout = getLayout(items[i]);
|
|
1821
|
-
const colStart = getColStartAt(layout, breakpoint);
|
|
1822
|
-
const colSpan = getColSpanAt(layout, breakpoint);
|
|
1823
|
-
// colStart: 1 begins a new row (except for the first item in the current row)
|
|
1824
|
-
if (colStart === 1 && i > rowStart) {
|
|
1825
|
-
break;
|
|
1826
|
-
}
|
|
1827
|
-
if (colStart != null) {
|
|
1828
|
-
rowHasExplicitColStart = true;
|
|
1829
|
-
const end = colStart + colSpan;
|
|
1830
|
-
if (end - 1 > GRID_COLUMNS) {
|
|
1831
|
-
i++;
|
|
1832
|
-
break;
|
|
1833
|
-
}
|
|
1834
|
-
explicitRowEnd = Math.max(explicitRowEnd, end);
|
|
1835
|
-
i++;
|
|
1836
|
-
if (explicitRowEnd >= GRID_COLUMNS) {
|
|
1837
|
-
break;
|
|
1838
|
-
}
|
|
1839
|
-
continue;
|
|
1840
|
-
}
|
|
1841
|
-
if (sequentialRowSum + colSpan > GRID_COLUMNS && i > rowStart) {
|
|
1842
|
-
break;
|
|
1843
|
-
}
|
|
1844
|
-
if (sequentialRowSum + colSpan > GRID_COLUMNS && i === rowStart) {
|
|
1845
|
-
sequentialRowSum = colSpan;
|
|
1846
|
-
i++;
|
|
1847
|
-
break;
|
|
1848
|
-
}
|
|
1849
|
-
sequentialRowSum += colSpan;
|
|
2085
|
+
while (i < colSpans.length && rowSum + colSpans[i] <= GRID_COLUMNS) {
|
|
2086
|
+
rowSum += colSpans[i];
|
|
1850
2087
|
i++;
|
|
1851
|
-
if (sequentialRowSum >= GRID_COLUMNS) {
|
|
1852
|
-
break;
|
|
1853
|
-
}
|
|
1854
2088
|
}
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
2089
|
+
if (i === rowStart) {
|
|
2090
|
+
rowSum = colSpans[i];
|
|
2091
|
+
i++;
|
|
1858
2092
|
}
|
|
1859
|
-
if (
|
|
2093
|
+
if (rowSum < GRID_COLUMNS && rowSum > 0 && i > rowStart) {
|
|
1860
2094
|
const lastIdx = i - 1;
|
|
1861
|
-
const oldColSpan =
|
|
1862
|
-
const fill = GRID_COLUMNS -
|
|
2095
|
+
const oldColSpan = colSpans[lastIdx];
|
|
2096
|
+
const fill = GRID_COLUMNS - rowSum;
|
|
1863
2097
|
const newColSpan = Math.min(GRID_COLUMNS, oldColSpan + fill);
|
|
1864
2098
|
const layout = getLayout(items[lastIdx]);
|
|
1865
2099
|
if (layout) {
|
|
@@ -2354,7 +2588,7 @@ class AXPCreateEntityCommand {
|
|
|
2354
2588
|
}
|
|
2355
2589
|
const createFn = entityRef.commands?.create?.execute;
|
|
2356
2590
|
const updateFn = entityRef.commands?.update?.execute;
|
|
2357
|
-
const context =
|
|
2591
|
+
const context = dialogRef.context();
|
|
2358
2592
|
console.log('context', context);
|
|
2359
2593
|
const hasPersistedId = hasPersistedRootId(context);
|
|
2360
2594
|
const persistFn = hasPersistedId ? updateFn : createFn;
|
|
@@ -2510,9 +2744,6 @@ class AXPUpdateEntityCommand {
|
|
|
2510
2744
|
this.entityService = inject(AXPEntityDefinitionRegistryService);
|
|
2511
2745
|
this.toastService = inject(AXToastService);
|
|
2512
2746
|
this.translationService = inject(AXTranslationService);
|
|
2513
|
-
this.formatService = inject(AXFormatService);
|
|
2514
|
-
this.expressionEvaluator = inject(AXPExpressionEvaluatorService);
|
|
2515
|
-
this.contextEvalFactory = inject(AXPContextEvalFactory);
|
|
2516
2747
|
this.eventService = inject(AXPBroadcastEventService);
|
|
2517
2748
|
}
|
|
2518
2749
|
//#endregion
|
|
@@ -2520,7 +2751,7 @@ class AXPUpdateEntityCommand {
|
|
|
2520
2751
|
async execute(input) {
|
|
2521
2752
|
const enableOperationToasts = await this.settingsService.get(AXPCommonSettings.EnableOperationToasts);
|
|
2522
2753
|
const dialogSize = input['dialogSize'];
|
|
2523
|
-
const { entity, data, options } = input.__context__;
|
|
2754
|
+
const { entity, entityInfo, data, options } = input.__context__;
|
|
2524
2755
|
const excludeProperties = options?.excludeProperties;
|
|
2525
2756
|
const includeProperties = options?.includeProperties;
|
|
2526
2757
|
const decoration = options?.['decoration'];
|
|
@@ -2559,17 +2790,10 @@ class AXPUpdateEntityCommand {
|
|
|
2559
2790
|
if (headerTitle) {
|
|
2560
2791
|
chain = chain.title(headerTitle);
|
|
2561
2792
|
}
|
|
2562
|
-
else {
|
|
2563
|
-
|
|
2564
|
-
const
|
|
2565
|
-
|
|
2566
|
-
recordData = await this.entityForm.getRecordById(`${moduleName}.${entityName}`, String(recordId));
|
|
2567
|
-
}
|
|
2568
|
-
else if (typeof data === 'object' && data != null) {
|
|
2569
|
-
recordData = data;
|
|
2570
|
-
}
|
|
2571
|
-
const title = await resolveEntityModifyPopupTitle(entityRef, recordData, this.translationService, this.formatService, this.expressionEvaluator, this.contextEvalFactory, '@general:actions.edit.title');
|
|
2572
|
-
chain = chain.title(title);
|
|
2793
|
+
else if (entityInfo?.title) {
|
|
2794
|
+
const editText = await this.translationService.translateAsync('@general:actions.edit.title');
|
|
2795
|
+
const translatedTitle = await this.translationService.translateAsync(entityInfo.title);
|
|
2796
|
+
chain = chain.title(`${editText} ${translatedTitle}`);
|
|
2573
2797
|
}
|
|
2574
2798
|
const finalSize = layoutSize || dialogSize;
|
|
2575
2799
|
if (finalSize) {
|
|
@@ -2663,19 +2887,15 @@ var updateEntity_command = /*#__PURE__*/Object.freeze({
|
|
|
2663
2887
|
|
|
2664
2888
|
class AXPViewEntityDetailsCommand {
|
|
2665
2889
|
constructor() {
|
|
2666
|
-
//#region ----
|
|
2890
|
+
//#region ---- Services & Dependencies ----
|
|
2667
2891
|
this.entityForm = inject(AXPEntityFormBuilderService);
|
|
2668
2892
|
this.entityService = inject(AXPEntityDefinitionRegistryService);
|
|
2669
2893
|
this.translationService = inject(AXTranslationService);
|
|
2670
|
-
this.expressionEvaluator = inject(AXPExpressionEvaluatorService);
|
|
2671
|
-
this.contextEvalFactory = inject(AXPContextEvalFactory);
|
|
2672
2894
|
}
|
|
2673
2895
|
//#endregion
|
|
2674
|
-
//#region ----
|
|
2896
|
+
//#region ---- Command Execution ----
|
|
2675
2897
|
async execute(input) {
|
|
2676
|
-
const excludeProperties = input['excludeProperties']
|
|
2677
|
-
input?.options?.excludeProperties ??
|
|
2678
|
-
input?.__context__?.options?.excludeProperties;
|
|
2898
|
+
const excludeProperties = input['excludeProperties'];
|
|
2679
2899
|
const { entity, entityInfo, data } = input.__context__;
|
|
2680
2900
|
const [moduleName, entityName] = (entity || '').split('.');
|
|
2681
2901
|
if (!moduleName || !entityName) {
|
|
@@ -2686,9 +2906,10 @@ class AXPViewEntityDetailsCommand {
|
|
|
2686
2906
|
},
|
|
2687
2907
|
};
|
|
2688
2908
|
}
|
|
2689
|
-
|
|
2909
|
+
await this.entityService.resolve(moduleName, entityName);
|
|
2690
2910
|
let dialogRef;
|
|
2691
2911
|
try {
|
|
2912
|
+
// Validate data type
|
|
2692
2913
|
if (!data || (typeof data !== 'string' && typeof data !== 'object')) {
|
|
2693
2914
|
return {
|
|
2694
2915
|
success: false,
|
|
@@ -2697,18 +2918,22 @@ class AXPViewEntityDetailsCommand {
|
|
|
2697
2918
|
},
|
|
2698
2919
|
};
|
|
2699
2920
|
}
|
|
2921
|
+
// Pass data directly to single() - it handles string | object internally
|
|
2700
2922
|
let chain = this.entityForm.entity(`${moduleName}.${entityName}`).single(data);
|
|
2701
2923
|
if (excludeProperties && excludeProperties.length > 0) {
|
|
2702
2924
|
chain = chain.exclude(...excludeProperties);
|
|
2703
2925
|
}
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2926
|
+
if (entityInfo?.title) {
|
|
2927
|
+
const detailText = await this.translationService.translateAsync('@general:actions.detail.title');
|
|
2928
|
+
// const translatedTitle = await this.translationService.translateAsync(entityInfo.title);
|
|
2929
|
+
chain = chain.title(`${detailText}`);
|
|
2707
2930
|
}
|
|
2708
2931
|
chain = chain.actions((actions) => {
|
|
2709
2932
|
actions.submit('@general:actions.ok.title');
|
|
2710
2933
|
});
|
|
2711
2934
|
dialogRef = await chain.show();
|
|
2935
|
+
// For single/view mode, only close action is available
|
|
2936
|
+
// No need to show any message when closing a read-only view
|
|
2712
2937
|
dialogRef.close();
|
|
2713
2938
|
return {
|
|
2714
2939
|
success: true,
|
|
@@ -2728,62 +2953,11 @@ class AXPViewEntityDetailsCommand {
|
|
|
2728
2953
|
};
|
|
2729
2954
|
}
|
|
2730
2955
|
finally {
|
|
2731
|
-
if (dialogRef
|
|
2956
|
+
if (dialogRef) {
|
|
2732
2957
|
dialogRef.setLoading(false);
|
|
2733
2958
|
}
|
|
2734
2959
|
}
|
|
2735
2960
|
}
|
|
2736
|
-
//#endregion
|
|
2737
|
-
//#region ---- Title resolution ----
|
|
2738
|
-
async resolveDialogTitle(entityDef, data) {
|
|
2739
|
-
const titleTemplate = entityDef.interfaces?.master?.single?.title ??
|
|
2740
|
-
entityDef.formats?.searchResult?.title ??
|
|
2741
|
-
entityDef.formats?.individual;
|
|
2742
|
-
if (!titleTemplate || typeof titleTemplate !== 'string') {
|
|
2743
|
-
return this.translationService.translateAsync('@general:actions.detail.title');
|
|
2744
|
-
}
|
|
2745
|
-
if (!titleTemplate.includes('{{')) {
|
|
2746
|
-
const translated = await this.translationService.translateAsync(titleTemplate);
|
|
2747
|
-
return resolveMultiLanguageString(translated, this.translationService.getActiveLang()).trim() || translated;
|
|
2748
|
-
}
|
|
2749
|
-
const recordContext = await this.loadRecordContext(`${entityDef.module}.${entityDef.name}`, data);
|
|
2750
|
-
const scope = {
|
|
2751
|
-
context: this.contextEvalFactory.createScope(recordContext),
|
|
2752
|
-
};
|
|
2753
|
-
const evaluated = await this.expressionEvaluator.evaluate(titleTemplate, scope);
|
|
2754
|
-
const locale = this.translationService.getActiveLang();
|
|
2755
|
-
const text = resolveMultiLanguageString(evaluated, locale).trim() || String(evaluated ?? '').trim();
|
|
2756
|
-
if (text) {
|
|
2757
|
-
return text;
|
|
2758
|
-
}
|
|
2759
|
-
return this.translationService.translateAsync('@general:actions.detail.title');
|
|
2760
|
-
}
|
|
2761
|
-
async loadRecordContext(entityFullName, data) {
|
|
2762
|
-
if (typeof data === 'object' && data !== null && !Array.isArray(data)) {
|
|
2763
|
-
const hasNestedFields = get(data, 'subject.title') != null ||
|
|
2764
|
-
get(data, 'recordType.title') != null ||
|
|
2765
|
-
get(data, 'occurredDate') != null;
|
|
2766
|
-
if (hasNestedFields) {
|
|
2767
|
-
return data;
|
|
2768
|
-
}
|
|
2769
|
-
}
|
|
2770
|
-
const recordId = typeof data === 'string' ? data : String(get(data, 'id') ?? '');
|
|
2771
|
-
if (!recordId) {
|
|
2772
|
-
return typeof data === 'object' && data !== null ? data : {};
|
|
2773
|
-
}
|
|
2774
|
-
try {
|
|
2775
|
-
const [moduleName, entityName] = entityFullName.split('.');
|
|
2776
|
-
const entity = await this.entityService.resolve(moduleName, entityName);
|
|
2777
|
-
const byKeyFn = entity?.queries?.byKey?.execute;
|
|
2778
|
-
if (typeof byKeyFn === 'function') {
|
|
2779
|
-
return (await byKeyFn(recordId)) ?? {};
|
|
2780
|
-
}
|
|
2781
|
-
}
|
|
2782
|
-
catch {
|
|
2783
|
-
// Fall back to list row payload below.
|
|
2784
|
-
}
|
|
2785
|
-
return typeof data === 'object' && data !== null ? data : {};
|
|
2786
|
-
}
|
|
2787
2961
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPViewEntityDetailsCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2788
2962
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPViewEntityDetailsCommand, providedIn: 'root' }); }
|
|
2789
2963
|
}
|
|
@@ -2799,6 +2973,13 @@ var viewEntityDetails_command = /*#__PURE__*/Object.freeze({
|
|
|
2799
2973
|
AXPViewEntityDetailsCommand: AXPViewEntityDetailsCommand
|
|
2800
2974
|
});
|
|
2801
2975
|
|
|
2976
|
+
//#region ---- Datasource keys ----
|
|
2977
|
+
/** Platform entity layout datasource registry names. */
|
|
2978
|
+
const AXPEntityDataSourceKeys = {
|
|
2979
|
+
Entities: 'entities',
|
|
2980
|
+
};
|
|
2981
|
+
//#endregion
|
|
2982
|
+
|
|
2802
2983
|
const AXPEntityEventsKeys = {
|
|
2803
2984
|
REFRESH_LAYOUT: 'entity:refresh-layout',
|
|
2804
2985
|
REFRESH_DATA: 'entity:refresh-data',
|
|
@@ -2837,44 +3018,10 @@ function buildAXPRecordWorkflowInfo(params) {
|
|
|
2837
3018
|
...(params.pinnedVersion != null ? { pinnedVersion: params.pinnedVersion } : {}),
|
|
2838
3019
|
};
|
|
2839
3020
|
}
|
|
2840
|
-
//#endregion
|
|
2841
3021
|
|
|
2842
3022
|
//#region ---- Contracts barrel ----
|
|
2843
3023
|
//#endregion
|
|
2844
3024
|
|
|
2845
|
-
/** Common keys on denormalized expose stubs (e.g. `{ id, displayName }` from lookup expose). */
|
|
2846
|
-
const LOOKUP_EXPOSE_STUB_DISPLAY_FIELDS = ['displayName', 'title', 'name', 'fullName', 'code'];
|
|
2847
|
-
function resolveLookupItemFieldValue(item, field) {
|
|
2848
|
-
const direct = get(item, field);
|
|
2849
|
-
if (direct != null && direct !== '') {
|
|
2850
|
-
return direct;
|
|
2851
|
-
}
|
|
2852
|
-
if (!field.includes('.')) {
|
|
2853
|
-
return direct;
|
|
2854
|
-
}
|
|
2855
|
-
for (const fallback of LOOKUP_EXPOSE_STUB_DISPLAY_FIELDS) {
|
|
2856
|
-
const candidate = get(item, fallback);
|
|
2857
|
-
if (candidate != null && candidate !== '') {
|
|
2858
|
-
return candidate;
|
|
2859
|
-
}
|
|
2860
|
-
}
|
|
2861
|
-
return direct;
|
|
2862
|
-
}
|
|
2863
|
-
function formatLookupFieldValue(raw, locale, translationService, resolveMultiLanguage) {
|
|
2864
|
-
if (raw == null || raw === '') {
|
|
2865
|
-
return '';
|
|
2866
|
-
}
|
|
2867
|
-
if (typeof raw === 'string' || typeof raw === 'number' || typeof raw === 'boolean') {
|
|
2868
|
-
return String(raw);
|
|
2869
|
-
}
|
|
2870
|
-
if (typeof raw === 'object' && !Array.isArray(raw)) {
|
|
2871
|
-
if (resolveMultiLanguage) {
|
|
2872
|
-
return resolveMultiLanguage(raw);
|
|
2873
|
-
}
|
|
2874
|
-
return resolveSearchableText(raw, locale, translationService);
|
|
2875
|
-
}
|
|
2876
|
-
return String(raw);
|
|
2877
|
-
}
|
|
2878
3025
|
//#region ---- Template resolution ----
|
|
2879
3026
|
/**
|
|
2880
3027
|
* Resolves the display template for a lookup item.
|
|
@@ -2916,46 +3063,7 @@ function resolveLookupDisplayField(entity, options) {
|
|
|
2916
3063
|
return found ?? 'title';
|
|
2917
3064
|
}
|
|
2918
3065
|
/**
|
|
2919
|
-
* Formats a lookup row for display using template and/or field resolution
|
|
2920
|
-
*/
|
|
2921
|
-
async function formatLookupItemDisplayAsync(item, entity, options, formatService, displayDeps, resolveMultiLanguage) {
|
|
2922
|
-
if (item == null) {
|
|
2923
|
-
return '';
|
|
2924
|
-
}
|
|
2925
|
-
if (typeof item === 'string' || typeof item === 'number' || typeof item === 'boolean') {
|
|
2926
|
-
return String(item);
|
|
2927
|
-
}
|
|
2928
|
-
if (typeof item !== 'object') {
|
|
2929
|
-
return '';
|
|
2930
|
-
}
|
|
2931
|
-
if (options.isMultiLanguage?.(item) && resolveMultiLanguage) {
|
|
2932
|
-
return resolveMultiLanguage(item);
|
|
2933
|
-
}
|
|
2934
|
-
const template = resolveLookupDisplayTemplate(entity, options);
|
|
2935
|
-
if (template) {
|
|
2936
|
-
if (template.includes('{{') || template.includes('context.eval')) {
|
|
2937
|
-
const evaluated = await evaluateEntityDisplayTemplate(template, item, displayDeps.expressionEvaluator, displayDeps.locale, displayDeps.translationService, displayDeps.contextEvalFactory);
|
|
2938
|
-
const text = sanitizeResolvedEntityDisplayTitle(resolveSearchableText(evaluated, displayDeps.locale, displayDeps.translationService));
|
|
2939
|
-
if (text && !isUnresolvedEntityDisplayTemplate(text)) {
|
|
2940
|
-
return text;
|
|
2941
|
-
}
|
|
2942
|
-
}
|
|
2943
|
-
else {
|
|
2944
|
-
const formatted = formatService.format(template, 'string', item);
|
|
2945
|
-
if (formatted) {
|
|
2946
|
-
const text = String(formatted);
|
|
2947
|
-
if (!isUnresolvedEntityDisplayTemplate(text)) {
|
|
2948
|
-
return text;
|
|
2949
|
-
}
|
|
2950
|
-
}
|
|
2951
|
-
}
|
|
2952
|
-
}
|
|
2953
|
-
const field = resolveLookupDisplayField(entity, options);
|
|
2954
|
-
const raw = typeof item === 'object' && item != null ? resolveLookupItemFieldValue(item, field) : undefined;
|
|
2955
|
-
return formatLookupFieldValue(raw, displayDeps.locale, displayDeps.translationService, resolveMultiLanguage);
|
|
2956
|
-
}
|
|
2957
|
-
/**
|
|
2958
|
-
* @deprecated Prefer {@link formatLookupItemDisplayAsync} for expression templates with `context.eval`.
|
|
3066
|
+
* Formats a lookup row for display using template and/or field resolution.
|
|
2959
3067
|
*/
|
|
2960
3068
|
function formatLookupItemDisplay(item, entity, options, formatService, resolveMultiLanguage) {
|
|
2961
3069
|
if (item == null) {
|
|
@@ -2971,7 +3079,7 @@ function formatLookupItemDisplay(item, entity, options, formatService, resolveMu
|
|
|
2971
3079
|
return resolveMultiLanguage(item);
|
|
2972
3080
|
}
|
|
2973
3081
|
const template = resolveLookupDisplayTemplate(entity, options);
|
|
2974
|
-
if (template
|
|
3082
|
+
if (template) {
|
|
2975
3083
|
const formatted = formatService.format(template, 'string', item);
|
|
2976
3084
|
if (formatted) {
|
|
2977
3085
|
const text = String(formatted);
|
|
@@ -2981,8 +3089,8 @@ function formatLookupItemDisplay(item, entity, options, formatService, resolveMu
|
|
|
2981
3089
|
}
|
|
2982
3090
|
}
|
|
2983
3091
|
const field = resolveLookupDisplayField(entity, options);
|
|
2984
|
-
const raw =
|
|
2985
|
-
if (raw == null
|
|
3092
|
+
const raw = get(item, field);
|
|
3093
|
+
if (raw == null) {
|
|
2986
3094
|
return '';
|
|
2987
3095
|
}
|
|
2988
3096
|
if (typeof raw === 'string' || typeof raw === 'number' || typeof raw === 'boolean') {
|
|
@@ -3005,8 +3113,7 @@ class AXPEntityDetailPopoverComponent {
|
|
|
3005
3113
|
this.queryService = inject(AXPQueryService);
|
|
3006
3114
|
this.formatService = inject(AXFormatService);
|
|
3007
3115
|
this.translation = inject(AXTranslationService);
|
|
3008
|
-
this.
|
|
3009
|
-
this.contextEvalFactory = inject(AXPContextEvalFactory);
|
|
3116
|
+
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
3010
3117
|
//#endregion
|
|
3011
3118
|
//#region ---- Inputs ----
|
|
3012
3119
|
this.entity = input.required(...(ngDevMode ? [{ debugName: "entity" }] : /* istanbul ignore next */ []));
|
|
@@ -3016,18 +3123,36 @@ class AXPEntityDetailPopoverComponent {
|
|
|
3016
3123
|
this.displayTitle = input('', ...(ngDevMode ? [{ debugName: "displayTitle" }] : /* istanbul ignore next */ []));
|
|
3017
3124
|
this.item = input(...(ngDevMode ? [undefined, { debugName: "item" }] : /* istanbul ignore next */ []));
|
|
3018
3125
|
this.breadcrumb = input(null, ...(ngDevMode ? [{ debugName: "breadcrumb" }] : /* istanbul ignore next */ []));
|
|
3019
|
-
|
|
3020
|
-
//#region ---- View Children ----
|
|
3021
|
-
this.detailPopover = viewChild('detailPopover', ...(ngDevMode ? [{ debugName: "detailPopover" }] : /* istanbul ignore next */ []));
|
|
3126
|
+
this.requestClose = input(...(ngDevMode ? [undefined, { debugName: "requestClose" }] : /* istanbul ignore next */ []));
|
|
3022
3127
|
//#endregion
|
|
3023
3128
|
//#region ---- Signals ----
|
|
3024
3129
|
this.entityDetails = signal(null, ...(ngDevMode ? [{ debugName: "entityDetails" }] : /* istanbul ignore next */ []));
|
|
3025
3130
|
this.isLoadingDetails = signal(false, ...(ngDevMode ? [{ debugName: "isLoadingDetails" }] : /* istanbul ignore next */ []));
|
|
3026
|
-
this.isDetailPopoverOpen = signal(false, ...(ngDevMode ? [{ debugName: "isDetailPopoverOpen" }] : /* istanbul ignore next */ []));
|
|
3027
|
-
this.headerTitleVersion = 0;
|
|
3028
3131
|
/** Placeholder rows for the loading skeleton (matches typical property count). */
|
|
3029
3132
|
this.loadingSkeletonRows = [1, 2, 3, 4, 5];
|
|
3030
|
-
this.headerTitle =
|
|
3133
|
+
this.headerTitle = computed(() => {
|
|
3134
|
+
const details = this.entityDetails();
|
|
3135
|
+
const entityDefinition = details?.entityDefinition;
|
|
3136
|
+
const data = details?.entityData;
|
|
3137
|
+
if (data && entityDefinition) {
|
|
3138
|
+
const fromDetails = this.resolveLookupDisplayLabel(data, entityDefinition);
|
|
3139
|
+
if (fromDetails) {
|
|
3140
|
+
return fromDetails;
|
|
3141
|
+
}
|
|
3142
|
+
}
|
|
3143
|
+
const preset = this.displayTitle()?.trim();
|
|
3144
|
+
if (preset && !isUnresolvedEntityDisplayTemplate(preset)) {
|
|
3145
|
+
return preset;
|
|
3146
|
+
}
|
|
3147
|
+
const fallbackItem = this.item();
|
|
3148
|
+
if (fallbackItem) {
|
|
3149
|
+
const fromItem = this.resolveLookupDisplayLabel(fallbackItem, entityDefinition);
|
|
3150
|
+
if (fromItem) {
|
|
3151
|
+
return fromItem;
|
|
3152
|
+
}
|
|
3153
|
+
}
|
|
3154
|
+
return preset ?? '';
|
|
3155
|
+
}, ...(ngDevMode ? [{ debugName: "headerTitle" }] : /* istanbul ignore next */ []));
|
|
3031
3156
|
/**
|
|
3032
3157
|
* Stable list of property widgets for the template. Must be a signal (computed), not a method:
|
|
3033
3158
|
* calling a method from the template rebuilds nodes every CD cycle and can make the widget renderer loop.
|
|
@@ -3040,45 +3165,14 @@ class AXPEntityDetailPopoverComponent {
|
|
|
3040
3165
|
return [];
|
|
3041
3166
|
return this.buildEntityPropertiesWithWidgets(data, entityDefinition, this.textField(), this.valueField());
|
|
3042
3167
|
}, ...(ngDevMode ? [{ debugName: "entityPropertiesWithWidgets" }] : /* istanbul ignore next */ []));
|
|
3043
|
-
effect(() => {
|
|
3044
|
-
void this.translation.getActiveLang();
|
|
3045
|
-
const details = this.entityDetails();
|
|
3046
|
-
const preset = this.displayTitle();
|
|
3047
|
-
const fallbackItem = this.item();
|
|
3048
|
-
const version = ++this.headerTitleVersion;
|
|
3049
|
-
void this.resolveHeaderTitle(details?.entityDefinition, details?.entityData, preset, fallbackItem).then((title) => {
|
|
3050
|
-
if (version === this.headerTitleVersion) {
|
|
3051
|
-
this.headerTitle.set(title);
|
|
3052
|
-
}
|
|
3053
|
-
});
|
|
3054
|
-
});
|
|
3055
3168
|
}
|
|
3056
3169
|
//#endregion
|
|
3057
3170
|
//#region ---- Public Methods ----
|
|
3058
|
-
/**
|
|
3059
|
-
|
|
3060
|
-
*/
|
|
3061
|
-
async show(target) {
|
|
3062
|
-
this.isDetailPopoverOpen.set(true);
|
|
3171
|
+
/** Loads entity details after the overlay panel is created. */
|
|
3172
|
+
async loadDetails() {
|
|
3063
3173
|
this.isLoadingDetails.set(true);
|
|
3064
3174
|
this.entityDetails.set(null);
|
|
3065
|
-
|
|
3066
|
-
if (this.detailPopover()) {
|
|
3067
|
-
const targetElement = target instanceof ElementRef ? target.nativeElement : target;
|
|
3068
|
-
this.detailPopover().target = targetElement;
|
|
3069
|
-
this.detailPopover().open();
|
|
3070
|
-
}
|
|
3071
|
-
else {
|
|
3072
|
-
// In case the view child is not ready yet, schedule an immediate open
|
|
3073
|
-
setTimeout(() => {
|
|
3074
|
-
if (this.detailPopover()) {
|
|
3075
|
-
const targetElement = target instanceof ElementRef ? target.nativeElement : target;
|
|
3076
|
-
this.detailPopover().target = targetElement;
|
|
3077
|
-
this.detailPopover().open();
|
|
3078
|
-
}
|
|
3079
|
-
}, 0);
|
|
3080
|
-
}
|
|
3081
|
-
// Fetch entity details using the query
|
|
3175
|
+
this.changeDetectorRef.detectChanges();
|
|
3082
3176
|
try {
|
|
3083
3177
|
const result = await this.queryService.fetch('Entity:GetDetails', {
|
|
3084
3178
|
entity: this.entity(),
|
|
@@ -3093,24 +3187,7 @@ class AXPEntityDetailPopoverComponent {
|
|
|
3093
3187
|
}
|
|
3094
3188
|
finally {
|
|
3095
3189
|
this.isLoadingDetails.set(false);
|
|
3096
|
-
|
|
3097
|
-
}
|
|
3098
|
-
/**
|
|
3099
|
-
* Hide the entity detail popover
|
|
3100
|
-
*/
|
|
3101
|
-
hide() {
|
|
3102
|
-
this.isDetailPopoverOpen.set(false);
|
|
3103
|
-
this.entityDetails.set(null);
|
|
3104
|
-
this.isLoadingDetails.set(false);
|
|
3105
|
-
if (this.detailPopover()) {
|
|
3106
|
-
this.detailPopover().close();
|
|
3107
|
-
}
|
|
3108
|
-
}
|
|
3109
|
-
onDetailPopoverOpenChange(event) {
|
|
3110
|
-
this.isDetailPopoverOpen.set(event);
|
|
3111
|
-
if (!event) {
|
|
3112
|
-
this.entityDetails.set(null);
|
|
3113
|
-
this.isLoadingDetails.set(false);
|
|
3190
|
+
this.changeDetectorRef.detectChanges();
|
|
3114
3191
|
}
|
|
3115
3192
|
}
|
|
3116
3193
|
async navigateToDetails() {
|
|
@@ -3119,39 +3196,15 @@ class AXPEntityDetailPopoverComponent {
|
|
|
3119
3196
|
entity: this.entity(),
|
|
3120
3197
|
data: { id: this.entityId() },
|
|
3121
3198
|
});
|
|
3122
|
-
this.
|
|
3199
|
+
this.requestClose()?.();
|
|
3123
3200
|
}
|
|
3124
3201
|
}
|
|
3125
3202
|
//#endregion
|
|
3126
3203
|
//#region ---- Helper Methods ----
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
return fromDetails;
|
|
3132
|
-
}
|
|
3133
|
-
}
|
|
3134
|
-
const presetTrimmed = preset?.trim();
|
|
3135
|
-
if (presetTrimmed && !isUnresolvedEntityDisplayTemplate(presetTrimmed)) {
|
|
3136
|
-
return presetTrimmed;
|
|
3137
|
-
}
|
|
3138
|
-
if (fallbackItem) {
|
|
3139
|
-
const fromItem = await this.resolveLookupDisplayLabelAsync(fallbackItem, entityDefinition);
|
|
3140
|
-
if (fromItem) {
|
|
3141
|
-
return fromItem;
|
|
3142
|
-
}
|
|
3143
|
-
}
|
|
3144
|
-
return presetTrimmed ?? '';
|
|
3145
|
-
}
|
|
3146
|
-
async resolveLookupDisplayLabelAsync(item, entityDefinition) {
|
|
3147
|
-
const locale = this.translation.getActiveLang() ?? 'en-US';
|
|
3148
|
-
const label = await formatLookupItemDisplayAsync(item, entityDefinition ?? null, { textField: this.textField() }, this.formatService, {
|
|
3149
|
-
expressionEvaluator: this.expressionEvaluator,
|
|
3150
|
-
contextEvalFactory: this.contextEvalFactory,
|
|
3151
|
-
translationService: this.translation,
|
|
3152
|
-
locale,
|
|
3153
|
-
}, (value) => this.translation.resolve(value));
|
|
3154
|
-
return label && !isUnresolvedEntityDisplayTemplate(label) ? label : '';
|
|
3204
|
+
resolveLookupDisplayLabel(item, entityDefinition) {
|
|
3205
|
+
const label = formatLookupItemDisplay(item, entityDefinition, { textField: this.textField() }, this.formatService, (value) => this.translation.resolve(value));
|
|
3206
|
+
const resolved = typeof label === 'string' ? label : this.translation.resolve(label);
|
|
3207
|
+
return resolved && !isUnresolvedEntityDisplayTemplate(resolved) ? resolved : '';
|
|
3155
3208
|
}
|
|
3156
3209
|
/**
|
|
3157
3210
|
* Returns true if a value is meaningful for display (non-empty/non-null).
|
|
@@ -3316,91 +3369,196 @@ class AXPEntityDetailPopoverComponent {
|
|
|
3316
3369
|
resolveDataPath(prop, data) {
|
|
3317
3370
|
const iface = prop.schema?.interface;
|
|
3318
3371
|
const expose = iface?.options?.['expose'];
|
|
3319
|
-
const textField = iface?.options?.['textField']?.trim();
|
|
3320
3372
|
if (expose?.length) {
|
|
3373
|
+
// Try expanded path first (e.g. personTitle for personTitle.title)
|
|
3321
3374
|
const textTarget = expose.find((e) => e.source !== 'id');
|
|
3322
3375
|
if (textTarget) {
|
|
3323
3376
|
const expandedPath = textTarget.target.split('.')[0];
|
|
3324
3377
|
const expandedValue = get(data, expandedPath);
|
|
3325
3378
|
if (expandedValue != null && typeof expandedValue === 'object') {
|
|
3326
|
-
|
|
3327
|
-
if (this.hasMeaningfulValue(get(expandedValue, textField))) {
|
|
3328
|
-
return expandedPath;
|
|
3329
|
-
}
|
|
3330
|
-
}
|
|
3331
|
-
else {
|
|
3332
|
-
const leaf = textTarget.target.split('.').pop();
|
|
3333
|
-
if (leaf && this.hasMeaningfulValue(get(expandedValue, leaf))) {
|
|
3334
|
-
return expandedPath;
|
|
3335
|
-
}
|
|
3336
|
-
}
|
|
3379
|
+
return expandedPath;
|
|
3337
3380
|
}
|
|
3338
3381
|
}
|
|
3339
3382
|
}
|
|
3340
3383
|
return prop.name;
|
|
3341
3384
|
}
|
|
3342
3385
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityDetailPopoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3343
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPEntityDetailPopoverComponent, isStandalone: true, selector: "axp-entity-detail-popover", inputs: { entity: { classPropertyName: "entity", publicName: "entity", isSignal: true, isRequired: true, transformFunction: null }, entityId: { classPropertyName: "entityId", publicName: "entityId", isSignal: true, isRequired: true, transformFunction: null }, textField: { classPropertyName: "textField", publicName: "textField", isSignal: true, isRequired: false, transformFunction: null }, valueField: { classPropertyName: "valueField", publicName: "valueField", isSignal: true, isRequired: false, transformFunction: null }, displayTitle: { classPropertyName: "displayTitle", publicName: "displayTitle", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, breadcrumb: { classPropertyName: "breadcrumb", publicName: "breadcrumb", isSignal: true, isRequired: false, transformFunction: null }
|
|
3386
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPEntityDetailPopoverComponent, isStandalone: true, selector: "axp-entity-detail-popover", inputs: { entity: { classPropertyName: "entity", publicName: "entity", isSignal: true, isRequired: true, transformFunction: null }, entityId: { classPropertyName: "entityId", publicName: "entityId", isSignal: true, isRequired: true, transformFunction: null }, textField: { classPropertyName: "textField", publicName: "textField", isSignal: true, isRequired: false, transformFunction: null }, valueField: { classPropertyName: "valueField", publicName: "valueField", isSignal: true, isRequired: false, transformFunction: null }, displayTitle: { classPropertyName: "displayTitle", publicName: "displayTitle", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, breadcrumb: { classPropertyName: "breadcrumb", publicName: "breadcrumb", isSignal: true, isRequired: false, transformFunction: null }, requestClose: { classPropertyName: "requestClose", publicName: "requestClose", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\n class=\"ax-lightest-surface dark:ax-dark-surface ax-p-4 ax-w-[min(600px,calc(100vw-2rem))] ax-rounded-lg ax-shadow-lg\"\n>\n <div class=\"ax-mb-4 ax-border-b ax-pb-2\">\n <h3 class=\"ax-text-base ax-font-semibold ax-text-on-lightest-surface\">\n {{ headerTitle() }}\n </h3>\n @if (breadcrumb()) {\n <div class=\"ax-text-xs ax-text-neutral-500 ax-mt-1\">{{ breadcrumb() }}</div>\n }\n </div>\n @if (isLoadingDetails()) {\n <div class=\"ax-space-y-2 ax-mb-4\">\n @for (row of loadingSkeletonRows; track row) {\n <div class=\"ax-grid ax-grid-cols-[minmax(7rem,35%)_1fr] ax-gap-x-4 ax-items-start\">\n <ax-skeleton [animated]=\"true\" class=\"ax-h-4 ax-w-2/3 ax-rounded\"></ax-skeleton>\n @if (row === 2) {\n <ax-skeleton [animated]=\"true\" class=\"ax-h-16 ax-w-full ax-rounded\"></ax-skeleton>\n } @else {\n <ax-skeleton [animated]=\"true\" class=\"ax-h-4 ax-w-full ax-rounded\"></ax-skeleton>\n }\n </div>\n }\n </div>\n <div class=\"ax-flex ax-justify-end\">\n <ax-skeleton [animated]=\"true\" class=\"ax-h-9 ax-w-28 ax-rounded\"></ax-skeleton>\n </div>\n } @else if (entityDetails()) {\n <div class=\"ax-space-y-3 ax-mb-4\">\n @if (entityDetails()?.entityData) {\n <axp-widgets-container [context]=\"entityDetails()?.entityData\">\n <div class=\"ax-space-y-2\">\n @for (item of entityPropertiesWithWidgets(); track item.name) {\n <div class=\"ax-grid ax-grid-cols-[minmax(7rem,35%)_1fr] ax-gap-x-4 ax-gap-y-1 ax-items-start\">\n <span class=\"ax-text-sm ax-font-medium ax-shrink-0\">{{ item.title | translate | async }}:</span>\n <div class=\"ax-min-w-0 ax-text-sm\">\n <ng-container axp-widget-renderer [node]=\"item.node\" [mode]=\"'view'\"></ng-container>\n </div>\n </div>\n }\n </div>\n </axp-widgets-container>\n }\n </div>\n <div class=\"ax-flex ax-gap-2 ax-justify-end ax-sm\">\n <ax-button\n [color]=\"'primary'\"\n [look]=\"'solid'\"\n [text]=\"'@general:actions.open-details.title' | translate | async\"\n (click)=\"navigateToDetails()\"\n >\n </ax-button>\n </div>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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: AXPWidgetCoreModule }, { kind: "component", type: i2.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i2.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged", "onLoad"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXSkeletonModule }, { kind: "component", type: i3.AXSkeletonComponent, selector: "ax-skeleton", inputs: ["animated"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3344
3387
|
}
|
|
3345
3388
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityDetailPopoverComponent, decorators: [{
|
|
3346
3389
|
type: Component,
|
|
3347
|
-
args: [{ selector: 'axp-entity-detail-popover', changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, AXButtonModule,
|
|
3348
|
-
}],
|
|
3390
|
+
args: [{ selector: 'axp-entity-detail-popover', changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, AXButtonModule, AXPWidgetCoreModule, AXTranslationModule, AXSkeletonModule], template: "<div\n class=\"ax-lightest-surface dark:ax-dark-surface ax-p-4 ax-w-[min(600px,calc(100vw-2rem))] ax-rounded-lg ax-shadow-lg\"\n>\n <div class=\"ax-mb-4 ax-border-b ax-pb-2\">\n <h3 class=\"ax-text-base ax-font-semibold ax-text-on-lightest-surface\">\n {{ headerTitle() }}\n </h3>\n @if (breadcrumb()) {\n <div class=\"ax-text-xs ax-text-neutral-500 ax-mt-1\">{{ breadcrumb() }}</div>\n }\n </div>\n @if (isLoadingDetails()) {\n <div class=\"ax-space-y-2 ax-mb-4\">\n @for (row of loadingSkeletonRows; track row) {\n <div class=\"ax-grid ax-grid-cols-[minmax(7rem,35%)_1fr] ax-gap-x-4 ax-items-start\">\n <ax-skeleton [animated]=\"true\" class=\"ax-h-4 ax-w-2/3 ax-rounded\"></ax-skeleton>\n @if (row === 2) {\n <ax-skeleton [animated]=\"true\" class=\"ax-h-16 ax-w-full ax-rounded\"></ax-skeleton>\n } @else {\n <ax-skeleton [animated]=\"true\" class=\"ax-h-4 ax-w-full ax-rounded\"></ax-skeleton>\n }\n </div>\n }\n </div>\n <div class=\"ax-flex ax-justify-end\">\n <ax-skeleton [animated]=\"true\" class=\"ax-h-9 ax-w-28 ax-rounded\"></ax-skeleton>\n </div>\n } @else if (entityDetails()) {\n <div class=\"ax-space-y-3 ax-mb-4\">\n @if (entityDetails()?.entityData) {\n <axp-widgets-container [context]=\"entityDetails()?.entityData\">\n <div class=\"ax-space-y-2\">\n @for (item of entityPropertiesWithWidgets(); track item.name) {\n <div class=\"ax-grid ax-grid-cols-[minmax(7rem,35%)_1fr] ax-gap-x-4 ax-gap-y-1 ax-items-start\">\n <span class=\"ax-text-sm ax-font-medium ax-shrink-0\">{{ item.title | translate | async }}:</span>\n <div class=\"ax-min-w-0 ax-text-sm\">\n <ng-container axp-widget-renderer [node]=\"item.node\" [mode]=\"'view'\"></ng-container>\n </div>\n </div>\n }\n </div>\n </axp-widgets-container>\n }\n </div>\n <div class=\"ax-flex ax-gap-2 ax-justify-end ax-sm\">\n <ax-button\n [color]=\"'primary'\"\n [look]=\"'solid'\"\n [text]=\"'@general:actions.open-details.title' | translate | async\"\n (click)=\"navigateToDetails()\"\n >\n </ax-button>\n </div>\n }\n</div>\n" }]
|
|
3391
|
+
}], propDecorators: { entity: [{ type: i0.Input, args: [{ isSignal: true, alias: "entity", required: true }] }], entityId: [{ type: i0.Input, args: [{ isSignal: true, alias: "entityId", required: true }] }], textField: [{ type: i0.Input, args: [{ isSignal: true, alias: "textField", required: false }] }], valueField: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueField", required: false }] }], displayTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayTitle", required: false }] }], item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: false }] }], breadcrumb: [{ type: i0.Input, args: [{ isSignal: true, alias: "breadcrumb", required: false }] }], requestClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "requestClose", required: false }] }] } });
|
|
3349
3392
|
|
|
3350
3393
|
class AXPEntityDetailPopoverService {
|
|
3351
3394
|
constructor() {
|
|
3352
|
-
//#region ---- Dependencies ----
|
|
3353
|
-
this.
|
|
3354
|
-
this.
|
|
3395
|
+
//#region ---- Services & Dependencies ----
|
|
3396
|
+
this.overlayService = inject(AXOverlayService);
|
|
3397
|
+
this.platform = inject(AXPlatform);
|
|
3398
|
+
this.localeService = inject(AXLocaleService);
|
|
3399
|
+
this.document = inject(DOCUMENT);
|
|
3400
|
+
this.router = inject(Router);
|
|
3355
3401
|
//#endregion
|
|
3356
3402
|
//#region ---- Private Properties ----
|
|
3357
|
-
this.
|
|
3403
|
+
this.overlayRef = null;
|
|
3404
|
+
this.componentRef = null;
|
|
3405
|
+
this.outsideClickHandler = null;
|
|
3406
|
+
this.keydownHandler = null;
|
|
3407
|
+
this.routerSubscription = null;
|
|
3358
3408
|
}
|
|
3359
3409
|
//#endregion
|
|
3360
3410
|
//#region ---- Public Methods ----
|
|
3361
3411
|
/**
|
|
3362
|
-
* Show entity detail popover
|
|
3363
|
-
* @param target - The target element to position the popover
|
|
3364
|
-
* @param options - Configuration options for the popover
|
|
3412
|
+
* Show entity detail popover anchored to the target element.
|
|
3365
3413
|
*/
|
|
3366
3414
|
async show(target, options) {
|
|
3367
|
-
|
|
3415
|
+
const anchorElement = this.resolveAnchorElement(target);
|
|
3416
|
+
if (!anchorElement) {
|
|
3417
|
+
return;
|
|
3418
|
+
}
|
|
3368
3419
|
this.hide();
|
|
3369
|
-
|
|
3370
|
-
this.
|
|
3371
|
-
|
|
3372
|
-
}
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3420
|
+
const panelClasses = ['ax-animate-fadeIn', 'ax-animate-faster', 'axp-entity-detail-popover-overlay'];
|
|
3421
|
+
if (this.platform.isDark()) {
|
|
3422
|
+
panelClasses.push('ax-dark');
|
|
3423
|
+
}
|
|
3424
|
+
const requestClose = () => {
|
|
3425
|
+
this.hide();
|
|
3426
|
+
};
|
|
3427
|
+
try {
|
|
3428
|
+
const ref = await this.overlayService.create(AXPEntityDetailPopoverComponent, {
|
|
3429
|
+
centered: false,
|
|
3430
|
+
width: 'fit-content',
|
|
3431
|
+
actionSheetStyle: true,
|
|
3432
|
+
panelClass: panelClasses,
|
|
3433
|
+
backdrop: {
|
|
3434
|
+
enabled: false,
|
|
3435
|
+
background: false,
|
|
3436
|
+
closeOnClick: false,
|
|
3437
|
+
},
|
|
3438
|
+
anchorOptions: {
|
|
3439
|
+
anchor: anchorElement,
|
|
3440
|
+
placement: this.resolveOverlayPlacement(anchorElement),
|
|
3441
|
+
offsetX: this.resolveOverlayOffsetX(anchorElement),
|
|
3442
|
+
offsetY: 8,
|
|
3443
|
+
autoFlip: true,
|
|
3444
|
+
},
|
|
3445
|
+
inputs: {
|
|
3446
|
+
entity: options.entity,
|
|
3447
|
+
entityId: options.id,
|
|
3448
|
+
textField: options.textField || 'title',
|
|
3449
|
+
valueField: options.valueField || 'id',
|
|
3450
|
+
displayTitle: options.displayTitle ?? '',
|
|
3451
|
+
breadcrumb: options.breadcrumb ?? null,
|
|
3452
|
+
item: options.item,
|
|
3453
|
+
requestClose,
|
|
3454
|
+
},
|
|
3455
|
+
onDispose: () => {
|
|
3456
|
+
this.handleOverlayDisposed();
|
|
3457
|
+
},
|
|
3458
|
+
});
|
|
3459
|
+
this.overlayRef = ref;
|
|
3460
|
+
this.componentRef = ref.instance;
|
|
3461
|
+
setTimeout(() => {
|
|
3462
|
+
ref.updatePosition();
|
|
3463
|
+
this.bindDismissHandlers(ref.overlayElement, anchorElement);
|
|
3464
|
+
}, 0);
|
|
3465
|
+
await this.componentRef.instance.loadDetails();
|
|
3466
|
+
}
|
|
3467
|
+
catch (error) {
|
|
3468
|
+
console.error('[EntityDetailPopover] Failed to open overlay:', error);
|
|
3469
|
+
this.handleOverlayDisposed();
|
|
3470
|
+
}
|
|
3387
3471
|
}
|
|
3388
|
-
/**
|
|
3389
|
-
* Hide the active popover
|
|
3390
|
-
*/
|
|
3472
|
+
/** Hide the active popover */
|
|
3391
3473
|
hide() {
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
this.
|
|
3395
|
-
this.activePopoverRef.destroy();
|
|
3396
|
-
this.activePopoverRef = null;
|
|
3474
|
+
this.removeDismissHandlers();
|
|
3475
|
+
if (this.overlayRef) {
|
|
3476
|
+
this.overlayRef.dispose();
|
|
3397
3477
|
}
|
|
3398
3478
|
}
|
|
3399
|
-
/**
|
|
3400
|
-
* Check if a popover is currently active
|
|
3401
|
-
*/
|
|
3479
|
+
/** Whether a popover is currently active */
|
|
3402
3480
|
get isActive() {
|
|
3403
|
-
return this.
|
|
3481
|
+
return this.overlayRef !== null;
|
|
3482
|
+
}
|
|
3483
|
+
//#endregion
|
|
3484
|
+
//#region ---- Utility Methods ----
|
|
3485
|
+
resolveAnchorElement(target) {
|
|
3486
|
+
if (target instanceof ElementRef) {
|
|
3487
|
+
return target.nativeElement;
|
|
3488
|
+
}
|
|
3489
|
+
if (target instanceof HTMLElement) {
|
|
3490
|
+
return target;
|
|
3491
|
+
}
|
|
3492
|
+
const hostCandidate = target;
|
|
3493
|
+
if (typeof hostCandidate.getHostElement === 'function') {
|
|
3494
|
+
return hostCandidate.getHostElement();
|
|
3495
|
+
}
|
|
3496
|
+
return null;
|
|
3497
|
+
}
|
|
3498
|
+
/** Mirror popover placement for RTL so the panel aligns with the anchor's inline-start edge. */
|
|
3499
|
+
resolveOverlayPlacement(anchor) {
|
|
3500
|
+
return this.isRtlContext(anchor) ? 'bottom-end' : 'bottom-start';
|
|
3501
|
+
}
|
|
3502
|
+
resolveOverlayOffsetX(anchor) {
|
|
3503
|
+
return this.isRtlContext(anchor) ? -8 : 8;
|
|
3504
|
+
}
|
|
3505
|
+
isRtlContext(anchor) {
|
|
3506
|
+
if (this.localeService.activeProfile()?.i18nMeta?.rtl === true) {
|
|
3507
|
+
return true;
|
|
3508
|
+
}
|
|
3509
|
+
const dir = getComputedStyle(anchor).direction || this.document.documentElement.getAttribute('dir');
|
|
3510
|
+
return dir === 'rtl';
|
|
3511
|
+
}
|
|
3512
|
+
bindDismissHandlers(overlayElement, anchor) {
|
|
3513
|
+
this.removeDismissHandlers();
|
|
3514
|
+
this.keydownHandler = (event) => {
|
|
3515
|
+
if (event.key === 'Escape') {
|
|
3516
|
+
this.hide();
|
|
3517
|
+
}
|
|
3518
|
+
};
|
|
3519
|
+
this.document.addEventListener('keydown', this.keydownHandler);
|
|
3520
|
+
this.outsideClickHandler = (event) => {
|
|
3521
|
+
const target = event.target;
|
|
3522
|
+
if (!target || !overlayElement) {
|
|
3523
|
+
return;
|
|
3524
|
+
}
|
|
3525
|
+
if (this.isInsideInteractiveSurface(target, overlayElement, anchor)) {
|
|
3526
|
+
return;
|
|
3527
|
+
}
|
|
3528
|
+
this.hide();
|
|
3529
|
+
};
|
|
3530
|
+
this.document.addEventListener('mousedown', this.outsideClickHandler);
|
|
3531
|
+
this.routerSubscription = this.router.events
|
|
3532
|
+
.pipe(filter((event) => event instanceof NavigationStart))
|
|
3533
|
+
.subscribe(() => {
|
|
3534
|
+
this.hide();
|
|
3535
|
+
});
|
|
3536
|
+
}
|
|
3537
|
+
/** Ignore clicks on the anchor, overlay panel, or nested dropdown menus. */
|
|
3538
|
+
isInsideInteractiveSurface(target, overlayElement, anchor) {
|
|
3539
|
+
if (anchor.contains(target) || overlayElement.contains(target)) {
|
|
3540
|
+
return true;
|
|
3541
|
+
}
|
|
3542
|
+
return Boolean(target.closest('ax-dropdown-panel, ax-button-item-list, ax-button-item, ax-dropdown-button, .ax-dropdown-panel'));
|
|
3543
|
+
}
|
|
3544
|
+
removeDismissHandlers() {
|
|
3545
|
+
if (this.keydownHandler) {
|
|
3546
|
+
this.document.removeEventListener('keydown', this.keydownHandler);
|
|
3547
|
+
this.keydownHandler = null;
|
|
3548
|
+
}
|
|
3549
|
+
if (this.outsideClickHandler) {
|
|
3550
|
+
this.document.removeEventListener('mousedown', this.outsideClickHandler);
|
|
3551
|
+
this.outsideClickHandler = null;
|
|
3552
|
+
}
|
|
3553
|
+
if (this.routerSubscription) {
|
|
3554
|
+
this.routerSubscription.unsubscribe();
|
|
3555
|
+
this.routerSubscription = null;
|
|
3556
|
+
}
|
|
3557
|
+
}
|
|
3558
|
+
handleOverlayDisposed() {
|
|
3559
|
+
this.removeDismissHandlers();
|
|
3560
|
+
this.overlayRef = null;
|
|
3561
|
+
this.componentRef = null;
|
|
3404
3562
|
}
|
|
3405
3563
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityDetailPopoverService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3406
3564
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityDetailPopoverService, providedIn: 'root' }); }
|
|
@@ -3408,7 +3566,7 @@ class AXPEntityDetailPopoverService {
|
|
|
3408
3566
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityDetailPopoverService, decorators: [{
|
|
3409
3567
|
type: Injectable,
|
|
3410
3568
|
args: [{
|
|
3411
|
-
providedIn: 'root'
|
|
3569
|
+
providedIn: 'root',
|
|
3412
3570
|
}]
|
|
3413
3571
|
}] });
|
|
3414
3572
|
|
|
@@ -3897,6 +4055,7 @@ class AXPEntityPreloadFiltersContainerComponent extends AXPPageLayoutBaseCompone
|
|
|
3897
4055
|
super(...arguments);
|
|
3898
4056
|
//#region ---- Services & Dependencies ----
|
|
3899
4057
|
this.route = inject(ActivatedRoute);
|
|
4058
|
+
this.router = inject(Router);
|
|
3900
4059
|
this.entityService = inject(AXPEntityService);
|
|
3901
4060
|
this.filterOperatorMiddleware = inject(AXPFilterOperatorMiddlewareService);
|
|
3902
4061
|
//#endregion
|
|
@@ -4315,7 +4474,7 @@ class AXPEntityCommandTriggerViewModel {
|
|
|
4315
4474
|
this.priority = action.priority;
|
|
4316
4475
|
this.title = action.title;
|
|
4317
4476
|
this.separated = action.separated ?? false;
|
|
4318
|
-
this.color =
|
|
4477
|
+
this.color = action.color ?? resolvedLook.color;
|
|
4319
4478
|
this.icon = action.icon ?? resolvedLook.icon;
|
|
4320
4479
|
this.hidden = action.hidden ?? false;
|
|
4321
4480
|
this.disabled = action.disabled ?? false;
|
|
@@ -5185,7 +5344,7 @@ class AXPEntityMasterListViewModel {
|
|
|
5185
5344
|
}
|
|
5186
5345
|
}
|
|
5187
5346
|
//#endregion
|
|
5188
|
-
|
|
5347
|
+
createExpressionScope(data) {
|
|
5189
5348
|
return {
|
|
5190
5349
|
context: {
|
|
5191
5350
|
eval: (path) => get(data, path),
|
|
@@ -5196,20 +5355,11 @@ class AXPEntityMasterListViewModel {
|
|
|
5196
5355
|
},
|
|
5197
5356
|
};
|
|
5198
5357
|
}
|
|
5199
|
-
createDisplayExpressionScope(data) {
|
|
5200
|
-
return {
|
|
5201
|
-
context: this.contextEvalFactory.createScope((data ?? {})),
|
|
5202
|
-
list: {
|
|
5203
|
-
view: () => this.view().name,
|
|
5204
|
-
views: () => this.views().map((v) => ({ name: v.name, title: v.title })),
|
|
5205
|
-
},
|
|
5206
|
-
};
|
|
5207
|
-
}
|
|
5208
5358
|
async resolveCommandNameExpression(commandName, data) {
|
|
5209
5359
|
if (!commandName || !commandName.includes('{{')) {
|
|
5210
5360
|
return commandName;
|
|
5211
5361
|
}
|
|
5212
|
-
const scope = this.
|
|
5362
|
+
const scope = this.createExpressionScope(data);
|
|
5213
5363
|
const result = await this.expressionEvaluator.evaluate({ value: commandName }, scope);
|
|
5214
5364
|
const resolved = result?.value;
|
|
5215
5365
|
return typeof resolved === 'string' && resolved.trim() !== '' ? resolved : commandName;
|
|
@@ -5218,7 +5368,7 @@ class AXPEntityMasterListViewModel {
|
|
|
5218
5368
|
if (!title || !title.includes('{{')) {
|
|
5219
5369
|
return title;
|
|
5220
5370
|
}
|
|
5221
|
-
const scope = this.
|
|
5371
|
+
const scope = this.createExpressionScope(data);
|
|
5222
5372
|
const result = await this.expressionEvaluator.evaluate({ value: title }, scope);
|
|
5223
5373
|
const resolved = result?.value;
|
|
5224
5374
|
return typeof resolved === 'string' && resolved.trim() !== '' ? resolved : title;
|
|
@@ -5233,7 +5383,7 @@ class AXPEntityMasterListViewModel {
|
|
|
5233
5383
|
return '';
|
|
5234
5384
|
}
|
|
5235
5385
|
if (value.includes('{{')) {
|
|
5236
|
-
const scope = this.
|
|
5386
|
+
const scope = this.createExpressionScope(rowData);
|
|
5237
5387
|
const result = await this.expressionEvaluator.evaluate(value, scope);
|
|
5238
5388
|
if (result === false) {
|
|
5239
5389
|
return '';
|
|
@@ -5271,7 +5421,7 @@ class AXPEntityMasterListViewModel {
|
|
|
5271
5421
|
if (color == null || color === '') {
|
|
5272
5422
|
return 'default';
|
|
5273
5423
|
}
|
|
5274
|
-
const scope = this.
|
|
5424
|
+
const scope = this.createExpressionScope(rowData);
|
|
5275
5425
|
const result = await this.expressionEvaluator.evaluate(color, scope);
|
|
5276
5426
|
if (result === false || result == null) {
|
|
5277
5427
|
return 'default';
|
|
@@ -5319,7 +5469,6 @@ class AXPEntityMasterListViewModel {
|
|
|
5319
5469
|
this.settings = this.injector.get(AXPSettingsService);
|
|
5320
5470
|
this.widgetResolver = this.injector.get(AXPWidgetRegistryService);
|
|
5321
5471
|
this.expressionEvaluator = this.injector.get(AXPExpressionEvaluatorService);
|
|
5322
|
-
this.contextEvalFactory = this.injector.get(AXPContextEvalFactory);
|
|
5323
5472
|
this.translation = this.injector.get(AXTranslationService);
|
|
5324
5473
|
this.commandService = this.injector.get(AXPCommandService);
|
|
5325
5474
|
this.eventService = this.injector.get(AXPBroadcastEventService);
|
|
@@ -5542,7 +5691,7 @@ class AXPEntityMasterListViewModel {
|
|
|
5542
5691
|
this.sortedFields = signal([], ...(ngDevMode ? [{ debugName: "sortedFields" }] : /* istanbul ignore next */ []));
|
|
5543
5692
|
//#endregion
|
|
5544
5693
|
this.evaluateExpressions = async (options, data) => {
|
|
5545
|
-
const scope = this.
|
|
5694
|
+
const scope = this.createExpressionScope(data);
|
|
5546
5695
|
return await this.expressionEvaluator.evaluate(options, scope);
|
|
5547
5696
|
};
|
|
5548
5697
|
this.workflow.events$
|
|
@@ -5932,7 +6081,7 @@ class AXPEntityMasterListViewModel {
|
|
|
5932
6081
|
this.selectedCategory.set(category);
|
|
5933
6082
|
}
|
|
5934
6083
|
async getPrimaryActions() {
|
|
5935
|
-
const scope = this.
|
|
6084
|
+
const scope = this.createExpressionScope(null);
|
|
5936
6085
|
const actions = await Promise.all(this.allActions()
|
|
5937
6086
|
.filter((a) => a.priority == 'primary' &&
|
|
5938
6087
|
((a.scope == AXPEntityCommandScope.Selected && this.hasSelectedItems()) ||
|
|
@@ -5949,7 +6098,7 @@ class AXPEntityMasterListViewModel {
|
|
|
5949
6098
|
return actions.filter(Boolean);
|
|
5950
6099
|
}
|
|
5951
6100
|
async getSecondaryActions() {
|
|
5952
|
-
const scope = this.
|
|
6101
|
+
const scope = this.createExpressionScope(null);
|
|
5953
6102
|
const actions = await Promise.all(this.allActions()
|
|
5954
6103
|
.filter((a) => a.priority == 'secondary' &&
|
|
5955
6104
|
((a.scope == AXPEntityCommandScope.Selected && this.hasSelectedItems()) ||
|
|
@@ -5966,7 +6115,7 @@ class AXPEntityMasterListViewModel {
|
|
|
5966
6115
|
return actions.filter(Boolean);
|
|
5967
6116
|
}
|
|
5968
6117
|
async secondaryRowActions(rowData) {
|
|
5969
|
-
const scope = this.
|
|
6118
|
+
const scope = this.createExpressionScope(rowData);
|
|
5970
6119
|
const actions = await Promise.all(this.allActions()
|
|
5971
6120
|
.filter((a) => a.scope === AXPEntityCommandScope.Individual && a.priority === 'secondary')
|
|
5972
6121
|
.map(async (a) => {
|
|
@@ -6989,9 +7138,6 @@ class AXPEntityModifySectionPopupAction extends AXPWorkflowAction {
|
|
|
6989
7138
|
this.popupService = inject(AXPopupService);
|
|
6990
7139
|
this.platform = inject(AXPlatform);
|
|
6991
7140
|
this.translateService = inject(AXTranslationService);
|
|
6992
|
-
this.formatService = inject(AXFormatService);
|
|
6993
|
-
this.expressionEvaluator = inject(AXPExpressionEvaluatorService);
|
|
6994
|
-
this.contextEvalFactory = inject(AXPContextEvalFactory);
|
|
6995
7141
|
this.entityRegistery = inject(AXPEntityDefinitionRegistryService);
|
|
6996
7142
|
this.config = inject(AXP_ENTITY_CONFIG_TOKEN);
|
|
6997
7143
|
this.factory = inject(AXPEntityMasterUpdateViewModelFactory);
|
|
@@ -7009,7 +7155,7 @@ class AXPEntityModifySectionPopupAction extends AXPWorkflowAction {
|
|
|
7009
7155
|
title: headerTitle
|
|
7010
7156
|
? headerTitle
|
|
7011
7157
|
: title ??
|
|
7012
|
-
(
|
|
7158
|
+
`${this.translateService.translateSync('entity.modify')} ${this.translateService.translateSync(entityRef.formats.individual)}`,
|
|
7013
7159
|
size: this.platform.is('Mobile') || this.platform.is('SM') ? 'full' : 'md',
|
|
7014
7160
|
data: {
|
|
7015
7161
|
vm,
|
|
@@ -8023,7 +8169,7 @@ class AXMAttachmentsPageComponentProvider {
|
|
|
8023
8169
|
return [
|
|
8024
8170
|
{
|
|
8025
8171
|
key: ATTACHMENTS_PAGE_COMPONENT_KEY,
|
|
8026
|
-
loader: () => import('./acorex-platform-layout-entity-attachments-page.component-
|
|
8172
|
+
loader: () => import('./acorex-platform-layout-entity-attachments-page.component-CwG6n_Yb.mjs').then((m) => m.AXMAttachmentsPageComponent),
|
|
8027
8173
|
},
|
|
8028
8174
|
];
|
|
8029
8175
|
}
|
|
@@ -10003,7 +10149,7 @@ class AXPEntityCategoryTreeSelectorComponent extends AXBasePageComponent {
|
|
|
10003
10149
|
></ax-button>
|
|
10004
10150
|
</ax-suffix>
|
|
10005
10151
|
</ax-footer>
|
|
10006
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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: AXBadgeModule }, { kind: "component", type: i2$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "ngmodule", type: AXCheckBoxModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$
|
|
10152
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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: AXBadgeModule }, { kind: "component", type: i2$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "ngmodule", type: AXCheckBoxModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$2.AXDecoratorIconComponent, selector: "ax-icon", 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: AXSearchBoxModule }, { kind: "component", type: i4.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: "ngmodule", type: AXSkeletonModule }, { kind: "component", type: i3.AXSkeletonComponent, selector: "ax-skeleton", inputs: ["animated"] }, { kind: "component", type: AXTreeViewComponent, selector: "ax-tree-view", inputs: ["datasource", "selectMode", "selectionBehavior", "dragArea", "dragBehavior", "showIcons", "showChildrenBadge", "expandedIcon", "collapsedIcon", "indentSize", "look", "nodeTemplate", "idField", "titleField", "tooltipField", "iconField", "expandedField", "selectedField", "indeterminateField", "disabledField", "hiddenField", "childrenField", "childrenCountField", "dataField", "inheritDisabled", "expandOnDoubleClick", "doubleClickDuration", "tooltipDelay", "controlledSelection", "selectedIds"], outputs: ["datasourceChange", "selectedIdsChange", "onBeforeDrop", "onNodeToggle", "onNodeSelect", "onNodeDoubleClick", "onNodeClick", "onSelectionChange", "onOrderChange", "onMoveChange", "onItemsChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXPStateMessageComponent, selector: "axp-state-message", inputs: ["mode", "icon", "title", "description", "look"] }, { kind: "ngmodule", type: FormsModule }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10007
10153
|
}
|
|
10008
10154
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityCategoryTreeSelectorComponent, decorators: [{
|
|
10009
10155
|
type: Component,
|
|
@@ -10444,7 +10590,7 @@ class AXPEntityCategoryWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
10444
10590
|
}
|
|
10445
10591
|
//#endregion
|
|
10446
10592
|
//#region ---- Public Methods ----
|
|
10447
|
-
async showItemDetail(item, index) {
|
|
10593
|
+
async showItemDetail(item, index, anchor) {
|
|
10448
10594
|
if (this.options['disableDetailPopover']) {
|
|
10449
10595
|
return;
|
|
10450
10596
|
}
|
|
@@ -10453,7 +10599,7 @@ class AXPEntityCategoryWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
10453
10599
|
this.selectedItemIndex.set(index);
|
|
10454
10600
|
const entityKey = this.entity();
|
|
10455
10601
|
if (entityKey && id) {
|
|
10456
|
-
await this.entityDetailPopoverService.show(this.host, {
|
|
10602
|
+
await this.entityDetailPopoverService.show(anchor ?? this.host.nativeElement, {
|
|
10457
10603
|
entity: entityKey,
|
|
10458
10604
|
id: id,
|
|
10459
10605
|
textField: this.textField(),
|
|
@@ -10717,7 +10863,7 @@ class AXPEntityCategoryWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
10717
10863
|
}
|
|
10718
10864
|
</div>
|
|
10719
10865
|
</ng-template>
|
|
10720
|
-
`, isInline: true, dependencies: [{ kind: "component", type: AXPColumnItemListComponent, selector: "axp-column-item-list", inputs: ["items", "itemTemplate"], outputs: ["itemClick"] }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i2$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$
|
|
10866
|
+
`, isInline: true, dependencies: [{ kind: "component", type: AXPColumnItemListComponent, selector: "axp-column-item-list", inputs: ["items", "itemTemplate"], outputs: ["itemClick"] }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i2$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "ngmodule", type: AXDecoratorModule }, { 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: AXTooltipModule }, { kind: "directive", type: i3$3.AXTooltipDirective, selector: "[axTooltip]", inputs: ["axTooltipDisabled", "axTooltip", "axTooltipContext", "axTooltipPlacement", "axTooltipOffsetX", "axTooltipOffsetY", "axTooltipOpenAfter", "axTooltipCloseAfter"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10721
10867
|
}
|
|
10722
10868
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityCategoryWidgetColumnComponent, decorators: [{
|
|
10723
10869
|
type: Component,
|
|
@@ -10943,7 +11089,7 @@ class AXPTruncatedBreadcrumbComponent {
|
|
|
10943
11089
|
}
|
|
10944
11090
|
}
|
|
10945
11091
|
</div>
|
|
10946
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$
|
|
11092
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i3$1.AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
10947
11093
|
}
|
|
10948
11094
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTruncatedBreadcrumbComponent, decorators: [{
|
|
10949
11095
|
type: Component,
|
|
@@ -11520,7 +11666,7 @@ class AXPEntityCategoryWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
11520
11666
|
</button>
|
|
11521
11667
|
</div>
|
|
11522
11668
|
</ng-template>
|
|
11523
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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$
|
|
11669
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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: i1$2.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.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: "component", type: AXPTruncatedBreadcrumbComponent, selector: "axp-truncated-breadcrumb", inputs: ["sections", "characterLimit", "sectionLimit", "separatorIcon", "ellipsisIcon", "eyeIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
11524
11670
|
}
|
|
11525
11671
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityCategoryWidgetEditComponent, decorators: [{
|
|
11526
11672
|
type: Component,
|
|
@@ -11691,7 +11837,7 @@ class AXPEntityCategoryWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
11691
11837
|
<span class="ax-text-muted">---</span>
|
|
11692
11838
|
}
|
|
11693
11839
|
}
|
|
11694
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i1$2.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i2$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type:
|
|
11840
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i1$2.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i2$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i3$1.AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
11695
11841
|
}
|
|
11696
11842
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityCategoryWidgetViewComponent, decorators: [{
|
|
11697
11843
|
type: Component,
|
|
@@ -11949,7 +12095,7 @@ class AXPEntityDefinitionProviderWidgetEditComponent extends AXPProviderSelectWi
|
|
|
11949
12095
|
return parent ? `${parent}.${fieldName}` : fieldName;
|
|
11950
12096
|
}
|
|
11951
12097
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityDefinitionProviderWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
11952
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPEntityDefinitionProviderWidgetEditComponent, isStandalone: true, selector: "axp-entity-definition-provider-widget-edit", usesInheritance: true, ngImport: i0, template: "<ax-select-box\n [placeholder]=\"(placeholder() | translate | async) ?? ''\"\n [dataSource]=\"dataSource()\"\n [disabled]=\"disabled()\"\n [valueField]=\"valueField()\"\n [textField]=\"textField()\"\n [textTemplate]=\"textTemplate()\"\n [multiple]=\"multiple()\"\n [readonly]=\"readonly()\"\n [ngModel]=\"filterMode() ? selectFilterDisplayValue() : getValue()\"\n (onValueChanged)=\"handleValueChange($event)\"\n>\n @if (allowSearch()) {\n <ax-search-box\n [autoSearch]=\"false\"\n [ngModel]=\"searchValue()\"\n (onValueChanged)=\"handleSearchValueChange($event)\"\n ><ax-clear-button></ax-clear-button\n ></ax-search-box>\n }\n @if (hasClearButton() && !filterMode()) {\n <ax-clear-button></ax-clear-button>\n }\n @for (validation of validationRules(); track $index) {\n <ax-validation-rule\n [rule]=\"validation.rule\"\n [message]=\"validation.options?.message\"\n [options]=\"validation.options\"\n ></ax-validation-rule>\n }\n</ax-select-box>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i2$2.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: "ngmodule", type: AXFormModule }, { kind: "directive", type: i5$1.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message", "disabled"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$
|
|
12098
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPEntityDefinitionProviderWidgetEditComponent, isStandalone: true, selector: "axp-entity-definition-provider-widget-edit", usesInheritance: true, ngImport: i0, template: "<ax-select-box\n [placeholder]=\"(placeholder() | translate | async) ?? ''\"\n [dataSource]=\"dataSource()\"\n [disabled]=\"disabled()\"\n [valueField]=\"valueField()\"\n [textField]=\"textField()\"\n [textTemplate]=\"textTemplate()\"\n [multiple]=\"multiple()\"\n [readonly]=\"readonly()\"\n [ngModel]=\"filterMode() ? selectFilterDisplayValue() : getValue()\"\n (onValueChanged)=\"handleValueChange($event)\"\n>\n @if (allowSearch()) {\n <ax-search-box\n [autoSearch]=\"false\"\n [ngModel]=\"searchValue()\"\n (onValueChanged)=\"handleSearchValueChange($event)\"\n ><ax-clear-button></ax-clear-button\n ></ax-search-box>\n }\n @if (hasClearButton() && !filterMode()) {\n <ax-clear-button></ax-clear-button>\n }\n @for (validation of validationRules(); track $index) {\n <ax-validation-rule\n [rule]=\"validation.rule\"\n [message]=\"validation.options?.message\"\n [options]=\"validation.options\"\n ></ax-validation-rule>\n }\n</ax-select-box>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i2$2.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: "ngmodule", type: AXFormModule }, { kind: "directive", type: i5$1.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message", "disabled"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$2.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "ngmodule", type: AXSearchBoxModule }, { kind: "component", type: i4.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: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i3$1.AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
11953
12099
|
}
|
|
11954
12100
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityDefinitionProviderWidgetEditComponent, decorators: [{
|
|
11955
12101
|
type: Component,
|
|
@@ -12246,7 +12392,6 @@ class AXPEntityListTableService {
|
|
|
12246
12392
|
const evaluatedOptions = await this.evaluateExpressions(action?.options, data);
|
|
12247
12393
|
const options = this.mergeRelatedListFormOptions(command, evaluatedOptions, relatedListExcludeProperties);
|
|
12248
12394
|
if (this.commandService.exists(command)) {
|
|
12249
|
-
const excludeProperties = options['excludeProperties'];
|
|
12250
12395
|
await this.commandService.execute(command, {
|
|
12251
12396
|
__context__: {
|
|
12252
12397
|
entity: getEntityInfo(entity).source,
|
|
@@ -12263,7 +12408,6 @@ class AXPEntityListTableService {
|
|
|
12263
12408
|
},
|
|
12264
12409
|
options,
|
|
12265
12410
|
metadata: action?.metadata,
|
|
12266
|
-
...(excludeProperties?.length ? { excludeProperties } : {}),
|
|
12267
12411
|
});
|
|
12268
12412
|
}
|
|
12269
12413
|
else {
|
|
@@ -12289,7 +12433,7 @@ class AXPEntityListTableService {
|
|
|
12289
12433
|
mergeRelatedListFormOptions(command, evaluatedOptions, relatedListExcludeProperties) {
|
|
12290
12434
|
const exclusions = relatedListExcludeProperties?.filter(Boolean);
|
|
12291
12435
|
if (!exclusions?.length ||
|
|
12292
|
-
(command !== 'Entity:Create' && command !== 'Entity:Update'
|
|
12436
|
+
(command !== 'Entity:Create' && command !== 'Entity:Update')) {
|
|
12293
12437
|
return evaluatedOptions;
|
|
12294
12438
|
}
|
|
12295
12439
|
return {
|
|
@@ -13287,7 +13431,7 @@ class AXPEntityListWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
13287
13431
|
></ng-container>
|
|
13288
13432
|
}
|
|
13289
13433
|
</div>
|
|
13290
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$
|
|
13434
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$2.AXDecoratorIconComponent, selector: "ax-icon", 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: AXPWidgetCoreModule }, { kind: "directive", type: i2.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged", "onLoad"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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: "component", type: i1.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i1.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items", "closeParentOnClick", "lockOnLoading"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i3$4.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
13291
13435
|
}
|
|
13292
13436
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityListWidgetViewComponent, decorators: [{
|
|
13293
13437
|
type: Component,
|
|
@@ -13653,7 +13797,7 @@ class AXPPageComponentWidgetViewComponent extends AXPBaseWidgetComponent {
|
|
|
13653
13797
|
[options]="pageOptions()"
|
|
13654
13798
|
(componentReady)="handleComponentReady()"
|
|
13655
13799
|
></div>
|
|
13656
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "directive", type: AXPPageComponentRendererDirective, selector: "[axp-page-component-renderer]", inputs: ["componentKey", "rootContext", "pageConfig", "options"], outputs: ["componentReady"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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: "component", type: i1.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i1.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items", "closeParentOnClick", "lockOnLoading"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$
|
|
13800
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "directive", type: AXPPageComponentRendererDirective, selector: "[axp-page-component-renderer]", inputs: ["componentKey", "rootContext", "pageConfig", "options"], outputs: ["componentReady"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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: "component", type: i1.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i1.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items", "closeParentOnClick", "lockOnLoading"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDecoratorModule }, { 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: AXDropdownModule }, { kind: "component", type: i3$4.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i3$1.AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
13657
13801
|
}
|
|
13658
13802
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPPageComponentWidgetViewComponent, decorators: [{
|
|
13659
13803
|
type: Component,
|
|
@@ -13833,8 +13977,6 @@ class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
13833
13977
|
super(...arguments);
|
|
13834
13978
|
this.formatService = inject(AXFormatService);
|
|
13835
13979
|
this.translation = inject(AXTranslationService);
|
|
13836
|
-
this.expressionEvaluator = inject(AXPExpressionEvaluatorService);
|
|
13837
|
-
this.contextEvalFactory = inject(AXPContextEvalFactory);
|
|
13838
13980
|
this.entityResolver = inject(AXPEntityDefinitionRegistryService);
|
|
13839
13981
|
this.entity = computed(() => this.options()['entity'], ...(ngDevMode ? [{ debugName: "entity" }] : /* istanbul ignore next */ []));
|
|
13840
13982
|
this.multiple = computed(() => this.options()['multiple'], ...(ngDevMode ? [{ debugName: "multiple" }] : /* istanbul ignore next */ []));
|
|
@@ -13868,7 +14010,7 @@ class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
13868
14010
|
if (typeof item == 'object') {
|
|
13869
14011
|
return {
|
|
13870
14012
|
id: item[this.valueField()],
|
|
13871
|
-
text:
|
|
14013
|
+
text: this.getDisplayRaw(item),
|
|
13872
14014
|
};
|
|
13873
14015
|
}
|
|
13874
14016
|
const def = this.entityDef();
|
|
@@ -13879,7 +14021,7 @@ class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
13879
14021
|
this.loading.set(false);
|
|
13880
14022
|
return {
|
|
13881
14023
|
id: fetchedItem[this.valueField()],
|
|
13882
|
-
text:
|
|
14024
|
+
text: this.getDisplayRaw(fetchedItem),
|
|
13883
14025
|
};
|
|
13884
14026
|
}
|
|
13885
14027
|
return {
|
|
@@ -13887,17 +14029,12 @@ class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
13887
14029
|
text: item,
|
|
13888
14030
|
};
|
|
13889
14031
|
}
|
|
13890
|
-
|
|
13891
|
-
const
|
|
13892
|
-
return formatLookupItemDisplayAsync(item, this.entityDef(), {
|
|
14032
|
+
getDisplayRaw(item) {
|
|
14033
|
+
const text = formatLookupItemDisplay(item, this.entityDef(), {
|
|
13893
14034
|
displayFormat: this.options()['displayFormat'],
|
|
13894
14035
|
textField: this.textField(),
|
|
13895
|
-
}, this.formatService,
|
|
13896
|
-
|
|
13897
|
-
contextEvalFactory: this.contextEvalFactory,
|
|
13898
|
-
translationService: this.translation,
|
|
13899
|
-
locale,
|
|
13900
|
-
}, (value) => this.translation.resolve(value));
|
|
14036
|
+
}, this.formatService, (value) => this.translation.resolve(value));
|
|
14037
|
+
return text;
|
|
13901
14038
|
}
|
|
13902
14039
|
get __class() {
|
|
13903
14040
|
const cls = {};
|
|
@@ -13923,7 +14060,7 @@ class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
13923
14060
|
<span class="ax-text-muted">---</span>
|
|
13924
14061
|
}
|
|
13925
14062
|
}
|
|
13926
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i1$2.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i2$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type:
|
|
14063
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i1$2.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i2$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i3$1.AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
13927
14064
|
}
|
|
13928
14065
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLookupWidgetViewComponent, decorators: [{
|
|
13929
14066
|
type: Component,
|
|
@@ -14979,7 +15116,7 @@ class AXPLookupWidgetSelectComponent extends LookupWidgetLookBase {
|
|
|
14979
15116
|
</ax-select-box>
|
|
14980
15117
|
</div>
|
|
14981
15118
|
}
|
|
14982
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "directive", type: i5$1.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message", "disabled"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$
|
|
15119
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "directive", type: i5$1.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message", "disabled"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$2.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i2$2.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: i3$1.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
14983
15120
|
}
|
|
14984
15121
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLookupWidgetSelectComponent, decorators: [{
|
|
14985
15122
|
type: Component,
|
|
@@ -15047,8 +15184,6 @@ class AXPLookupWidgetTagboxComponent extends LookupWidgetLookBase {
|
|
|
15047
15184
|
this.formatService = inject(AXFormatService);
|
|
15048
15185
|
this.translateService = inject(AXTranslationService);
|
|
15049
15186
|
this.entityDataSelectorService = inject(AXPEntityDataSelectorService);
|
|
15050
|
-
this.expressionEvaluator = inject(AXPExpressionEvaluatorService);
|
|
15051
|
-
this.contextEvalFactory = inject(AXPContextEvalFactory);
|
|
15052
15187
|
//#endregion
|
|
15053
15188
|
//#region ---- Inputs ----
|
|
15054
15189
|
this.selectedItems = input.required(...(ngDevMode ? [{ debugName: "selectedItems" }] : /* istanbul ignore next */ []));
|
|
@@ -15078,8 +15213,6 @@ class AXPLookupWidgetTagboxComponent extends LookupWidgetLookBase {
|
|
|
15078
15213
|
//#region ---- Internal State ----
|
|
15079
15214
|
this.searchTerm = signal('', ...(ngDevMode ? [{ debugName: "searchTerm" }] : /* istanbul ignore next */ []));
|
|
15080
15215
|
this.isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
15081
|
-
this.itemLabels = signal({}, ...(ngDevMode ? [{ debugName: "itemLabels" }] : /* istanbul ignore next */ []));
|
|
15082
|
-
this.itemLabelsVersion = 0;
|
|
15083
15216
|
//#endregion
|
|
15084
15217
|
//#region ---- View Children ----
|
|
15085
15218
|
this.tagBox = viewChild('tagBoxComponent', ...(ngDevMode ? [{ debugName: "tagBox" }] : /* istanbul ignore next */ []));
|
|
@@ -15102,31 +15235,6 @@ class AXPLookupWidgetTagboxComponent extends LookupWidgetLookBase {
|
|
|
15102
15235
|
}
|
|
15103
15236
|
}
|
|
15104
15237
|
}, ...(ngDevMode ? [{ debugName: "#focusEffect" }] : /* istanbul ignore next */ []));
|
|
15105
|
-
this.#itemLabelsEffect = effect(() => {
|
|
15106
|
-
void this.translateService.getActiveLang();
|
|
15107
|
-
const items = this.selectedItemsValue();
|
|
15108
|
-
const entityDef = this.entityDef()();
|
|
15109
|
-
const valueField = this.valueFieldValue();
|
|
15110
|
-
const version = ++this.itemLabelsVersion;
|
|
15111
|
-
void Promise.all(items.map(async (item) => {
|
|
15112
|
-
const id = String(get(item, valueField) ?? '');
|
|
15113
|
-
const label = await formatLookupItemDisplayAsync(item, entityDef, {
|
|
15114
|
-
displayFormat: this.displayFormatValue(),
|
|
15115
|
-
textField: this.displayFieldValue(),
|
|
15116
|
-
}, this.formatService, {
|
|
15117
|
-
expressionEvaluator: this.expressionEvaluator,
|
|
15118
|
-
contextEvalFactory: this.contextEvalFactory,
|
|
15119
|
-
translationService: this.translateService,
|
|
15120
|
-
locale: this.translateService.getActiveLang() ?? 'en-US',
|
|
15121
|
-
}, (value) => this.translateService.resolve(value));
|
|
15122
|
-
return [id, label];
|
|
15123
|
-
})).then((entries) => {
|
|
15124
|
-
if (version !== this.itemLabelsVersion) {
|
|
15125
|
-
return;
|
|
15126
|
-
}
|
|
15127
|
-
this.itemLabels.set(Object.fromEntries(entries));
|
|
15128
|
-
});
|
|
15129
|
-
}, ...(ngDevMode ? [{ debugName: "#itemLabelsEffect" }] : /* istanbul ignore next */ []));
|
|
15130
15238
|
//#endregion
|
|
15131
15239
|
//#region ---- Computed Properties ----
|
|
15132
15240
|
this.tagBoxComponent = computed(() => this.tagBox(), ...(ngDevMode ? [{ debugName: "tagBoxComponent" }] : /* istanbul ignore next */ []));
|
|
@@ -15142,7 +15250,6 @@ class AXPLookupWidgetTagboxComponent extends LookupWidgetLookBase {
|
|
|
15142
15250
|
this.placeholderValue = computed(() => this.placeholder()?.() ?? '', ...(ngDevMode ? [{ debugName: "placeholderValue" }] : /* istanbul ignore next */ []));
|
|
15143
15251
|
}
|
|
15144
15252
|
#focusEffect;
|
|
15145
|
-
#itemLabelsEffect;
|
|
15146
15253
|
focus() {
|
|
15147
15254
|
this.shouldFocus.set(true);
|
|
15148
15255
|
}
|
|
@@ -15208,9 +15315,11 @@ class AXPLookupWidgetTagboxComponent extends LookupWidgetLookBase {
|
|
|
15208
15315
|
}
|
|
15209
15316
|
//#endregion
|
|
15210
15317
|
//#region ---- Utility Methods ----
|
|
15211
|
-
|
|
15212
|
-
|
|
15213
|
-
|
|
15318
|
+
getDisplayRaw(item) {
|
|
15319
|
+
return formatLookupItemDisplay(item, this.entityDef()(), {
|
|
15320
|
+
displayFormat: this.displayFormatValue(),
|
|
15321
|
+
textField: this.displayFieldValue(),
|
|
15322
|
+
}, this.formatService, (value) => this.translateService.resolve(value));
|
|
15214
15323
|
}
|
|
15215
15324
|
/**
|
|
15216
15325
|
* Get current input value from tag box
|
|
@@ -15357,13 +15466,13 @@ class AXPLookupWidgetTagboxComponent extends LookupWidgetLookBase {
|
|
|
15357
15466
|
</ax-tag-box>
|
|
15358
15467
|
<ng-template #tagTemplate let-item let-index="index">
|
|
15359
15468
|
<div class="ax-inline-flex ax-items-center ax-gap-1.5 ax-rounded-md ax-px-3 ax-py-1 ax-text-sm ax-surface">
|
|
15360
|
-
<span>{{
|
|
15469
|
+
<span>{{ getDisplayRaw(item) | translate | async }}</span>
|
|
15361
15470
|
<button type="button" (click)="tagBoxComponent.removeItem(index)">
|
|
15362
15471
|
<ax-icon class="ax-icon ax-icon-close"></ax-icon>
|
|
15363
15472
|
</button>
|
|
15364
15473
|
</div>
|
|
15365
15474
|
</ng-template>
|
|
15366
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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$
|
|
15475
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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: i1$2.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.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: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
15367
15476
|
}
|
|
15368
15477
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLookupWidgetTagboxComponent, decorators: [{
|
|
15369
15478
|
type: Component,
|
|
@@ -15417,7 +15526,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
15417
15526
|
</ax-tag-box>
|
|
15418
15527
|
<ng-template #tagTemplate let-item let-index="index">
|
|
15419
15528
|
<div class="ax-inline-flex ax-items-center ax-gap-1.5 ax-rounded-md ax-px-3 ax-py-1 ax-text-sm ax-surface">
|
|
15420
|
-
<span>{{
|
|
15529
|
+
<span>{{ getDisplayRaw(item) | translate | async }}</span>
|
|
15421
15530
|
<button type="button" (click)="tagBoxComponent.removeItem(index)">
|
|
15422
15531
|
<ax-icon class="ax-icon ax-icon-close"></ax-icon>
|
|
15423
15532
|
</button>
|
|
@@ -15795,7 +15904,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
15795
15904
|
}
|
|
15796
15905
|
</div>
|
|
15797
15906
|
}
|
|
15798
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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$
|
|
15907
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXPLookupWidgetSelectComponent, selector: "axp-lookup-widget-select", inputs: ["entityDef", "customFilter", "selectedItems", "displayField", "valueField", "disabled", "multiple", "validationRules", "placeholder", "hasClearButton", "allowCreate", "showItemTooltip", "isItemTruncated"], outputs: ["valueChanged"] }, { kind: "component", type: AXPLookupWidgetTagboxComponent, selector: "axp-lookup-widget-tagbox", inputs: ["selectedItems", "displayField", "valueField", "displayFormat", "disabled", "multiple", "isLoading", "validationRules", "placeholder", "hasClearButton", "allowCreate", "allowUnselect", "entityDef", "customFilter", "columns", "parentFilters", "rowActions", "onSetLoading"], outputs: ["valueChanged"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
15799
15908
|
}
|
|
15800
15909
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLookupWidgetEditComponent, decorators: [{
|
|
15801
15910
|
type: Component,
|
|
@@ -15895,8 +16004,6 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
15895
16004
|
this.entityService = inject(AXPEntityService);
|
|
15896
16005
|
this.entityResolver = inject(AXPEntityDefinitionRegistryService);
|
|
15897
16006
|
this.queryExecutor = inject(AXPQueryExecutor);
|
|
15898
|
-
this.expressionEvaluator = inject(AXPExpressionEvaluatorService);
|
|
15899
|
-
this.contextEvalFactory = inject(AXPContextEvalFactory);
|
|
15900
16007
|
//#endregion
|
|
15901
16008
|
//#region ---- View Children ----
|
|
15902
16009
|
this.moreButton = viewChild('moreButton', ...(ngDevMode ? [{ debugName: "moreButton" }] : /* istanbul ignore next */ []));
|
|
@@ -15934,16 +16041,11 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
15934
16041
|
this.resolveError = signal(null, ...(ngDevMode ? [{ debugName: "resolveError" }] : /* istanbul ignore next */ []));
|
|
15935
16042
|
this.summaryLabel = signal('', ...(ngDevMode ? [{ debugName: "summaryLabel" }] : /* istanbul ignore next */ []));
|
|
15936
16043
|
this.popoverHeader = signal('', ...(ngDevMode ? [{ debugName: "popoverHeader" }] : /* istanbul ignore next */ []));
|
|
15937
|
-
this.mainItemLabels = signal([], ...(ngDevMode ? [{ debugName: "mainItemLabels" }] : /* istanbul ignore next */ []));
|
|
15938
|
-
this.lazyPopoverItemLabels = signal([], ...(ngDevMode ? [{ debugName: "lazyPopoverItemLabels" }] : /* istanbul ignore next */ []));
|
|
15939
16044
|
this.entityDef = signal(null, ...(ngDevMode ? [{ debugName: "entityDef" }] : /* istanbul ignore next */ []));
|
|
15940
16045
|
this.hydratedDisplayItems = signal(null, ...(ngDevMode ? [{ debugName: "hydratedDisplayItems" }] : /* istanbul ignore next */ []));
|
|
15941
16046
|
this.hydrateRequestId = 0;
|
|
15942
|
-
this.mainLabelsVersion = 0;
|
|
15943
|
-
this.lazyPopoverLabelsVersion = 0;
|
|
15944
16047
|
//#endregion
|
|
15945
16048
|
//#region ---- Computed ----
|
|
15946
|
-
this.popoverItemLabels = computed(() => this.isHydratedStrategy() ? this.mainItemLabels() : this.lazyPopoverItemLabels(), ...(ngDevMode ? [{ debugName: "popoverItemLabels" }] : /* istanbul ignore next */ []));
|
|
15947
16049
|
this.displayItems = computed(() => isNil(this.rawValue)
|
|
15948
16050
|
? []
|
|
15949
16051
|
: castArray(this.rawValue)
|
|
@@ -16063,36 +16165,6 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
16063
16165
|
}
|
|
16064
16166
|
void this.hydrateScalarIds(entityKey, values);
|
|
16065
16167
|
});
|
|
16066
|
-
effect(() => {
|
|
16067
|
-
void this.translation.getActiveLang();
|
|
16068
|
-
this.entityDef();
|
|
16069
|
-
const items = this.allItems();
|
|
16070
|
-
const version = ++this.mainLabelsVersion;
|
|
16071
|
-
void this.resolveLabelsForItems(items).then((labels) => {
|
|
16072
|
-
if (version === this.mainLabelsVersion) {
|
|
16073
|
-
this.mainItemLabels.set(labels);
|
|
16074
|
-
}
|
|
16075
|
-
});
|
|
16076
|
-
});
|
|
16077
|
-
effect(() => {
|
|
16078
|
-
if (this.isHydratedStrategy()) {
|
|
16079
|
-
return;
|
|
16080
|
-
}
|
|
16081
|
-
void this.translation.getActiveLang();
|
|
16082
|
-
this.entityDef();
|
|
16083
|
-
const status = this.resolveStatus();
|
|
16084
|
-
const items = this.resolvedPopoverItems();
|
|
16085
|
-
if (status !== 'ready') {
|
|
16086
|
-
this.lazyPopoverItemLabels.set([]);
|
|
16087
|
-
return;
|
|
16088
|
-
}
|
|
16089
|
-
const version = ++this.lazyPopoverLabelsVersion;
|
|
16090
|
-
void this.resolveLabelsForItems(items).then((labels) => {
|
|
16091
|
-
if (version === this.lazyPopoverLabelsVersion) {
|
|
16092
|
-
this.lazyPopoverItemLabels.set(labels);
|
|
16093
|
-
}
|
|
16094
|
-
});
|
|
16095
|
-
});
|
|
16096
16168
|
}
|
|
16097
16169
|
//#endregion
|
|
16098
16170
|
//#region ---- Public methods ----
|
|
@@ -16114,10 +16186,11 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
16114
16186
|
void this.ensureLazyItemsLoaded();
|
|
16115
16187
|
}
|
|
16116
16188
|
}
|
|
16117
|
-
async showItemDetail(item, index) {
|
|
16189
|
+
async showItemDetail(item, index, anchor) {
|
|
16118
16190
|
if (!this.detailPopoverEnabled()) {
|
|
16119
16191
|
return;
|
|
16120
16192
|
}
|
|
16193
|
+
const detailAnchor = this.resolveStableDetailAnchor(anchor);
|
|
16121
16194
|
this.selectedItemIndex.set(index);
|
|
16122
16195
|
this.closeMorePopover();
|
|
16123
16196
|
// Prefer the row's FK / stored value (columnName) first. List columns often use options.dataPath so
|
|
@@ -16147,9 +16220,7 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
16147
16220
|
let resolvedTitle = '';
|
|
16148
16221
|
if (headerItem != null && this.hasDisplayTextOnLookupValue(headerItem)) {
|
|
16149
16222
|
resolvedTitle =
|
|
16150
|
-
typeof headerItem === 'object'
|
|
16151
|
-
? await this.resolveItemLabel(headerItem)
|
|
16152
|
-
: this.formatDisplayValue(headerItem);
|
|
16223
|
+
typeof headerItem === 'object' ? this.renderLookupLabel(headerItem) : this.formatDisplayValue(headerItem);
|
|
16153
16224
|
}
|
|
16154
16225
|
else if (!this.isMultiValueLookup()) {
|
|
16155
16226
|
const rowText = this.getRowDisplayTextFromTextField();
|
|
@@ -16158,12 +16229,13 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
16158
16229
|
}
|
|
16159
16230
|
}
|
|
16160
16231
|
if (!resolvedTitle) {
|
|
16161
|
-
|
|
16232
|
+
const displayTitle = formatLookupItemDisplay(headerItem, this.entityDef(), this.lookupDisplayOptions(), this.formatService, (value) => this.translation.resolve(value));
|
|
16233
|
+
resolvedTitle = typeof displayTitle === 'string' ? displayTitle : this.translation.resolve(displayTitle);
|
|
16162
16234
|
if (isUnresolvedEntityDisplayTemplate(resolvedTitle)) {
|
|
16163
16235
|
resolvedTitle = '';
|
|
16164
16236
|
}
|
|
16165
16237
|
}
|
|
16166
|
-
await this.entityDetailPopoverService.show(
|
|
16238
|
+
await this.entityDetailPopoverService.show(detailAnchor, {
|
|
16167
16239
|
entity: this.entity,
|
|
16168
16240
|
id,
|
|
16169
16241
|
textField: this.options['textField'] ?? this.displayField(),
|
|
@@ -16172,30 +16244,36 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
16172
16244
|
item,
|
|
16173
16245
|
});
|
|
16174
16246
|
}
|
|
16175
|
-
handleItemClick(index) {
|
|
16247
|
+
handleItemClick(index, event) {
|
|
16176
16248
|
if (!this.detailPopoverEnabled()) {
|
|
16177
16249
|
return;
|
|
16178
16250
|
}
|
|
16179
16251
|
const items = this.allItems();
|
|
16180
16252
|
if (index < items.length) {
|
|
16181
|
-
this.showItemDetail(items[index], index);
|
|
16253
|
+
void this.showItemDetail(items[index], index, this.resolvePopoverAnchor(event));
|
|
16182
16254
|
}
|
|
16183
16255
|
}
|
|
16184
|
-
handleResolvedItemClick(index) {
|
|
16256
|
+
handleResolvedItemClick(index, event) {
|
|
16185
16257
|
if (!this.detailPopoverEnabled()) {
|
|
16186
16258
|
return;
|
|
16187
16259
|
}
|
|
16188
16260
|
const items = this.resolvedPopoverItems();
|
|
16189
16261
|
if (index < items.length) {
|
|
16190
|
-
this.showItemDetail(items[index], index);
|
|
16262
|
+
void this.showItemDetail(items[index], index, this.resolvePopoverAnchor(event));
|
|
16191
16263
|
}
|
|
16192
16264
|
}
|
|
16193
|
-
handlePopoverItemClick(index) {
|
|
16265
|
+
handlePopoverItemClick(index, _event) {
|
|
16266
|
+
const anchor = this.resolveMorePopoverDetailAnchor();
|
|
16194
16267
|
if (this.isHydratedStrategy()) {
|
|
16195
|
-
this.
|
|
16268
|
+
const items = this.allItems();
|
|
16269
|
+
if (index < items.length) {
|
|
16270
|
+
void this.showItemDetail(items[index], index, anchor);
|
|
16271
|
+
}
|
|
16272
|
+
return;
|
|
16196
16273
|
}
|
|
16197
|
-
|
|
16198
|
-
|
|
16274
|
+
const items = this.resolvedPopoverItems();
|
|
16275
|
+
if (index < items.length) {
|
|
16276
|
+
void this.showItemDetail(items[index], index, anchor);
|
|
16199
16277
|
}
|
|
16200
16278
|
}
|
|
16201
16279
|
/**
|
|
@@ -16218,22 +16296,8 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
16218
16296
|
const values = castArray(raw).filter((value) => value != null && value !== '');
|
|
16219
16297
|
return values.length > 0 && values.every((value) => this.hasDisplayTextOnLookupValue(value));
|
|
16220
16298
|
}
|
|
16221
|
-
|
|
16222
|
-
|
|
16223
|
-
}
|
|
16224
|
-
getPopoverItemLabel(index) {
|
|
16225
|
-
return this.popoverItemLabels()[index] ?? '';
|
|
16226
|
-
}
|
|
16227
|
-
//#endregion
|
|
16228
|
-
//#region ---- Private methods ----
|
|
16229
|
-
async resolveLabelsForItems(items) {
|
|
16230
|
-
return Promise.all(items.map((item) => this.resolveItemLabel(item)));
|
|
16231
|
-
}
|
|
16232
|
-
async resolveItemLabel(item) {
|
|
16233
|
-
if (item == null) {
|
|
16234
|
-
return '';
|
|
16235
|
-
}
|
|
16236
|
-
if (typeof item === 'object' && this.translation.isValidMultiLanguageObject(item)) {
|
|
16299
|
+
getDisplayRaw(item) {
|
|
16300
|
+
if (item != null && typeof item === 'object' && this.translation.isValidMultiLanguageObject(item)) {
|
|
16237
16301
|
return this.translation.resolve(item);
|
|
16238
16302
|
}
|
|
16239
16303
|
if (!this.isMultiValueLookup()) {
|
|
@@ -16242,19 +16306,16 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
16242
16306
|
return this.formatDisplayValue(rowText);
|
|
16243
16307
|
}
|
|
16244
16308
|
}
|
|
16245
|
-
if (this.hasDisplayTextOnLookupValue(item)) {
|
|
16246
|
-
if (typeof item
|
|
16247
|
-
return this.
|
|
16309
|
+
if (item != null && this.hasDisplayTextOnLookupValue(item)) {
|
|
16310
|
+
if (typeof item === 'object') {
|
|
16311
|
+
return this.renderLookupLabel(item);
|
|
16248
16312
|
}
|
|
16313
|
+
return this.formatDisplayValue(item);
|
|
16249
16314
|
}
|
|
16250
|
-
|
|
16251
|
-
return formatLookupItemDisplayAsync(item, this.entityDef(), this.lookupDisplayOptions(), this.formatService, {
|
|
16252
|
-
expressionEvaluator: this.expressionEvaluator,
|
|
16253
|
-
contextEvalFactory: this.contextEvalFactory,
|
|
16254
|
-
translationService: this.translation,
|
|
16255
|
-
locale,
|
|
16256
|
-
}, (value) => this.translation.resolve(value));
|
|
16315
|
+
return this.renderLookupLabel(item);
|
|
16257
16316
|
}
|
|
16317
|
+
//#endregion
|
|
16318
|
+
//#region ---- Private methods ----
|
|
16258
16319
|
async refreshSummaryLabel(count) {
|
|
16259
16320
|
const text = await this.translation.translateAsync('@general:widgets.lookup.column.items-count', {
|
|
16260
16321
|
params: { count: String(count) },
|
|
@@ -16287,6 +16348,37 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
16287
16348
|
this.isMorePopoverOpen.set(false);
|
|
16288
16349
|
}
|
|
16289
16350
|
}
|
|
16351
|
+
/** Prefer the clicked inline item as anchor; fall back to the column host. */
|
|
16352
|
+
resolvePopoverAnchor(event) {
|
|
16353
|
+
const target = event.currentTarget;
|
|
16354
|
+
return target instanceof HTMLElement ? target : this.host.nativeElement;
|
|
16355
|
+
}
|
|
16356
|
+
/**
|
|
16357
|
+
* Stable anchor for entity detail when opened from the more-items list.
|
|
16358
|
+
* Clicks inside ax-popover overlay use elements that are removed/hidden on close.
|
|
16359
|
+
*/
|
|
16360
|
+
resolveMorePopoverDetailAnchor() {
|
|
16361
|
+
return (this.moreButton()?.nativeElement ??
|
|
16362
|
+
this.lazyTrigger()?.nativeElement ??
|
|
16363
|
+
this.host.nativeElement);
|
|
16364
|
+
}
|
|
16365
|
+
/** Ensures the detail popover anchor stays in the layout after the more popover closes. */
|
|
16366
|
+
resolveStableDetailAnchor(anchor) {
|
|
16367
|
+
const fallback = this.resolveMorePopoverDetailAnchor();
|
|
16368
|
+
if (!anchor?.isConnected || this.isInsideMorePopover(anchor)) {
|
|
16369
|
+
return fallback;
|
|
16370
|
+
}
|
|
16371
|
+
const rect = anchor.getBoundingClientRect();
|
|
16372
|
+
if (rect.width <= 0 && rect.height <= 0) {
|
|
16373
|
+
return fallback;
|
|
16374
|
+
}
|
|
16375
|
+
return anchor;
|
|
16376
|
+
}
|
|
16377
|
+
isInsideMorePopover(element) {
|
|
16378
|
+
const popover = this.morePopover();
|
|
16379
|
+
const popoverHost = popover?.getHostElement?.();
|
|
16380
|
+
return popoverHost instanceof HTMLElement && popoverHost.contains(element);
|
|
16381
|
+
}
|
|
16290
16382
|
async ensureLazyItemsLoaded() {
|
|
16291
16383
|
if (this.resolveStatus() === 'loading') {
|
|
16292
16384
|
return;
|
|
@@ -16547,6 +16639,10 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
16547
16639
|
return !isNil(candidate) && candidate !== '' && !this.isLikelyEntityId(candidate);
|
|
16548
16640
|
});
|
|
16549
16641
|
}
|
|
16642
|
+
renderLookupLabel(value) {
|
|
16643
|
+
const label = formatLookupItemDisplay(value, this.entityDef(), this.lookupDisplayOptions(), this.formatService, (item) => this.translation.resolve(item));
|
|
16644
|
+
return typeof label === 'string' ? label : this.translation.resolve(label);
|
|
16645
|
+
}
|
|
16550
16646
|
formatDisplayValue(value) {
|
|
16551
16647
|
if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
|
|
16552
16648
|
return String(value);
|
|
@@ -16567,11 +16663,11 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
16567
16663
|
return /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(value) || /^\d+$/.test(value);
|
|
16568
16664
|
}
|
|
16569
16665
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLookupWidgetColumnComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
16570
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPLookupWidgetColumnComponent, isStandalone: true, selector: "ng-component", inputs: { rawValue: "rawValue", rowData: "rowData" }, viewQueries: [{ propertyName: "moreButton", first: true, predicate: ["moreButton"], descendants: true, isSignal: true }, { propertyName: "lazyTrigger", first: true, predicate: ["lazyTrigger"], descendants: true, isSignal: true }, { propertyName: "morePopover", first: true, predicate: ["morePopover"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (isHydratedStrategy()) {\n<div class=\"ax-relative ax-flex ax-min-w-0 ax-items-center ax-gap-1\">\n @for (item of visibleItems(); track $index) {\n <span [class.ax-cursor-pointer]=\"detailPopoverEnabled()\" [class.hover:ax-text-primary]=\"detailPopoverEnabled()\"\n [class.hover:ax-underline]=\"detailPopoverEnabled()\" (click)=\"handleItemClick($index)\">\n {{
|
|
16666
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPLookupWidgetColumnComponent, isStandalone: true, selector: "ng-component", inputs: { rawValue: "rawValue", rowData: "rowData" }, viewQueries: [{ propertyName: "moreButton", first: true, predicate: ["moreButton"], descendants: true, isSignal: true }, { propertyName: "lazyTrigger", first: true, predicate: ["lazyTrigger"], descendants: true, isSignal: true }, { propertyName: "morePopover", first: true, predicate: ["morePopover"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (isHydratedStrategy()) {\n<div class=\"ax-relative ax-flex ax-min-w-0 ax-items-center ax-gap-1\">\n @for (item of visibleItems(); track $index) {\n @let label = getDisplayRaw(item);\n <span [class.ax-cursor-pointer]=\"detailPopoverEnabled()\" [class.hover:ax-text-primary]=\"detailPopoverEnabled()\"\n [class.hover:ax-underline]=\"detailPopoverEnabled()\" (click)=\"handleItemClick($index, $event)\">\n {{ label }}\n </span>\n @if ($index < visibleItems().length - 1) { <span class=\"ax-text-muted\">\u2022</span>\n }\n } @empty {\n <span class=\"ax-text-muted\">---</span>\n }\n @if (hasMoreItems()) {\n <span\n class=\"ax-absolute ax-end-0 ax-flex ax-h-full ax-cursor-pointer ax-items-center ax-px-1 hover:ax-primary-lighter\"\n (click)=\"showMoreItems(); $event.stopPropagation()\" #moreButton>\n <i class=\"fa-light fa-ellipsis-vertical\"></i>\n </span>\n }\n</div>\n} @else {\n<div class=\"ax-flex ax-min-w-0 ax-items-center ax-gap-1\">\n @if (displayCount() > 0) {\n <span class=\"ax-cursor-pointer ax-text-primary hover:ax-underline\"\n (click)=\"openLazyPopover(); $event.stopPropagation()\" #lazyTrigger>\n {{ summaryLabel() }}\n </span>\n } @else {\n <span class=\"ax-text-muted\">---</span>\n }\n</div>\n}\n\n<ax-popover [openOn]=\"'manual'\" #morePopover (openChange)=\"onPopoverOpenChange($event)\">\n <div class=\"ax-lightest-surface dark:ax-dark-surface ax-min-w-[280px] ax-rounded-lg ax-p-4 ax-shadow-lg\">\n <div class=\"ax-mb-4 ax-border-b ax-pb-2\">\n <h3 class=\"ax-text-base ax-font-semibold\">{{ popoverHeader() }}</h3>\n </div>\n\n @if (!isHydratedStrategy() && resolveStatus() === 'loading') {\n <div class=\"ax-flex ax-min-h-[120px] ax-items-center ax-justify-center\">\n <ax-loading></ax-loading>\n </div>\n } @else if (!isHydratedStrategy() && resolveStatus() === 'error') {\n <div class=\"ax-text-danger ax-text-sm\">{{ resolveError() }}</div>\n } @else {\n <div class=\"ax-flex ax-max-h-64 ax-flex-col ax-gap-3\">\n @for (item of popoverListItems(); track $index) {\n @let label = getDisplayRaw(item);\n <span [class.ax-cursor-pointer]=\"detailPopoverEnabled()\" [class.hover:ax-text-primary]=\"detailPopoverEnabled()\"\n [class.hover:ax-underline]=\"detailPopoverEnabled()\" (click)=\"handlePopoverItemClick($index, $event)\">\n {{ label }}\n </span>\n } @empty {\n <span class=\"ax-text-muted\">---</span>\n }\n </div>\n }\n </div>\n</ax-popover>", dependencies: [{ kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i1$2.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "component", type: i2$3.AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disablePanelClass", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "closeOnScroll", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
16571
16667
|
}
|
|
16572
16668
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLookupWidgetColumnComponent, decorators: [{
|
|
16573
16669
|
type: Component,
|
|
16574
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, imports: [AXLoadingModule, AXPopoverModule], inputs: ['rawValue', 'rowData'], template: "@if (isHydratedStrategy()) {\n<div class=\"ax-relative ax-flex ax-min-w-0 ax-items-center ax-gap-1\">\n @for (item of visibleItems(); track $index) {\n <span [class.ax-cursor-pointer]=\"detailPopoverEnabled()\" [class.hover:ax-text-primary]=\"detailPopoverEnabled()\"\n [class.hover:ax-underline]=\"detailPopoverEnabled()\" (click)=\"handleItemClick($index)\">\n {{
|
|
16670
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, imports: [AXLoadingModule, AXPopoverModule], inputs: ['rawValue', 'rowData'], template: "@if (isHydratedStrategy()) {\n<div class=\"ax-relative ax-flex ax-min-w-0 ax-items-center ax-gap-1\">\n @for (item of visibleItems(); track $index) {\n @let label = getDisplayRaw(item);\n <span [class.ax-cursor-pointer]=\"detailPopoverEnabled()\" [class.hover:ax-text-primary]=\"detailPopoverEnabled()\"\n [class.hover:ax-underline]=\"detailPopoverEnabled()\" (click)=\"handleItemClick($index, $event)\">\n {{ label }}\n </span>\n @if ($index < visibleItems().length - 1) { <span class=\"ax-text-muted\">\u2022</span>\n }\n } @empty {\n <span class=\"ax-text-muted\">---</span>\n }\n @if (hasMoreItems()) {\n <span\n class=\"ax-absolute ax-end-0 ax-flex ax-h-full ax-cursor-pointer ax-items-center ax-px-1 hover:ax-primary-lighter\"\n (click)=\"showMoreItems(); $event.stopPropagation()\" #moreButton>\n <i class=\"fa-light fa-ellipsis-vertical\"></i>\n </span>\n }\n</div>\n} @else {\n<div class=\"ax-flex ax-min-w-0 ax-items-center ax-gap-1\">\n @if (displayCount() > 0) {\n <span class=\"ax-cursor-pointer ax-text-primary hover:ax-underline\"\n (click)=\"openLazyPopover(); $event.stopPropagation()\" #lazyTrigger>\n {{ summaryLabel() }}\n </span>\n } @else {\n <span class=\"ax-text-muted\">---</span>\n }\n</div>\n}\n\n<ax-popover [openOn]=\"'manual'\" #morePopover (openChange)=\"onPopoverOpenChange($event)\">\n <div class=\"ax-lightest-surface dark:ax-dark-surface ax-min-w-[280px] ax-rounded-lg ax-p-4 ax-shadow-lg\">\n <div class=\"ax-mb-4 ax-border-b ax-pb-2\">\n <h3 class=\"ax-text-base ax-font-semibold\">{{ popoverHeader() }}</h3>\n </div>\n\n @if (!isHydratedStrategy() && resolveStatus() === 'loading') {\n <div class=\"ax-flex ax-min-h-[120px] ax-items-center ax-justify-center\">\n <ax-loading></ax-loading>\n </div>\n } @else if (!isHydratedStrategy() && resolveStatus() === 'error') {\n <div class=\"ax-text-danger ax-text-sm\">{{ resolveError() }}</div>\n } @else {\n <div class=\"ax-flex ax-max-h-64 ax-flex-col ax-gap-3\">\n @for (item of popoverListItems(); track $index) {\n @let label = getDisplayRaw(item);\n <span [class.ax-cursor-pointer]=\"detailPopoverEnabled()\" [class.hover:ax-text-primary]=\"detailPopoverEnabled()\"\n [class.hover:ax-underline]=\"detailPopoverEnabled()\" (click)=\"handlePopoverItemClick($index, $event)\">\n {{ label }}\n </span>\n } @empty {\n <span class=\"ax-text-muted\">---</span>\n }\n </div>\n }\n </div>\n</ax-popover>" }]
|
|
16575
16671
|
}], ctorParameters: () => [], propDecorators: { moreButton: [{ type: i0.ViewChild, args: ['moreButton', { isSignal: true }] }], lazyTrigger: [{ type: i0.ViewChild, args: ['lazyTrigger', { isSignal: true }] }], morePopover: [{ type: i0.ViewChild, args: ['morePopover', { isSignal: true }] }] } });
|
|
16576
16672
|
|
|
16577
16673
|
var lookupWidgetColumn_component = /*#__PURE__*/Object.freeze({
|
|
@@ -17296,7 +17392,7 @@ class AXPMultiSourceSelectorComponent extends AXBasePageComponent {
|
|
|
17296
17392
|
></ax-button>
|
|
17297
17393
|
</ax-suffix>
|
|
17298
17394
|
</ax-footer>
|
|
17299
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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: AXTabsModule }, { kind: "component", type: i2$
|
|
17395
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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: AXTabsModule }, { kind: "component", type: i2$4.AXTabsComponent, selector: "ax-tabs", inputs: ["look", "location", "fitParent", "minWidth", "content"], outputs: ["onActiveTabChanged"] }, { kind: "component", type: i2$4.AXTabItemComponent, selector: "ax-tab-item", inputs: ["disabled", "text", "key", "headerTemplate", "active"], outputs: ["disabledChange", "onClick", "onBlur", "onFocus", "activeChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$2.AXDecoratorIconComponent, selector: "ax-icon", 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: AXTranslationModule }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
17300
17396
|
}
|
|
17301
17397
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMultiSourceSelectorComponent, decorators: [{
|
|
17302
17398
|
type: Component,
|
|
@@ -17657,7 +17753,7 @@ class AXPMultiSourceSelectorWidgetEditComponent extends AXPValueWidgetComponent
|
|
|
17657
17753
|
</div>
|
|
17658
17754
|
</ng-template>
|
|
17659
17755
|
}
|
|
17660
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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$
|
|
17756
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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: i1$2.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.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 }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
17661
17757
|
}
|
|
17662
17758
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMultiSourceSelectorWidgetEditComponent, decorators: [{
|
|
17663
17759
|
type: Component,
|
|
@@ -18808,11 +18904,11 @@ class AXPFileListComponent {
|
|
|
18808
18904
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
18809
18905
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPFileListComponent, isStandalone: true, selector: "axp-file-list", inputs: { readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, fileEditable: { classPropertyName: "fileEditable", publicName: "fileEditable", isSignal: true, isRequired: false, transformFunction: null }, enableTitleDescription: { classPropertyName: "enableTitleDescription", publicName: "enableTitleDescription", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: true, isRequired: false, transformFunction: null }, titleKey: { classPropertyName: "titleKey", publicName: "titleKey", isSignal: true, isRequired: false, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", isSignal: true, isRequired: false, transformFunction: null }, linksLayout: { classPropertyName: "linksLayout", publicName: "linksLayout", isSignal: true, isRequired: false, transformFunction: null }, files: { classPropertyName: "files", publicName: "files", isSignal: true, isRequired: false, transformFunction: null }, plugins: { classPropertyName: "plugins", publicName: "plugins", isSignal: true, isRequired: false, transformFunction: null }, excludePlugins: { classPropertyName: "excludePlugins", publicName: "excludePlugins", isSignal: true, isRequired: false, transformFunction: null }, capabilities: { classPropertyName: "capabilities", publicName: "capabilities", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onRemove: "onRemove", onRevert: "onRevert", onRename: "onRename" }, host: { properties: { "class.--look-rows": "look() === \"rows\"", "class.--look-links": "look() === \"links\"", "class.--links-inline": "look() === \"links\" && linksLayout() === \"inline\"" } }, providers: [], ngImport: i0, template: "@if (look() === 'links') {\n @if (displayFiles().length > 0) {\n <div class=\"__links\">\n @if (showLabel()) {\n <span class=\"__links-label\">{{ titleKey() | translate | async }}:</span>\n }\n <ul class=\"__links-list\">\n @for (file of displayFiles(); track file.id ?? $index) {\n <li>\n <button\n type=\"button\"\n class=\"__link-item\"\n (click)=\"handleFileDownload($event, file)\"\n (dblclick)=\"handleFileRowActivate($event, file)\"\n >\n <i class=\"fa-light fa-paperclip ax-flex-shrink-0\"></i>\n <span class=\"ax-min-w-0 ax-break-all\">{{ file.name }}</span>\n </button>\n </li>\n }\n </ul>\n </div>\n }\n} @else {\n @for (file of displayFiles(); track $index) {\n <div\n class=\"__item\"\n [ngClass]=\"{\n '--removed': file.status === 'deleted',\n '--attached': file.status === 'attached',\n '--with-meta': enableTitleDescription(),\n '--item-readonly': file.readOnly === true,\n '--downloadable': file.status !== 'deleted',\n }\"\n (dblclick)=\"handleFileRowActivate($event, file)\"\n >\n <div class=\"__icon\">\n <i class=\"fa-fw {{ getFileInfo(file.name).icon }} fa-solid\"></i>\n </div>\n @if (enableTitleDescription()) {\n <div class=\"__content\">\n <div class=\"__primary\">{{ file.name }}{{ file.title?.trim() ? ' - ' + file.title : '' }}</div>\n @if (file.description?.trim()) {\n <div class=\"__secondary\">{{ file.description }}</div>\n }\n </div>\n } @else {\n <div class=\"__name\">{{ file.name }}</div>\n }\n <div class=\"__actions\" (dblclick)=\"$event.stopPropagation()\">\n @if (file.status === 'deleted' && multiple() && !isItemInteractionLocked(file)) {\n <ax-button [look]=\"'blank'\" class=\"ax-sm\" color=\"warning\" (onClick)=\"handleFileRevert($event, file)\">\n <ax-icon class=\"fa-light fa-rotate-left\"></ax-icon>\n </ax-button>\n } @else if (file.status !== 'deleted') {\n @for (action of actionsFor(file, $index); track action.id ?? action.textKey ?? action.text ?? $index) {\n <ax-button\n [look]=\"'blank'\"\n class=\"ax-sm\"\n [color]=\"getActionColor(action)\"\n (onClick)=\"runAction(action)\"\n >\n @if (action.icon) {\n <ax-icon class=\"{{ action.icon }}\"></ax-icon>\n }\n </ax-button>\n }\n }\n </div>\n </div>\n } @empty {\n <div class=\"__empty-state\">\n <axp-state-message\n icon=\"fa-light fa-folder-open\"\n [title]=\"'@general:widgets.file-uploader.empty-state.title'\"\n [description]=\"'@general:widgets.file-uploader.empty-state.description'\"\n >\n </axp-state-message>\n </div>\n }\n}\n", styles: [":host{display:flex;width:100%;flex-direction:column;gap:.125rem}:host.--look-rows{padding-top:.5rem;padding-bottom:.5rem}:host.--look-links{padding-top:0;padding-bottom:0}:host.--look-links .__links .__links-label{margin-inline-end:.5rem;font-size:.875rem;line-height:1.25rem;font-weight:500;color:rgb(var(--ax-sys-color-on-surface-variant))}:host.--look-links .__links .__links-list{margin:0;margin-top:.25rem;list-style-type:none;padding:0}:host.--look-links .__links .__links-list li{margin:0;padding:0}:host.--look-links .__links .__links-list .__link-item{display:inline-flex;width:100%;cursor:pointer;align-items:center;gap:.75rem;border-radius:.375rem;border-width:0px;background-color:transparent;padding:.625rem .75rem;text-align:start;font-size:.875rem;line-height:1.25rem;text-decoration-line:none;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;color:rgb(var(--ax-sys-color-primary))}:host.--look-links .__links .__links-list .__link-item:hover{background:rgb(var(--ax-sys-color-lighter-surface))}:host.--look-links.--links-inline .__links{margin-bottom:1rem;border-bottom-width:1px;--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-border-surface),var(--tw-border-opacity, 1));padding-bottom:1rem}:host.--look-links:not(.--links-inline) .__links-list{margin-top:0;display:flex;flex-direction:column;gap:.5rem}:host .__item{display:flex;align-items:center;gap:.75rem;border-left-width:4px;border-color:transparent;padding:.5rem}:host .__item.--downloadable{cursor:pointer}:host .__item.--downloadable:hover{background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface));border-color:rgb(var(--ax-sys-color-border-lighter-surface))}:host .__item:not(.--downloadable){cursor:default}:host .__item.--removed{--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-danger-500),var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-danger-50),var(--tw-bg-opacity, 1))}:host .__item.--attached{--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-success-500),var(--tw-border-opacity, 1));animation:attached-flash 1s ease-out forwards}:host .__item.--item-readonly:not(.--removed){opacity:.85}:host .__item .__icon{width:1.5rem;flex-shrink:0}:host .__item .__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:start;font-size:.875rem;line-height:1.25rem;font-weight:500}:host .__item .__content{display:flex;min-width:0px;flex:1 1 0%;flex-direction:column;gap:.125rem}:host .__item .__primary{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:start;font-size:.875rem;line-height:1.25rem;font-weight:500}:host .__item .__secondary{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;text-align:start;font-size:.75rem;line-height:1rem;color:var(--ax-sys-color-text-secondary)}:host .__item.--with-meta .__content{justify-content:center}:host .__item .__actions{margin-left:auto;display:flex;flex-shrink:0}@keyframes attached-flash{0%{background-color:rgb(var(--ax-sys-color-success-50))}to{background-color:transparent}}.__empty-state{cursor:pointer;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}.__empty-state:hover{opacity:.8}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type:
|
|
18810
18906
|
// ACoreX
|
|
18811
|
-
AXFormModule }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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: AXLabelModule }, { kind: "ngmodule", type: AXCheckBoxModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$
|
|
18907
|
+
AXFormModule }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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: AXLabelModule }, { kind: "ngmodule", type: AXCheckBoxModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type:
|
|
18812
18908
|
// Platform
|
|
18813
18909
|
AXPStateMessageComponent, selector: "axp-state-message", inputs: ["mode", "icon", "title", "description", "look"] }, { kind: "pipe", type:
|
|
18814
18910
|
// Angular
|
|
18815
|
-
AsyncPipe, name: "async" }, { kind: "pipe", type:
|
|
18911
|
+
AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.AXTranslatorPipe, name: "translate" }] }); }
|
|
18816
18912
|
}
|
|
18817
18913
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileListComponent, decorators: [{
|
|
18818
18914
|
type: Component,
|
|
@@ -19270,7 +19366,7 @@ class AXPFileUploaderWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
19270
19366
|
return false;
|
|
19271
19367
|
}
|
|
19272
19368
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileUploaderWidgetColumnComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
19273
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPFileUploaderWidgetColumnComponent, isStandalone: true, selector: "axp-file-uploader-widget-column", inputs: { rawValue: "rawValue", rowData: "rowData" }, viewQueries: [{ propertyName: "fileListTrigger", first: true, predicate: ["fileListTrigger"], descendants: true, isSignal: true }, { propertyName: "fileListPopover", first: true, predicate: ["fileListPopover"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (fileCount() > 0) {\n<span class=\"ax-cursor-pointer ax-text-primary ax-underline\" (click)=\"openFileListPopover(); $event.stopPropagation()\"\n #fileListTrigger>\n {{\n '@general:widgets.file-uploader.column.files-count'\n | translate: { params: { count: fileCount() } }\n | async\n }}\n</span>\n} @else {\n<span class=\"ax-text-muted\">---</span>\n}\n\n<ax-popover [openOn]=\"'manual'\" #fileListPopover (openChange)=\"onPopoverOpenChange($event)\">\n <div class=\"ax-lightest-surface dark:ax-dark-surface ax-min-w-[17.5rem] ax-max-w-[26rem] ax-overflow-hidden\">\n <div class=\"ax-border-b ax-border-surface ax-px-4 ax-py-3\">\n <h3 class=\"ax-m-0 ax-text-sm ax-font-semibold ax-leading-normal ax-text-on-lightest-surface\">\n {{ popoverTitle() | translate | async }}\n </h3>\n </div>\n <div class=\"ax-max-h-64 ax-overflow-y-auto ax-px-3 ax-py-3\" style=\"max-height: max(30dvh, 12rem)\">\n @if (loadStatus() === 'loading') {\n <div class=\"ax-flex ax-min-h-[120px] ax-items-center ax-justify-center\">\n <ax-loading></ax-loading>\n </div>\n } @else if (loadStatus() === 'error') {\n <div class=\"ax-text-danger ax-text-sm\">{{ loadError() }}</div>\n } @else {\n <axp-file-list [files]=\"popoverFiles()\" look=\"links\" linksLayout=\"menu\" [showLabel]=\"false\" [readonly]=\"true\" />\n }\n </div>\n </div>\n</ax-popover>", dependencies: [{ kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "component", type: i2.AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disablePanelClass", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "closeOnScroll", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i1$2.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "component", type: AXPFileListComponent, selector: "axp-file-list", inputs: ["readonly", "fileEditable", "enableTitleDescription", "multiple", "look", "titleKey", "showLabel", "linksLayout", "files", "plugins", "excludePlugins", "capabilities"], outputs: ["onRemove", "onRevert", "onRename"] }, { kind: "pipe", type:
|
|
19369
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPFileUploaderWidgetColumnComponent, isStandalone: true, selector: "axp-file-uploader-widget-column", inputs: { rawValue: "rawValue", rowData: "rowData" }, viewQueries: [{ propertyName: "fileListTrigger", first: true, predicate: ["fileListTrigger"], descendants: true, isSignal: true }, { propertyName: "fileListPopover", first: true, predicate: ["fileListPopover"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (fileCount() > 0) {\n<span class=\"ax-cursor-pointer ax-text-primary ax-underline\" (click)=\"openFileListPopover(); $event.stopPropagation()\"\n #fileListTrigger>\n {{\n '@general:widgets.file-uploader.column.files-count'\n | translate: { params: { count: fileCount() } }\n | async\n }}\n</span>\n} @else {\n<span class=\"ax-text-muted\">---</span>\n}\n\n<ax-popover [openOn]=\"'manual'\" #fileListPopover (openChange)=\"onPopoverOpenChange($event)\">\n <div class=\"ax-lightest-surface dark:ax-dark-surface ax-min-w-[17.5rem] ax-max-w-[26rem] ax-overflow-hidden\">\n <div class=\"ax-border-b ax-border-surface ax-px-4 ax-py-3\">\n <h3 class=\"ax-m-0 ax-text-sm ax-font-semibold ax-leading-normal ax-text-on-lightest-surface\">\n {{ popoverTitle() | translate | async }}\n </h3>\n </div>\n <div class=\"ax-max-h-64 ax-overflow-y-auto ax-px-3 ax-py-3\" style=\"max-height: max(30dvh, 12rem)\">\n @if (loadStatus() === 'loading') {\n <div class=\"ax-flex ax-min-h-[120px] ax-items-center ax-justify-center\">\n <ax-loading></ax-loading>\n </div>\n } @else if (loadStatus() === 'error') {\n <div class=\"ax-text-danger ax-text-sm\">{{ loadError() }}</div>\n } @else {\n <axp-file-list [files]=\"popoverFiles()\" look=\"links\" linksLayout=\"menu\" [showLabel]=\"false\" [readonly]=\"true\" />\n }\n </div>\n </div>\n</ax-popover>", dependencies: [{ kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "component", type: i2$3.AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disablePanelClass", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "closeOnScroll", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i1$2.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "component", type: AXPFileListComponent, selector: "axp-file-list", inputs: ["readonly", "fileEditable", "enableTitleDescription", "multiple", "look", "titleKey", "showLabel", "linksLayout", "files", "plugins", "excludePlugins", "capabilities"], outputs: ["onRemove", "onRevert", "onRename"] }, { kind: "pipe", type: i3$1.AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
19274
19370
|
}
|
|
19275
19371
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileUploaderWidgetColumnComponent, decorators: [{
|
|
19276
19372
|
type: Component,
|
|
@@ -19720,7 +19816,7 @@ class AXPFileUploaderWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
19720
19816
|
(onRename)="handleFileRename($event)"
|
|
19721
19817
|
></axp-file-list>
|
|
19722
19818
|
</div>
|
|
19723
|
-
`, isInline: true, styles: [":host{border-color:rgba(var(--ax-comp-editor-border-color))}:host.axp-file-uploader-widget-edit--borderless{border:none!important}.__drag-over{background-color:rgba(var(--ax-sys-color-primary-50),.1);border:2px dashed rgb(var(--ax-sys-color-primary-500));border-radius:.375rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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: "component", type: i1.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i1.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items", "closeParentOnClick", "lockOnLoading"], outputs: ["onItemClick"] }, { kind: "directive", type: AXUploaderZoneDirective, selector: "[axUploaderZone]", inputs: ["multiple", "accept", "fileType", "overlayTemplate", "disableBrowse", "disableDragDrop"], outputs: ["fileChange", "onChanged", "dragEnter", "dragLeave", "dragOver", "onFileUploadComplete", "onFilesUploadComplete"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$
|
|
19819
|
+
`, isInline: true, styles: [":host{border-color:rgba(var(--ax-comp-editor-border-color))}:host.axp-file-uploader-widget-edit--borderless{border:none!important}.__drag-over{background-color:rgba(var(--ax-sys-color-primary-50),.1);border:2px dashed rgb(var(--ax-sys-color-primary-500));border-radius:.375rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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: "component", type: i1.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i1.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items", "closeParentOnClick", "lockOnLoading"], outputs: ["onItemClick"] }, { kind: "directive", type: AXUploaderZoneDirective, selector: "[axUploaderZone]", inputs: ["multiple", "accept", "fileType", "overlayTemplate", "disableBrowse", "disableDragDrop"], outputs: ["fileChange", "onChanged", "dragEnter", "dragLeave", "dragOver", "onFileUploadComplete", "onFilesUploadComplete"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$2.AXDecoratorIconComponent, selector: "ax-icon", 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: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i3$4.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXPComponentSlotModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i3$1.AXTranslatorDirective, selector: "[translate]" }, { kind: "component", type: AXPFileListComponent, selector: "axp-file-list", inputs: ["readonly", "fileEditable", "enableTitleDescription", "multiple", "look", "titleKey", "showLabel", "linksLayout", "files", "plugins", "excludePlugins", "capabilities"], outputs: ["onRemove", "onRevert", "onRename"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
19724
19820
|
}
|
|
19725
19821
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileUploaderWidgetEditComponent, decorators: [{
|
|
19726
19822
|
type: Component,
|
|
@@ -19950,7 +20046,7 @@ class AXPFileUploaderWidgetService {
|
|
|
19950
20046
|
plugins: options?.plugins ?? [],
|
|
19951
20047
|
editDialog: options?.editDialog,
|
|
19952
20048
|
};
|
|
19953
|
-
const component = await import('./acorex-platform-layout-entity-file-list-popup.component
|
|
20049
|
+
const component = await import('./acorex-platform-layout-entity-file-list-popup.component--IeMZLIr.mjs').then((m) => m.AXPFileListPopupComponent);
|
|
19954
20050
|
const result = await this.popupService.open(component, {
|
|
19955
20051
|
title: await this.translate.translateAsync('@document-management:terms.common.file'),
|
|
19956
20052
|
data: {
|
|
@@ -20850,7 +20946,7 @@ class AXPSelectorStructureWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
20850
20946
|
} @else {
|
|
20851
20947
|
<span class="ax-text-muted">{{ disabledHint() }}</span>
|
|
20852
20948
|
}
|
|
20853
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i2$2.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: "ngmodule", type: AXFormModule }, { kind: "component", type: i5$1.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "ngmodule", type: AXCollapseModule }, { kind: "component", type: i4$
|
|
20949
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i2$2.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: "ngmodule", type: AXFormModule }, { kind: "component", type: i5$1.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "ngmodule", type: AXCollapseModule }, { kind: "component", type: i4$1.AXCollapseComponent, selector: "ax-collapse", inputs: ["disabled", "look", "isCollapsed", "showHeader", "caption", "icon", "isLoading", "headerTemplate"], outputs: ["onClick", "isCollapsedChange"] }, { kind: "component", type: i4$1.AXCollapseGroupComponent, selector: "ax-collapse-group", inputs: ["look", "accordion", "activeIndex"], outputs: ["accordionChange", "activeIndexChange"] }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i5$2.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: i2.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i2.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged", "onLoad"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "component", type: i7.AXTextBoxComponent, selector: "ax-text-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "maxLength", "allowNull", "type", "autoComplete", "look", "maskPattern", "customTokens", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress", "onMaskChanged"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
20854
20950
|
}
|
|
20855
20951
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSelectorStructureWidgetEditComponent, decorators: [{
|
|
20856
20952
|
type: Component,
|
|
@@ -21834,20 +21930,13 @@ class AXPPageDetailsConverter extends AXPBaseRelatedEntityConverter {
|
|
|
21834
21930
|
const p = relatedEntity?.persistence || {};
|
|
21835
21931
|
const strategy = p.strategy || 'embedded';
|
|
21836
21932
|
const mappedTargets = Object.keys(p.map || {}).map((k) => (k || '').split('.')[0]);
|
|
21837
|
-
const excludeProperties = relatedEntity.excludeProperties && relatedEntity.excludeProperties.length > 0
|
|
21838
|
-
? new Set(relatedEntity.excludeProperties)
|
|
21839
|
-
: undefined;
|
|
21840
21933
|
const helpers = {
|
|
21841
21934
|
...baseHelpers,
|
|
21842
21935
|
getPropertyByGroupId: (groupId) => {
|
|
21843
|
-
|
|
21844
|
-
if (strategy
|
|
21845
|
-
|
|
21846
|
-
|
|
21847
|
-
if (excludeProperties) {
|
|
21848
|
-
props = props.filter((prop) => !excludeProperties.has(prop.name ?? ''));
|
|
21849
|
-
}
|
|
21850
|
-
return props;
|
|
21936
|
+
const props = baseHelpers.getPropertyByGroupId(groupId) ?? [];
|
|
21937
|
+
if (strategy !== 'referenced' || mappedTargets.length === 0)
|
|
21938
|
+
return props;
|
|
21939
|
+
return props.filter((prop) => !mappedTargets.includes(prop?.name));
|
|
21851
21940
|
},
|
|
21852
21941
|
};
|
|
21853
21942
|
const evaluateExpressions = async (actionData) => {
|
|
@@ -21965,70 +22054,18 @@ class AXPPageDetailsConverter extends AXPBaseRelatedEntityConverter {
|
|
|
21965
22054
|
}
|
|
21966
22055
|
createLoadFunction(entityDef, relatedEntity, evaluateExpressions) {
|
|
21967
22056
|
return async (context) => {
|
|
21968
|
-
const
|
|
21969
|
-
if (conditions.length > 0) {
|
|
21970
|
-
const evaluatedFilters = await Promise.all(conditions.map(async (c) => ({
|
|
21971
|
-
field: c.name,
|
|
21972
|
-
operator: c.operator,
|
|
21973
|
-
value: await evaluateExpressions(c.value),
|
|
21974
|
-
})));
|
|
21975
|
-
if (conditions.length === 1 && conditions[0].name === 'id') {
|
|
21976
|
-
const byKeyFn = entityDef?.queries?.byKey?.execute;
|
|
21977
|
-
const id = evaluatedFilters[0]?.value;
|
|
21978
|
-
const result = id ? await byKeyFn(id) : null;
|
|
21979
|
-
return { success: true, data: result ?? {} };
|
|
21980
|
-
}
|
|
21981
|
-
const listFn = entityDef?.queries?.list?.execute;
|
|
21982
|
-
const filter = evaluatedFilters.length === 1
|
|
21983
|
-
? evaluatedFilters[0]
|
|
21984
|
-
: { logic: 'and', filters: evaluatedFilters };
|
|
21985
|
-
const page = await listFn({ skip: 0, take: 1, filter });
|
|
21986
|
-
const item = page?.items?.[0];
|
|
21987
|
-
const data = item ? { ...item } : {};
|
|
21988
|
-
if (!item) {
|
|
21989
|
-
for (const evaluated of evaluatedFilters) {
|
|
21990
|
-
if (evaluated.field) {
|
|
21991
|
-
set(data, evaluated.field, evaluated.value);
|
|
21992
|
-
}
|
|
21993
|
-
}
|
|
21994
|
-
}
|
|
21995
|
-
return { success: true, data };
|
|
21996
|
-
}
|
|
21997
|
-
const fn = entityDef?.queries?.byKey?.execute;
|
|
22057
|
+
const fn = entityDef?.queries.byKey?.execute;
|
|
21998
22058
|
const conditionValues = relatedEntity.conditions?.map((c) => c.value) ?? [];
|
|
21999
22059
|
const evaluatedConditionValues = await Promise.all(conditionValues.map((c) => evaluateExpressions(c)));
|
|
22000
22060
|
const id = evaluatedConditionValues[0];
|
|
22001
|
-
const result =
|
|
22002
|
-
return { success: true, data: result
|
|
22061
|
+
const result = await fn(id);
|
|
22062
|
+
return { success: true, data: result };
|
|
22003
22063
|
};
|
|
22004
22064
|
}
|
|
22005
22065
|
createExecuteFunction(entityDef, actions, evaluateExpressions, converterContext) {
|
|
22006
22066
|
return async (e, context) => {
|
|
22007
22067
|
try {
|
|
22008
22068
|
if (e.name === 'update-entity') {
|
|
22009
|
-
const recordId = context?.['id'];
|
|
22010
|
-
if (!recordId) {
|
|
22011
|
-
const createFn = entityDef?.commands?.create?.execute;
|
|
22012
|
-
const created = await createFn(context);
|
|
22013
|
-
if (created && typeof created === 'object' && 'success' in created) {
|
|
22014
|
-
const cmd = created;
|
|
22015
|
-
if (!cmd.success) {
|
|
22016
|
-
const errorText = commandMessageTextForError(cmd.message?.text) || 'Failed to create entity';
|
|
22017
|
-
return {
|
|
22018
|
-
success: false,
|
|
22019
|
-
message: cmd.message ?? { text: errorText },
|
|
22020
|
-
};
|
|
22021
|
-
}
|
|
22022
|
-
return {
|
|
22023
|
-
success: true,
|
|
22024
|
-
data: cmd.data ?? created,
|
|
22025
|
-
};
|
|
22026
|
-
}
|
|
22027
|
-
return {
|
|
22028
|
-
success: true,
|
|
22029
|
-
data: created,
|
|
22030
|
-
};
|
|
22031
|
-
}
|
|
22032
22069
|
const fn = entityDef?.commands?.update?.execute;
|
|
22033
22070
|
const result = await fn(context);
|
|
22034
22071
|
if (result && typeof result === 'object' && 'success' in result) {
|
|
@@ -22290,16 +22327,11 @@ class AXPPageListConverter extends AXPBaseRelatedEntityConverter {
|
|
|
22290
22327
|
const excludeForUpdate = commandName === 'Entity:Update' &&
|
|
22291
22328
|
relatedEntity.excludeProperties &&
|
|
22292
22329
|
relatedEntity.excludeProperties.length > 0;
|
|
22293
|
-
const excludeForView = commandName === 'Entity:View' &&
|
|
22294
|
-
relatedEntity.excludeProperties &&
|
|
22295
|
-
relatedEntity.excludeProperties.length > 0;
|
|
22296
22330
|
const mergedOptions = excludeForCreate
|
|
22297
22331
|
? { ...evaluatedOptions, excludeProperties: createExcludes }
|
|
22298
22332
|
: excludeForUpdate
|
|
22299
22333
|
? { ...evaluatedOptions, excludeProperties: relatedEntity.excludeProperties }
|
|
22300
|
-
:
|
|
22301
|
-
? { ...evaluatedOptions, excludeProperties: relatedEntity.excludeProperties }
|
|
22302
|
-
: evaluatedOptions;
|
|
22334
|
+
: evaluatedOptions;
|
|
22303
22335
|
if (context.commandService.exists(commandName)) {
|
|
22304
22336
|
// check options for evaluation
|
|
22305
22337
|
await context.commandService.execute(commandName, {
|
|
@@ -22318,7 +22350,6 @@ class AXPPageListConverter extends AXPBaseRelatedEntityConverter {
|
|
|
22318
22350
|
},
|
|
22319
22351
|
options: mergedOptions,
|
|
22320
22352
|
metadata: action.metadata,
|
|
22321
|
-
...(excludeForView ? { excludeProperties: relatedEntity.excludeProperties } : {}),
|
|
22322
22353
|
});
|
|
22323
22354
|
}
|
|
22324
22355
|
else {
|
|
@@ -23229,7 +23260,6 @@ class AXPLayoutAdapterFactory {
|
|
|
23229
23260
|
this.layoutAdapterBuilder = layoutAdapterBuilder;
|
|
23230
23261
|
this.filterOperatorMiddleware = filterOperatorMiddleware;
|
|
23231
23262
|
this.pageComponentConverter = inject(AXPPageComponentConverter);
|
|
23232
|
-
this.contextEvalFactory = inject(AXPContextEvalFactory);
|
|
23233
23263
|
}
|
|
23234
23264
|
async createDetailsViewAdapter(entityResolver, moduleName, entityName, id, dependencies) {
|
|
23235
23265
|
const entity = await entityResolver.resolve(moduleName, entityName);
|
|
@@ -23283,7 +23313,9 @@ class AXPLayoutAdapterFactory {
|
|
|
23283
23313
|
if (hidden && typeof hidden === 'string') {
|
|
23284
23314
|
try {
|
|
23285
23315
|
const scope = {
|
|
23286
|
-
context:
|
|
23316
|
+
context: {
|
|
23317
|
+
eval: (path) => get(rootContext, path),
|
|
23318
|
+
},
|
|
23287
23319
|
};
|
|
23288
23320
|
const result = await dependencies.expressionEvaluator.evaluate({ hidden }, scope);
|
|
23289
23321
|
hidden = result.hidden;
|
|
@@ -23445,12 +23477,14 @@ class AXPLayoutAdapterFactory {
|
|
|
23445
23477
|
}
|
|
23446
23478
|
const scope = {
|
|
23447
23479
|
...rootContext,
|
|
23448
|
-
context:
|
|
23480
|
+
context: {
|
|
23481
|
+
eval: (path) => get(rootContext, path),
|
|
23482
|
+
},
|
|
23449
23483
|
};
|
|
23450
23484
|
const title = await dependencies.expressionEvaluator.evaluate(titleTemplate, scope);
|
|
23451
23485
|
return title;
|
|
23452
23486
|
}
|
|
23453
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLayoutAdapterFactory, deps: [{ token: AXPRelatedEntityConverterFactory }, { token: AXPMainEntityContentBuilder }, { token: AXPLayoutAdapterBuilder }, { token: i4$
|
|
23487
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLayoutAdapterFactory, deps: [{ token: AXPRelatedEntityConverterFactory }, { token: AXPMainEntityContentBuilder }, { token: AXPLayoutAdapterBuilder }, { token: i4$2.AXPFilterOperatorMiddlewareService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
23454
23488
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLayoutAdapterFactory, providedIn: 'root' }); }
|
|
23455
23489
|
}
|
|
23456
23490
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLayoutAdapterFactory, decorators: [{
|
|
@@ -23458,7 +23492,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
23458
23492
|
args: [{
|
|
23459
23493
|
providedIn: 'root',
|
|
23460
23494
|
}]
|
|
23461
|
-
}], ctorParameters: () => [{ type: AXPRelatedEntityConverterFactory }, { type: AXPMainEntityContentBuilder }, { type: AXPLayoutAdapterBuilder }, { type: i4$
|
|
23495
|
+
}], ctorParameters: () => [{ type: AXPRelatedEntityConverterFactory }, { type: AXPMainEntityContentBuilder }, { type: AXPLayoutAdapterBuilder }, { type: i4$2.AXPFilterOperatorMiddlewareService }] });
|
|
23462
23496
|
|
|
23463
23497
|
const AXPLayoutDetailsViewRouteResolver = async (route, state, entityResolver = inject(AXPEntityDefinitionRegistryService), expressionEvaluator = inject(AXPExpressionEvaluatorService), session = inject(AXPSessionService), formatService = inject(AXFormatService), workflowService = inject(AXPWorkflowService), commandService = inject(AXPCommandService), layoutAdapterFactory = inject(AXPLayoutAdapterFactory), router = inject(Router)) => {
|
|
23464
23498
|
const moduleName = route.parent?.paramMap.get('module');
|
|
@@ -24254,7 +24288,7 @@ const AXPCrudModifier = {
|
|
|
24254
24288
|
queries.list = {
|
|
24255
24289
|
execute: async (e) => {
|
|
24256
24290
|
const res = await dataService.query(e);
|
|
24257
|
-
//console.log('query', res, ctx.module.get() + '.' + ctx.name.get(), e);
|
|
24291
|
+
// console.log('query', res, ctx.module.get() + '.' + ctx.name.get(), e);
|
|
24258
24292
|
return res;
|
|
24259
24293
|
},
|
|
24260
24294
|
type: AXPEntityQueryType.List,
|
|
@@ -24287,68 +24321,6 @@ class AXPEntityCommandSearchDefinitionProvider {
|
|
|
24287
24321
|
function moduleNameToI18nScope(moduleName) {
|
|
24288
24322
|
return moduleName.replace(/([A-Z])/g, '-$1').toLowerCase().replace(/^-/, '');
|
|
24289
24323
|
}
|
|
24290
|
-
//#region ---- Entity search definition builder ----
|
|
24291
|
-
function buildEntitySearchDefinition(entity, manifestRegistry) {
|
|
24292
|
-
const manifest = manifestRegistry.get(entity.module);
|
|
24293
|
-
const i18nScope = manifest?.i18n ?? moduleNameToI18nScope(entity.module);
|
|
24294
|
-
const searchTitleTemplate = entity.formats.searchResult?.title;
|
|
24295
|
-
const titleContext = buildEntitySearchTitleContext(entity, searchTitleTemplate);
|
|
24296
|
-
return {
|
|
24297
|
-
name: `Module.${entity.module}.${entity.name}`,
|
|
24298
|
-
title: `@${i18nScope}:module.title`,
|
|
24299
|
-
group: `Module.${entity.module}`,
|
|
24300
|
-
icon: entity.icon ?? 'fa-solid fa-objects-column',
|
|
24301
|
-
order: 4,
|
|
24302
|
-
format: {
|
|
24303
|
-
title: searchTitleTemplate,
|
|
24304
|
-
description: entity.formats.searchResult?.description ?? `${entity.module} / ${entity.title}`,
|
|
24305
|
-
id: '{{data.id}}',
|
|
24306
|
-
titleFallbackTemplates: titleContext.fallbackTemplates,
|
|
24307
|
-
titleFallbackFields: titleContext.fallbackFields,
|
|
24308
|
-
},
|
|
24309
|
-
actions: [
|
|
24310
|
-
{
|
|
24311
|
-
name: 'open-entity',
|
|
24312
|
-
type: AXPSystemActionType.View,
|
|
24313
|
-
priority: 'primary',
|
|
24314
|
-
},
|
|
24315
|
-
],
|
|
24316
|
-
};
|
|
24317
|
-
}
|
|
24318
|
-
//#endregion
|
|
24319
|
-
//#region ---- Lazy resolver ----
|
|
24320
|
-
class AXPEntitySearchDefinitionLazyResolver {
|
|
24321
|
-
constructor() {
|
|
24322
|
-
this.entityResolver = inject(AXPEntityResolver);
|
|
24323
|
-
this.manifestRegistry = inject(AXPModuleManifestRegistry);
|
|
24324
|
-
this.resolved = new Map();
|
|
24325
|
-
}
|
|
24326
|
-
async resolve(definitionName) {
|
|
24327
|
-
const cached = this.resolved.get(definitionName);
|
|
24328
|
-
if (cached) {
|
|
24329
|
-
return cached;
|
|
24330
|
-
}
|
|
24331
|
-
const match = definitionName.match(/^Module\.([^.]+)\.(.+)$/);
|
|
24332
|
-
if (!match) {
|
|
24333
|
-
return null;
|
|
24334
|
-
}
|
|
24335
|
-
const [, moduleName, entityName] = match;
|
|
24336
|
-
await this.manifestRegistry.initialize();
|
|
24337
|
-
const entity = await this.entityResolver.get(moduleName, entityName);
|
|
24338
|
-
if (!entity) {
|
|
24339
|
-
return null;
|
|
24340
|
-
}
|
|
24341
|
-
const definition = buildEntitySearchDefinition(entity, this.manifestRegistry);
|
|
24342
|
-
this.resolved.set(definitionName, definition);
|
|
24343
|
-
return definition;
|
|
24344
|
-
}
|
|
24345
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntitySearchDefinitionLazyResolver, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
24346
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntitySearchDefinitionLazyResolver }); }
|
|
24347
|
-
}
|
|
24348
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntitySearchDefinitionLazyResolver, decorators: [{
|
|
24349
|
-
type: Injectable
|
|
24350
|
-
}] });
|
|
24351
|
-
|
|
24352
24324
|
class AXPEntitySearchDefinitionProvider {
|
|
24353
24325
|
constructor() {
|
|
24354
24326
|
this.entityRegister = inject(AXPEntityDefinitionRegistryService);
|
|
@@ -24356,13 +24328,28 @@ class AXPEntitySearchDefinitionProvider {
|
|
|
24356
24328
|
}
|
|
24357
24329
|
async provide(context) {
|
|
24358
24330
|
await this.manifestRegistry.initialize();
|
|
24359
|
-
|
|
24360
|
-
const
|
|
24361
|
-
|
|
24362
|
-
|
|
24363
|
-
|
|
24331
|
+
this.entityRegister.getAll().forEach((entity) => {
|
|
24332
|
+
const manifest = this.manifestRegistry.get(entity.module);
|
|
24333
|
+
const i18nScope = manifest?.i18n ?? moduleNameToI18nScope(entity.module);
|
|
24334
|
+
const searchTitleTemplate = entity.formats.searchResult?.title;
|
|
24335
|
+
const titleContext = buildEntitySearchTitleContext(entity, searchTitleTemplate);
|
|
24336
|
+
context.addDefinition(`Module.${entity.module}.${entity.name}`, `@${i18nScope}:module.title`, `Module.${entity.module}`, entity.icon ?? 'fa-solid fa-objects-column', 4, {
|
|
24337
|
+
actions: [
|
|
24338
|
+
{
|
|
24339
|
+
name: 'open-entity',
|
|
24340
|
+
type: 'view',
|
|
24341
|
+
priority: 'primary',
|
|
24342
|
+
},
|
|
24343
|
+
],
|
|
24344
|
+
format: {
|
|
24345
|
+
title: searchTitleTemplate,
|
|
24346
|
+
description: (entity.formats.searchResult?.description) ?? `${entity.module} / ${entity.title}`,
|
|
24347
|
+
id: '{{data.id}}',
|
|
24348
|
+
titleFallbackTemplates: titleContext.fallbackTemplates,
|
|
24349
|
+
titleFallbackFields: titleContext.fallbackFields,
|
|
24350
|
+
},
|
|
24364
24351
|
});
|
|
24365
|
-
}
|
|
24352
|
+
});
|
|
24366
24353
|
}
|
|
24367
24354
|
}
|
|
24368
24355
|
|
|
@@ -24468,9 +24455,9 @@ class AXPMiddlewareEntityStorageService extends AXPEntityStorageService {
|
|
|
24468
24455
|
...init,
|
|
24469
24456
|
};
|
|
24470
24457
|
}
|
|
24471
|
-
async initial(entityName, collection) {
|
|
24458
|
+
async initial(entityName, collection, options) {
|
|
24472
24459
|
const ctx = this.createCtx('initial', entityName, { data: collection });
|
|
24473
|
-
return this.run(ctx, () => this.backend.initial(ctx.entityName, ctx.data));
|
|
24460
|
+
return this.run(ctx, () => this.backend.initial(ctx.entityName, ctx.data, options));
|
|
24474
24461
|
}
|
|
24475
24462
|
async getOne(entityName, id) {
|
|
24476
24463
|
const key = getDedupKey('getOne', entityName, { id });
|
|
@@ -24754,9 +24741,6 @@ class AXPQuickEntityModifyPopupAction extends AXPWorkflowAction {
|
|
|
24754
24741
|
this.popupService = inject(AXPopupService);
|
|
24755
24742
|
this.platform = inject(AXPlatform);
|
|
24756
24743
|
this.translateService = inject(AXTranslationService);
|
|
24757
|
-
this.formatService = inject(AXFormatService);
|
|
24758
|
-
this.expressionEvaluator = inject(AXPExpressionEvaluatorService);
|
|
24759
|
-
this.contextEvalFactory = inject(AXPContextEvalFactory);
|
|
24760
24744
|
this.entityRegistery = inject(AXPEntityDefinitionRegistryService);
|
|
24761
24745
|
this.config = inject(AXP_ENTITY_CONFIG_TOKEN);
|
|
24762
24746
|
this.factory = inject(AXPEntityMasterUpdateViewModelFactory);
|
|
@@ -24766,8 +24750,10 @@ class AXPQuickEntityModifyPopupAction extends AXPWorkflowAction {
|
|
|
24766
24750
|
const data = context.getVariable('data');
|
|
24767
24751
|
const entityRef = await this.entityRegistery.resolve(moduleName, entityName);
|
|
24768
24752
|
const { parentKey } = entityRef;
|
|
24753
|
+
console.log(data);
|
|
24769
24754
|
const { id } = data;
|
|
24770
|
-
const
|
|
24755
|
+
const { interfaces, title } = entityRef;
|
|
24756
|
+
const properties = interfaces?.master?.update?.properties?.map((p) => p.name) || [];
|
|
24771
24757
|
const vm = await this.factory.create(moduleName, entityName, id, properties);
|
|
24772
24758
|
const options = context.getVariable('options');
|
|
24773
24759
|
const decoration = options?.['decoration'];
|
|
@@ -24777,11 +24763,12 @@ class AXPQuickEntityModifyPopupAction extends AXPWorkflowAction {
|
|
|
24777
24763
|
if (parentKey) {
|
|
24778
24764
|
context.setVariable('parentKey', parentKey);
|
|
24779
24765
|
}
|
|
24766
|
+
console.log(`${this.translateService.translateSync('entity.modify')}`);
|
|
24780
24767
|
const com = await this.config.viewers.master.modify();
|
|
24781
24768
|
const popup = await this.popupService.open(com, {
|
|
24782
24769
|
title: headerTitle
|
|
24783
24770
|
? headerTitle
|
|
24784
|
-
:
|
|
24771
|
+
: `${this.translateService.translateSync('@general:actions.modify.title')} ${this.translateService.translateSync(entityRef.formats.individual)}`,
|
|
24785
24772
|
size: this.platform.is('Mobile') || this.platform.is('SM') ? 'full' : size ? size : 'md',
|
|
24786
24773
|
data: {
|
|
24787
24774
|
vm,
|
|
@@ -25088,7 +25075,7 @@ function routesFacory() {
|
|
|
25088
25075
|
const refreshChanged = from.queryParams['_ts'] !== to.queryParams['_ts'];
|
|
25089
25076
|
return entityChanged || idChanged || refreshChanged;
|
|
25090
25077
|
},
|
|
25091
|
-
data: { reuse:
|
|
25078
|
+
data: { reuse: false },
|
|
25092
25079
|
},
|
|
25093
25080
|
{
|
|
25094
25081
|
path: 'e/:entity/:id',
|
|
@@ -25121,15 +25108,6 @@ class AXPEntityModule {
|
|
|
25121
25108
|
AXPAttachmentsPluginModule, i1$3.AXPWorkflowModule, AXPWidgetCoreModule,
|
|
25122
25109
|
LayoutBuilderModule] }); }
|
|
25123
25110
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityModule, providers: [
|
|
25124
|
-
{
|
|
25125
|
-
provide: AXP_REPEATER_ENTITY_BY_KEY_LOOKUP,
|
|
25126
|
-
useFactory: () => {
|
|
25127
|
-
const entityService = inject(AXPEntityService);
|
|
25128
|
-
return {
|
|
25129
|
-
byKey: (entityKey, id) => entityService.withEntity(entityKey).data().byKey(id),
|
|
25130
|
-
};
|
|
25131
|
-
},
|
|
25132
|
-
},
|
|
25133
25111
|
{ provide: AXP_WIDGET_DEFINITION_PROVIDER, useClass: AXPEntityWidgetsProvider, multi: true },
|
|
25134
25112
|
{
|
|
25135
25113
|
provide: ROUTES,
|
|
@@ -25146,10 +25124,6 @@ class AXPEntityModule {
|
|
|
25146
25124
|
useClass: AXPEntityCommandSearchDefinitionProvider,
|
|
25147
25125
|
multi: true,
|
|
25148
25126
|
},
|
|
25149
|
-
{
|
|
25150
|
-
provide: AXP_SEARCH_DEFINITION_LAZY_RESOLVER,
|
|
25151
|
-
useClass: AXPEntitySearchDefinitionLazyResolver,
|
|
25152
|
-
},
|
|
25153
25127
|
// Bind the middleware wrapper as the public storage service
|
|
25154
25128
|
{ provide: AXPEntityStorageService, useClass: AXPMiddlewareEntityStorageService },
|
|
25155
25129
|
{
|
|
@@ -25321,15 +25295,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
25321
25295
|
exports: [],
|
|
25322
25296
|
declarations: [],
|
|
25323
25297
|
providers: [
|
|
25324
|
-
{
|
|
25325
|
-
provide: AXP_REPEATER_ENTITY_BY_KEY_LOOKUP,
|
|
25326
|
-
useFactory: () => {
|
|
25327
|
-
const entityService = inject(AXPEntityService);
|
|
25328
|
-
return {
|
|
25329
|
-
byKey: (entityKey, id) => entityService.withEntity(entityKey).data().byKey(id),
|
|
25330
|
-
};
|
|
25331
|
-
},
|
|
25332
|
-
},
|
|
25333
25298
|
{ provide: AXP_WIDGET_DEFINITION_PROVIDER, useClass: AXPEntityWidgetsProvider, multi: true },
|
|
25334
25299
|
{
|
|
25335
25300
|
provide: ROUTES,
|
|
@@ -25346,10 +25311,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
25346
25311
|
useClass: AXPEntityCommandSearchDefinitionProvider,
|
|
25347
25312
|
multi: true,
|
|
25348
25313
|
},
|
|
25349
|
-
{
|
|
25350
|
-
provide: AXP_SEARCH_DEFINITION_LAZY_RESOLVER,
|
|
25351
|
-
useClass: AXPEntitySearchDefinitionLazyResolver,
|
|
25352
|
-
},
|
|
25353
25314
|
// Bind the middleware wrapper as the public storage service
|
|
25354
25315
|
{ provide: AXPEntityStorageService, useClass: AXPMiddlewareEntityStorageService },
|
|
25355
25316
|
{
|
|
@@ -25657,5 +25618,5 @@ var getEntityDetails_query = /*#__PURE__*/Object.freeze({
|
|
|
25657
25618
|
* Generated bundle index. Do not edit.
|
|
25658
25619
|
*/
|
|
25659
25620
|
|
|
25660
|
-
export { ATTACHMENTS_PAGE_COMPONENT_KEY, AXMEntityCrudService, AXMEntityCrudServiceImpl, AXPCategoryTreeService, AXPCreateEntityCommand, AXPCreateEntityWorkflow, AXPDataSeederService, AXPDeleteEntityWorkflow, AXPEditFileUploaderCommand, AXPEntitiesListDataSourceDefinition, AXPEntityApplyUpdatesAction, AXPEntityCategoryTreeSelectorComponent, AXPEntityCategoryWidget, AXPEntityCategoryWidgetColumnComponent, AXPEntityCategoryWidgetEditComponent, AXPEntityCategoryWidgetViewComponent, AXPEntityCommandTriggerViewModel, AXPEntityCreateEvent, AXPEntityCreatePopupAction, AXPEntityCreateSubmittedAction, AXPEntityCreateViewElementViewModel, AXPEntityCreateViewModelFactory, AXPEntityCreateViewSectionViewModel, AXPEntityDataProvider, AXPEntityDataProviderImpl, AXPEntityDataSelectorRowActionsService, AXPEntityDataSelectorService, AXPEntityDefinitionProviderWidget, AXPEntityDefinitionProviderWidgetEditComponent, AXPEntityDefinitionRegistryService, AXPEntityDeletedEvent, AXPEntityDetailListViewModel, AXPEntityDetailPopoverComponent, AXPEntityDetailPopoverService, AXPEntityDetailViewModelFactory, AXPEntityDetailViewModelResolver, AXPEntityEventDispatcherService, AXPEntityEventsKeys, AXPEntityFormBuilderService, AXPEntityListPersistenceModeDefault, AXPEntityListTableService, AXPEntityListToolbarService, AXPEntityListViewCardFieldViewModel, AXPEntityListViewColumnViewModel, AXPEntityListViewModelFactory, AXPEntityListViewModelResolver, AXPEntityListWidget, AXPEntityListWidgetViewComponent, AXPEntityMasterCreateViewModel, AXPEntityMasterListCardSelectActionName, AXPEntityMasterListViewModel, AXPEntityMasterListViewQueryViewModel, AXPEntityMasterSingleElementViewModel, AXPEntityMasterSingleViewGroupViewModel, AXPEntityMasterSingleViewModel, AXPEntityMasterUpdateElementViewModel, AXPEntityMasterUpdateViewModel, AXPEntityMasterUpdateViewModelFactory, AXPEntityMiddleware, AXPEntityModifyConfirmedAction, AXPEntityModifyEvent, AXPEntityModifySectionPopupAction, AXPEntityModule, AXPEntityPerformDeleteAction, AXPEntityPreloadFiltersContainerComponent, AXPEntityPreloadFiltersViewModel, AXPEntityPreloadFiltersViewModelResolver, AXPEntityResolver, AXPEntityService, AXPEntityStorageService, AXPEntityUpdateViewSectionViewModel, AXPFileListComponent, AXPFileUploaderLoadFilesQuery, AXPFileUploaderSaveFilesCommand, AXPFileUploaderWidget, AXPFileUploaderWidgetColumnComponent, AXPFileUploaderWidgetEditComponent, AXPFileUploaderWidgetService, AXPFileUploaderWidgetViewComponent, AXPGetEntityDetailsQuery, AXPLayoutOrderingConfigService, AXPLookupWidget, AXPLookupWidgetColumnComponent, AXPLookupWidgetEditComponent, AXPLookupWidgetViewComponent, AXPMiddlewareAbortError, AXPMiddlewareEntityStorageService, AXPModifyEntitySectionWorkflow, AXPMultiSourceDefinitionProviderContext, AXPMultiSourceDefinitionProviderService, AXPMultiSourceFederatedSearchService, AXPMultiSourceSelectorComponent, AXPMultiSourceSelectorService, AXPMultiSourceSelectorWidget, AXPMultiSourceSelectorWidgetColumnComponent, AXPMultiSourceSelectorWidgetEditComponent, AXPMultiSourceSelectorWidgetViewComponent, AXPMultiSourceType, AXPOpenEntityDetailsCommand, AXPQuickEntityModifyPopupAction, AXPQuickModifyEntityWorkflow, AXPRelatedColumnEnrichmentService, AXPRelatedColumnMetadataResolver, AXPSelectorStructureWidget, AXPSelectorStructureWidgetColumnComponent, AXPSelectorStructureWidgetEditComponent, AXPSelectorStructureWidgetViewComponent, AXPShowDetailViewAction, AXPShowDetailsViewWorkflow, AXPShowListViewAction, AXPShowListViewWorkflow, AXPTruncatedBreadcrumbComponent, AXPUpdateEntityCommand, AXPViewEntityDetailsCommand, AXP_CATEGORY_TREE_ROOT_TITLE_I18N_KEY, AXP_DATA_SEEDER_TOKEN, AXP_ENTITY_ACTION_PLUGIN, AXP_ENTITY_CONFIG_TOKEN, AXP_ENTITY_DEFINITION_LOADER, AXP_ENTITY_MODIFIER, AXP_ENTITY_STORAGE_BACKEND, AXP_ENTITY_STORAGE_MIDDLEWARE, AXP_MULTI_SOURCE_DEFINITION_PROVIDER, AXP_RECORD_WORKFLOW_INFO_CORRELATION_ID_FIELD, AXP_RECORD_WORKFLOW_INFO_DEFINITION_ID_FIELD, AXP_RECORD_WORKFLOW_INFO_INSTANCE_ID_FIELD, DEFAULT_COLUMN_ORDER, DEFAULT_PAIR_SPAN_RULES, DEFAULT_PROPERTY_ORDER, DEFAULT_SECTION_ORDER, ENTITY_LIST_ROUTE_CONTEXT_SESSION_KEY, EntityBuilder, EntityDataAccessor, actionExists, applyDataSourcePagingWithoutLoad, attachmentFieldCount, attachmentsPlugin, attachmentsSemanticallyEqual, axpCreateEntityAiToolInputDefaults, axpCreateEntityCommandDefinition, buildAXPRecordWorkflowInfo, canPersistEntityListState, cloneLayoutArrays, collectEntityQuickSearchFieldPaths, collectNestedFieldPathsFromEntityColumns, collectQuickSearchPathsFromSingleEntityDefinition, columnOrderingMiddleware, columnOrderingMiddlewareProvider, columnWidthMiddleware, columnWidthMiddlewareProvider, commandMessageTextForError, committedAttachments, computeEntityAggregates, createColumnOrderingMiddlewareProvider, createLayoutOrderingMiddlewareProvider, createModifierContext, defaultCardLayoutMiddleware, defaultCardLayoutMiddlewareProvider, defaultMultiLanguageMiddleware, defaultMultiLanguageMiddlewareProvider, detectEntityChanges, ensureLayoutPropertyView, ensureLayoutSection, ensureListActions, eventDispatchMiddleware, filterSortEntityRows, findEntityListRowDataInTree, fingerprintAttachmentItem, fingerprintAttachments, formatLookupItemDisplay,
|
|
25621
|
+
export { ATTACHMENTS_PAGE_COMPONENT_KEY, AXMEntityCrudService, AXMEntityCrudServiceImpl, AXPCategoryTreeService, AXPCreateEntityCommand, AXPCreateEntityWorkflow, AXPDataSeederService, AXPDeleteEntityWorkflow, AXPEditFileUploaderCommand, AXPEntitiesListDataSourceDefinition, AXPEntityApplyUpdatesAction, AXPEntityCategoryTreeSelectorComponent, AXPEntityCategoryWidget, AXPEntityCategoryWidgetColumnComponent, AXPEntityCategoryWidgetEditComponent, AXPEntityCategoryWidgetViewComponent, AXPEntityCommandTriggerViewModel, AXPEntityCreateEvent, AXPEntityCreatePopupAction, AXPEntityCreateSubmittedAction, AXPEntityCreateViewElementViewModel, AXPEntityCreateViewModelFactory, AXPEntityCreateViewSectionViewModel, AXPEntityDataProvider, AXPEntityDataProviderImpl, AXPEntityDataSelectorRowActionsService, AXPEntityDataSelectorService, AXPEntityDataSourceKeys, AXPEntityDefinitionProviderWidget, AXPEntityDefinitionProviderWidgetEditComponent, AXPEntityDefinitionRegistryService, AXPEntityDeletedEvent, AXPEntityDetailListViewModel, AXPEntityDetailPopoverComponent, AXPEntityDetailPopoverService, AXPEntityDetailViewModelFactory, AXPEntityDetailViewModelResolver, AXPEntityEventDispatcherService, AXPEntityEventsKeys, AXPEntityFormBuilderService, AXPEntityListPersistenceModeDefault, AXPEntityListTableService, AXPEntityListToolbarService, AXPEntityListViewCardFieldViewModel, AXPEntityListViewColumnViewModel, AXPEntityListViewModelFactory, AXPEntityListViewModelResolver, AXPEntityListWidget, AXPEntityListWidgetViewComponent, AXPEntityMasterCreateViewModel, AXPEntityMasterListCardSelectActionName, AXPEntityMasterListViewModel, AXPEntityMasterListViewQueryViewModel, AXPEntityMasterSingleElementViewModel, AXPEntityMasterSingleViewGroupViewModel, AXPEntityMasterSingleViewModel, AXPEntityMasterUpdateElementViewModel, AXPEntityMasterUpdateViewModel, AXPEntityMasterUpdateViewModelFactory, AXPEntityMiddleware, AXPEntityModifyConfirmedAction, AXPEntityModifyEvent, AXPEntityModifySectionPopupAction, AXPEntityModule, AXPEntityPerformDeleteAction, AXPEntityPreloadFiltersContainerComponent, AXPEntityPreloadFiltersViewModel, AXPEntityPreloadFiltersViewModelResolver, AXPEntityResolver, AXPEntityService, AXPEntityStorageService, AXPEntityUpdateViewSectionViewModel, AXPFileListComponent, AXPFileUploaderLoadFilesQuery, AXPFileUploaderSaveFilesCommand, AXPFileUploaderWidget, AXPFileUploaderWidgetColumnComponent, AXPFileUploaderWidgetEditComponent, AXPFileUploaderWidgetService, AXPFileUploaderWidgetViewComponent, AXPGetEntityDetailsQuery, AXPLayoutOrderingConfigService, AXPLookupWidget, AXPLookupWidgetColumnComponent, AXPLookupWidgetEditComponent, AXPLookupWidgetViewComponent, AXPMiddlewareAbortError, AXPMiddlewareEntityStorageService, AXPModifyEntitySectionWorkflow, AXPMultiSourceDefinitionProviderContext, AXPMultiSourceDefinitionProviderService, AXPMultiSourceFederatedSearchService, AXPMultiSourceSelectorComponent, AXPMultiSourceSelectorService, AXPMultiSourceSelectorWidget, AXPMultiSourceSelectorWidgetColumnComponent, AXPMultiSourceSelectorWidgetEditComponent, AXPMultiSourceSelectorWidgetViewComponent, AXPMultiSourceType, AXPOpenEntityDetailsCommand, AXPQuickEntityModifyPopupAction, AXPQuickModifyEntityWorkflow, AXPRelatedColumnEnrichmentService, AXPRelatedColumnMetadataResolver, AXPSelectorStructureWidget, AXPSelectorStructureWidgetColumnComponent, AXPSelectorStructureWidgetEditComponent, AXPSelectorStructureWidgetViewComponent, AXPShowDetailViewAction, AXPShowDetailsViewWorkflow, AXPShowListViewAction, AXPShowListViewWorkflow, AXPTruncatedBreadcrumbComponent, AXPUpdateEntityCommand, AXPViewEntityDetailsCommand, AXP_CATEGORY_TREE_ROOT_TITLE_I18N_KEY, AXP_DATA_SEEDER_TOKEN, AXP_ENTITY_ACTION_PLUGIN, AXP_ENTITY_CONFIG_TOKEN, AXP_ENTITY_DEFINITION_LOADER, AXP_ENTITY_MODIFIER, AXP_ENTITY_STORAGE_BACKEND, AXP_ENTITY_STORAGE_MIDDLEWARE, AXP_MULTI_SOURCE_DEFINITION_PROVIDER, AXP_RECORD_WORKFLOW_INFO_CORRELATION_ID_FIELD, AXP_RECORD_WORKFLOW_INFO_DEFINITION_ID_FIELD, AXP_RECORD_WORKFLOW_INFO_INSTANCE_ID_FIELD, DEFAULT_COLUMN_ORDER, DEFAULT_PAIR_SPAN_RULES, DEFAULT_PROPERTY_ORDER, DEFAULT_SECTION_ORDER, ENTITY_LIST_ROUTE_CONTEXT_SESSION_KEY, EntityBuilder, EntityDataAccessor, actionExists, applyDataSourcePagingWithoutLoad, attachmentFieldCount, attachmentsPlugin, attachmentsSemanticallyEqual, axpCreateEntityAiToolInputDefaults, axpCreateEntityCommandDefinition, buildAXPRecordWorkflowInfo, canPersistEntityListState, cloneLayoutArrays, collectEntityQuickSearchFieldPaths, collectNestedCreateHiddenProperties, collectNestedFieldPathsFromEntityColumns, collectQuickSearchPathsFromSingleEntityDefinition, columnOrderingMiddleware, columnOrderingMiddlewareProvider, columnWidthMiddleware, columnWidthMiddlewareProvider, commandMessageTextForError, committedAttachments, computeEntityAggregates, createColumnOrderingMiddlewareProvider, createLayoutOrderingMiddlewareProvider, createModifierContext, defaultCardLayoutMiddleware, defaultCardLayoutMiddlewareProvider, defaultMultiLanguageMiddleware, defaultMultiLanguageMiddlewareProvider, detectEntityChanges, ensureLayoutPropertyView, ensureLayoutSection, ensureListActions, entityDetailsCreateActions, entityDetailsCreateActionsDeferredParent, entityDetailsCrudActions, entityDetailsEditAction, entityDetailsNewEditAction, entityDetailsReferenceCondition, entityDetailsReferenceCreateActions, entityDetailsSimpleCondition, entityMasterBulkDeleteAction, entityMasterCreateAction, entityMasterCrudActions, entityMasterDeleteAction, entityMasterEditAction, entityMasterRecordActions, entityMasterViewAction, entityOverrideDetailsViewAction, eventDispatchMiddleware, filterSortEntityRows, findEntityListRowDataInTree, fingerprintAttachmentItem, fingerprintAttachments, formatLookupItemDisplay, getDataSourcePageIndex, getEntityListRowId, getMasterInterfacePropertySortKey, getRecordWorkflowCorrelationId, getRecordWorkflowInstanceId, hasFileUploaderTitleOrDescriptionFields, isAXPMiddlewareAbortError, isAttachmentListEntry, isCategoryEntity, isCategoryFilter, isFileListItem, isFileUploaderEditDialogAuto, isLegacyEntityDataSelectorOptions, layoutOrderingMiddlewareFactory, layoutOrderingMiddlewareProvider, mapEntityStorageErrorToCommandResult, mapLegacyEntityDataSelectorOptions, mergeForeignKeyFieldIntoCreateActions, normalizeEntityDataSelectorOptions, normalizeEntityFieldToFileList, normalizeEntityListPersistenceMode, normalizeListPaging, persistedAttachments, provideEntity, resolveEntityPluginDetailPageOrder, resolveFileUploaderEditDialog, resolveFileUploaderEntityScope, resolveLookupDisplayField, resolveLookupDisplayTemplate, restoreEntityListExpandedRows, runEntityQuery, searchResultDescriptionMiddleware, searchResultDescriptionMiddlewareProvider, shouldLoadEntityListStateFromStorage, shouldResetEntityListStateOnRouteEntry };
|
|
25661
25622
|
//# sourceMappingURL=acorex-platform-layout-entity.mjs.map
|