@masterteam/customization 0.0.13 → 0.0.15
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/assets/customization.css +1 -1
- package/assets/i18n/ar.json +24 -19
- package/assets/i18n/en.json +28 -23
- package/fesm2022/masterteam-customization.mjs +338 -110
- package/fesm2022/masterteam-customization.mjs.map +1 -1
- package/package.json +8 -7
- package/types/masterteam-customization.d.ts +61 -17
|
@@ -17,17 +17,52 @@ interface Response<T> {
|
|
|
17
17
|
data: T;
|
|
18
18
|
cacheSession?: string;
|
|
19
19
|
}
|
|
20
|
+
interface LeafStatusConfig {
|
|
21
|
+
key: string;
|
|
22
|
+
display: string;
|
|
23
|
+
description: string | null;
|
|
24
|
+
color: string | null;
|
|
25
|
+
icon: string | null;
|
|
26
|
+
order: number;
|
|
27
|
+
}
|
|
28
|
+
interface LeafLevelConfig {
|
|
29
|
+
levelId: number;
|
|
30
|
+
levelName: string;
|
|
31
|
+
levelIcon: string;
|
|
32
|
+
statuses: LeafStatusConfig[];
|
|
33
|
+
}
|
|
20
34
|
interface CatalogPropertyDto {
|
|
21
35
|
id: number;
|
|
22
36
|
key: string;
|
|
23
37
|
label: string;
|
|
24
38
|
viewType: string;
|
|
25
|
-
|
|
39
|
+
/** Regular properties have an object config; LeafDetails has LeafLevelConfig[] */
|
|
40
|
+
configuration: Record<string, unknown> | LeafLevelConfig[] | null;
|
|
26
41
|
source?: string;
|
|
27
42
|
order?: number;
|
|
28
43
|
isRequired?: boolean;
|
|
29
44
|
isSystem?: boolean;
|
|
30
45
|
}
|
|
46
|
+
interface LeafDetailsStatusSummary {
|
|
47
|
+
key: string;
|
|
48
|
+
display: string;
|
|
49
|
+
color: string | null;
|
|
50
|
+
count: number;
|
|
51
|
+
}
|
|
52
|
+
interface LeafDetailsEntityValue {
|
|
53
|
+
levelId: number;
|
|
54
|
+
levelName: string;
|
|
55
|
+
levelIcon: string;
|
|
56
|
+
statuses: LeafDetailsStatusSummary[];
|
|
57
|
+
}
|
|
58
|
+
interface LeafLevelSavedConfig {
|
|
59
|
+
/** Position order for this level entity in the preview grid */
|
|
60
|
+
order: number;
|
|
61
|
+
/** Column span (1-24), persisted from drag-resize */
|
|
62
|
+
size?: number;
|
|
63
|
+
/** Status keys the user has chosen to display */
|
|
64
|
+
selectedStatuses: string[];
|
|
65
|
+
}
|
|
31
66
|
interface PropertyCatalogResponseDto {
|
|
32
67
|
contextKey: string;
|
|
33
68
|
properties: CatalogPropertyDto[];
|
|
@@ -107,7 +142,8 @@ interface ManagePreviewPropertyItem {
|
|
|
107
142
|
shownInTable?: boolean;
|
|
108
143
|
includeInSummary?: boolean;
|
|
109
144
|
category?: string;
|
|
110
|
-
|
|
145
|
+
/** Regular properties: object config. LeafDetails: LeafLevelConfig[] */
|
|
146
|
+
configuration?: Record<string, unknown> | unknown[];
|
|
111
147
|
[key: string]: unknown;
|
|
112
148
|
}
|
|
113
149
|
declare enum CustomizationActionKey {
|
|
@@ -190,6 +226,11 @@ declare class Customization implements OnInit {
|
|
|
190
226
|
label: string;
|
|
191
227
|
value: string;
|
|
192
228
|
}[]>;
|
|
229
|
+
/**
|
|
230
|
+
* Configurations filtered to exclude properties that no longer exist in the catalog.
|
|
231
|
+
* Prevents sending orphaned property references on save.
|
|
232
|
+
*/
|
|
233
|
+
private readonly validConfigurations;
|
|
193
234
|
/** Properties enriched with `enabled` based on current area configurations */
|
|
194
235
|
readonly propertiesWithEnabled: _angular_core.Signal<{
|
|
195
236
|
enabled: boolean;
|
|
@@ -210,7 +251,7 @@ declare class Customization implements OnInit {
|
|
|
210
251
|
shownInTable?: boolean;
|
|
211
252
|
includeInSummary?: boolean;
|
|
212
253
|
category?: string;
|
|
213
|
-
configuration?: Record<string, unknown
|
|
254
|
+
configuration?: Record<string, unknown> | unknown[];
|
|
214
255
|
}[]>;
|
|
215
256
|
readonly filteredProperties: _angular_core.Signal<{
|
|
216
257
|
enabled: boolean;
|
|
@@ -231,8 +272,13 @@ declare class Customization implements OnInit {
|
|
|
231
272
|
shownInTable?: boolean;
|
|
232
273
|
includeInSummary?: boolean;
|
|
233
274
|
category?: string;
|
|
234
|
-
configuration?: Record<string, unknown
|
|
275
|
+
configuration?: Record<string, unknown> | unknown[];
|
|
235
276
|
}[]>;
|
|
277
|
+
/**
|
|
278
|
+
* LeafDetails saved configs indexed by propertyKey for the active area.
|
|
279
|
+
* Used by the inline selector in the property list.
|
|
280
|
+
*/
|
|
281
|
+
protected readonly leafConfigsByProp: _angular_core.Signal<Record<string, Record<string, LeafLevelSavedConfig>>>;
|
|
236
282
|
/** Preview entities built from configurations + properties for the active area */
|
|
237
283
|
previewEntities: _angular_core.WritableSignal<EntityData[]>;
|
|
238
284
|
constructor();
|
|
@@ -241,26 +287,24 @@ declare class Customization implements OnInit {
|
|
|
241
287
|
enabled: boolean;
|
|
242
288
|
}, enabled: boolean): void;
|
|
243
289
|
onEditProperty(prop: ManagePreviewPropertyItem): void;
|
|
290
|
+
onEntityClicked(entity: EntityData): void;
|
|
244
291
|
onEntityResized(event: EntityResizeEvent): void;
|
|
245
292
|
onEntitiesReordered(entities: EntityData[]): void;
|
|
246
293
|
/**
|
|
247
|
-
*
|
|
248
|
-
*
|
|
294
|
+
* Called by the inline LeafDetailsSelector when the user changes status selections.
|
|
295
|
+
* Immediately persists the updated leafLevels configuration.
|
|
249
296
|
*/
|
|
250
|
-
|
|
297
|
+
onLeafConfigChange(prop: ManagePreviewPropertyItem, leafLevels: Record<string, LeafLevelSavedConfig>): void;
|
|
251
298
|
/**
|
|
252
|
-
*
|
|
253
|
-
*
|
|
299
|
+
* Builds zero or more EntityData entries from a single DisplayConfiguration.
|
|
300
|
+
* Regular properties → one entity. LeafDetails → one entity per enabled level.
|
|
254
301
|
*/
|
|
302
|
+
private buildEntitiesFromConfig;
|
|
303
|
+
/** Builds one EntityData per enabled level from a LeafDetails display config. */
|
|
304
|
+
private buildLeafDetailsEntities;
|
|
305
|
+
private activateProperty;
|
|
255
306
|
private bulkSaveWithout;
|
|
256
|
-
/**
|
|
257
|
-
* Group flat DisplayConfiguration[] into bulk-replace items grouped by propertyKey.
|
|
258
|
-
*/
|
|
259
307
|
private groupConfigsByProperty;
|
|
260
|
-
/**
|
|
261
|
-
* Merge two sets of bulk items. If a propertyKey exists in both,
|
|
262
|
-
* combine their displayAreas arrays.
|
|
263
|
-
*/
|
|
264
308
|
private mergeItems;
|
|
265
309
|
private openDrawer;
|
|
266
310
|
private toPropertyEditConfig;
|
|
@@ -273,4 +317,4 @@ declare class Customization implements OnInit {
|
|
|
273
317
|
}
|
|
274
318
|
|
|
275
319
|
export { BulkReplaceConfigurations, Customization, CustomizationActionKey, CustomizationFacade, CustomizationState, GetCustomization, GetManagePreviewAreas, GetManagePreviewConfigurations, SetManagePreviewModuleInfo };
|
|
276
|
-
export type { BulkReplaceConfigRequest, BulkReplaceItem, CustomizationStateModel, DisplayArea, DisplayAreaConfig, DisplayConfiguration, ManagePreviewPropertyItem };
|
|
320
|
+
export type { BulkReplaceConfigRequest, BulkReplaceItem, CustomizationStateModel, DisplayArea, DisplayAreaConfig, DisplayConfiguration, LeafDetailsEntityValue, LeafDetailsStatusSummary, LeafLevelConfig, LeafLevelSavedConfig, LeafStatusConfig, ManagePreviewPropertyItem };
|