@acorex/platform 21.0.0-next.39 → 21.0.0-next.40
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-common.mjs +6 -2
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +8 -1
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-domain.mjs +3 -0
- package/fesm2022/acorex-platform-domain.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +22 -5
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs +25 -13
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +203 -55
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +622 -121
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +169 -85
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widgets.mjs +643 -311
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-runtime.mjs +120 -9
- package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-Cvvr4HnL.mjs → acorex-platform-themes-default-entity-master-create-view.component-Cx1lLUaR.mjs} +3 -3
- 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-TYoLN1Jq.mjs → acorex-platform-themes-default-entity-master-modify-view.component-AOrcgjDF.mjs} +3 -3
- 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-C2z5Lq9y.mjs → acorex-platform-themes-default-entity-master-single-view.component-BfCeUU5F.mjs} +3 -3
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-BfCeUU5F.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +10 -10
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs → acorex-platform-themes-shared-settings.provider-D13QB3Hr.mjs} +2 -2
- package/fesm2022/acorex-platform-themes-shared-settings.provider-D13QB3Hr.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-BSmvnUVq.mjs → acorex-platform-themes-shared-theme-color-chooser-view.component-D7-rCGl7.mjs} +38 -16
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-D7-rCGl7.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared.mjs +183 -84
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +50 -10
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/package.json +1 -1
- package/types/acorex-platform-core.d.ts +13 -2
- package/types/acorex-platform-domain.d.ts +28 -2
- package/types/acorex-platform-layout-builder.d.ts +41 -27
- package/types/acorex-platform-layout-designer.d.ts +55 -15
- package/types/acorex-platform-layout-entity.d.ts +145 -11
- package/types/acorex-platform-layout-widget-core.d.ts +81 -68
- package/types/acorex-platform-layout-widgets.d.ts +25 -5
- package/types/acorex-platform-runtime.d.ts +156 -61
- package/types/acorex-platform-workflow.d.ts +37 -2
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Cvvr4HnL.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-TYoLN1Jq.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-C2z5Lq9y.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-CHfrTtol.mjs +0 -65
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-CHfrTtol.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-BSmvnUVq.mjs.map +0 -1
|
@@ -2,6 +2,7 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { signal, computed, Injectable, InjectionToken, inject, ElementRef, effect, untracked, Injector, ChangeDetectorRef, ViewChild, Input, ChangeDetectionStrategy, Component, EventEmitter, Output, input, output, ViewContainerRef, Directive, NgModule } from '@angular/core';
|
|
3
3
|
import { convertArrayToDataSource, AXDataSource } from '@acorex/cdk/common';
|
|
4
4
|
import { AXPContextStore, AXPDataSourceDefinitionProviderService, extractValue, AXPExpressionEvaluatorService, getSmart } from '@acorex/platform/core';
|
|
5
|
+
export { normalizeDefinitionCategories } from '@acorex/platform/core';
|
|
5
6
|
import { set, merge, cloneDeep, isNil, get, isEqual, isUndefined, isObjectLike, sum, isEmpty, isString } from 'lodash-es';
|
|
6
7
|
import { Subject, BehaviorSubject, filter } from 'rxjs';
|
|
7
8
|
import * as i1$1 from '@acorex/components/skeleton';
|
|
@@ -230,7 +231,6 @@ const AXPWidgetsCatalog = {
|
|
|
230
231
|
tableLayout: 'table-layout',
|
|
231
232
|
tableItem: 'table-item-layout',
|
|
232
233
|
avatar: 'avatar',
|
|
233
|
-
themePaletteChooser: 'theme-palette-chooser',
|
|
234
234
|
themeModeChooser: 'theme-mode-chooser',
|
|
235
235
|
menuOrientationChooser: 'menu-orientation-chooser',
|
|
236
236
|
fontStyleChooser: 'font-style-chooser',
|
|
@@ -699,6 +699,8 @@ class AXPColumnWidgetComponent {
|
|
|
699
699
|
this.token = inject(AXP_WIDGET_COLUMN_TOKEN);
|
|
700
700
|
this.path = this.token.path;
|
|
701
701
|
this.options = this.token.options ?? {};
|
|
702
|
+
/** Column header caption when rendered inside `axp-widget-column-renderer`. */
|
|
703
|
+
this.columnCaption = this.token.caption;
|
|
702
704
|
this.rawValue = null;
|
|
703
705
|
this.nullText = this.options['nullText'];
|
|
704
706
|
this.nullValue = this.options['nullValue'];
|
|
@@ -1223,6 +1225,7 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
|
|
|
1223
1225
|
const tokenValue = {
|
|
1224
1226
|
path: this.node.path,
|
|
1225
1227
|
options: this.mergedOptions(),
|
|
1228
|
+
caption: this.caption,
|
|
1226
1229
|
};
|
|
1227
1230
|
this.widgetInjector = Injector.create({
|
|
1228
1231
|
parent: this.injector,
|
|
@@ -1321,6 +1324,7 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
|
|
|
1321
1324
|
const tokenValue = {
|
|
1322
1325
|
path: this.node.path,
|
|
1323
1326
|
options: this.mergedOptions(),
|
|
1327
|
+
caption: this.caption,
|
|
1324
1328
|
};
|
|
1325
1329
|
rowInjector = Injector.create({
|
|
1326
1330
|
parent: this.injector,
|
|
@@ -1353,6 +1357,7 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
|
|
|
1353
1357
|
const tokenValue = {
|
|
1354
1358
|
path: this.node.path,
|
|
1355
1359
|
options: evaluatedOptions,
|
|
1360
|
+
caption: this.caption,
|
|
1356
1361
|
};
|
|
1357
1362
|
const newInjector = Injector.create({
|
|
1358
1363
|
parent: this.injector,
|
|
@@ -1379,6 +1384,7 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
|
|
|
1379
1384
|
const tokenValue = {
|
|
1380
1385
|
path: this.node.path,
|
|
1381
1386
|
options: this.mergedOptions(),
|
|
1387
|
+
caption: this.caption,
|
|
1382
1388
|
};
|
|
1383
1389
|
rowInjector = Injector.create({
|
|
1384
1390
|
parent: this.injector,
|
|
@@ -2383,30 +2389,31 @@ class AXPWidgetRendererDirective {
|
|
|
2383
2389
|
}
|
|
2384
2390
|
getEventScope() {
|
|
2385
2391
|
return {
|
|
2386
|
-
context: (
|
|
2392
|
+
context: (...paths) => {
|
|
2387
2393
|
return this.onContextChanged.pipe(filter((c) => {
|
|
2388
|
-
|
|
2389
|
-
|
|
2394
|
+
const activePaths = paths.filter((p) => !!p && p.trim().length > 0);
|
|
2395
|
+
// If no path filters specified, pass all events
|
|
2396
|
+
if (activePaths.length === 0) {
|
|
2390
2397
|
return true;
|
|
2391
2398
|
}
|
|
2392
2399
|
// Ensure c.path exists
|
|
2393
2400
|
if (!c.path) {
|
|
2394
2401
|
return false;
|
|
2395
2402
|
}
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2403
|
+
return activePaths.some((path) => {
|
|
2404
|
+
// Pattern: "prefix*" - matches paths that start with prefix
|
|
2405
|
+
if (path.endsWith('*')) {
|
|
2406
|
+
const prefix = path.substring(0, path.length - 1);
|
|
2407
|
+
return c.path.startsWith(prefix);
|
|
2408
|
+
}
|
|
2409
|
+
// Pattern: "*suffix" - matches paths that end with suffix
|
|
2410
|
+
if (path.startsWith('*')) {
|
|
2411
|
+
const suffix = path.substring(1);
|
|
2412
|
+
return c.path.endsWith(suffix);
|
|
2413
|
+
}
|
|
2414
|
+
// Exact match
|
|
2408
2415
|
return c.path === path;
|
|
2409
|
-
}
|
|
2416
|
+
});
|
|
2410
2417
|
}));
|
|
2411
2418
|
},
|
|
2412
2419
|
from: (event) => get(this.instance.api(), event),
|
|
@@ -2569,6 +2576,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
2569
2576
|
}]
|
|
2570
2577
|
}] });
|
|
2571
2578
|
|
|
2579
|
+
//#endregion
|
|
2580
|
+
//#region ---- Mapping ----
|
|
2581
|
+
/**
|
|
2582
|
+
* Converts a domain {@link AXPProperty} into a {@link AXPWidgetProperty} row for
|
|
2583
|
+
* the layout property viewer (`AXPPropertyViewerService` and `buildPropertyViewerTabsFromProperties`).
|
|
2584
|
+
*/
|
|
2585
|
+
function mapAXPPropertyToWidgetProperty(property, options) {
|
|
2586
|
+
const { group, order, valuePathPrefix, resolveTitle, resolveDescription } = options;
|
|
2587
|
+
const path = valuePathPrefix ? `${valuePathPrefix}.${property.name}` : property.name;
|
|
2588
|
+
const iface = property.interface;
|
|
2589
|
+
const widgetType = iface?.type ?? 'text-editor';
|
|
2590
|
+
const description = resolveDescription?.(property);
|
|
2591
|
+
return {
|
|
2592
|
+
name: property.name,
|
|
2593
|
+
title: resolveTitle(property),
|
|
2594
|
+
...(description !== undefined && description !== '' ? { description } : {}),
|
|
2595
|
+
group,
|
|
2596
|
+
order,
|
|
2597
|
+
schema: {
|
|
2598
|
+
dataType: property.dataType,
|
|
2599
|
+
interface: {
|
|
2600
|
+
path,
|
|
2601
|
+
name: property.name,
|
|
2602
|
+
type: widgetType,
|
|
2603
|
+
options: iface?.options ?? {},
|
|
2604
|
+
...(iface?.triggers ? { triggers: iface.triggers } : {}),
|
|
2605
|
+
},
|
|
2606
|
+
},
|
|
2607
|
+
validations: property.validations,
|
|
2608
|
+
visible: true,
|
|
2609
|
+
};
|
|
2610
|
+
}
|
|
2611
|
+
//#endregion
|
|
2612
|
+
|
|
2572
2613
|
class AXPPropertyEditorHelper {
|
|
2573
2614
|
static expandShorthand(values) {
|
|
2574
2615
|
switch (values.length) {
|
|
@@ -2851,6 +2892,109 @@ class AXPWidgetSerializationHelper {
|
|
|
2851
2892
|
}
|
|
2852
2893
|
//#endregion
|
|
2853
2894
|
|
|
2895
|
+
//#region ---- Editor sub-categories (widget picker) ----
|
|
2896
|
+
const AXP_WIDGETS_EDITOR_SUB_TEXT_INPUTS = {
|
|
2897
|
+
name: 'editor-text-inputs',
|
|
2898
|
+
order: 1,
|
|
2899
|
+
title: '@platform-layout-widgets:subcategories.editor-text-inputs.title',
|
|
2900
|
+
};
|
|
2901
|
+
const AXP_WIDGETS_EDITOR_SUB_NUMERIC = {
|
|
2902
|
+
name: 'editor-numeric',
|
|
2903
|
+
order: 2,
|
|
2904
|
+
title: '@platform-layout-widgets:subcategories.editor-numeric.title',
|
|
2905
|
+
};
|
|
2906
|
+
const AXP_WIDGETS_EDITOR_SUB_DATETIME = {
|
|
2907
|
+
name: 'editor-datetime',
|
|
2908
|
+
order: 3,
|
|
2909
|
+
title: '@platform-layout-widgets:subcategories.editor-datetime.title',
|
|
2910
|
+
};
|
|
2911
|
+
const AXP_WIDGETS_EDITOR_SUB_CHOICE = {
|
|
2912
|
+
name: 'editor-choice',
|
|
2913
|
+
order: 4,
|
|
2914
|
+
title: '@platform-layout-widgets:subcategories.editor-choice.title',
|
|
2915
|
+
};
|
|
2916
|
+
const AXP_WIDGETS_EDITOR_SUB_RICH = {
|
|
2917
|
+
name: 'editor-rich',
|
|
2918
|
+
order: 5,
|
|
2919
|
+
title: '@platform-layout-widgets:subcategories.editor-rich.title',
|
|
2920
|
+
};
|
|
2921
|
+
const AXP_WIDGETS_EDITOR_SUB_VISUAL = {
|
|
2922
|
+
name: 'editor-visual',
|
|
2923
|
+
order: 6,
|
|
2924
|
+
title: '@platform-layout-widgets:subcategories.editor-visual.title',
|
|
2925
|
+
};
|
|
2926
|
+
const AXP_WIDGETS_EDITOR_SUB_COMPOSITE = {
|
|
2927
|
+
name: 'editor-composite',
|
|
2928
|
+
order: 7,
|
|
2929
|
+
title: '@platform-layout-widgets:subcategories.editor-composite.title',
|
|
2930
|
+
};
|
|
2931
|
+
const AXP_WIDGETS_EDITOR_SUB_CONFIG = {
|
|
2932
|
+
name: 'editor-config',
|
|
2933
|
+
order: 8,
|
|
2934
|
+
title: '@platform-layout-widgets:subcategories.editor-config.title',
|
|
2935
|
+
};
|
|
2936
|
+
//#endregion
|
|
2937
|
+
//#region ---- Layout sub-categories (widget picker) ----
|
|
2938
|
+
const AXP_WIDGETS_LAYOUT_SUB_SHELL = {
|
|
2939
|
+
name: 'layout-shell',
|
|
2940
|
+
order: 1,
|
|
2941
|
+
title: '@platform-layout-widgets:subcategories.layout-shell.title',
|
|
2942
|
+
};
|
|
2943
|
+
const AXP_WIDGETS_LAYOUT_SUB_GRID = {
|
|
2944
|
+
name: 'layout-grid',
|
|
2945
|
+
order: 2,
|
|
2946
|
+
title: '@platform-layout-widgets:subcategories.layout-grid.title',
|
|
2947
|
+
};
|
|
2948
|
+
const AXP_WIDGETS_LAYOUT_SUB_SURFACES = {
|
|
2949
|
+
name: 'layout-surfaces',
|
|
2950
|
+
order: 3,
|
|
2951
|
+
title: '@platform-layout-widgets:subcategories.layout-surfaces.title',
|
|
2952
|
+
};
|
|
2953
|
+
const AXP_WIDGETS_LAYOUT_SUB_TABS = {
|
|
2954
|
+
name: 'layout-tabs',
|
|
2955
|
+
order: 4,
|
|
2956
|
+
title: '@platform-layout-widgets:subcategories.layout-tabs.title',
|
|
2957
|
+
};
|
|
2958
|
+
const AXP_WIDGETS_LAYOUT_SUB_LISTS = {
|
|
2959
|
+
name: 'layout-lists',
|
|
2960
|
+
order: 5,
|
|
2961
|
+
title: '@platform-layout-widgets:subcategories.layout-lists.title',
|
|
2962
|
+
};
|
|
2963
|
+
const AXP_WIDGETS_LAYOUT_SUB_UTILITY = {
|
|
2964
|
+
name: 'layout-utility',
|
|
2965
|
+
order: 6,
|
|
2966
|
+
title: '@platform-layout-widgets:subcategories.layout-utility.title',
|
|
2967
|
+
};
|
|
2968
|
+
//#endregion
|
|
2969
|
+
//#region ---- Action sub-categories (widget picker) ----
|
|
2970
|
+
const AXP_WIDGETS_ACTION_SUB_CONTROLS = {
|
|
2971
|
+
name: 'action-controls',
|
|
2972
|
+
order: 1,
|
|
2973
|
+
title: '@platform-layout-widgets:subcategories.action-controls.title',
|
|
2974
|
+
};
|
|
2975
|
+
//#endregion
|
|
2976
|
+
//#region ---- Advance sub-categories (widget picker) ----
|
|
2977
|
+
const AXP_WIDGETS_ADVANCE_SUB_MEDIA = {
|
|
2978
|
+
name: 'advance-media',
|
|
2979
|
+
order: 1,
|
|
2980
|
+
title: '@platform-layout-widgets:subcategories.advance-media.title',
|
|
2981
|
+
};
|
|
2982
|
+
const AXP_WIDGETS_ADVANCE_SUB_INPUT = {
|
|
2983
|
+
name: 'advance-input',
|
|
2984
|
+
order: 2,
|
|
2985
|
+
title: '@platform-layout-widgets:subcategories.advance-input.title',
|
|
2986
|
+
};
|
|
2987
|
+
const AXP_WIDGETS_ADVANCE_SUB_DATA = {
|
|
2988
|
+
name: 'advance-data',
|
|
2989
|
+
order: 3,
|
|
2990
|
+
title: '@platform-layout-widgets:subcategories.advance-data.title',
|
|
2991
|
+
};
|
|
2992
|
+
const AXP_WIDGETS_ADVANCE_SUB_TOOLS = {
|
|
2993
|
+
name: 'advance-tools',
|
|
2994
|
+
order: 4,
|
|
2995
|
+
title: '@platform-layout-widgets:subcategories.advance-tools.title',
|
|
2996
|
+
};
|
|
2997
|
+
//#endregion
|
|
2854
2998
|
/** Normalizes widget categories to an array for iteration and serialization. */
|
|
2855
2999
|
function normalizeWidgetCategories(categories) {
|
|
2856
3000
|
if (categories == null) {
|
|
@@ -2861,28 +3005,28 @@ function normalizeWidgetCategories(categories) {
|
|
|
2861
3005
|
const AXP_WIDGETS_LAYOUT_CATEGORY = {
|
|
2862
3006
|
name: 'layout',
|
|
2863
3007
|
order: 1,
|
|
2864
|
-
title: '
|
|
3008
|
+
title: '@platform-layout-widgets:categories.layout.title',
|
|
2865
3009
|
};
|
|
2866
3010
|
const AXP_WIDGETS_EDITOR_CATEGORY = {
|
|
2867
3011
|
name: 'editor',
|
|
2868
3012
|
order: 2,
|
|
2869
|
-
title: '
|
|
3013
|
+
title: '@platform-layout-widgets:categories.editor.title',
|
|
2870
3014
|
};
|
|
2871
3015
|
const AXP_WIDGETS_ACTION_CATEGORY = {
|
|
2872
3016
|
name: 'action',
|
|
2873
3017
|
order: 3,
|
|
2874
|
-
title: '
|
|
3018
|
+
title: '@platform-layout-widgets:categories.action.title',
|
|
2875
3019
|
};
|
|
2876
3020
|
const AXP_WIDGETS_ADVANCE_CATEGORY = {
|
|
2877
3021
|
name: 'advance',
|
|
2878
3022
|
order: 4,
|
|
2879
|
-
title: '
|
|
3023
|
+
title: '@platform-layout-widgets:categories.advance.title',
|
|
2880
3024
|
};
|
|
2881
|
-
/**
|
|
3025
|
+
/** AI category tab in the widget picker (metadata); unrelated to Widgets:GetForAI listing scope. */
|
|
2882
3026
|
const AXP_WIDGETS_AI_CATEGORY = {
|
|
2883
3027
|
name: 'ai',
|
|
2884
3028
|
order: 5,
|
|
2885
|
-
title: '
|
|
3029
|
+
title: '@platform-layout-widgets:categories.ai.title',
|
|
2886
3030
|
};
|
|
2887
3031
|
const AXP_WIDGETS_CATEGORIES = [
|
|
2888
3032
|
AXP_WIDGETS_LAYOUT_CATEGORY,
|
|
@@ -2902,72 +3046,12 @@ var AXPWidgetGroupEnum;
|
|
|
2902
3046
|
AXPWidgetGroupEnum["SettingWidget"] = "setting-widget";
|
|
2903
3047
|
AXPWidgetGroupEnum["EntityWidget"] = "entity-widget";
|
|
2904
3048
|
AXPWidgetGroupEnum["UtilityWidget"] = "utility-widget";
|
|
3049
|
+
AXPWidgetGroupEnum["BaseWidget"] = "base-widget";
|
|
2905
3050
|
})(AXPWidgetGroupEnum || (AXPWidgetGroupEnum = {}));
|
|
2906
3051
|
|
|
2907
|
-
//#endregion
|
|
2908
|
-
//#region ---- Mapping ----
|
|
2909
|
-
/**
|
|
2910
|
-
* Converts a domain {@link AXPProperty} into a {@link AXPWidgetProperty} row for
|
|
2911
|
-
* the layout property viewer (`AXPPropertyViewerService` and `buildPropertyViewerTabsFromProperties`).
|
|
2912
|
-
*/
|
|
2913
|
-
function mapAXPPropertyToWidgetProperty(property, options) {
|
|
2914
|
-
const { group, order, valuePathPrefix, resolveTitle, resolveDescription } = options;
|
|
2915
|
-
const path = valuePathPrefix ? `${valuePathPrefix}.${property.name}` : property.name;
|
|
2916
|
-
const iface = property.interface;
|
|
2917
|
-
const widgetType = iface?.type ?? 'text-editor';
|
|
2918
|
-
const description = resolveDescription?.(property);
|
|
2919
|
-
return {
|
|
2920
|
-
name: property.name,
|
|
2921
|
-
title: resolveTitle(property),
|
|
2922
|
-
...(description !== undefined && description !== '' ? { description } : {}),
|
|
2923
|
-
group,
|
|
2924
|
-
order,
|
|
2925
|
-
schema: {
|
|
2926
|
-
dataType: property.dataType,
|
|
2927
|
-
interface: {
|
|
2928
|
-
path,
|
|
2929
|
-
name: property.name,
|
|
2930
|
-
type: widgetType,
|
|
2931
|
-
options: iface?.options ?? {},
|
|
2932
|
-
...(iface?.triggers ? { triggers: iface.triggers } : {}),
|
|
2933
|
-
},
|
|
2934
|
-
},
|
|
2935
|
-
validations: property.validations,
|
|
2936
|
-
visible: true,
|
|
2937
|
-
};
|
|
2938
|
-
}
|
|
2939
|
-
//#endregion
|
|
2940
|
-
|
|
2941
|
-
//#region ---- Helpers ----
|
|
2942
|
-
/**
|
|
2943
|
-
* True when the widget declares the AI category (see {@link AXP_WIDGETS_AI_CATEGORY}).
|
|
2944
|
-
*/
|
|
2945
|
-
function hasAiWidgetCategory(config) {
|
|
2946
|
-
return normalizeWidgetCategories(config.categories).some((c) => c.name === AXP_WIDGETS_AI_CATEGORY.name);
|
|
2947
|
-
}
|
|
2948
|
-
//#endregion
|
|
2949
|
-
//#region ---- Public API ----
|
|
2950
|
-
/**
|
|
2951
|
-
* Resolves AI catalog visibility using {@link AXPWidgetConfig.aiCatalog} and the AI widget category.
|
|
2952
|
-
* - `exclude`: never listed.
|
|
2953
|
-
* - `include`: always listed (override when the widget cannot declare the AI category yet).
|
|
2954
|
-
* - `inherit` / omitted: listed only if {@link hasAiWidgetCategory} is true.
|
|
2955
|
-
*/
|
|
2956
|
-
function isWidgetAiCatalogIncluded(config) {
|
|
2957
|
-
const mode = config.aiCatalog ?? 'inherit';
|
|
2958
|
-
if (mode === 'exclude') {
|
|
2959
|
-
return false;
|
|
2960
|
-
}
|
|
2961
|
-
if (mode === 'include') {
|
|
2962
|
-
return true;
|
|
2963
|
-
}
|
|
2964
|
-
return hasAiWidgetCategory(config);
|
|
2965
|
-
}
|
|
2966
|
-
//#endregion
|
|
2967
|
-
|
|
2968
3052
|
/**
|
|
2969
3053
|
* Generated bundle index. Do not edit.
|
|
2970
3054
|
*/
|
|
2971
3055
|
|
|
2972
|
-
export { AXPBaseWidgetComponent, AXPBlockBaseLayoutWidgetComponent, AXPBoxModelLayoutWidgetComponent, AXPColumnWidgetComponent, AXPDataListWidgetComponent, AXPFlexBaseLayoutWidgetComponent, AXPFlexItemBaseLayoutWidgetComponent, AXPGridBaseLayoutWidgetComponent, AXPGridItemBaseLayoutWidgetComponent, AXPInlineBaseLayoutWidgetComponent, AXPLayoutBaseWidgetComponent, AXPPageStatus, AXPPropertyEditorHelper, AXPTableBaseLayoutWidgetComponent, AXPTableItemBaseLayoutWidgetComponent, AXPTableItemOpsBaseLayoutWidgetComponent, AXPValueWidgetComponent, AXPWidgetColumnRendererComponent, AXPWidgetContainerComponent, AXPWidgetCoreElement, AXPWidgetCoreModule, AXPWidgetCoreService, AXPWidgetGroupEnum, AXPWidgetRegistryService, AXPWidgetRendererDirective, AXPWidgetSerializationHelper, AXPWidgetStatus, AXPWidgetsCatalog, AXP_WIDGETS_ACTION_CATEGORY, AXP_WIDGETS_ADVANCE_CATEGORY, AXP_WIDGETS_AI_CATEGORY, AXP_WIDGETS_CATEGORIES, AXP_WIDGETS_EDITOR_CATEGORY, AXP_WIDGETS_LAYOUT_CATEGORY, AXP_WIDGET_COLUMN_TOKEN, AXP_WIDGET_DEFINITION_PROVIDER, AXP_WIDGET_TOKEN, buildWidgetRegistryMapFromProviders, cloneProperty, createBooleanProperty, createNumberProperty, createSelectProperty, createStringProperty, findNonEmptyBreakpoints,
|
|
3056
|
+
export { AXPBaseWidgetComponent, AXPBlockBaseLayoutWidgetComponent, AXPBoxModelLayoutWidgetComponent, AXPColumnWidgetComponent, AXPDataListWidgetComponent, AXPFlexBaseLayoutWidgetComponent, AXPFlexItemBaseLayoutWidgetComponent, AXPGridBaseLayoutWidgetComponent, AXPGridItemBaseLayoutWidgetComponent, AXPInlineBaseLayoutWidgetComponent, AXPLayoutBaseWidgetComponent, AXPPageStatus, AXPPropertyEditorHelper, AXPTableBaseLayoutWidgetComponent, AXPTableItemBaseLayoutWidgetComponent, AXPTableItemOpsBaseLayoutWidgetComponent, AXPValueWidgetComponent, AXPWidgetColumnRendererComponent, AXPWidgetContainerComponent, AXPWidgetCoreElement, AXPWidgetCoreModule, AXPWidgetCoreService, AXPWidgetGroupEnum, AXPWidgetRegistryService, AXPWidgetRendererDirective, AXPWidgetSerializationHelper, AXPWidgetStatus, AXPWidgetsCatalog, AXP_WIDGETS_ACTION_CATEGORY, AXP_WIDGETS_ACTION_SUB_CONTROLS, AXP_WIDGETS_ADVANCE_CATEGORY, AXP_WIDGETS_ADVANCE_SUB_DATA, AXP_WIDGETS_ADVANCE_SUB_INPUT, AXP_WIDGETS_ADVANCE_SUB_MEDIA, AXP_WIDGETS_ADVANCE_SUB_TOOLS, AXP_WIDGETS_AI_CATEGORY, AXP_WIDGETS_CATEGORIES, AXP_WIDGETS_EDITOR_CATEGORY, AXP_WIDGETS_EDITOR_SUB_CHOICE, AXP_WIDGETS_EDITOR_SUB_COMPOSITE, AXP_WIDGETS_EDITOR_SUB_CONFIG, AXP_WIDGETS_EDITOR_SUB_DATETIME, AXP_WIDGETS_EDITOR_SUB_NUMERIC, AXP_WIDGETS_EDITOR_SUB_RICH, AXP_WIDGETS_EDITOR_SUB_TEXT_INPUTS, AXP_WIDGETS_EDITOR_SUB_VISUAL, AXP_WIDGETS_LAYOUT_CATEGORY, AXP_WIDGETS_LAYOUT_SUB_GRID, AXP_WIDGETS_LAYOUT_SUB_LISTS, AXP_WIDGETS_LAYOUT_SUB_SHELL, AXP_WIDGETS_LAYOUT_SUB_SURFACES, AXP_WIDGETS_LAYOUT_SUB_TABS, AXP_WIDGETS_LAYOUT_SUB_UTILITY, AXP_WIDGET_COLUMN_TOKEN, AXP_WIDGET_DEFINITION_PROVIDER, AXP_WIDGET_TOKEN, buildWidgetRegistryMapFromProviders, cloneProperty, createBooleanProperty, createNumberProperty, createSelectProperty, createStringProperty, findNonEmptyBreakpoints, mapAXPPropertyToWidgetProperty, normalizeWidgetCategories };
|
|
2973
3057
|
//# sourceMappingURL=acorex-platform-layout-widget-core.mjs.map
|