@acorex/platform 20.9.5 → 20.9.8
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.mjs +71 -1
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +244 -4
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs +96 -19
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity-contracts.mjs +19 -1
- package/fesm2022/acorex-platform-layout-entity-contracts.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +51 -8
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +65 -19
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +82 -43
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widgets.mjs +168 -80
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/package.json +1 -1
- package/types/acorex-platform-common.d.ts +18 -2
- package/types/acorex-platform-core.d.ts +68 -2
- package/types/acorex-platform-layout-components.d.ts +12 -0
- package/types/acorex-platform-layout-entity-contracts.d.ts +14 -2
- package/types/acorex-platform-layout-entity.d.ts +2 -1
- package/types/acorex-platform-layout-views.d.ts +6 -13
- package/types/acorex-platform-layout-widget-core.d.ts +11 -4
- package/types/acorex-platform-layout-widgets.d.ts +20 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { mergeForeignKeyFieldIntoCreateActions, collectNestedCreateHiddenProperties, AXPEntityCommandScope, normalizeEntityDisplayTemplate, sanitizeResolvedEntityDisplayTitle, isUnresolvedEntityDisplayTemplate, AXPEntityDataSourceKeys, isCardFieldBadgeDisplay, resolveCardFieldBadgeColor, getEntityInfo, resolveEnabledMasterListLayouts, resolveDefaultMasterListLayout, AXPEntityEventsKeys, collectEntityListSortableFields, collectEntityListFilterDefinitions, parseDottedFieldPath, ENTITY_ROW_POPUP_TITLE_OPTION, resolveLookupWidgetCreateOptions, AXPEntityQueryType, buildEntitySearchTitleContext } from '@acorex/platform/layout/entity-contracts';
|
|
1
|
+
import { mergeForeignKeyFieldIntoCreateActions, collectNestedCreateHiddenProperties, AXPEntityCommandScope, normalizeEntityDisplayTemplate, sanitizeResolvedEntityDisplayTitle, isUnresolvedEntityDisplayTemplate, AXPEntityDataSourceKeys, isCardFieldBadgeDisplay, resolveCardFieldBadgeColor, getEntityInfo, resolveEnabledMasterListLayouts, resolveDefaultMasterListLayout, AXPEntityEventsKeys, collectEntityListSortableFields, collectEntityListFilterDefinitions, parseDottedFieldPath, ENTITY_ROW_POPUP_TITLE_OPTION, resolveLookupWidgetCreateOptions, buildPageListWidgetName, AXPEntityQueryType, buildEntitySearchTitleContext } from '@acorex/platform/layout/entity-contracts';
|
|
2
2
|
export * from '@acorex/platform/layout/entity-contracts';
|
|
3
3
|
export { collectNestedCreateHiddenProperties, entityDetailsCreateActions, entityDetailsCreateActionsDeferredParent, entityDetailsCrudActions, entityDetailsEditAction, entityDetailsNewEditAction, entityDetailsReferenceCondition, entityDetailsReferenceCreateActions, entityDetailsSimpleCondition, entityMasterBulkDeleteAction, entityMasterCreateAction, entityMasterCrudActions, entityMasterDeleteAction, entityMasterEditAction, entityMasterRecordActions, entityMasterViewAction, entityOverrideDetailsViewAction, mergeForeignKeyFieldIntoCreateActions } from '@acorex/platform/layout/entity-contracts';
|
|
4
4
|
import { AXToastService } from '@acorex/components/toast';
|
|
5
5
|
import * as i3$1 from '@acorex/core/translation';
|
|
6
6
|
import { AXTranslationService, resolveMultiLanguageString, AXTranslationModule, translateSync } from '@acorex/core/translation';
|
|
7
7
|
import * as i4$2 from '@acorex/platform/common';
|
|
8
|
-
import { AXPNotFoundError, axpNavigateAppPath, AXPSettingsService, AXPCommonSettings, resolveEntityCreateListBehavior, AXPRefreshEvent, resolveEntityModifyPopupTitle, resolveSearchableText, evaluateEntityDisplayTemplate, AXPFilterOperatorMiddlewareService, AXPReloadEvent, axpRedirectToNotFound, AXP_ENTITY_DELETED_WORKFLOW_EVENT_TYPE, AXPCleanNestedFilters, AXPFileTypeProviderService, AXPFileStorageService, resolveEntityRowDisplayTitle, AXPFileActionsService, axpIsEntityRecordNotFound, AXPDefaultMultiLanguageConfigService, withDefaultMultiLanguageOnWidgetNodeTree, AXPWorkflowNavigateAction, AXP_NOT_FOUND_ROUTE, AXP_PROTECTED_ROUTE_GUARDS, AXPToastAction, AXP_SEARCH_DEFINITION_PROVIDER, AXP_SEARCH_DEFINITION_LAZY_RESOLVER, AXPMenuItemsDataSourceDefinition } from '@acorex/platform/common';
|
|
8
|
+
import { AXPNotFoundError, axpNavigateAppPath, AXPSettingsService, AXPCommonSettings, resolveEntityCreateListBehavior, AXPRefreshEvent, resolveEntityModifyPopupTitle, resolveSearchableText, evaluateEntityDisplayTemplate, AXPFilterOperatorMiddlewareService, AXPReloadEvent, axpRedirectToNotFound, AXP_ENTITY_DELETED_WORKFLOW_EVENT_TYPE, AXPCleanNestedFilters, AXPFileTypeProviderService, AXPFileStorageService, resolveEntityRowDisplayTitle, AXPFileActionsService, axpIsEntityRecordNotFound, AXPDefaultMultiLanguageConfigService, withDefaultMultiLanguageOnWidgetNodeTree, AXPWorkflowNavigateAction, axpIsEntityListPath, axpIsEntityDetailsPath, axpParseEntityListRoute, axpParseEntityDetailsRoute, axpSaveEntityListReturnUrl, AXP_NOT_FOUND_ROUTE, AXP_PROTECTED_ROUTE_GUARDS, AXPToastAction, AXP_SEARCH_DEFINITION_PROVIDER, AXP_SEARCH_DEFINITION_LAZY_RESOLVER, AXPMenuItemsDataSourceDefinition } from '@acorex/platform/common';
|
|
9
9
|
import * as i1$3 from '@acorex/platform/workflow';
|
|
10
10
|
import { AXPWorkflowEventService, AXPWorkflowService, ofType, createWorkFlowEvent, AXPWorkflowAction, AXPWorkflowModule } from '@acorex/platform/workflow';
|
|
11
11
|
import * as i0 from '@angular/core';
|
|
12
|
-
import { InjectionToken, inject, Injector, runInInjectionContext, Injectable, ChangeDetectorRef, input, signal, computed, effect, ChangeDetectionStrategy, Component, ElementRef, NgModule, viewChild, Input, afterNextRender, untracked, ViewEncapsulation, viewChildren, linkedSignal, HostBinding, output, EnvironmentInjector, makeEnvironmentProviders } from '@angular/core';
|
|
12
|
+
import { InjectionToken, inject, Injector, runInInjectionContext, Injectable, ChangeDetectorRef, input, signal, computed, effect, ChangeDetectionStrategy, Component, ElementRef, NgModule, viewChild, Input, afterNextRender, untracked, ViewEncapsulation, viewChildren, linkedSignal, HostBinding, output, EnvironmentInjector, DestroyRef, makeEnvironmentProviders } from '@angular/core';
|
|
13
13
|
import { cloneDeep, merge, get, castArray, set, orderBy, defaultTo, isNil, isEmpty, isEqual, isObjectLike, isArray, has, isString, isPlainObject } from 'lodash-es';
|
|
14
14
|
import { Subject, filter, takeUntil } from 'rxjs';
|
|
15
15
|
import { AXPWidgetsCatalog, resolveActionLook, AXPPlatformScope, extractValue, setSmart, getChangedPaths, isSelectionValueEqual, AXPDataGenerator, AXPSystemActionType } from '@acorex/platform/contracts';
|
|
@@ -80,6 +80,8 @@ import { AXUploaderZoneDirective } from '@acorex/cdk/uploader';
|
|
|
80
80
|
import { AXUploaderModule } from '@acorex/components/uploader';
|
|
81
81
|
import * as i4$1 from '@acorex/components/collapse';
|
|
82
82
|
import { AXCollapseModule } from '@acorex/components/collapse';
|
|
83
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
84
|
+
import { filter as filter$1 } from 'rxjs/operators';
|
|
83
85
|
import { transform, isEqual as isEqual$1 } from 'lodash';
|
|
84
86
|
|
|
85
87
|
function ensureListActions(ctx) {
|
|
@@ -15699,7 +15701,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
15699
15701
|
create: this.options()['create'],
|
|
15700
15702
|
allowCreate: this.options()['allowCreate'],
|
|
15701
15703
|
}), ...(ngDevMode ? [{ debugName: "resolvedCreate" }] : /* istanbul ignore next */ []));
|
|
15702
|
-
this.
|
|
15704
|
+
this.rowActions = computed(() => this.options()['rowActions'], ...(ngDevMode ? [{ debugName: "rowActions" }] : /* istanbul ignore next */ []));
|
|
15703
15705
|
this.valueField = computed(() => this.entityDef()?.properties.find((c) => c.name == 'id')?.name ?? 'id', ...(ngDevMode ? [{ debugName: "valueField" }] : /* istanbul ignore next */ []));
|
|
15704
15706
|
this.displayFormat = computed(() => resolveLookupDisplayTemplate(this.entityDef(), {
|
|
15705
15707
|
displayFormat: this.options()['displayFormat'],
|
|
@@ -16052,7 +16054,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
16052
16054
|
[customFilter]="customFilter"
|
|
16053
16055
|
[columns]="columns"
|
|
16054
16056
|
[parentFilters]="filter"
|
|
16055
|
-
[rowActions]="
|
|
16057
|
+
[rowActions]="rowActions()"
|
|
16056
16058
|
[onSetLoading]="setLoading.bind(this)"
|
|
16057
16059
|
(valueChanged)="handleComponentValueChanged($event)"
|
|
16058
16060
|
/>
|
|
@@ -16121,7 +16123,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
16121
16123
|
[customFilter]="customFilter"
|
|
16122
16124
|
[columns]="columns"
|
|
16123
16125
|
[parentFilters]="filter"
|
|
16124
|
-
[rowActions]="
|
|
16126
|
+
[rowActions]="rowActions()"
|
|
16125
16127
|
[onSetLoading]="setLoading.bind(this)"
|
|
16126
16128
|
(valueChanged)="handleComponentValueChanged($event)"
|
|
16127
16129
|
/>
|
|
@@ -22988,7 +22990,7 @@ class AXPPageListConverter extends AXPBaseRelatedEntityConverter {
|
|
|
22988
22990
|
content: [
|
|
22989
22991
|
{
|
|
22990
22992
|
type: AXPWidgetsCatalog.entityList,
|
|
22991
|
-
name:
|
|
22993
|
+
name: buildPageListWidgetName(relatedEntity.entity),
|
|
22992
22994
|
defaultValue: {
|
|
22993
22995
|
toolbar: {
|
|
22994
22996
|
filters: await Promise.all(filters),
|
|
@@ -25583,6 +25585,44 @@ const AXPShowDetailsViewWorkflow = {
|
|
|
25583
25585
|
},
|
|
25584
25586
|
};
|
|
25585
25587
|
|
|
25588
|
+
//#region ---- Entity List Return URL Capture ----
|
|
25589
|
+
/**
|
|
25590
|
+
* Captures the active entity list URL (including query params) whenever navigation
|
|
25591
|
+
* moves from list to details for the same entity. Works for simple and tabular navigation.
|
|
25592
|
+
*/
|
|
25593
|
+
class AXPEntityListReturnUrlCaptureService {
|
|
25594
|
+
//#endregion
|
|
25595
|
+
//#region ---- Lifecycle ----
|
|
25596
|
+
constructor() {
|
|
25597
|
+
//#region ---- Services & Dependencies ----
|
|
25598
|
+
this.router = inject(Router);
|
|
25599
|
+
this.destroyRef = inject(DestroyRef);
|
|
25600
|
+
this.router.events
|
|
25601
|
+
.pipe(filter$1((event) => event instanceof NavigationStart), takeUntilDestroyed(this.destroyRef))
|
|
25602
|
+
.subscribe((event) => this.captureIfLeavingList(event.url));
|
|
25603
|
+
}
|
|
25604
|
+
//#endregion
|
|
25605
|
+
//#region ---- Capture ----
|
|
25606
|
+
captureIfLeavingList(targetUrl) {
|
|
25607
|
+
const fromUrl = this.router.url;
|
|
25608
|
+
if (!axpIsEntityListPath(fromUrl) || !axpIsEntityDetailsPath(targetUrl)) {
|
|
25609
|
+
return;
|
|
25610
|
+
}
|
|
25611
|
+
const from = axpParseEntityListRoute(fromUrl);
|
|
25612
|
+
const to = axpParseEntityDetailsRoute(targetUrl);
|
|
25613
|
+
if (!from || !to || from.module !== to.module || from.entity !== to.entity) {
|
|
25614
|
+
return;
|
|
25615
|
+
}
|
|
25616
|
+
axpSaveEntityListReturnUrl(from.module, from.entity, fromUrl);
|
|
25617
|
+
}
|
|
25618
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityListReturnUrlCaptureService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
25619
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityListReturnUrlCaptureService, providedIn: 'root' }); }
|
|
25620
|
+
}
|
|
25621
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityListReturnUrlCaptureService, decorators: [{
|
|
25622
|
+
type: Injectable,
|
|
25623
|
+
args: [{ providedIn: 'root' }]
|
|
25624
|
+
}], ctorParameters: () => [] });
|
|
25625
|
+
|
|
25586
25626
|
class AXPShowFileUploaderPopupAction extends AXPWorkflowAction {
|
|
25587
25627
|
constructor() {
|
|
25588
25628
|
super(...arguments);
|
|
@@ -25801,6 +25841,9 @@ function routesFacory() {
|
|
|
25801
25841
|
return routes;
|
|
25802
25842
|
}
|
|
25803
25843
|
class AXPEntityModule {
|
|
25844
|
+
constructor() {
|
|
25845
|
+
inject(AXPEntityListReturnUrlCaptureService);
|
|
25846
|
+
}
|
|
25804
25847
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
25805
25848
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityModule, imports: [RouterModule,
|
|
25806
25849
|
AXPAttachmentsPluginModule, i1$3.AXPWorkflowModule, AXPWidgetCoreModule,
|
|
@@ -26139,7 +26182,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
26139
26182
|
]),
|
|
26140
26183
|
],
|
|
26141
26184
|
}]
|
|
26142
|
-
}] });
|
|
26185
|
+
}], ctorParameters: () => [] });
|
|
26143
26186
|
|
|
26144
26187
|
/**
|
|
26145
26188
|
* Registers entity CRUD commands and queries for the given entity keys.
|