@acorex/platform 19.1.4 → 19.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common/lib/workflows/common.workflow.d.ts +11 -0
- package/fesm2022/acorex-platform-common.mjs +4 -4
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +127 -94
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +540 -534
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-filters.mjs +0 -1
- package/fesm2022/acorex-platform-layout-filters.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-DAmHq1bt.mjs → acorex-platform-themes-default-entity-master-list-view.component-xlBBA76O.mjs} +3 -3
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-xlBBA76O.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +2 -2
- package/fesm2022/{acorex-platform-widgets-checkbox-widget-designer.component-RCi5IJOR.mjs → acorex-platform-widgets-checkbox-widget-designer.component-D8KErkus.mjs} +4 -4
- package/fesm2022/{acorex-platform-widgets-checkbox-widget-designer.component-RCi5IJOR.mjs.map → acorex-platform-widgets-checkbox-widget-designer.component-D8KErkus.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-widgets-color-box-widget-designer.component-CWhbgmDV.mjs → acorex-platform-widgets-color-box-widget-designer.component-B2g0ct24.mjs} +4 -4
- package/fesm2022/acorex-platform-widgets-color-box-widget-designer.component-B2g0ct24.mjs.map +1 -0
- package/fesm2022/acorex-platform-widgets.mjs +942 -160
- package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
- package/layout/builder/lib/builder/builder.module.d.ts +4 -3
- package/layout/builder/lib/builder/widget-map.d.ts +5 -0
- package/layout/builder/lib/builder/widget-placeholder.component.d.ts +5 -0
- package/layout/builder/lib/builder/widget-renderer.directive.d.ts +1 -1
- package/layout/builder/lib/builder/widget.types.d.ts +6 -2
- package/package.json +13 -13
- package/widgets/lib/widgets/editors/select/select-box-widget-edit.component.d.ts +1 -1
- package/widgets/lib/widgets/filters/boolean-filter/boolean-filter-widget-edit.component.d.ts +18 -0
- package/widgets/lib/widgets/filters/boolean-filter/boolean-filter-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/filters/boolean-filter/index.d.ts +2 -0
- package/widgets/lib/widgets/filters/date-time-filter/date-time-filter-widget-edit.component.d.ts +20 -0
- package/widgets/lib/widgets/filters/date-time-filter/date-time-filter-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/filters/date-time-filter/index.d.ts +2 -0
- package/widgets/lib/widgets/filters/number-filter/index.d.ts +2 -0
- package/widgets/lib/widgets/filters/number-filter/number-filter-widget-edit.component.d.ts +12 -0
- package/widgets/lib/widgets/filters/number-filter/number-filter-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/filters/select-filter/index.d.ts +2 -0
- package/widgets/lib/widgets/filters/select-filter/select-filter-widget-edit.component.d.ts +16 -0
- package/widgets/lib/widgets/filters/select-filter/select-filter-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/filters/string-filter/string-filter-widget-edit.component.d.ts +1 -0
- package/widgets/lib/widgets/property-editors/flex-options/flex-options-widget-editor.component.d.ts +22 -17
- package/widgets/lib/widgets/property-editors/flex-options/flex-options-widget.type.d.ts +16 -13
- package/widgets/lib/widgets/property-editors/property-editor-helper.d.ts +10 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DAmHq1bt.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-color-box-widget-designer.component-CWhbgmDV.mjs.map +0 -1
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
import * as i1$1 from '@acorex/components/skeleton';
|
|
1
2
|
import { AXSkeletonModule } from '@acorex/components/skeleton';
|
|
2
3
|
import { PortalModule } from '@angular/cdk/portal';
|
|
3
4
|
import * as i1 from '@angular/common';
|
|
4
5
|
import { CommonModule } from '@angular/common';
|
|
5
6
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { signal, computed, Injectable, inject,
|
|
7
|
-
import { set, cloneDeep, get, isEqual, merge, isNil, isUndefined, sum } from 'lodash-es';
|
|
8
|
-
import { Subject, BehaviorSubject, filter } from 'rxjs';
|
|
9
|
-
import { signalStore, withState, withComputed, withMethods, patchState } from '@ngrx/signals';
|
|
7
|
+
import { signal, computed, Injectable, InjectionToken, inject, ElementRef, effect, Injector, ChangeDetectorRef, Component, ChangeDetectionStrategy, Input, ViewChild, EventEmitter, Output, input, ViewContainerRef, Directive, NgModule, Optional, Inject } from '@angular/core';
|
|
10
8
|
import { AXDataTableColumnComponent, AXBaseDataTable } from '@acorex/components/data-table';
|
|
9
|
+
import { set, merge, cloneDeep, get, isEqual, isNil, isUndefined, sum } from 'lodash-es';
|
|
10
|
+
import { Subject, BehaviorSubject, filter } from 'rxjs';
|
|
11
11
|
import { convertArrayToDataSource, AXDataSource } from '@acorex/components/common';
|
|
12
|
+
import { signalStore, withState, withComputed, withMethods, patchState } from '@ngrx/signals';
|
|
12
13
|
import { AXUnsubscriber } from '@acorex/core/utils';
|
|
13
14
|
|
|
14
15
|
var AXPPageStatus;
|
|
@@ -121,6 +122,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
121
122
|
type: Injectable
|
|
122
123
|
}] });
|
|
123
124
|
|
|
125
|
+
class AXPWidgetRegistryService {
|
|
126
|
+
constructor() {
|
|
127
|
+
this.types = new Map();
|
|
128
|
+
}
|
|
129
|
+
register(widget) {
|
|
130
|
+
this.types.set(widget.name, widget);
|
|
131
|
+
}
|
|
132
|
+
extend(parentName, widget) {
|
|
133
|
+
const parentWidget = this.resolve(parentName);
|
|
134
|
+
const newWidget = merge({}, parentWidget, widget);
|
|
135
|
+
newWidget.name = widget.name;
|
|
136
|
+
this.register(newWidget);
|
|
137
|
+
}
|
|
138
|
+
resolve(name) {
|
|
139
|
+
const widget = this.types.get(name);
|
|
140
|
+
if (!widget) {
|
|
141
|
+
throw new Error(`Widget with name "${name}" does not exist.`);
|
|
142
|
+
}
|
|
143
|
+
return widget;
|
|
144
|
+
}
|
|
145
|
+
all() {
|
|
146
|
+
return Array.from(this.types.values());
|
|
147
|
+
}
|
|
148
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
149
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetRegistryService, providedIn: 'root' }); }
|
|
150
|
+
}
|
|
151
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetRegistryService, decorators: [{
|
|
152
|
+
type: Injectable,
|
|
153
|
+
args: [{
|
|
154
|
+
providedIn: 'root',
|
|
155
|
+
}]
|
|
156
|
+
}] });
|
|
157
|
+
|
|
124
158
|
class AXPLayoutContextChangeEvent {
|
|
125
159
|
}
|
|
126
160
|
const AXPLayoutBuilderContextStore = signalStore(
|
|
@@ -216,83 +250,6 @@ withMethods((store) => ({
|
|
|
216
250
|
},
|
|
217
251
|
})));
|
|
218
252
|
|
|
219
|
-
class AXPWidgetContainerComponent {
|
|
220
|
-
set context(value) {
|
|
221
|
-
this.contextService.set(value);
|
|
222
|
-
}
|
|
223
|
-
set functions(v) {
|
|
224
|
-
this.builderService.setFunctions(v);
|
|
225
|
-
}
|
|
226
|
-
constructor() {
|
|
227
|
-
this.contextService = inject(AXPLayoutBuilderContextStore);
|
|
228
|
-
this.builderService = inject(AXPLayoutBuilderService);
|
|
229
|
-
this.onContextChanged = new EventEmitter();
|
|
230
|
-
this.status = computed(() => {
|
|
231
|
-
return this.builderService.status();
|
|
232
|
-
});
|
|
233
|
-
this.isBusy = computed(() => {
|
|
234
|
-
return this.builderService.isBusy();
|
|
235
|
-
});
|
|
236
|
-
effect(() => {
|
|
237
|
-
if (this.contextService.isChanged()) {
|
|
238
|
-
this.onContextChanged.emit(this.contextService.changeEvent());
|
|
239
|
-
}
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
243
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: AXPWidgetContainerComponent, isStandalone: false, selector: "axp-widgets-container", inputs: { context: "context", functions: "functions" }, outputs: { onContextChanged: "onContextChanged" }, host: { styleAttribute: "display: contents;" }, providers: [AXPLayoutBuilderService, AXPLayoutBuilderContextStore], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
244
|
-
}
|
|
245
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetContainerComponent, decorators: [{
|
|
246
|
-
type: Component,
|
|
247
|
-
args: [{
|
|
248
|
-
selector: 'axp-widgets-container',
|
|
249
|
-
template: `<ng-content></ng-content>`,
|
|
250
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
251
|
-
host: { style: 'display: contents;' },
|
|
252
|
-
providers: [AXPLayoutBuilderService, AXPLayoutBuilderContextStore],
|
|
253
|
-
standalone: false,
|
|
254
|
-
}]
|
|
255
|
-
}], ctorParameters: () => [], propDecorators: { onContextChanged: [{
|
|
256
|
-
type: Output
|
|
257
|
-
}], context: [{
|
|
258
|
-
type: Input
|
|
259
|
-
}], functions: [{
|
|
260
|
-
type: Input
|
|
261
|
-
}] } });
|
|
262
|
-
|
|
263
|
-
class AXPWidgetRegistryService {
|
|
264
|
-
constructor() {
|
|
265
|
-
this.types = new Map();
|
|
266
|
-
}
|
|
267
|
-
register(widget) {
|
|
268
|
-
this.types.set(widget.name, widget);
|
|
269
|
-
}
|
|
270
|
-
extend(parentName, widget) {
|
|
271
|
-
const parentWidget = this.resolve(parentName);
|
|
272
|
-
const newWidget = merge({}, parentWidget, widget);
|
|
273
|
-
newWidget.name = widget.name;
|
|
274
|
-
this.register(newWidget);
|
|
275
|
-
}
|
|
276
|
-
resolve(name) {
|
|
277
|
-
const widget = this.types.get(name);
|
|
278
|
-
if (!widget) {
|
|
279
|
-
throw new Error(`Widget with name "${name}" does not exist.`);
|
|
280
|
-
}
|
|
281
|
-
return widget;
|
|
282
|
-
}
|
|
283
|
-
all() {
|
|
284
|
-
return Array.from(this.types.values());
|
|
285
|
-
}
|
|
286
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
287
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetRegistryService, providedIn: 'root' }); }
|
|
288
|
-
}
|
|
289
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetRegistryService, decorators: [{
|
|
290
|
-
type: Injectable,
|
|
291
|
-
args: [{
|
|
292
|
-
providedIn: 'root',
|
|
293
|
-
}]
|
|
294
|
-
}] });
|
|
295
|
-
|
|
296
253
|
const AXP_WIDGET_DATASOURCE_PROVIDER = new InjectionToken('AXP_WIDGET_DATASOURCE_PROVIDER');
|
|
297
254
|
class AXPWidgetDataSourceProviderService {
|
|
298
255
|
constructor() {
|
|
@@ -359,7 +316,12 @@ const AXPWidgetsCatalog = {
|
|
|
359
316
|
avatar: 'avatar',
|
|
360
317
|
stringFilter: 'string-filter',
|
|
361
318
|
themeColorSelection: 'theme-color-selection',
|
|
319
|
+
numberFilter: 'number-filter',
|
|
320
|
+
dateTimeFilter: 'datetime-filter',
|
|
321
|
+
booleanFilter: 'boolean-filter',
|
|
322
|
+
lookupFilter: 'lookup-filter',
|
|
362
323
|
flexOptions: 'flex-options',
|
|
324
|
+
selectFilter: 'select-filter',
|
|
363
325
|
};
|
|
364
326
|
|
|
365
327
|
function objectKeyValueTransforms(keyName) {
|
|
@@ -460,7 +422,9 @@ class AXPWidgetComponent extends AXPLayoutElement {
|
|
|
460
422
|
this._status = signal(AXPWidgetStatus.Rendering);
|
|
461
423
|
this.status = this._status.asReadonly();
|
|
462
424
|
this.onStatusChanged = new BehaviorSubject(this._status());
|
|
463
|
-
this.#statusEffect = effect(() => {
|
|
425
|
+
this.#statusEffect = effect(() => {
|
|
426
|
+
this.onStatusChanged.next(this.status());
|
|
427
|
+
});
|
|
464
428
|
this.isBusy = computed(() => [AXPWidgetStatus.Rendering, AXPWidgetStatus.Processing].includes(this.status()));
|
|
465
429
|
this.fullPath = signal(null);
|
|
466
430
|
this.getValue = computed(() => {
|
|
@@ -813,6 +777,69 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
813
777
|
args: ['header']
|
|
814
778
|
}] } });
|
|
815
779
|
|
|
780
|
+
class AXPWidgetContainerComponent {
|
|
781
|
+
set context(value) {
|
|
782
|
+
this.contextService.set(value);
|
|
783
|
+
}
|
|
784
|
+
set functions(v) {
|
|
785
|
+
this.builderService.setFunctions(v);
|
|
786
|
+
}
|
|
787
|
+
constructor() {
|
|
788
|
+
this.contextService = inject(AXPLayoutBuilderContextStore);
|
|
789
|
+
this.builderService = inject(AXPLayoutBuilderService);
|
|
790
|
+
this.onContextChanged = new EventEmitter();
|
|
791
|
+
this.status = computed(() => {
|
|
792
|
+
return this.builderService.status();
|
|
793
|
+
});
|
|
794
|
+
this.isBusy = computed(() => {
|
|
795
|
+
return this.builderService.isBusy();
|
|
796
|
+
});
|
|
797
|
+
effect(() => {
|
|
798
|
+
if (this.contextService.isChanged()) {
|
|
799
|
+
this.onContextChanged.emit(this.contextService.changeEvent());
|
|
800
|
+
}
|
|
801
|
+
});
|
|
802
|
+
}
|
|
803
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
804
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: AXPWidgetContainerComponent, isStandalone: false, selector: "axp-widgets-container", inputs: { context: "context", functions: "functions" }, outputs: { onContextChanged: "onContextChanged" }, host: { styleAttribute: "display: contents;" }, providers: [AXPLayoutBuilderService, AXPLayoutBuilderContextStore], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
805
|
+
}
|
|
806
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetContainerComponent, decorators: [{
|
|
807
|
+
type: Component,
|
|
808
|
+
args: [{
|
|
809
|
+
selector: 'axp-widgets-container',
|
|
810
|
+
template: `<ng-content></ng-content>`,
|
|
811
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
812
|
+
host: { style: 'display: contents;' },
|
|
813
|
+
providers: [AXPLayoutBuilderService, AXPLayoutBuilderContextStore],
|
|
814
|
+
standalone: false,
|
|
815
|
+
}]
|
|
816
|
+
}], ctorParameters: () => [], propDecorators: { onContextChanged: [{
|
|
817
|
+
type: Output
|
|
818
|
+
}], context: [{
|
|
819
|
+
type: Input
|
|
820
|
+
}], functions: [{
|
|
821
|
+
type: Input
|
|
822
|
+
}] } });
|
|
823
|
+
|
|
824
|
+
class AXPWidgetPlaceholderComponent {
|
|
825
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetPlaceholderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
826
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: AXPWidgetPlaceholderComponent, isStandalone: true, selector: "axp-widget-placeholder", ngImport: i0, template: `<div>
|
|
827
|
+
<ax-skeleton class="ax-w-full ax-h-10 ax-rounded-md"></ax-skeleton>
|
|
828
|
+
</div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXSkeletonModule }, { kind: "component", type: i1$1.AXSkeletonComponent, selector: "ax-skeleton", inputs: ["animated"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
829
|
+
}
|
|
830
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetPlaceholderComponent, decorators: [{
|
|
831
|
+
type: Component,
|
|
832
|
+
args: [{
|
|
833
|
+
selector: 'axp-widget-placeholder',
|
|
834
|
+
template: `<div>
|
|
835
|
+
<ax-skeleton class="ax-w-full ax-h-10 ax-rounded-md"></ax-skeleton>
|
|
836
|
+
</div>`,
|
|
837
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
838
|
+
imports: [AXSkeletonModule],
|
|
839
|
+
standalone: true,
|
|
840
|
+
}]
|
|
841
|
+
}] });
|
|
842
|
+
|
|
816
843
|
class AXPWidgetRendererDirective {
|
|
817
844
|
constructor() {
|
|
818
845
|
this.parentNode = input();
|
|
@@ -892,7 +919,7 @@ class AXPWidgetRendererDirective {
|
|
|
892
919
|
return { ...acc, ...curr };
|
|
893
920
|
}, {});
|
|
894
921
|
//
|
|
895
|
-
this.mergedOptions.set(merge(props, this.node().options) || {});
|
|
922
|
+
this.mergedOptions.set(merge(props, widget?.options, this.node().options) || {});
|
|
896
923
|
this.preprocessAndInitialOptions(cloneDeep(this.node().options));
|
|
897
924
|
await this.updateOptionsBasedOnContext();
|
|
898
925
|
//
|
|
@@ -913,6 +940,8 @@ class AXPWidgetRendererDirective {
|
|
|
913
940
|
],
|
|
914
941
|
});
|
|
915
942
|
//
|
|
943
|
+
const loadingRef = this.viewContainerRef.createComponent(AXPWidgetPlaceholderComponent);
|
|
944
|
+
//
|
|
916
945
|
const com = await widget?.components[this.mode()]?.component();
|
|
917
946
|
this.componentRef = this.viewContainerRef.createComponent(com, { injector: token });
|
|
918
947
|
this.instance = this.componentRef.instance;
|
|
@@ -924,7 +953,9 @@ class AXPWidgetRendererDirective {
|
|
|
924
953
|
await this.updateValueBasedOnFormula();
|
|
925
954
|
await this.assignTriggers();
|
|
926
955
|
//
|
|
956
|
+
loadingRef.destroy();
|
|
927
957
|
this.isLoading.set(false);
|
|
958
|
+
//
|
|
928
959
|
}
|
|
929
960
|
applyOptions() {
|
|
930
961
|
if (!this.instance)
|
|
@@ -1140,7 +1171,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
1140
1171
|
provide: AXUnsubscriber,
|
|
1141
1172
|
},
|
|
1142
1173
|
],
|
|
1143
|
-
standalone: false
|
|
1174
|
+
standalone: false,
|
|
1144
1175
|
}]
|
|
1145
1176
|
}], ctorParameters: () => [] });
|
|
1146
1177
|
|
|
@@ -1152,13 +1183,14 @@ class AXPLayoutBuilderModule {
|
|
|
1152
1183
|
providers: [
|
|
1153
1184
|
{
|
|
1154
1185
|
provide: 'AXPLayoutBuilderModuleFactory',
|
|
1155
|
-
useFactory: (registry) => () => {
|
|
1156
|
-
config?.widgets?.
|
|
1186
|
+
useFactory: (registry) => async () => {
|
|
1187
|
+
await Promise.all(config?.widgets?.map((w) => Promise.resolve(registry.register(w))) || []);
|
|
1188
|
+
await Promise.all(config?.extendedWidgets?.map((ew) => Promise.resolve(registry.extend(ew.parentName, ew.widget))) || []);
|
|
1157
1189
|
},
|
|
1158
1190
|
deps: [AXPWidgetRegistryService],
|
|
1159
|
-
multi: true
|
|
1191
|
+
multi: true,
|
|
1160
1192
|
},
|
|
1161
|
-
]
|
|
1193
|
+
],
|
|
1162
1194
|
};
|
|
1163
1195
|
}
|
|
1164
1196
|
static forChild(config) {
|
|
@@ -1167,20 +1199,21 @@ class AXPLayoutBuilderModule {
|
|
|
1167
1199
|
providers: [
|
|
1168
1200
|
{
|
|
1169
1201
|
provide: 'AXPLayoutBuilderModuleFactory',
|
|
1170
|
-
useFactory: (registry) => () => {
|
|
1171
|
-
config?.widgets?.
|
|
1202
|
+
useFactory: (registry) => async () => {
|
|
1203
|
+
await Promise.all(config?.widgets?.map((w) => Promise.resolve(registry.register(w))) || []);
|
|
1204
|
+
await Promise.all(config?.extendedWidgets?.map((ew) => Promise.resolve(registry.extend(ew.parentName, ew.widget))) || []);
|
|
1172
1205
|
},
|
|
1173
1206
|
deps: [AXPWidgetRegistryService],
|
|
1174
|
-
multi: true
|
|
1175
|
-
}
|
|
1176
|
-
]
|
|
1207
|
+
multi: true,
|
|
1208
|
+
},
|
|
1209
|
+
],
|
|
1177
1210
|
};
|
|
1178
1211
|
}
|
|
1179
1212
|
/**
|
|
1180
1213
|
* @ignore
|
|
1181
1214
|
*/
|
|
1182
1215
|
constructor(instances) {
|
|
1183
|
-
instances?.forEach(f => {
|
|
1216
|
+
instances?.forEach((f) => {
|
|
1184
1217
|
f();
|
|
1185
1218
|
});
|
|
1186
1219
|
}
|