@acorex/platform 19.3.0-next.4 → 19.3.0
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/app/index.d.ts +0 -1
- package/common/lib/common.module.d.ts +1 -1
- package/common/lib/configs/app.config.d.ts +12 -3
- package/common/lib/home-page/home-page.service.d.ts +6 -0
- package/common/lib/layout/logo/logo.component.d.ts +4 -0
- package/common/lib/settings/settings.service.d.ts +4 -1
- package/common/lib/utils/regional-util.service.d.ts +2 -2
- package/common/lib/utils/regional.types.d.ts +6 -16
- package/core/lib/index.d.ts +1 -0
- package/{common/lib/app → core/lib/startup}/app-startup.service.d.ts +1 -5
- package/core/lib/startup/app-startup.types.d.ts +6 -0
- package/core/lib/startup/index.d.ts +2 -0
- package/core/lib/types/logo.types.d.ts +5 -9
- package/fesm2022/acorex-platform-auth.mjs +5 -1
- package/fesm2022/acorex-platform-auth.mjs.map +1 -1
- package/fesm2022/acorex-platform-common.mjs +130 -85
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +42 -13
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +17 -0
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +2 -2
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +51 -24
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-search.mjs +4 -3
- package/fesm2022/acorex-platform-layout-search.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-setting.mjs +5 -4
- package/fesm2022/acorex-platform-layout-setting.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-CuyWAi6X.mjs → acorex-platform-themes-default-entity-master-list-view.component-Ol8haGqF.mjs} +5 -4
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-Ol8haGqF.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +18 -20
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-shared.mjs +22 -18
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/acorex-platform-widgets.mjs +770 -123
- package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
- package/layout/builder/lib/builder/context-store.service.d.ts +2 -1
- package/layout/builder/lib/builder/widget-base.component.d.ts +1 -0
- package/layout/builder/lib/builder/widget-container.component.d.ts +1 -0
- package/layout/builder/lib/builder/widget-map.d.ts +1 -0
- package/layout/builder/lib/builder/widget-renderer.directive.d.ts +1 -0
- package/layout/entity/lib/entity-master-single.viewmodel.d.ts +1 -0
- package/layout/entity/lib/entity.module.d.ts +1 -1
- package/layout/entity/lib/widgets/lookup-widget/lookup-widget-column.component.d.ts +1 -1
- package/layout/entity/lib/widgets/lookup-widget/lookup-widget-edit.component.d.ts +2 -0
- package/layout/entity/lib/widgets/lookup-widget/lookup-widget.config.d.ts +0 -5
- package/layout/search/lib/search.module.d.ts +1 -1
- package/layout/setting/lib/settings.module.d.ts +1 -1
- package/package.json +4 -2
- package/themes/default/lib/layouts/root-layout/components/header/header.component.d.ts +12 -3
- package/themes/default/lib/layouts/root-layout/horizontal/horizontal-layout.component.d.ts +12 -6
- package/themes/default/lib/layouts/root-layout/root-layout.component.d.ts +2 -1
- package/themes/default/lib/layouts/root-layout/vertical/vertical-layout.component.d.ts +14 -5
- package/themes/shared/lib/shared.module.d.ts +1 -1
- package/widgets/lib/widgets/charts/bar-chart/bar-chart-widget.component.d.ts +31 -0
- package/widgets/lib/widgets/charts/gauge-chart/gauge-chart-widget.component.d.ts +18 -12
- package/widgets/lib/widgets/charts/index.d.ts +11 -0
- package/widgets/lib/widgets/charts/line-chart/index.d.ts +3 -0
- package/widgets/lib/widgets/charts/line-chart/line-chart-widget.component.d.ts +76 -0
- package/widgets/lib/widgets/charts/line-chart/line-chart-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/charts/line-chart/line-chart.type.d.ts +41 -0
- package/widgets/lib/widgets/charts/shared/index.d.ts +3 -0
- package/widgets/lib/widgets/charts/weather/index.d.ts +0 -1
- package/widgets/lib/widgets/index.d.ts +3 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-CuyWAi6X.mjs.map +0 -1
- package/widgets/lib/widgets/charts/weather/weather.module.d.ts +0 -11
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { InjectionToken, inject, Injectable, computed, signal, Injector, effect, HostBinding, ChangeDetectionStrategy, Component, viewChild, ViewChild, NgModule } from '@angular/core';
|
|
3
|
-
import { castArray, get, cloneDeep, set, merge, isNil, sortBy } from 'lodash-es';
|
|
3
|
+
import { castArray, get, cloneDeep, set, merge, isNil, isEmpty, sortBy } from 'lodash-es';
|
|
4
4
|
import * as i2 from '@acorex/components/common';
|
|
5
5
|
import { AXDataSource, AXCommonModule } from '@acorex/components/common';
|
|
6
6
|
import { AXFormatService } from '@acorex/core/format';
|
|
7
|
-
import * as i1$4 from '@acorex/platform/common';
|
|
8
7
|
import { resolveActionLook, AXPFilterOperatorMiddlewareService, AXPEntityCommandScope, getEntityInfo, AXPSettingService, AXPRefreshEvent, AXPCleanNestedFilters, AXPWorkflowNavigateAction, AXPToastAction, AXP_SEARCH_DEFINITION_PROVIDER } from '@acorex/platform/common';
|
|
9
8
|
import * as i2$2 from '@acorex/platform/workflow';
|
|
10
9
|
import { AXPWorkflowService, ofType, createWorkFlowEvent, AXPWorkflowAction, AXPWorkflowModule } from '@acorex/platform/workflow';
|
|
11
|
-
import
|
|
10
|
+
import * as i1$4 from '@acorex/platform/core';
|
|
11
|
+
import { AXPExpressionEvaluatorService, AXPPlatformScope, extractValue, setSmart } from '@acorex/platform/core';
|
|
12
12
|
import * as i7 from '@acorex/platform/layout/builder';
|
|
13
13
|
import { AXPPageStatus, AXPWidgetRegistryService, AXPValueWidgetComponent, AXPLayoutBuilderModule, AXPColumnWidgetComponent, AXPWidgetsCatalog, AXPWidgetGroupEnum, AXP_WIDGETS_EDITOR_CATEGORY } from '@acorex/platform/layout/builder';
|
|
14
14
|
import { AXPLayoutThemeService } from '@acorex/platform/themes/shared';
|
|
@@ -1472,6 +1472,7 @@ class AXPEntityMasterSingleElementViewModel {
|
|
|
1472
1472
|
this.propertyView = propertyView;
|
|
1473
1473
|
this.property = this.entity.properties.find((c) => c.name == this.propertyView.name);
|
|
1474
1474
|
this.name = signal(this.property.name);
|
|
1475
|
+
this.path = signal(this.propertyView.dataPath ?? this.property.name);
|
|
1475
1476
|
this.title = signal(this.property.title);
|
|
1476
1477
|
this.showLabel = signal(this.propertyView.layout?.label?.visible != false);
|
|
1477
1478
|
this.description = signal(this.property.description);
|
|
@@ -1487,7 +1488,7 @@ class AXPEntityMasterSingleElementViewModel {
|
|
|
1487
1488
|
return {
|
|
1488
1489
|
type: widget.type,
|
|
1489
1490
|
mode: 'view',
|
|
1490
|
-
path: this.
|
|
1491
|
+
path: this.path(),
|
|
1491
1492
|
children: widget.children,
|
|
1492
1493
|
formula: widget.formula,
|
|
1493
1494
|
valueTransforms: widget.valueTransforms,
|
|
@@ -2218,6 +2219,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
2218
2219
|
this.translateService = inject(AXTranslationService);
|
|
2219
2220
|
this.expose = computed(() => this.options()['expose']);
|
|
2220
2221
|
this.entity = computed(() => this.options()['entity']);
|
|
2222
|
+
this.disabled = computed(() => this.options()['disabled']);
|
|
2221
2223
|
this.customFilter = computed(() => this.options()['filter']);
|
|
2222
2224
|
this.multiple = computed(() => (this.options()['multiple'] ?? false));
|
|
2223
2225
|
this.textField = computed(() => {
|
|
@@ -2254,19 +2256,23 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
2254
2256
|
#efValue;
|
|
2255
2257
|
async findByValue() {
|
|
2256
2258
|
this.isLoading.set(true);
|
|
2259
|
+
const rawValue = this.getValue();
|
|
2260
|
+
const values = castArray(rawValue);
|
|
2257
2261
|
const byKey = this.entityDef()?.queries.byKey?.execute;
|
|
2258
|
-
if (byKey) {
|
|
2259
|
-
const rawValue = this.getValue();
|
|
2260
|
-
const values = castArray(rawValue);
|
|
2262
|
+
if (byKey && values.length) {
|
|
2261
2263
|
if (this.multiple()) {
|
|
2262
2264
|
const items = await Promise.all(values.map((value) => byKey(extractValue(value, this.valueField()))));
|
|
2263
2265
|
this.setItems(items);
|
|
2264
2266
|
}
|
|
2265
2267
|
else {
|
|
2266
|
-
const
|
|
2268
|
+
const id = extractValue(values[0], this.valueField());
|
|
2269
|
+
const item = await byKey(id);
|
|
2267
2270
|
this.setItems(item);
|
|
2268
2271
|
}
|
|
2269
2272
|
}
|
|
2273
|
+
else {
|
|
2274
|
+
this.setItems([]);
|
|
2275
|
+
}
|
|
2270
2276
|
this.isLoading.set(false);
|
|
2271
2277
|
}
|
|
2272
2278
|
handleOnClick(e) {
|
|
@@ -2298,7 +2304,12 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
2298
2304
|
}
|
|
2299
2305
|
handleValueChange(e) {
|
|
2300
2306
|
if (e.isUserInteraction) {
|
|
2301
|
-
|
|
2307
|
+
if (isNil(e.value) || isEmpty(e.value)) {
|
|
2308
|
+
this.clear();
|
|
2309
|
+
}
|
|
2310
|
+
else {
|
|
2311
|
+
this.setValue(this.singleOrMultiple(e.value));
|
|
2312
|
+
}
|
|
2302
2313
|
}
|
|
2303
2314
|
}
|
|
2304
2315
|
handleOnBlur(e) {
|
|
@@ -2328,7 +2339,8 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
2328
2339
|
}
|
|
2329
2340
|
}
|
|
2330
2341
|
setItems(items) {
|
|
2331
|
-
if (!items) {
|
|
2342
|
+
if (!items || items.length == 0) {
|
|
2343
|
+
this.selectedItems.set([]);
|
|
2332
2344
|
return;
|
|
2333
2345
|
}
|
|
2334
2346
|
//
|
|
@@ -2336,25 +2348,33 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
2336
2348
|
this.clearInput();
|
|
2337
2349
|
this.selectedItems.set(items);
|
|
2338
2350
|
//
|
|
2339
|
-
const
|
|
2351
|
+
const keys = items.map((item) => get(item, this.valueField()));
|
|
2340
2352
|
//
|
|
2341
|
-
this.setValue(
|
|
2353
|
+
this.setValue(this.singleOrMultiple(keys));
|
|
2342
2354
|
//
|
|
2343
2355
|
// extract data from valueField and set context by expose path
|
|
2344
2356
|
if (this.expose()) {
|
|
2345
2357
|
const exposeValue = castArray(this.expose());
|
|
2358
|
+
const itemToExpose = {};
|
|
2359
|
+
//
|
|
2346
2360
|
exposeValue.forEach((i) => {
|
|
2361
|
+
debugger;
|
|
2347
2362
|
if (typeof i == 'string') {
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2363
|
+
const values = items.map((item) => set({}, i, get(item, i)));
|
|
2364
|
+
//this.contextService.update(i, this.singleOrMultiple(values));
|
|
2365
|
+
setSmart(itemToExpose, i, this.singleOrMultiple(values));
|
|
2351
2366
|
}
|
|
2352
2367
|
else {
|
|
2353
2368
|
// extract data from item by source path and set context by target path
|
|
2354
|
-
const values =
|
|
2355
|
-
|
|
2369
|
+
const values = this.multiple() ?
|
|
2370
|
+
items.map((item) => set({}, i.source, get(item, i.source))) :
|
|
2371
|
+
items.map((item) => get(item, i.source));
|
|
2372
|
+
setSmart(itemToExpose, i.target, this.singleOrMultiple(values));
|
|
2356
2373
|
}
|
|
2357
2374
|
});
|
|
2375
|
+
debugger;
|
|
2376
|
+
this.contextService.patch(itemToExpose);
|
|
2377
|
+
//this.contextService.update(i.target, this.singleOrMultiple(values));
|
|
2358
2378
|
}
|
|
2359
2379
|
}
|
|
2360
2380
|
handleClearClick() {
|
|
@@ -2369,16 +2389,20 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
2369
2389
|
this.textbox()?.inputValue.set('');
|
|
2370
2390
|
this.searchTerm.set('');
|
|
2371
2391
|
}
|
|
2392
|
+
singleOrMultiple(values) {
|
|
2393
|
+
return this.multiple() ? values : values[0];
|
|
2394
|
+
}
|
|
2372
2395
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLookupWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2373
2396
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPLookupWidgetEditComponent, isStandalone: true, selector: "axp-lookup-widget-edit", viewQueries: [{ propertyName: "textbox", first: true, predicate: AXTagBoxComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
2374
2397
|
<ax-tag-box
|
|
2375
2398
|
[ngModel]="selectedItems()"
|
|
2376
2399
|
[textField]="textField()"
|
|
2377
2400
|
[valueField]="valueField()"
|
|
2378
|
-
(onValueChanged)="handleValueChange($event)"
|
|
2401
|
+
(onValueChanged)="handleValueChange($event)"
|
|
2379
2402
|
[placeholder]="placeholder() | translate | async"
|
|
2380
2403
|
[addOnEnter]="false"
|
|
2381
2404
|
[addOnComma]="false"
|
|
2405
|
+
[disabled]="disabled()"
|
|
2382
2406
|
(onKeyUp)="handleKeyUp($event)"
|
|
2383
2407
|
(onBlur)="handleOnBlur($event)"
|
|
2384
2408
|
>
|
|
@@ -2393,7 +2417,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
2393
2417
|
}
|
|
2394
2418
|
|
|
2395
2419
|
<ax-suffix>
|
|
2396
|
-
<ax-button color="ghost" look="blank" [disabled]="isLoading()" (onClick)="handleOnClick($event)">
|
|
2420
|
+
<ax-button color="ghost" look="blank" [disabled]="isLoading() || disabled()" (onClick)="handleOnClick($event)">
|
|
2397
2421
|
@if(isLoading()) {
|
|
2398
2422
|
<ax-loading></ax-loading>
|
|
2399
2423
|
} @else {
|
|
@@ -2415,10 +2439,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2415
2439
|
[ngModel]="selectedItems()"
|
|
2416
2440
|
[textField]="textField()"
|
|
2417
2441
|
[valueField]="valueField()"
|
|
2418
|
-
(onValueChanged)="handleValueChange($event)"
|
|
2442
|
+
(onValueChanged)="handleValueChange($event)"
|
|
2419
2443
|
[placeholder]="placeholder() | translate | async"
|
|
2420
2444
|
[addOnEnter]="false"
|
|
2421
2445
|
[addOnComma]="false"
|
|
2446
|
+
[disabled]="disabled()"
|
|
2422
2447
|
(onKeyUp)="handleKeyUp($event)"
|
|
2423
2448
|
(onBlur)="handleOnBlur($event)"
|
|
2424
2449
|
>
|
|
@@ -2433,7 +2458,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2433
2458
|
}
|
|
2434
2459
|
|
|
2435
2460
|
<ax-suffix>
|
|
2436
|
-
<ax-button color="ghost" look="blank" [disabled]="isLoading()" (onClick)="handleOnClick($event)">
|
|
2461
|
+
<ax-button color="ghost" look="blank" [disabled]="isLoading() || disabled()" (onClick)="handleOnClick($event)">
|
|
2437
2462
|
@if(isLoading()) {
|
|
2438
2463
|
<ax-loading></ax-loading>
|
|
2439
2464
|
} @else {
|
|
@@ -2469,7 +2494,7 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
2469
2494
|
super(...arguments);
|
|
2470
2495
|
this.valueField = this.options['valueField'] ?? 'id';
|
|
2471
2496
|
this.textField = this.options['textField'] ?? 'title';
|
|
2472
|
-
this.
|
|
2497
|
+
this.displayItems = computed(() => castArray(this.rawValue).map((item) => this.extractItem(item)));
|
|
2473
2498
|
}
|
|
2474
2499
|
extractItem(item) {
|
|
2475
2500
|
return typeof item == 'object'
|
|
@@ -2485,7 +2510,7 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
2485
2510
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLookupWidgetColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2486
2511
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPLookupWidgetColumnComponent, isStandalone: true, selector: "ng-component", inputs: { rawValue: "rawValue" }, usesInheritance: true, ngImport: i0, template: `
|
|
2487
2512
|
<div class="ax-flex ax-gap-1">
|
|
2488
|
-
@for (item of
|
|
2513
|
+
@for (item of displayItems(); track $index) {
|
|
2489
2514
|
<ax-badge [text]="item[this.textField]" color="primary"></ax-badge>
|
|
2490
2515
|
}
|
|
2491
2516
|
</div>
|
|
@@ -2496,7 +2521,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2496
2521
|
args: [{
|
|
2497
2522
|
template: `
|
|
2498
2523
|
<div class="ax-flex ax-gap-1">
|
|
2499
|
-
@for (item of
|
|
2524
|
+
@for (item of displayItems(); track $index) {
|
|
2500
2525
|
<ax-badge [text]="item[this.textField]" color="primary"></ax-badge>
|
|
2501
2526
|
}
|
|
2502
2527
|
</div>
|
|
@@ -3390,6 +3415,7 @@ class AXPEntityModule {
|
|
|
3390
3415
|
appInitService.registerTask({
|
|
3391
3416
|
name: 'layout-theme',
|
|
3392
3417
|
statusText: 'Preload entities ...',
|
|
3418
|
+
priority: 100,
|
|
3393
3419
|
run: async () => {
|
|
3394
3420
|
// load in background
|
|
3395
3421
|
service.preload();
|
|
@@ -3398,6 +3424,7 @@ class AXPEntityModule {
|
|
|
3398
3424
|
appInitService.registerTask({
|
|
3399
3425
|
name: 'Seeder',
|
|
3400
3426
|
statusText: 'Seed Data ...',
|
|
3427
|
+
priority: 100,
|
|
3401
3428
|
run: async () => {
|
|
3402
3429
|
await seederService.seed();
|
|
3403
3430
|
},
|