@acorex/platform 20.8.8 → 20.8.10
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-auth.mjs +125 -27
- package/fesm2022/acorex-platform-auth.mjs.map +1 -1
- package/fesm2022/{acorex-platform-common-common-settings.provider-DqdSjjp6.mjs → acorex-platform-common-common-settings.provider-Bi1RYif5.mjs} +49 -27
- package/fesm2022/acorex-platform-common-common-settings.provider-Bi1RYif5.mjs.map +1 -0
- package/fesm2022/acorex-platform-common.mjs +712 -205
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +420 -127
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-domain.mjs +557 -826
- package/fesm2022/acorex-platform-domain.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +634 -114
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-components-binding-expression-editor-popup.component-CSxCnzwU.mjs → acorex-platform-layout-components-binding-expression-editor-popup.component-CXEdvDTf.mjs} +9 -9
- package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CXEdvDTf.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-components.mjs +3365 -880
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +456 -204
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +15129 -10185
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +413 -171
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +507 -441
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-button-widget-designer.component-CPBzE96V.mjs → acorex-platform-layout-widgets-button-widget-designer.component-Dy7jF-oD.mjs} +10 -10
- package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-Dy7jF-oD.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-file-list-popup.component-Dtv6U3df.mjs → acorex-platform-layout-widgets-file-list-popup.component-CDYAGBku.mjs} +21 -76
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-CDYAGBku.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-image-preview.popup-QxJfswhK.mjs → acorex-platform-layout-widgets-image-preview.popup-C_EPAvCU.mjs} +6 -7
- package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-C_EPAvCU.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-page-widget-designer.component-CVdssZBD.mjs → acorex-platform-layout-widgets-page-widget-designer.component-D10yO28c.mjs} +12 -12
- package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-D10yO28c.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BGO75IMz.mjs +116 -0
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BGO75IMz.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-DVaZN9QN.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-DmzNTYiS.mjs} +5 -5
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-DmzNTYiS.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-view-popup.component-DPGHgXa6.mjs → acorex-platform-layout-widgets-tabular-data-view-popup.component-BNG_588B.mjs} +4 -4
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-BNG_588B.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-text-block-widget-designer.component-CdiNW691.mjs → acorex-platform-layout-widgets-text-block-widget-designer.component-Vo4fWHtX.mjs} +6 -6
- package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-Vo4fWHtX.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets.mjs +6578 -4314
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-native.mjs +8 -7
- package/fesm2022/acorex-platform-native.mjs.map +1 -1
- package/fesm2022/acorex-platform-runtime.mjs +391 -166
- package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Cx1lLUaR.mjs +160 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Cx1lLUaR.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-AOrcgjDF.mjs +120 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-AOrcgjDF.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-rGsMVAZj.mjs → acorex-platform-themes-default-entity-master-single-view.component-BfCeUU5F.mjs} +16 -23
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-BfCeUU5F.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-error-401.component-53VB-PS_.mjs → acorex-platform-themes-default-error-401.component-C7EYJzSr.mjs} +4 -4
- package/fesm2022/acorex-platform-themes-default-error-401.component-C7EYJzSr.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-error-404.component-DVF9soT5.mjs → acorex-platform-themes-default-error-404.component-7MVLMwIa.mjs} +4 -4
- package/fesm2022/acorex-platform-themes-default-error-404.component-7MVLMwIa.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-error-offline.component-DR6G8gPC.mjs +19 -0
- package/fesm2022/acorex-platform-themes-default-error-offline.component-DR6G8gPC.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +1784 -61
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-shared-icon-chooser-column.component-TJ9PWHMY.mjs → acorex-platform-themes-shared-icon-chooser-column.component-CqkWJYdv.mjs} +6 -6
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-CqkWJYdv.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-icon-chooser-view.component-BHcKkIx0.mjs → acorex-platform-themes-shared-icon-chooser-view.component-BOTuLdWN.mjs} +6 -6
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-BOTuLdWN.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs → acorex-platform-themes-shared-settings.provider-DK6R87Lf.mjs} +24 -25
- package/fesm2022/acorex-platform-themes-shared-settings.provider-DK6R87Lf.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-D566Kdvy.mjs +94 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-D566Kdvy.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-D7-rCGl7.mjs +86 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-D7-rCGl7.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared.mjs +408 -305
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +359 -100
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/fesm2022/acorex-platform.mjs.map +1 -1
- package/package.json +31 -31
- package/{auth/index.d.ts → types/acorex-platform-auth.d.ts} +14 -2
- package/{common/index.d.ts → types/acorex-platform-common.d.ts} +304 -31
- package/{core/index.d.ts → types/acorex-platform-core.d.ts} +188 -44
- package/{domain/index.d.ts → types/acorex-platform-domain.d.ts} +744 -412
- package/{layout/builder/index.d.ts → types/acorex-platform-layout-builder.d.ts} +160 -38
- package/{layout/components/index.d.ts → types/acorex-platform-layout-components.d.ts} +854 -125
- package/{layout/designer/index.d.ts → types/acorex-platform-layout-designer.d.ts} +96 -18
- package/{layout/entity/index.d.ts → types/acorex-platform-layout-entity.d.ts} +926 -65
- package/{layout/views/index.d.ts → types/acorex-platform-layout-views.d.ts} +80 -47
- package/{layout/widget-core/index.d.ts → types/acorex-platform-layout-widget-core.d.ts} +274 -197
- package/{layout/widgets/index.d.ts → types/acorex-platform-layout-widgets.d.ts} +608 -122
- package/{native/index.d.ts → types/acorex-platform-native.d.ts} +0 -7
- package/types/acorex-platform-runtime.d.ts +571 -0
- package/{themes/default/index.d.ts → types/acorex-platform-themes-default.d.ts} +113 -4
- package/{themes/shared/index.d.ts → types/acorex-platform-themes-shared.d.ts} +5 -4
- package/{workflow/index.d.ts → types/acorex-platform-workflow.d.ts} +162 -81
- package/fesm2022/acorex-platform-common-common-settings.provider-DqdSjjp6.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CSxCnzwU.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-CPBzE96V.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-Dtv6U3df.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-QxJfswhK.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-CVdssZBD.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BCxE0RTB.mjs +0 -111
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BCxE0RTB.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-DVaZN9QN.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-DPGHgXa6.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-CdiNW691.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-D4hU2SCE.mjs +0 -160
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-D4hU2SCE.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DZeByyDy.mjs +0 -1610
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DZeByyDy.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-BVTklnzs.mjs +0 -120
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-BVTklnzs.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-rGsMVAZj.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-401.component-53VB-PS_.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-404.component-DVF9soT5.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-offline.component-CwNNHzZn.mjs +0 -19
- package/fesm2022/acorex-platform-themes-default-error-offline.component-CwNNHzZn.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-TJ9PWHMY.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-BHcKkIx0.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-BUPs84MI.mjs +0 -65
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-BUPs84MI.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-BotknoHn.mjs +0 -64
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-BotknoHn.mjs.map +0 -1
- package/runtime/index.d.ts +0 -307
- /package/{index.d.ts → types/acorex-platform.d.ts} +0 -0
|
@@ -3,6 +3,8 @@ import { InjectionToken, Injector, Injectable, signal, inject, Input, Directive,
|
|
|
3
3
|
import { AXPBroadcastEventService, AXP_SESSION_SERVICE } from '@acorex/platform/core';
|
|
4
4
|
import { isEmpty } from 'lodash-es';
|
|
5
5
|
import { map, BehaviorSubject, shareReplay, defaultIfEmpty, switchMap, filter, from, first } from 'rxjs';
|
|
6
|
+
import { AXDataSource } from '@acorex/cdk/common';
|
|
7
|
+
import { AXPWidgetsCatalog } from '@acorex/platform/layout/widget-core';
|
|
6
8
|
|
|
7
9
|
const AXP_APPLICATION_LOADER = new InjectionToken('AXP_APPLICATION_LOADER', {
|
|
8
10
|
providedIn: 'root',
|
|
@@ -72,10 +74,10 @@ class AXPAuthStrategyRegistryService {
|
|
|
72
74
|
get(strategyKey) {
|
|
73
75
|
return this.strategies.get(strategyKey);
|
|
74
76
|
}
|
|
75
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
76
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
77
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPAuthStrategyRegistryService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
78
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPAuthStrategyRegistryService, providedIn: 'root' }); }
|
|
77
79
|
}
|
|
78
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
80
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPAuthStrategyRegistryService, decorators: [{
|
|
79
81
|
type: Injectable,
|
|
80
82
|
args: [{
|
|
81
83
|
providedIn: 'root'
|
|
@@ -98,7 +100,7 @@ class AXPFeatureDirective {
|
|
|
98
100
|
constructor(templateRef, viewContainer) {
|
|
99
101
|
this.templateRef = templateRef;
|
|
100
102
|
this.viewContainer = viewContainer;
|
|
101
|
-
this.hasView = signal(false, ...(ngDevMode ? [{ debugName: "hasView" }] : []));
|
|
103
|
+
this.hasView = signal(false, ...(ngDevMode ? [{ debugName: "hasView" }] : /* istanbul ignore next */ []));
|
|
102
104
|
this.sessionService = inject(AXPSessionService);
|
|
103
105
|
}
|
|
104
106
|
set feature(featureKeys) {
|
|
@@ -132,10 +134,10 @@ class AXPFeatureDirective {
|
|
|
132
134
|
ngOnDestroy() {
|
|
133
135
|
this.subscription?.unsubscribe();
|
|
134
136
|
}
|
|
135
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
136
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
137
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFeatureDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
138
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: AXPFeatureDirective, isStandalone: false, selector: "[feature]", inputs: { feature: "feature", featureElse: "featureElse" }, ngImport: i0 }); }
|
|
137
139
|
}
|
|
138
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
140
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFeatureDirective, decorators: [{
|
|
139
141
|
type: Directive,
|
|
140
142
|
args: [{
|
|
141
143
|
selector: '[feature]',
|
|
@@ -352,6 +354,8 @@ class AXPSessionService {
|
|
|
352
354
|
if (!result)
|
|
353
355
|
return;
|
|
354
356
|
if (result?.succeed) {
|
|
357
|
+
this.permissionsSubject.next([]);
|
|
358
|
+
this.featuresSubject.next([]);
|
|
355
359
|
this.currentUserSubject.next(result.data.user);
|
|
356
360
|
this.setSession({
|
|
357
361
|
accessToken: result.data.accessToken,
|
|
@@ -363,6 +367,8 @@ class AXPSessionService {
|
|
|
363
367
|
expiresIn: result.data?.expiresIn,
|
|
364
368
|
idToken: result.data?.idToken ?? null,
|
|
365
369
|
});
|
|
370
|
+
await this.loadPermissions();
|
|
371
|
+
await this.loadFeatures();
|
|
366
372
|
}
|
|
367
373
|
else {
|
|
368
374
|
this.status.next(AXPSessionStatus.Unauthenticated);
|
|
@@ -633,10 +639,10 @@ class AXPSessionService {
|
|
|
633
639
|
application: this.application,
|
|
634
640
|
});
|
|
635
641
|
}
|
|
636
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
637
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
642
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSessionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
643
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSessionService, providedIn: 'root' }); }
|
|
638
644
|
}
|
|
639
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
645
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSessionService, decorators: [{
|
|
640
646
|
type: Injectable,
|
|
641
647
|
args: [{
|
|
642
648
|
providedIn: 'root',
|
|
@@ -647,7 +653,7 @@ class AXPPermissionDirective {
|
|
|
647
653
|
constructor(templateRef, viewContainer) {
|
|
648
654
|
this.templateRef = templateRef;
|
|
649
655
|
this.viewContainer = viewContainer;
|
|
650
|
-
this.hasView = signal(false, ...(ngDevMode ? [{ debugName: "hasView" }] : []));
|
|
656
|
+
this.hasView = signal(false, ...(ngDevMode ? [{ debugName: "hasView" }] : /* istanbul ignore next */ []));
|
|
651
657
|
this.sessionService = inject(AXPSessionService);
|
|
652
658
|
}
|
|
653
659
|
set permission(permissionKeys) {
|
|
@@ -680,10 +686,10 @@ class AXPPermissionDirective {
|
|
|
680
686
|
ngOnDestroy() {
|
|
681
687
|
this.subscription?.unsubscribe();
|
|
682
688
|
}
|
|
683
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
684
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
689
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPPermissionDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
690
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: AXPPermissionDirective, isStandalone: false, selector: "[permission]", inputs: { permission: "permission", permissionElse: "permissionElse" }, ngImport: i0 }); }
|
|
685
691
|
}
|
|
686
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
692
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPPermissionDirective, decorators: [{
|
|
687
693
|
type: Directive,
|
|
688
694
|
args: [{
|
|
689
695
|
selector: '[permission]',
|
|
@@ -886,14 +892,106 @@ class AXPPermissionDefinitionService {
|
|
|
886
892
|
await this.load();
|
|
887
893
|
return this.cache?.find(g => g.permissions.find(p => p.name === name))?.permissions.find(p => p.name === name) ?? null;
|
|
888
894
|
}
|
|
889
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
890
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
895
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPPermissionDefinitionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
896
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPPermissionDefinitionService, providedIn: 'root' }); }
|
|
891
897
|
}
|
|
892
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
898
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPPermissionDefinitionService, decorators: [{
|
|
893
899
|
type: Injectable,
|
|
894
900
|
args: [{ providedIn: 'root' }]
|
|
895
901
|
}] });
|
|
896
902
|
|
|
903
|
+
//#region ---- Imports ----
|
|
904
|
+
//#endregion
|
|
905
|
+
//#region ---- Helpers ----
|
|
906
|
+
function flattenPermissionDefinitions(nodes, groupPrefix) {
|
|
907
|
+
const rows = [];
|
|
908
|
+
for (const node of nodes) {
|
|
909
|
+
const displayTitle = groupPrefix ? `${groupPrefix} / ${node.title}` : node.title;
|
|
910
|
+
if (node.children?.length) {
|
|
911
|
+
rows.push(...flattenPermissionDefinitions(node.children, displayTitle));
|
|
912
|
+
}
|
|
913
|
+
else {
|
|
914
|
+
rows.push({
|
|
915
|
+
id: String(node.name),
|
|
916
|
+
title: displayTitle,
|
|
917
|
+
});
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
return rows;
|
|
921
|
+
}
|
|
922
|
+
//#endregion
|
|
923
|
+
//#region ---- Permission definitions data source ----
|
|
924
|
+
/**
|
|
925
|
+
* Registered permission definitions for select widgets via dataSource name {@link PERMISSION_DEFINITIONS_DATASOURCE_NAME}.
|
|
926
|
+
*/
|
|
927
|
+
const PERMISSION_DEFINITIONS_DATASOURCE_NAME = 'platform-permission-definitions';
|
|
928
|
+
/**
|
|
929
|
+
* Data source definition for leaf permissions from {@link AXPPermissionDefinitionService#getGroups}.
|
|
930
|
+
*/
|
|
931
|
+
class AXPPermissionDefinitionsDataSourceDefinition {
|
|
932
|
+
constructor() {
|
|
933
|
+
//#region ---- Services & Dependencies ----
|
|
934
|
+
this.permissionDefinitionService = inject(AXPPermissionDefinitionService);
|
|
935
|
+
//#endregion
|
|
936
|
+
}
|
|
937
|
+
//#endregion
|
|
938
|
+
//#region ---- Public API ----
|
|
939
|
+
async items() {
|
|
940
|
+
return [
|
|
941
|
+
{
|
|
942
|
+
name: PERMISSION_DEFINITIONS_DATASOURCE_NAME,
|
|
943
|
+
title: 'Permissions',
|
|
944
|
+
source: () => new AXDataSource({
|
|
945
|
+
key: 'id',
|
|
946
|
+
load: async () => {
|
|
947
|
+
const groups = await this.permissionDefinitionService.getGroups();
|
|
948
|
+
const list = [];
|
|
949
|
+
for (const g of groups) {
|
|
950
|
+
list.push(...flattenPermissionDefinitions(g.permissions, g.title));
|
|
951
|
+
}
|
|
952
|
+
return { items: list, total: list.length };
|
|
953
|
+
},
|
|
954
|
+
byKey: async (key) => {
|
|
955
|
+
const groups = await this.permissionDefinitionService.getGroups();
|
|
956
|
+
const list = [];
|
|
957
|
+
for (const g of groups) {
|
|
958
|
+
list.push(...flattenPermissionDefinitions(g.permissions, g.title));
|
|
959
|
+
}
|
|
960
|
+
return list.find((item) => item.id === key);
|
|
961
|
+
},
|
|
962
|
+
pageSize: 1000,
|
|
963
|
+
}),
|
|
964
|
+
columns: [
|
|
965
|
+
{
|
|
966
|
+
name: 'id',
|
|
967
|
+
title: 'ID',
|
|
968
|
+
datatype: 'string',
|
|
969
|
+
type: AXPWidgetsCatalog.text,
|
|
970
|
+
},
|
|
971
|
+
{
|
|
972
|
+
name: 'title',
|
|
973
|
+
title: 'Title',
|
|
974
|
+
datatype: 'string',
|
|
975
|
+
type: AXPWidgetsCatalog.text,
|
|
976
|
+
},
|
|
977
|
+
],
|
|
978
|
+
filters: [
|
|
979
|
+
{
|
|
980
|
+
field: 'title',
|
|
981
|
+
title: 'Title',
|
|
982
|
+
operator: { type: 'equal' },
|
|
983
|
+
widget: { type: AXPWidgetsCatalog.text },
|
|
984
|
+
filterType: { advance: true, inline: true },
|
|
985
|
+
},
|
|
986
|
+
],
|
|
987
|
+
textField: { name: 'title', title: 'Title' },
|
|
988
|
+
valueField: { name: 'id', title: 'ID' },
|
|
989
|
+
},
|
|
990
|
+
];
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
//#endregion
|
|
994
|
+
|
|
897
995
|
class AXPPermissionEvaluatorScopeProvider {
|
|
898
996
|
constructor() {
|
|
899
997
|
this.sessionService = inject(AXPSessionService);
|
|
@@ -983,9 +1081,9 @@ class AXPAuthModule {
|
|
|
983
1081
|
f();
|
|
984
1082
|
});
|
|
985
1083
|
}
|
|
986
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
987
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
988
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1084
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPAuthModule, deps: [{ token: 'AXPAuthModuleFactory', optional: true }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1085
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXPAuthModule, declarations: [AXPPermissionDirective, AXPFeatureDirective], exports: [AXPPermissionDirective, AXPFeatureDirective] }); }
|
|
1086
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPAuthModule, providers: [
|
|
989
1087
|
provideAppInitializer(() => {
|
|
990
1088
|
const initializerFn = initializeAppState(inject(AXPSessionService));
|
|
991
1089
|
return initializerFn();
|
|
@@ -996,7 +1094,7 @@ class AXPAuthModule {
|
|
|
996
1094
|
},
|
|
997
1095
|
] }); }
|
|
998
1096
|
}
|
|
999
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1097
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPAuthModule, decorators: [{
|
|
1000
1098
|
type: NgModule,
|
|
1001
1099
|
args: [{
|
|
1002
1100
|
imports: [],
|
|
@@ -1231,11 +1329,11 @@ class AXPLoginChallengeComponentBase {
|
|
|
1231
1329
|
* Challenge data to display
|
|
1232
1330
|
* Contains the image/content and metadata from the server
|
|
1233
1331
|
*/
|
|
1234
|
-
this.challengeData = input.required(...(ngDevMode ? [{ debugName: "challengeData" }] : []));
|
|
1332
|
+
this.challengeData = input.required(...(ngDevMode ? [{ debugName: "challengeData" }] : /* istanbul ignore next */ []));
|
|
1235
1333
|
/**
|
|
1236
1334
|
* Whether the challenge is currently loading (e.g., refreshing)
|
|
1237
1335
|
*/
|
|
1238
|
-
this.isLoading = input(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
|
|
1336
|
+
this.isLoading = input(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
|
|
1239
1337
|
//#endregion
|
|
1240
1338
|
//#region ---- Outputs ----
|
|
1241
1339
|
/**
|
|
@@ -1249,10 +1347,10 @@ class AXPLoginChallengeComponentBase {
|
|
|
1249
1347
|
*/
|
|
1250
1348
|
this.refreshRequest = output();
|
|
1251
1349
|
}
|
|
1252
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1253
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
1350
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLoginChallengeComponentBase, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1351
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: AXPLoginChallengeComponentBase, isStandalone: true, selector: "ng-component", inputs: { challengeData: { classPropertyName: "challengeData", publicName: "challengeData", isSignal: true, isRequired: true, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { responseChange: "responseChange", refreshRequest: "refreshRequest" }, ngImport: i0, template: '', isInline: true }); }
|
|
1254
1352
|
}
|
|
1255
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1353
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLoginChallengeComponentBase, decorators: [{
|
|
1256
1354
|
type: Component,
|
|
1257
1355
|
args: [{
|
|
1258
1356
|
template: '',
|
|
@@ -1264,5 +1362,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
1264
1362
|
* Generated bundle index. Do not edit.
|
|
1265
1363
|
*/
|
|
1266
1364
|
|
|
1267
|
-
export { AXPAuthGuard, AXPAuthModule, AXPAuthStrategy, AXPAuthStrategyRegistryService, AXPFeatureDirective, AXPFeatureGuard, AXPLoginChallengeComponentBase, AXPLoginChallengeProvider, AXPPermissionDefinitionBuilder, AXPPermissionDefinitionGroupBuilder, AXPPermissionDefinitionProviderContext, AXPPermissionDefinitionService, AXPPermissionDirective, AXPPermissionEvaluatorScopeProvider, AXPPermissionGuard, AXPSessionContext, AXPSessionService, AXPSessionStatus, AXPUnauthenticatedError, AXPUnauthorizedError, AXP_APPLICATION_LOADER, AXP_FEATURE_CHECKER, AXP_FEATURE_LOADER, AXP_LOGIN_CHALLENGE_PROVIDER, AXP_PERMISSION_CHECKER, AXP_PERMISSION_DEFINITION_PROVIDER, AXP_PERMISSION_LOADER, AXP_TENANT_LOADER, JwtUtil, PkceUtil, TimeUtil, initializeAppState };
|
|
1365
|
+
export { AXPAuthGuard, AXPAuthModule, AXPAuthStrategy, AXPAuthStrategyRegistryService, AXPFeatureDirective, AXPFeatureGuard, AXPLoginChallengeComponentBase, AXPLoginChallengeProvider, AXPPermissionDefinitionBuilder, AXPPermissionDefinitionGroupBuilder, AXPPermissionDefinitionProviderContext, AXPPermissionDefinitionService, AXPPermissionDefinitionsDataSourceDefinition, AXPPermissionDirective, AXPPermissionEvaluatorScopeProvider, AXPPermissionGuard, AXPSessionContext, AXPSessionService, AXPSessionStatus, AXPUnauthenticatedError, AXPUnauthorizedError, AXP_APPLICATION_LOADER, AXP_FEATURE_CHECKER, AXP_FEATURE_LOADER, AXP_LOGIN_CHALLENGE_PROVIDER, AXP_PERMISSION_CHECKER, AXP_PERMISSION_DEFINITION_PROVIDER, AXP_PERMISSION_LOADER, AXP_TENANT_LOADER, JwtUtil, PERMISSION_DEFINITIONS_DATASOURCE_NAME, PkceUtil, TimeUtil, initializeAppState };
|
|
1268
1366
|
//# sourceMappingURL=acorex-platform-auth.mjs.map
|