@acorex/platform 20.0.12 → 20.0.13
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/index.d.ts +137 -2
- package/core/index.d.ts +68 -3
- package/fesm2022/acorex-platform-common.mjs +3 -0
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +11 -1
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +3 -0
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs +18 -2
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +194 -27
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-BNdAQn4R.mjs +115 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-BNdAQn4R.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +2 -2
- package/fesm2022/acorex-platform-widgets.mjs +60 -20
- package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
- package/layout/components/index.d.ts +11 -2
- package/layout/entity/index.d.ts +12 -2
- package/package.json +1 -1
- package/widgets/index.d.ts +5 -4
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-DJ_0-SyR.mjs +0 -115
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-DJ_0-SyR.mjs.map +0 -1
|
@@ -43,10 +43,10 @@ import { AXDataTableModule } from '@acorex/components/data-table';
|
|
|
43
43
|
import { AXDropdownButtonModule } from '@acorex/components/dropdown-button';
|
|
44
44
|
import { AXBasePageComponent } from '@acorex/components/page';
|
|
45
45
|
import * as i6 from '@acorex/components/search-box';
|
|
46
|
-
import { AXSearchBoxModule } from '@acorex/components/search-box';
|
|
47
|
-
import
|
|
48
|
-
import * as i5$1 from '@acorex/components/select-box';
|
|
46
|
+
import { AXSearchBoxModule, AXSearchBoxComponent } from '@acorex/components/search-box';
|
|
47
|
+
import * as i9 from '@acorex/components/select-box';
|
|
49
48
|
import { AXSelectBoxModule } from '@acorex/components/select-box';
|
|
49
|
+
import { AXP_DISABLED_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_DATA_PROPERTY_GROUP, AXP_ALLOW_MULTIPLE_PROPERTY, AXP_NAME_PROPERTY, AXPFileUploaderWidgetService } from '@acorex/platform/widgets';
|
|
50
50
|
import * as i2$1 from '@acorex/components/text-box';
|
|
51
51
|
import { AXTextBoxModule, AXTextBoxComponent } from '@acorex/components/text-box';
|
|
52
52
|
import { AXPWidgetPropertyViewerComponent } from '@acorex/platform/layout/designer';
|
|
@@ -601,17 +601,36 @@ class AXPEntityDefinitionRegistryService {
|
|
|
601
601
|
? this.providers
|
|
602
602
|
: [this.providers];
|
|
603
603
|
const promises = [];
|
|
604
|
+
// Helper to wrap a promise with a timeout
|
|
605
|
+
function withTimeout(promise, ms = 10000, info = '') {
|
|
606
|
+
return Promise.race([
|
|
607
|
+
promise,
|
|
608
|
+
new Promise((_, reject) => setTimeout(() => reject(new Error(`Timeout after ${ms}ms: ${info}`)), ms))
|
|
609
|
+
]);
|
|
610
|
+
}
|
|
604
611
|
providers.forEach((provider) => {
|
|
605
612
|
const items = typeof provider.preload == 'function' ? provider.preload() : [];
|
|
606
613
|
items.forEach((item) => {
|
|
607
|
-
|
|
614
|
+
//console.log('[AXPEntityDefinitionRegistryService] Preloading entity:', item.module, item.entity);
|
|
615
|
+
promises.push(withTimeout(this.resolver.get(item.module, item.entity)
|
|
616
|
+
.catch(err => {
|
|
617
|
+
console.error(`[AXPEntityDefinitionRegistryService] Failed to load entity ${item.module}.${item.entity}:`, err);
|
|
618
|
+
return null;
|
|
619
|
+
}), 3000, `${item.module}.${item.entity}`));
|
|
608
620
|
});
|
|
609
621
|
});
|
|
610
|
-
const
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
622
|
+
const results = await Promise.allSettled(promises);
|
|
623
|
+
const loadedEntities = [];
|
|
624
|
+
results.forEach((result, idx) => {
|
|
625
|
+
if (result.status === 'fulfilled' && result.value != null) {
|
|
626
|
+
this.register(this.middleware.process(result.value));
|
|
627
|
+
loadedEntities.push(result.value);
|
|
628
|
+
}
|
|
629
|
+
else if (result.status === 'rejected') {
|
|
630
|
+
console.error('[AXPEntityDefinitionRegistryService] Entity preload failed:', result.reason);
|
|
631
|
+
}
|
|
614
632
|
});
|
|
633
|
+
//console.log('[AXPEntityDefinitionRegistryService] Loaded entities:', loadedEntities);
|
|
615
634
|
}
|
|
616
635
|
/**
|
|
617
636
|
* Registers a new entity configuration. Entities are identified uniquely by a combination
|
|
@@ -2121,7 +2140,7 @@ class AXPEntitySearchDefinitionProvider {
|
|
|
2121
2140
|
this.entityRegister = inject(AXPEntityDefinitionRegistryService);
|
|
2122
2141
|
}
|
|
2123
2142
|
async provide(context) {
|
|
2124
|
-
console.log(this.entityRegister.getAll());
|
|
2143
|
+
console.log("AXPEntitySearchDefinitionProvider", this.entityRegister.getAll());
|
|
2125
2144
|
this.entityRegister.getAll().forEach((entity) => {
|
|
2126
2145
|
context.addDefinition(`Module.${entity.module}.${entity.name}`, entity.formats.searchResult?.description ?? entity.module, `Module.${entity.module}`, 'fa-solid fa-objects-column', 4, {
|
|
2127
2146
|
actions: [
|
|
@@ -2150,6 +2169,7 @@ class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
2150
2169
|
this.multiple = computed(() => this.options()['multiple']);
|
|
2151
2170
|
this.valueField = computed(() => this.options()['valueField'] ?? 'id');
|
|
2152
2171
|
this.textField = computed(() => this.options()['textField'] ?? 'title');
|
|
2172
|
+
this.badgeClass = computed(() => this.options()['badgeClass'] ?? 'ax-accent1');
|
|
2153
2173
|
this.displayField = computed(() => {
|
|
2154
2174
|
return this.textField() ?? this.entityDef()?.formats.lookup ?? this.entityDef()?.properties.find((c) => c.name != 'id')?.name ?? 'title';
|
|
2155
2175
|
});
|
|
@@ -2211,14 +2231,14 @@ class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
2211
2231
|
@else{
|
|
2212
2232
|
@if(displayItems().length > 1) {
|
|
2213
2233
|
@for (item of displayItems(); track $index) {
|
|
2214
|
-
<ax-badge class="ax-p-0.5
|
|
2234
|
+
<ax-badge class="ax-p-0.5 {{badgeClass()}}" [text]="item.text" ></ax-badge>
|
|
2215
2235
|
}
|
|
2216
2236
|
}
|
|
2217
2237
|
@else if(displayItems().length == 1) {
|
|
2218
|
-
<ax-badge class="ax-p-0.5
|
|
2238
|
+
<ax-badge class="ax-p-0.5 {{badgeClass()}}" [text]="displayItems()[0].text" ></ax-badge>
|
|
2219
2239
|
}
|
|
2220
2240
|
@else {
|
|
2221
|
-
<span class="ax-text-muted"
|
|
2241
|
+
<span class="ax-text-muted">---</span>
|
|
2222
2242
|
}
|
|
2223
2243
|
}
|
|
2224
2244
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i1.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i1$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
@@ -2235,14 +2255,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
|
|
|
2235
2255
|
@else{
|
|
2236
2256
|
@if(displayItems().length > 1) {
|
|
2237
2257
|
@for (item of displayItems(); track $index) {
|
|
2238
|
-
<ax-badge class="ax-p-0.5
|
|
2258
|
+
<ax-badge class="ax-p-0.5 {{badgeClass()}}" [text]="item.text" ></ax-badge>
|
|
2239
2259
|
}
|
|
2240
2260
|
}
|
|
2241
2261
|
@else if(displayItems().length == 1) {
|
|
2242
|
-
<ax-badge class="ax-p-0.5
|
|
2262
|
+
<ax-badge class="ax-p-0.5 {{badgeClass()}}" [text]="displayItems()[0].text" ></ax-badge>
|
|
2243
2263
|
}
|
|
2244
2264
|
@else {
|
|
2245
|
-
<span class="ax-text-muted"
|
|
2265
|
+
<span class="ax-text-muted">---</span>
|
|
2246
2266
|
}
|
|
2247
2267
|
}
|
|
2248
2268
|
`,
|
|
@@ -2478,6 +2498,7 @@ class AXPLookupWidgetSelectorViewModel {
|
|
|
2478
2498
|
parentFilters: null,
|
|
2479
2499
|
customFilter: null,
|
|
2480
2500
|
sortedFields: [],
|
|
2501
|
+
columns: [],
|
|
2481
2502
|
}) {
|
|
2482
2503
|
this.injector = injector;
|
|
2483
2504
|
this.entityDef = entityDef;
|
|
@@ -2515,7 +2536,10 @@ class AXPLookupWidgetSelectorViewModel {
|
|
|
2515
2536
|
const listColumns = this.entityDef.columns ?? [];
|
|
2516
2537
|
const columns = listColumns?.map((c) => c.name) ?? [];
|
|
2517
2538
|
const props = this.entityDef.properties.filter((p) => p.schema.hidden != true);
|
|
2518
|
-
const displayColumns = props.filter((p) => columns
|
|
2539
|
+
const displayColumns = props.filter((p) => (this.options.columns?.length ?? 0) > 0
|
|
2540
|
+
? this.options.columns.some((c) => c == p.name)
|
|
2541
|
+
: columns.some((c) => c == p.name));
|
|
2542
|
+
//
|
|
2519
2543
|
return displayColumns.map((p) => {
|
|
2520
2544
|
return new AXPEntityListViewColumnViewModel(p, listColumns?.find((c) => c.name == p.name));
|
|
2521
2545
|
});
|
|
@@ -2606,8 +2630,10 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
2606
2630
|
this.expose = computed(() => this.options()['expose']);
|
|
2607
2631
|
this.entity = computed(() => this.options()['entity']);
|
|
2608
2632
|
this.disabled = computed(() => this.options()['disabled']);
|
|
2633
|
+
this.columns = computed(() => this.options()['columns'] ?? []);
|
|
2609
2634
|
this.customFilter = computed(() => this.options()['filter']);
|
|
2610
2635
|
this.multiple = computed(() => (this.options()['multiple'] ?? false));
|
|
2636
|
+
this.look = computed(() => this.options()['look'] ?? 'lookup');
|
|
2611
2637
|
this.textField = computed(() => {
|
|
2612
2638
|
return (this.entityDef()?.formats.lookup ?? this.entityDef()?.properties.find((c) => c.name != 'id')?.name ?? 'title');
|
|
2613
2639
|
});
|
|
@@ -2666,15 +2692,17 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
2666
2692
|
}
|
|
2667
2693
|
showSelector() {
|
|
2668
2694
|
this.isOpen.set(true);
|
|
2695
|
+
const columnsCount = this.columns().length > 0 ? this.columns().length : this.vm()?.columns().length ?? 0;
|
|
2669
2696
|
this.popupService
|
|
2670
2697
|
.open(AXPLookupWidgetSelectorComponent, {
|
|
2671
2698
|
title: `${this.translateService.translateSync('widget.lookup.search')} ${this.translateService.translateSync(this.entityDef()?.formats.plural ?? '')}`,
|
|
2672
|
-
size:
|
|
2699
|
+
size: columnsCount < 3 ? 'sm' : columnsCount > 3 ? 'lg' : 'md',
|
|
2673
2700
|
data: {
|
|
2674
2701
|
vm: new AXPLookupWidgetSelectorViewModel(this.injector, this.entityDef(), {
|
|
2675
2702
|
customFilter: this.customFilter(),
|
|
2676
2703
|
parentFilters: this.filter,
|
|
2677
2704
|
allowMultiple: this.multiple(),
|
|
2705
|
+
columns: this.columns(),
|
|
2678
2706
|
}),
|
|
2679
2707
|
searchTerm: this.searchTerm(),
|
|
2680
2708
|
initialSelectedItems: this.selectedItems(),
|
|
@@ -2688,6 +2716,10 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
2688
2716
|
}
|
|
2689
2717
|
});
|
|
2690
2718
|
}
|
|
2719
|
+
selectBoxValueChange(e) {
|
|
2720
|
+
const items = e.component.selectedItems;
|
|
2721
|
+
this.setItems(items);
|
|
2722
|
+
}
|
|
2691
2723
|
handleValueChange(e) {
|
|
2692
2724
|
if (e.isUserInteraction) {
|
|
2693
2725
|
if (isNil(e.value) || isEmpty(e.value)) {
|
|
@@ -2736,8 +2768,6 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
2736
2768
|
//
|
|
2737
2769
|
const keys = items.map((item) => get(item, this.valueField()));
|
|
2738
2770
|
//
|
|
2739
|
-
this.setValue(this.singleOrMultiple(keys));
|
|
2740
|
-
//
|
|
2741
2771
|
// extract data from valueField and set context by expose path
|
|
2742
2772
|
if (this.expose()) {
|
|
2743
2773
|
const exposeValue = castArray(this.expose());
|
|
@@ -2746,7 +2776,6 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
2746
2776
|
exposeValue.forEach((i) => {
|
|
2747
2777
|
if (typeof i == 'string') {
|
|
2748
2778
|
const values = items.map((item) => set({}, i, get(item, i)));
|
|
2749
|
-
//this.contextService.update(i, this.singleOrMultiple(values));
|
|
2750
2779
|
setSmart(itemToExpose, i, this.singleOrMultiple(values));
|
|
2751
2780
|
}
|
|
2752
2781
|
else {
|
|
@@ -2758,7 +2787,11 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
2758
2787
|
}
|
|
2759
2788
|
});
|
|
2760
2789
|
this.contextService.patch(itemToExpose);
|
|
2761
|
-
//
|
|
2790
|
+
// fire triggers
|
|
2791
|
+
this.setValue(this.singleOrMultiple(keys));
|
|
2792
|
+
}
|
|
2793
|
+
else {
|
|
2794
|
+
this.setValue(this.singleOrMultiple(keys));
|
|
2762
2795
|
}
|
|
2763
2796
|
}
|
|
2764
2797
|
handleClearClick() {
|
|
@@ -2778,6 +2811,20 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
2778
2811
|
}
|
|
2779
2812
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXPLookupWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2780
2813
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.7", 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: `
|
|
2814
|
+
@if (look() == 'select') {
|
|
2815
|
+
<ax-select-box
|
|
2816
|
+
[dataSource]="vm()?.dataSource!"
|
|
2817
|
+
[ngModel]="selectedItems()"
|
|
2818
|
+
[textField]="textField()"
|
|
2819
|
+
[valueField]="valueField()"
|
|
2820
|
+
[disabled]="disabled()"
|
|
2821
|
+
[multiple]="multiple()"
|
|
2822
|
+
(onValueChanged)="selectBoxValueChange($event)"
|
|
2823
|
+
>
|
|
2824
|
+
<ax-search-box>
|
|
2825
|
+
</ax-search-box>
|
|
2826
|
+
</ax-select-box>
|
|
2827
|
+
} @else {
|
|
2781
2828
|
<ax-tag-box
|
|
2782
2829
|
[ngModel]="selectedItems()"
|
|
2783
2830
|
[textField]="textField()"
|
|
@@ -2811,15 +2858,30 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
2811
2858
|
</ax-button>
|
|
2812
2859
|
</ax-suffix>
|
|
2813
2860
|
</ax-tag-box>
|
|
2861
|
+
}
|
|
2814
2862
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type:
|
|
2815
2863
|
//
|
|
2816
|
-
AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i4.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i1.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "directive", type: i6$1.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message", "disabled"] }, { kind: "ngmodule", type: AXTagBoxModule }, { kind: "component", type: i7$1.AXTagBoxComponent, selector: "ax-tag-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "allowNull", "type", "look", "addOnComma", "addOnEnter", "valueField", "textField", "readonlyField", "allowDuplicateValues"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i8.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2864
|
+
AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i4.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i1.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "directive", type: i6$1.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message", "disabled"] }, { kind: "ngmodule", type: AXTagBoxModule }, { kind: "component", type: i7$1.AXTagBoxComponent, selector: "ax-tag-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "allowNull", "type", "look", "addOnComma", "addOnEnter", "valueField", "textField", "readonlyField", "allowDuplicateValues"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i8.AXTranslatorPipe, name: "translate" }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i9.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "disabledField", "textTemplate", "selectedItems", "dataSource", "minRecordsForSearch", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth", "searchBoxAutoFocus"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }, { kind: "component", type: AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "class", "delayTime", "type"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2817
2865
|
}
|
|
2818
2866
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXPLookupWidgetEditComponent, decorators: [{
|
|
2819
2867
|
type: Component,
|
|
2820
2868
|
args: [{
|
|
2821
2869
|
selector: 'axp-lookup-widget-edit',
|
|
2822
2870
|
template: `
|
|
2871
|
+
@if (look() == 'select') {
|
|
2872
|
+
<ax-select-box
|
|
2873
|
+
[dataSource]="vm()?.dataSource!"
|
|
2874
|
+
[ngModel]="selectedItems()"
|
|
2875
|
+
[textField]="textField()"
|
|
2876
|
+
[valueField]="valueField()"
|
|
2877
|
+
[disabled]="disabled()"
|
|
2878
|
+
[multiple]="multiple()"
|
|
2879
|
+
(onValueChanged)="selectBoxValueChange($event)"
|
|
2880
|
+
>
|
|
2881
|
+
<ax-search-box>
|
|
2882
|
+
</ax-search-box>
|
|
2883
|
+
</ax-select-box>
|
|
2884
|
+
} @else {
|
|
2823
2885
|
<ax-tag-box
|
|
2824
2886
|
[ngModel]="selectedItems()"
|
|
2825
2887
|
[textField]="textField()"
|
|
@@ -2853,6 +2915,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
|
|
|
2853
2915
|
</ax-button>
|
|
2854
2916
|
</ax-suffix>
|
|
2855
2917
|
</ax-tag-box>
|
|
2918
|
+
}
|
|
2856
2919
|
`,
|
|
2857
2920
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2858
2921
|
imports: [
|
|
@@ -2866,6 +2929,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
|
|
|
2866
2929
|
AXFormModule,
|
|
2867
2930
|
AXTagBoxModule,
|
|
2868
2931
|
AXTranslationModule,
|
|
2932
|
+
AXSelectBoxModule,
|
|
2933
|
+
AXSearchBoxComponent
|
|
2869
2934
|
],
|
|
2870
2935
|
}]
|
|
2871
2936
|
}] });
|
|
@@ -2880,7 +2945,10 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
2880
2945
|
super(...arguments);
|
|
2881
2946
|
this.valueField = this.options['valueField'] ?? 'id';
|
|
2882
2947
|
this.textField = this.options['textField'] ?? 'title';
|
|
2883
|
-
this.
|
|
2948
|
+
this.badgeClass = this.options['badgeClass'] ?? 'ax-accent1';
|
|
2949
|
+
this.displayItems = computed(() => isNil(this.rawValue)
|
|
2950
|
+
? []
|
|
2951
|
+
: castArray(this.rawValue).map((item) => this.extractItem(item)));
|
|
2884
2952
|
}
|
|
2885
2953
|
extractItem(item) {
|
|
2886
2954
|
return typeof item == 'object'
|
|
@@ -2897,7 +2965,10 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
2897
2965
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.7", type: AXPLookupWidgetColumnComponent, isStandalone: true, selector: "ng-component", inputs: { rawValue: "rawValue", rowData: "rowData" }, usesInheritance: true, ngImport: i0, template: `
|
|
2898
2966
|
<div class="ax-flex ax-gap-1">
|
|
2899
2967
|
@for (item of displayItems(); track $index) {
|
|
2900
|
-
<ax-badge [text]="item[this.textField]"
|
|
2968
|
+
<ax-badge [text]="item[this.textField]" [class]="badgeClass"></ax-badge>
|
|
2969
|
+
}
|
|
2970
|
+
@empty {
|
|
2971
|
+
<span class="ax-text-muted">---</span>
|
|
2901
2972
|
}
|
|
2902
2973
|
</div>
|
|
2903
2974
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i1$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
@@ -2908,7 +2979,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
|
|
|
2908
2979
|
template: `
|
|
2909
2980
|
<div class="ax-flex ax-gap-1">
|
|
2910
2981
|
@for (item of displayItems(); track $index) {
|
|
2911
|
-
<ax-badge [text]="item[this.textField]"
|
|
2982
|
+
<ax-badge [text]="item[this.textField]" [class]="badgeClass"></ax-badge>
|
|
2983
|
+
}
|
|
2984
|
+
@empty {
|
|
2985
|
+
<span class="ax-text-muted">---</span>
|
|
2912
2986
|
}
|
|
2913
2987
|
</div>
|
|
2914
2988
|
`,
|
|
@@ -3115,7 +3189,7 @@ class AXPTagableBoxWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
3115
3189
|
</ax-prefix>
|
|
3116
3190
|
</ax-button>
|
|
3117
3191
|
</div>
|
|
3118
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXTextBoxModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "directive", type: i6$1.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message", "disabled"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i4.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type:
|
|
3192
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXTextBoxModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "directive", type: i6$1.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message", "disabled"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i4.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i9.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "disabledField", "textTemplate", "selectedItems", "dataSource", "minRecordsForSearch", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth", "searchBoxAutoFocus"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }, { kind: "ngmodule", type: AXSearchBoxModule }, { kind: "component", type: i6.AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "class", "delayTime", "type"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3119
3193
|
}
|
|
3120
3194
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXPTagableBoxWidgetEditComponent, decorators: [{
|
|
3121
3195
|
type: Component,
|
|
@@ -4020,9 +4094,102 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
|
|
|
4020
4094
|
}]
|
|
4021
4095
|
}], ctorParameters: () => [{ type: i1$4.AXPAppStartUpService }, { type: i0.Injector }] });
|
|
4022
4096
|
|
|
4097
|
+
// #region Master
|
|
4098
|
+
function entityMasterCreateAction() {
|
|
4099
|
+
return {
|
|
4100
|
+
title: '@general:actions.create.title',
|
|
4101
|
+
command: 'create-entity',
|
|
4102
|
+
priority: 'primary',
|
|
4103
|
+
type: 'create',
|
|
4104
|
+
scope: AXPEntityCommandScope.TypeLevel,
|
|
4105
|
+
};
|
|
4106
|
+
}
|
|
4107
|
+
function entityMasterBulkDeleteAction() {
|
|
4108
|
+
return {
|
|
4109
|
+
title: '@general:actions.delete-items.title',
|
|
4110
|
+
command: 'delete-entity',
|
|
4111
|
+
priority: 'primary',
|
|
4112
|
+
type: 'delete',
|
|
4113
|
+
scope: AXPEntityCommandScope.Selected,
|
|
4114
|
+
};
|
|
4115
|
+
}
|
|
4116
|
+
function entityMasterViewAction() {
|
|
4117
|
+
return {
|
|
4118
|
+
title: '@general:actions.view.title',
|
|
4119
|
+
command: 'open-entity',
|
|
4120
|
+
priority: 'secondary',
|
|
4121
|
+
type: 'view',
|
|
4122
|
+
scope: AXPEntityCommandScope.Individual,
|
|
4123
|
+
};
|
|
4124
|
+
}
|
|
4125
|
+
function entityMasterDeleteAction() {
|
|
4126
|
+
return {
|
|
4127
|
+
title: '@general:actions.delete.title',
|
|
4128
|
+
command: 'delete-entity',
|
|
4129
|
+
priority: 'secondary',
|
|
4130
|
+
type: 'delete',
|
|
4131
|
+
scope: AXPEntityCommandScope.Individual,
|
|
4132
|
+
};
|
|
4133
|
+
}
|
|
4134
|
+
function entityMasterCrudActions() {
|
|
4135
|
+
return [
|
|
4136
|
+
entityMasterCreateAction(),
|
|
4137
|
+
entityMasterBulkDeleteAction(),
|
|
4138
|
+
entityMasterViewAction(),
|
|
4139
|
+
entityMasterDeleteAction(),
|
|
4140
|
+
];
|
|
4141
|
+
}
|
|
4142
|
+
// #endregion
|
|
4143
|
+
// #region Details
|
|
4144
|
+
function entityDetailsCreateActions(parentId) {
|
|
4145
|
+
return {
|
|
4146
|
+
title: '@general:actions.create.title',
|
|
4147
|
+
command: {
|
|
4148
|
+
name: 'create-entity',
|
|
4149
|
+
options: {
|
|
4150
|
+
process: {
|
|
4151
|
+
redirect: false,
|
|
4152
|
+
canCreateNewOne: true,
|
|
4153
|
+
data: {
|
|
4154
|
+
[parentId]: '{{context.eval("id")}}',
|
|
4155
|
+
},
|
|
4156
|
+
},
|
|
4157
|
+
},
|
|
4158
|
+
},
|
|
4159
|
+
priority: 'primary',
|
|
4160
|
+
type: 'create',
|
|
4161
|
+
scope: AXPEntityCommandScope.TypeLevel,
|
|
4162
|
+
};
|
|
4163
|
+
}
|
|
4164
|
+
function entityDetailsSimpleCondition(fk) {
|
|
4165
|
+
return {
|
|
4166
|
+
name: fk,
|
|
4167
|
+
operator: { type: 'equal' },
|
|
4168
|
+
value: '{{context.eval("id")}}',
|
|
4169
|
+
};
|
|
4170
|
+
}
|
|
4171
|
+
function entityDetailsEditAction() {
|
|
4172
|
+
return {
|
|
4173
|
+
title: '@general:actions.edit.title',
|
|
4174
|
+
command: 'quick-modify-entity',
|
|
4175
|
+
priority: 'secondary',
|
|
4176
|
+
type: 'update',
|
|
4177
|
+
scope: AXPEntityCommandScope.Individual,
|
|
4178
|
+
};
|
|
4179
|
+
}
|
|
4180
|
+
function entityDetailsCrudActions(parentId) {
|
|
4181
|
+
return [
|
|
4182
|
+
entityDetailsCreateActions(parentId),
|
|
4183
|
+
entityMasterBulkDeleteAction(),
|
|
4184
|
+
entityDetailsEditAction(),
|
|
4185
|
+
entityMasterDeleteAction(),
|
|
4186
|
+
];
|
|
4187
|
+
}
|
|
4188
|
+
// #endregion
|
|
4189
|
+
|
|
4023
4190
|
/**
|
|
4024
4191
|
* Generated bundle index. Do not edit.
|
|
4025
4192
|
*/
|
|
4026
4193
|
|
|
4027
|
-
export { AXMEntityCrudService, AXMEntityCrudServiceImpl, AXPCreateEntityWorkflow, AXPDataSeederService, AXPDeleteEntityWorkflow, AXPEntityApplyUpdatesAction, AXPEntityCommandTriggerViewModel, AXPEntityCreateEvent, AXPEntityCreatePopupAction, AXPEntityCreateSubmittedAction, AXPEntityCreateViewElementViewModel, AXPEntityCreateViewModelFactory, AXPEntityCreateViewSectionViewModel, AXPEntityDataProvider, AXPEntityDataProviderImpl, AXPEntityDefinitionRegistryService, AXPEntityDeletedEvent, AXPEntityDetailListViewModel, AXPEntityDetailViewModelFactory, AXPEntityDetailViewModelResolver, AXPEntityListViewColumnViewModel, AXPEntityListViewModelFactory, AXPEntityListViewModelResolver, AXPEntityMasterCreateViewModel, AXPEntityMasterListViewModel, AXPEntityMasterListViewQueryViewModel, AXPEntityMasterSingleElementViewModel, AXPEntityMasterSingleViewGroupViewModel, AXPEntityMasterSingleViewModel, AXPEntityMasterUpdateElementViewModel, AXPEntityMasterUpdateViewModel, AXPEntityMasterUpdateViewModelFactory, AXPEntityMiddleware, AXPEntityModifyConfirmedAction, AXPEntityModifyEvent, AXPEntityModifySectionPopupAction, AXPEntityModule, AXPEntityPerformDeleteAction, AXPEntityResolver, AXPEntityService, AXPEntityStorageService, AXPModifyEntitySectionWorkflow, AXPQuickEntityModifyPopupAction, AXPQuickModifyEntityWorkflow, AXPShowDetailViewAction, AXPShowDetailsViewWorkflow, AXPShowListViewAction, AXPShowListViewWorkflow, AXP_DATA_SEEDER_TOKEN, AXP_ENTITY_CONFIG_TOKEN, AXP_ENTITY_DEFINITION_LOADER, AXP_ENTITY_MODIFIER, createModifierContext };
|
|
4194
|
+
export { AXMEntityCrudService, AXMEntityCrudServiceImpl, AXPCreateEntityWorkflow, AXPDataSeederService, AXPDeleteEntityWorkflow, AXPEntityApplyUpdatesAction, AXPEntityCommandTriggerViewModel, AXPEntityCreateEvent, AXPEntityCreatePopupAction, AXPEntityCreateSubmittedAction, AXPEntityCreateViewElementViewModel, AXPEntityCreateViewModelFactory, AXPEntityCreateViewSectionViewModel, AXPEntityDataProvider, AXPEntityDataProviderImpl, AXPEntityDefinitionRegistryService, AXPEntityDeletedEvent, AXPEntityDetailListViewModel, AXPEntityDetailViewModelFactory, AXPEntityDetailViewModelResolver, AXPEntityListViewColumnViewModel, AXPEntityListViewModelFactory, AXPEntityListViewModelResolver, AXPEntityMasterCreateViewModel, AXPEntityMasterListViewModel, AXPEntityMasterListViewQueryViewModel, AXPEntityMasterSingleElementViewModel, AXPEntityMasterSingleViewGroupViewModel, AXPEntityMasterSingleViewModel, AXPEntityMasterUpdateElementViewModel, AXPEntityMasterUpdateViewModel, AXPEntityMasterUpdateViewModelFactory, AXPEntityMiddleware, AXPEntityModifyConfirmedAction, AXPEntityModifyEvent, AXPEntityModifySectionPopupAction, AXPEntityModule, AXPEntityPerformDeleteAction, AXPEntityResolver, AXPEntityService, AXPEntityStorageService, AXPModifyEntitySectionWorkflow, AXPQuickEntityModifyPopupAction, AXPQuickModifyEntityWorkflow, AXPShowDetailViewAction, AXPShowDetailsViewWorkflow, AXPShowListViewAction, AXPShowListViewWorkflow, AXP_DATA_SEEDER_TOKEN, AXP_ENTITY_CONFIG_TOKEN, AXP_ENTITY_DEFINITION_LOADER, AXP_ENTITY_MODIFIER, createModifierContext, entityDetailsCreateActions, entityDetailsCrudActions, entityDetailsEditAction, entityDetailsSimpleCondition, entityMasterBulkDeleteAction, entityMasterCreateAction, entityMasterCrudActions, entityMasterDeleteAction, entityMasterViewAction };
|
|
4028
4195
|
//# sourceMappingURL=acorex-platform-layout-entity.mjs.map
|