@acorex/platform 21.0.0-next.10 → 21.0.0-next.11
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/core/index.d.ts +109 -3
- package/fesm2022/acorex-platform-core.mjs +3 -0
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +0 -2
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs +6 -6
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +619 -466
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +2 -2
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +3 -4
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widgets.mjs +50 -55
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-CIV6YDDZ.mjs → acorex-platform-themes-default-entity-master-list-view.component-CD4Q_UIG.mjs} +3 -3
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-CD4Q_UIG.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +2 -2
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/layout/entity/index.d.ts +47 -16
- package/layout/widgets/index.d.ts +4 -6
- package/package.json +9 -9
- package/workflow/index.d.ts +4 -4
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-CIV6YDDZ.mjs.map +0 -1
package/core/index.d.ts
CHANGED
|
@@ -945,6 +945,7 @@ interface AXPContent {
|
|
|
945
945
|
}
|
|
946
946
|
|
|
947
947
|
type AXPDataSource = string | AXDataSource | any[];
|
|
948
|
+
type AXPDataType = 'string' | 'number' | 'object' | 'boolean' | 'array';
|
|
948
949
|
interface AXPPagedListResult<T = any> {
|
|
949
950
|
items: T[];
|
|
950
951
|
total: number;
|
|
@@ -958,16 +959,121 @@ interface AXPQueryRequest {
|
|
|
958
959
|
[key: string]: string;
|
|
959
960
|
};
|
|
960
961
|
}
|
|
961
|
-
|
|
962
|
+
/**
|
|
963
|
+
* Category Entity - Base interface for hierarchical category structures
|
|
964
|
+
*
|
|
965
|
+
* This interface provides a standardized data model for category entities across the platform.
|
|
966
|
+
* All category entities (e.g., ReportCategory, ActivityCategory, WorkflowCategory) extend this interface
|
|
967
|
+
* to ensure consistency in data structure and field names.
|
|
968
|
+
*
|
|
969
|
+
* @template TKey - The type of the identifier key (default: string)
|
|
970
|
+
*
|
|
971
|
+
* @example
|
|
972
|
+
* ```typescript
|
|
973
|
+
* const category: AXPCategoryEntity = {
|
|
974
|
+
* id: 'cat-001',
|
|
975
|
+
* title: 'Electronics',
|
|
976
|
+
* description: 'Electronic products',
|
|
977
|
+
* parentId: undefined, // Root category
|
|
978
|
+
* childrenCount: 2, // Has 2 direct child categories
|
|
979
|
+
* itemsCount: 5, // Has 5 items directly in this category
|
|
980
|
+
* totalChildrenCount: 6, // Total of 6 nested categories (including grandchildren)
|
|
981
|
+
* totalItemsCount: 23 // Total of 23 items in entire category tree
|
|
982
|
+
* };
|
|
983
|
+
* ```
|
|
984
|
+
*/
|
|
962
985
|
interface AXPCategoryEntity<TKey = string> {
|
|
986
|
+
/** Unique identifier for the category */
|
|
963
987
|
id: TKey;
|
|
988
|
+
/** Display name of the category (required) */
|
|
964
989
|
title: string;
|
|
990
|
+
/** Optional description of the category */
|
|
965
991
|
description?: string;
|
|
992
|
+
/** Parent category ID (undefined for root categories) */
|
|
966
993
|
parentId?: TKey;
|
|
994
|
+
/**
|
|
995
|
+
* Count of direct child categories only (not recursive)
|
|
996
|
+
*
|
|
997
|
+
* Used by UI components to determine if a category has children and should show an expand icon.
|
|
998
|
+
* This enables efficient lazy loading - components can check this property without querying the API.
|
|
999
|
+
*
|
|
1000
|
+
* @example
|
|
1001
|
+
* - Category with 2 direct children: `childrenCount: 2`
|
|
1002
|
+
* - Leaf category (no children): `childrenCount: 0`
|
|
1003
|
+
*
|
|
1004
|
+
* @remarks
|
|
1005
|
+
* - Always set to `0` for leaf categories
|
|
1006
|
+
* - Does not include grandchildren or nested descendants
|
|
1007
|
+
* - Automatically maintained by middleware for category entities
|
|
1008
|
+
*/
|
|
967
1009
|
childrenCount: number;
|
|
1010
|
+
/**
|
|
1011
|
+
* Count of items directly assigned to this category (not recursive)
|
|
1012
|
+
*
|
|
1013
|
+
* Represents the number of items (e.g., reports, activities, workflows) that are directly
|
|
1014
|
+
* assigned to this category. Does not include items from child categories.
|
|
1015
|
+
*
|
|
1016
|
+
* Useful for:
|
|
1017
|
+
* - Displaying item counts per category in UI (e.g., "5 reports" badge)
|
|
1018
|
+
* - Optimizing queries (skip API call if itemsCount === 0)
|
|
1019
|
+
* - Showing category statistics
|
|
1020
|
+
*
|
|
1021
|
+
* @example
|
|
1022
|
+
* - Category with 5 reports directly assigned: `itemsCount: 5`
|
|
1023
|
+
* - Category with no direct items: `itemsCount: 0` or `undefined`
|
|
1024
|
+
*
|
|
1025
|
+
* @remarks
|
|
1026
|
+
* - Does not include items from child categories
|
|
1027
|
+
* - Can be calculated dynamically or stored
|
|
1028
|
+
* - Optional - may be undefined if not needed
|
|
1029
|
+
*/
|
|
968
1030
|
itemsCount?: number;
|
|
969
|
-
|
|
970
|
-
|
|
1031
|
+
/**
|
|
1032
|
+
* Recursive count of all nested child categories (includes all descendants)
|
|
1033
|
+
*
|
|
1034
|
+
* Represents the total number of categories in the entire subtree starting from this category.
|
|
1035
|
+
* Includes children, grandchildren, and all nested descendants.
|
|
1036
|
+
*
|
|
1037
|
+
* Useful for:
|
|
1038
|
+
* - Analytics and summary displays
|
|
1039
|
+
* - Showing complete category tree scope
|
|
1040
|
+
* - Performance metrics
|
|
1041
|
+
*
|
|
1042
|
+
* @example
|
|
1043
|
+
* Root category with:
|
|
1044
|
+
* - 2 direct children
|
|
1045
|
+
* - Each child has 2 children (4 grandchildren)
|
|
1046
|
+
* Result: `totalChildrenCount: 6` (2 + 4)
|
|
1047
|
+
*
|
|
1048
|
+
* @remarks
|
|
1049
|
+
* - Optional - typically used for analytics
|
|
1050
|
+
* - Includes all nested levels (recursive)
|
|
1051
|
+
* - Can be expensive to calculate for large trees
|
|
1052
|
+
*/
|
|
1053
|
+
totalChildrenCount?: number;
|
|
1054
|
+
/**
|
|
1055
|
+
* Recursive count of all items in this category and all descendants
|
|
1056
|
+
*
|
|
1057
|
+
* Represents the total number of items (e.g., reports, activities, workflows) in the entire
|
|
1058
|
+
* category tree, including items from this category and all nested child categories.
|
|
1059
|
+
*
|
|
1060
|
+
* Useful for:
|
|
1061
|
+
* - Analytics and summary displays
|
|
1062
|
+
* - Showing complete scope of a category branch
|
|
1063
|
+
* - Dashboard statistics
|
|
1064
|
+
*
|
|
1065
|
+
* @example
|
|
1066
|
+
* Category with:
|
|
1067
|
+
* - 5 items directly assigned
|
|
1068
|
+
* - 1 child category with 3 items
|
|
1069
|
+
* Result: `totalItemsCount: 8` (5 + 3)
|
|
1070
|
+
*
|
|
1071
|
+
* @remarks
|
|
1072
|
+
* - Optional - typically used for analytics
|
|
1073
|
+
* - Includes items from all nested categories (recursive)
|
|
1074
|
+
* - Can be expensive to calculate for large trees
|
|
1075
|
+
*/
|
|
1076
|
+
totalItemsCount?: number;
|
|
971
1077
|
}
|
|
972
1078
|
interface AXPCategoryEntityWithItems<T> extends AXPCategoryEntity {
|
|
973
1079
|
items: T[];
|
|
@@ -3177,6 +3177,9 @@ function getNestedKeys(obj, prefix = '') {
|
|
|
3177
3177
|
return keys;
|
|
3178
3178
|
}
|
|
3179
3179
|
|
|
3180
|
+
//#region ---- Imports ----
|
|
3181
|
+
//#endregion
|
|
3182
|
+
|
|
3180
3183
|
function applySystemActionDefault(action, type) {
|
|
3181
3184
|
const systemAction = getSystemActions(type);
|
|
3182
3185
|
return {
|