@acorex/platform 19.3.0-next.5 → 19.3.1
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/index.d.ts +0 -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 -218
- 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-components.mjs +247 -0
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -0
- 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 +44 -20
- 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-tabular-data-edit-popup.component-CybYV1Kf.mjs → acorex-platform-widgets-tabular-data-edit-popup.component-1IseEVXQ.mjs} +2 -2
- package/fesm2022/acorex-platform-widgets-tabular-data-edit-popup.component-1IseEVXQ.mjs.map +1 -0
- package/fesm2022/acorex-platform-widgets.mjs +35 -3775
- 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/components/README.md +3 -0
- package/layout/components/index.d.ts +1 -0
- package/layout/components/lib/user-avatar/index.d.ts +4 -0
- package/layout/components/lib/user-avatar/user-avatar.component.d.ts +27 -0
- package/layout/components/lib/user-avatar/user-avatar.provider.d.ts +3 -0
- package/layout/components/lib/user-avatar/user-avatar.service.d.ts +42 -0
- package/layout/components/lib/user-avatar/user-avatar.types.d.ts +12 -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 +1 -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 +8 -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/index.d.ts +0 -9
- package/common/lib/utils/data-generator.d.ts +0 -26
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-CuyWAi6X.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-tabular-data-edit-popup.component-CybYV1Kf.mjs.map +0 -1
- package/widgets/lib/widgets/charts/bar-chart/bar-chart-widget.component.d.ts +0 -41
- package/widgets/lib/widgets/charts/bar-chart/bar-chart-widget.config.d.ts +0 -7
- package/widgets/lib/widgets/charts/bar-chart/bar-chart.type.d.ts +0 -34
- package/widgets/lib/widgets/charts/bar-chart/index.d.ts +0 -2
- package/widgets/lib/widgets/charts/chart.type.d.ts +0 -3
- package/widgets/lib/widgets/charts/clock-calendar/clock-calendar-widget.component.d.ts +0 -40
- package/widgets/lib/widgets/charts/clock-calendar/clock-calendar-widget.config.d.ts +0 -7
- package/widgets/lib/widgets/charts/clock-calendar/clock-calendar.types.d.ts +0 -50
- package/widgets/lib/widgets/charts/clock-calendar/index.d.ts +0 -3
- package/widgets/lib/widgets/charts/donut-chart/donut-chart-widget.component.d.ts +0 -58
- package/widgets/lib/widgets/charts/donut-chart/donut-chart-widget.config.d.ts +0 -7
- package/widgets/lib/widgets/charts/donut-chart/donut-chart.type.d.ts +0 -67
- package/widgets/lib/widgets/charts/donut-chart/index.d.ts +0 -2
- package/widgets/lib/widgets/charts/gauge-chart/gauge-chart-widget.component.d.ts +0 -69
- package/widgets/lib/widgets/charts/gauge-chart/gauge-chart-widget.config.d.ts +0 -7
- package/widgets/lib/widgets/charts/gauge-chart/gauge-chart.type.d.ts +0 -29
- package/widgets/lib/widgets/charts/gauge-chart/index.d.ts +0 -3
- package/widgets/lib/widgets/charts/notification/index.d.ts +0 -3
- package/widgets/lib/widgets/charts/notification/notification-widget.component.d.ts +0 -54
- package/widgets/lib/widgets/charts/notification/notification-widget.config.d.ts +0 -10
- package/widgets/lib/widgets/charts/notification/notification.type.d.ts +0 -47
- package/widgets/lib/widgets/charts/shared/chart-base.component.d.ts +0 -44
- package/widgets/lib/widgets/charts/shared/chart-base.type.d.ts +0 -37
- package/widgets/lib/widgets/charts/shared/components/chart-tooltip/chart-tooltip.component.d.ts +0 -28
- package/widgets/lib/widgets/charts/shared/components/chart-tooltip/index.d.ts +0 -1
- package/widgets/lib/widgets/charts/sticky-note/index.d.ts +0 -2
- package/widgets/lib/widgets/charts/sticky-note/sticky-note-widget.component.d.ts +0 -21
- package/widgets/lib/widgets/charts/sticky-note/sticky-note-widget.config.d.ts +0 -7
- package/widgets/lib/widgets/charts/tasklist/index.d.ts +0 -3
- package/widgets/lib/widgets/charts/tasklist/tasklist-widget.component.d.ts +0 -34
- package/widgets/lib/widgets/charts/tasklist/tasklist-widget.config.d.ts +0 -7
- package/widgets/lib/widgets/charts/tasklist/tasklist.type.d.ts +0 -36
- package/widgets/lib/widgets/charts/weather/index.d.ts +0 -4
- package/widgets/lib/widgets/charts/weather/weather-services/index.d.ts +0 -3
- package/widgets/lib/widgets/charts/weather/weather-services/weather-api.abstract.d.ts +0 -174
- package/widgets/lib/widgets/charts/weather/weather-services/weather-api.key.d.ts +0 -2
- package/widgets/lib/widgets/charts/weather/weather-services/weather-api.mock.service.d.ts +0 -47
- package/widgets/lib/widgets/charts/weather/weather-services/weather-api.service.d.ts +0 -48
- package/widgets/lib/widgets/charts/weather/weather-widget.component.d.ts +0 -109
- package/widgets/lib/widgets/charts/weather/weather-widget.config.d.ts +0 -14
- 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,
|
|
@@ -2255,19 +2256,23 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
2255
2256
|
#efValue;
|
|
2256
2257
|
async findByValue() {
|
|
2257
2258
|
this.isLoading.set(true);
|
|
2259
|
+
const rawValue = this.getValue();
|
|
2260
|
+
const values = castArray(rawValue);
|
|
2258
2261
|
const byKey = this.entityDef()?.queries.byKey?.execute;
|
|
2259
|
-
if (byKey) {
|
|
2260
|
-
const rawValue = this.getValue();
|
|
2261
|
-
const values = castArray(rawValue);
|
|
2262
|
+
if (byKey && values.length) {
|
|
2262
2263
|
if (this.multiple()) {
|
|
2263
2264
|
const items = await Promise.all(values.map((value) => byKey(extractValue(value, this.valueField()))));
|
|
2264
2265
|
this.setItems(items);
|
|
2265
2266
|
}
|
|
2266
2267
|
else {
|
|
2267
|
-
const
|
|
2268
|
+
const id = extractValue(values[0], this.valueField());
|
|
2269
|
+
const item = await byKey(id);
|
|
2268
2270
|
this.setItems(item);
|
|
2269
2271
|
}
|
|
2270
2272
|
}
|
|
2273
|
+
else {
|
|
2274
|
+
this.setItems([]);
|
|
2275
|
+
}
|
|
2271
2276
|
this.isLoading.set(false);
|
|
2272
2277
|
}
|
|
2273
2278
|
handleOnClick(e) {
|
|
@@ -2299,7 +2304,12 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
2299
2304
|
}
|
|
2300
2305
|
handleValueChange(e) {
|
|
2301
2306
|
if (e.isUserInteraction) {
|
|
2302
|
-
|
|
2307
|
+
if (isNil(e.value) || isEmpty(e.value)) {
|
|
2308
|
+
this.clear();
|
|
2309
|
+
}
|
|
2310
|
+
else {
|
|
2311
|
+
this.setValue(this.singleOrMultiple(e.value));
|
|
2312
|
+
}
|
|
2303
2313
|
}
|
|
2304
2314
|
}
|
|
2305
2315
|
handleOnBlur(e) {
|
|
@@ -2329,7 +2339,8 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
2329
2339
|
}
|
|
2330
2340
|
}
|
|
2331
2341
|
setItems(items) {
|
|
2332
|
-
if (!items) {
|
|
2342
|
+
if (!items || items.length == 0) {
|
|
2343
|
+
this.selectedItems.set([]);
|
|
2333
2344
|
return;
|
|
2334
2345
|
}
|
|
2335
2346
|
//
|
|
@@ -2337,25 +2348,33 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
2337
2348
|
this.clearInput();
|
|
2338
2349
|
this.selectedItems.set(items);
|
|
2339
2350
|
//
|
|
2340
|
-
const
|
|
2351
|
+
const keys = items.map((item) => get(item, this.valueField()));
|
|
2341
2352
|
//
|
|
2342
|
-
this.setValue(
|
|
2353
|
+
this.setValue(this.singleOrMultiple(keys));
|
|
2343
2354
|
//
|
|
2344
2355
|
// extract data from valueField and set context by expose path
|
|
2345
2356
|
if (this.expose()) {
|
|
2346
2357
|
const exposeValue = castArray(this.expose());
|
|
2358
|
+
const itemToExpose = {};
|
|
2359
|
+
//
|
|
2347
2360
|
exposeValue.forEach((i) => {
|
|
2361
|
+
debugger;
|
|
2348
2362
|
if (typeof i == 'string') {
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
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));
|
|
2352
2366
|
}
|
|
2353
2367
|
else {
|
|
2354
2368
|
// extract data from item by source path and set context by target path
|
|
2355
|
-
const values =
|
|
2356
|
-
|
|
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));
|
|
2357
2373
|
}
|
|
2358
2374
|
});
|
|
2375
|
+
debugger;
|
|
2376
|
+
this.contextService.patch(itemToExpose);
|
|
2377
|
+
//this.contextService.update(i.target, this.singleOrMultiple(values));
|
|
2359
2378
|
}
|
|
2360
2379
|
}
|
|
2361
2380
|
handleClearClick() {
|
|
@@ -2370,6 +2389,9 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
2370
2389
|
this.textbox()?.inputValue.set('');
|
|
2371
2390
|
this.searchTerm.set('');
|
|
2372
2391
|
}
|
|
2392
|
+
singleOrMultiple(values) {
|
|
2393
|
+
return this.multiple() ? values : values[0];
|
|
2394
|
+
}
|
|
2373
2395
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLookupWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2374
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: `
|
|
2375
2397
|
<ax-tag-box
|
|
@@ -2472,7 +2494,7 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
2472
2494
|
super(...arguments);
|
|
2473
2495
|
this.valueField = this.options['valueField'] ?? 'id';
|
|
2474
2496
|
this.textField = this.options['textField'] ?? 'title';
|
|
2475
|
-
this.
|
|
2497
|
+
this.displayItems = computed(() => castArray(this.rawValue).map((item) => this.extractItem(item)));
|
|
2476
2498
|
}
|
|
2477
2499
|
extractItem(item) {
|
|
2478
2500
|
return typeof item == 'object'
|
|
@@ -2488,7 +2510,7 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
2488
2510
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLookupWidgetColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2489
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: `
|
|
2490
2512
|
<div class="ax-flex ax-gap-1">
|
|
2491
|
-
@for (item of
|
|
2513
|
+
@for (item of displayItems(); track $index) {
|
|
2492
2514
|
<ax-badge [text]="item[this.textField]" color="primary"></ax-badge>
|
|
2493
2515
|
}
|
|
2494
2516
|
</div>
|
|
@@ -2499,7 +2521,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2499
2521
|
args: [{
|
|
2500
2522
|
template: `
|
|
2501
2523
|
<div class="ax-flex ax-gap-1">
|
|
2502
|
-
@for (item of
|
|
2524
|
+
@for (item of displayItems(); track $index) {
|
|
2503
2525
|
<ax-badge [text]="item[this.textField]" color="primary"></ax-badge>
|
|
2504
2526
|
}
|
|
2505
2527
|
</div>
|
|
@@ -3393,6 +3415,7 @@ class AXPEntityModule {
|
|
|
3393
3415
|
appInitService.registerTask({
|
|
3394
3416
|
name: 'layout-theme',
|
|
3395
3417
|
statusText: 'Preload entities ...',
|
|
3418
|
+
priority: 100,
|
|
3396
3419
|
run: async () => {
|
|
3397
3420
|
// load in background
|
|
3398
3421
|
service.preload();
|
|
@@ -3401,6 +3424,7 @@ class AXPEntityModule {
|
|
|
3401
3424
|
appInitService.registerTask({
|
|
3402
3425
|
name: 'Seeder',
|
|
3403
3426
|
statusText: 'Seed Data ...',
|
|
3427
|
+
priority: 100,
|
|
3404
3428
|
run: async () => {
|
|
3405
3429
|
await seederService.seed();
|
|
3406
3430
|
},
|