@fuentis/phoenix-ui 0.0.9-alpha.67 → 0.0.9-alpha.671
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/fuentis-phoenix-ui.mjs +10491 -1095
- package/fesm2022/fuentis-phoenix-ui.mjs.map +1 -1
- package/index.d.ts +1741 -3
- package/package.json +30 -12
- package/styles/flag.css +1 -0
- package/styles/global.css +57 -1
- package/lib/components/data-table/phoenix-data-table/isSelected.pipe.d.ts +0 -7
- package/lib/components/data-table/phoenix-data-table/phoenix-data-table.component.d.ts +0 -84
- package/lib/components/data-table/phoenix-data-table-action/phoenix-data-table-action.component.d.ts +0 -28
- package/lib/components/data-table/phoenix-data-table-tabs/phoenix-data-table-tabs.component.d.ts +0 -16
- package/lib/components/data-table/table/table.component.d.ts +0 -41
- package/lib/components/data-table/table-caption/table-caption.component.d.ts +0 -32
- package/lib/components/data-table/utils/data-cell-value.pipe.d.ts +0 -16
- package/lib/components/data-table/utils/dataTable.enum.d.ts +0 -62
- package/lib/components/data-table/utils/dataTable.interface.d.ts +0 -44
- package/lib/components/data-table/utils/export-type.util.d.ts +0 -4
- package/lib/components/data-table/utils/remove-html-tags.pipe.d.ts +0 -7
- package/lib/components/data-table/utils/table-cell.pipe.d.ts +0 -10
- package/lib/components/search-bar/search-bar.component.d.ts +0 -30
- package/lib/components/shell/shell.component.d.ts +0 -9
- package/lib/components/sidebar/sidebar.component.d.ts +0 -12
- package/lib/components/sidebar-item/sidebar-item.component.d.ts +0 -12
- package/lib/components/status-header/status-header.component.d.ts +0 -45
- package/lib/components/topbar/topbar.component.d.ts +0 -46
- package/lib/components/user/user.component.d.ts +0 -15
- package/lib/models/shell-config.model.d.ts +0 -26
- package/lib/utils/date-format.service.d.ts +0 -14
- package/public-api.d.ts +0 -11
package/index.d.ts
CHANGED
|
@@ -1,5 +1,1743 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, ElementRef, OnChanges, SimpleChanges, QueryList, OnDestroy, TemplateRef, OnInit, InjectionToken } from '@angular/core';
|
|
3
|
+
import { ButtonProps } from 'primeng/button';
|
|
4
|
+
import { Popover } from 'primeng/popover';
|
|
5
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
6
|
+
import * as rxjs from 'rxjs';
|
|
7
|
+
import { Subject, Subscription, Observable } from 'rxjs';
|
|
8
|
+
import { Router } from '@angular/router';
|
|
9
|
+
import { Table } from 'primeng/table';
|
|
10
|
+
import { FormGroup, FormBuilder, AbstractControl } from '@angular/forms';
|
|
11
|
+
import { HttpClient } from '@angular/common/http';
|
|
12
|
+
import { DynamicDialogRef, DynamicDialogConfig } from 'primeng/dynamicdialog';
|
|
13
|
+
import { Drawer } from 'primeng/drawer';
|
|
14
|
+
|
|
15
|
+
declare class InnerHeaderComponent {
|
|
16
|
+
title: string;
|
|
17
|
+
tooltipContent: string;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InnerHeaderComponent, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InnerHeaderComponent, "pho-inner-header", never, { "title": { "alias": "title"; "required": false; }; "tooltipContent": { "alias": "tooltipContent"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
declare class SidebarComponent {
|
|
23
|
+
toggleSidebar: EventEmitter<boolean>;
|
|
24
|
+
sliderClick: EventEmitter<any>;
|
|
25
|
+
classname: string;
|
|
26
|
+
mainItems: any;
|
|
27
|
+
footerItem: any;
|
|
28
|
+
isHovered: boolean;
|
|
29
|
+
isSlim: boolean;
|
|
30
|
+
get hoverState(): "default" | "hovered";
|
|
31
|
+
onMouseEnter(): void;
|
|
32
|
+
onMouseLeave(): void;
|
|
33
|
+
onToggleSidebar(): void;
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SidebarComponent, never>;
|
|
35
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SidebarComponent, "pho-sidebar", never, { "classname": { "alias": "classname"; "required": false; }; "mainItems": { "alias": "mainItems"; "required": false; }; "footerItem": { "alias": "footerItem"; "required": false; }; }, { "toggleSidebar": "toggleSidebar"; "sliderClick": "sliderClick"; }, never, never, true, never>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
declare class ActionStateService {
|
|
39
|
+
private _disabledActions;
|
|
40
|
+
get disabledActions(): i0.Signal<Set<string>>;
|
|
41
|
+
disableAction(id: string): void;
|
|
42
|
+
enableAction(id: string): void;
|
|
43
|
+
isDisabled(id: string): boolean;
|
|
44
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ActionStateService, never>;
|
|
45
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ActionStateService>;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
declare enum ActionTypes {
|
|
49
|
+
BASIC = "BASIC",
|
|
50
|
+
SELECT = "SELECT"
|
|
51
|
+
}
|
|
52
|
+
interface Actions {
|
|
53
|
+
}
|
|
54
|
+
type RegisteredActionEnums = Actions[keyof Actions];
|
|
55
|
+
type AllActionValues = RegisteredActionEnums[keyof RegisteredActionEnums];
|
|
56
|
+
interface Action<T = AllActionValues> {
|
|
57
|
+
id?: string;
|
|
58
|
+
actionId: T;
|
|
59
|
+
label: string;
|
|
60
|
+
icon: string;
|
|
61
|
+
severity: Exclude<ButtonProps['severity'], 'warning'> | 'warn';
|
|
62
|
+
iconPos?: 'right' | 'left';
|
|
63
|
+
type: keyof typeof ActionTypes;
|
|
64
|
+
text?: boolean;
|
|
65
|
+
tooltip?: string;
|
|
66
|
+
key?: string;
|
|
67
|
+
requiredPermission?: string;
|
|
68
|
+
data?: any;
|
|
69
|
+
disabled?: boolean;
|
|
70
|
+
visible?: boolean;
|
|
71
|
+
loading?: boolean;
|
|
72
|
+
class?: string;
|
|
73
|
+
items?: {
|
|
74
|
+
key?: string;
|
|
75
|
+
actionId?: T;
|
|
76
|
+
label?: string;
|
|
77
|
+
separator?: boolean;
|
|
78
|
+
icon?: string;
|
|
79
|
+
requiredPermission?: string;
|
|
80
|
+
}[];
|
|
81
|
+
}
|
|
82
|
+
declare class ActionsComponent {
|
|
83
|
+
actionStateService: ActionStateService;
|
|
84
|
+
actions: Action[];
|
|
85
|
+
actionClick: EventEmitter<Action<never>>;
|
|
86
|
+
onActionClick($event: any, action: Action, menuRef?: Popover): void;
|
|
87
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ActionsComponent, never>;
|
|
88
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ActionsComponent, "pho-actions", never, { "actions": { "alias": "actions"; "required": false; }; }, { "actionClick": "actionClick"; }, never, never, true, never>;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
declare enum ActionKinds {
|
|
92
|
+
CREATE = "CREATE",
|
|
93
|
+
SUBMIT = "SUBMIT",
|
|
94
|
+
ASSIGN = "ASSIGN",
|
|
95
|
+
NEW = "NEW",
|
|
96
|
+
UPDATE = "UPDATE",
|
|
97
|
+
RELOAD = "RELOAD",
|
|
98
|
+
CLOSE = "CLOSE",
|
|
99
|
+
OPEN = "OPEN",
|
|
100
|
+
EDIT = "EDIT",
|
|
101
|
+
DELETE = "DELETE",
|
|
102
|
+
EDIT_TRANSITION = "EDIT_TRANSITION",
|
|
103
|
+
ADD_TRANSITION = "ADD_TRANSITION",
|
|
104
|
+
READ = "READ"
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
interface cardConfig {
|
|
108
|
+
name: string;
|
|
109
|
+
subName: string;
|
|
110
|
+
description: string;
|
|
111
|
+
actions: any[];
|
|
112
|
+
additional: any[];
|
|
113
|
+
}
|
|
114
|
+
declare class CardComponent<T extends Record<string, any>> {
|
|
115
|
+
card: i0.InputSignal<T>;
|
|
116
|
+
cardEventEmmiter: i0.OutputEmitterRef<{
|
|
117
|
+
data: T;
|
|
118
|
+
action: string;
|
|
119
|
+
}>;
|
|
120
|
+
actionEnum: typeof ActionKinds;
|
|
121
|
+
cardActions: i0.InputSignal<any>;
|
|
122
|
+
getObjectValueByKey(obj: any, key: string): any;
|
|
123
|
+
descEl: ElementRef<HTMLElement>;
|
|
124
|
+
showTooltip: boolean;
|
|
125
|
+
ngAfterViewInit(): void;
|
|
126
|
+
onCardClick(event: any, actionType?: string): void;
|
|
127
|
+
shouldShowTitleTooltip(): boolean;
|
|
128
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CardComponent<any>, never>;
|
|
129
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CardComponent<any>, "phoenix-card", never, { "card": { "alias": "card"; "required": true; "isSignal": true; }; "cardActions": { "alias": "cardActions"; "required": false; "isSignal": true; }; }, { "cardEventEmmiter": "cardEventEmmiter"; }, never, ["[custom]", "[footer]"], true, never>;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
interface SearchTabs {
|
|
133
|
+
id: number;
|
|
134
|
+
apiUrl: string;
|
|
135
|
+
header: string;
|
|
136
|
+
linkUrl: string;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
interface SidebarItem {
|
|
140
|
+
module: string;
|
|
141
|
+
items: any;
|
|
142
|
+
}
|
|
143
|
+
interface TopbarItem {
|
|
144
|
+
label: string;
|
|
145
|
+
icon?: string;
|
|
146
|
+
url?: string;
|
|
147
|
+
routerLink?: string[];
|
|
148
|
+
disabled?: boolean;
|
|
149
|
+
path: string;
|
|
150
|
+
}
|
|
151
|
+
interface User {
|
|
152
|
+
email: string;
|
|
153
|
+
username: string;
|
|
154
|
+
imageUrl: string;
|
|
155
|
+
bindImageUrl: string;
|
|
156
|
+
firstname?: string;
|
|
157
|
+
lastname?: string;
|
|
158
|
+
}
|
|
159
|
+
interface ShellConfig {
|
|
160
|
+
user: User;
|
|
161
|
+
mainItems: SidebarItem[][];
|
|
162
|
+
shortModuleName: string;
|
|
163
|
+
footerItem: TopbarItem[];
|
|
164
|
+
topbarModulesMenu: any[];
|
|
165
|
+
searchConfig?: SearchTabs[];
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
interface TopbarModuleItem {
|
|
169
|
+
label: string;
|
|
170
|
+
fullName?: string;
|
|
171
|
+
icon?: string;
|
|
172
|
+
url?: string;
|
|
173
|
+
routerLink?: string[];
|
|
174
|
+
disabled?: boolean;
|
|
175
|
+
}
|
|
176
|
+
interface TopbarModuleGroup {
|
|
177
|
+
label: string;
|
|
178
|
+
layout: 'full' | 'grid';
|
|
179
|
+
showIconBackground: boolean;
|
|
180
|
+
items: TopbarModuleItem[];
|
|
181
|
+
}
|
|
182
|
+
interface TopbarFooterConfig {
|
|
183
|
+
companyName: string;
|
|
184
|
+
companyUrl: string;
|
|
185
|
+
guideLabel: string;
|
|
186
|
+
guideUrl: string;
|
|
187
|
+
copyrightText: string;
|
|
188
|
+
}
|
|
189
|
+
interface UrlConfig {
|
|
190
|
+
url: string | null;
|
|
191
|
+
disabled?: boolean;
|
|
192
|
+
}
|
|
193
|
+
declare class TopbarComponent {
|
|
194
|
+
sidebarConfig: {
|
|
195
|
+
visible: boolean;
|
|
196
|
+
type: string;
|
|
197
|
+
};
|
|
198
|
+
currentYear: number;
|
|
199
|
+
isSidebarVisible: boolean;
|
|
200
|
+
homeUrl: string;
|
|
201
|
+
user: User;
|
|
202
|
+
shortModuleName?: string;
|
|
203
|
+
hidelogo?: boolean;
|
|
204
|
+
topbarModulesMenu: any[];
|
|
205
|
+
darkModeSelector: any;
|
|
206
|
+
urlConfig?: UrlConfig;
|
|
207
|
+
readonly defaultIncidentUrl = "https://fuentis.atlassian.net/servicedesk/customer/portal/1";
|
|
208
|
+
footerConfig: TopbarFooterConfig;
|
|
209
|
+
onDarkModeSelect: EventEmitter<void>;
|
|
210
|
+
onUserPopoverAction: EventEmitter<string>;
|
|
211
|
+
closeCallback(event: any): void;
|
|
212
|
+
searchConfig: i0.InputSignal<SearchTabs[] | undefined>;
|
|
213
|
+
openSidebarPanel(): void;
|
|
214
|
+
private messageService;
|
|
215
|
+
private translateService;
|
|
216
|
+
/** ✅ Zatvara sidebar */
|
|
217
|
+
closeSidebar(): void;
|
|
218
|
+
ngOnInit(): void;
|
|
219
|
+
onDarkModeSelectEmit(): void;
|
|
220
|
+
goToHome(): void;
|
|
221
|
+
openIncidentReport(): void;
|
|
222
|
+
goToTicketCenter(): void;
|
|
223
|
+
copyToClipboard($event: any, linkUrl: any): void;
|
|
224
|
+
get bindImageUrl(): string;
|
|
225
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TopbarComponent, never>;
|
|
226
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TopbarComponent, "pho-topbar", never, { "homeUrl": { "alias": "homeUrl"; "required": false; }; "user": { "alias": "user"; "required": false; }; "shortModuleName": { "alias": "shortModuleName"; "required": false; }; "hidelogo": { "alias": "hidelogo"; "required": false; }; "topbarModulesMenu": { "alias": "topbarModulesMenu"; "required": false; }; "darkModeSelector": { "alias": "darkModeSelector"; "required": false; }; "urlConfig": { "alias": "urlConfig"; "required": false; }; "footerConfig": { "alias": "footerConfig"; "required": false; }; "searchConfig": { "alias": "searchConfig"; "required": false; "isSignal": true; }; }, { "onDarkModeSelect": "onDarkModeSelect"; "onUserPopoverAction": "onUserPopoverAction"; }, never, ["*"], true, never>;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
declare class BaseObject {
|
|
230
|
+
name: string;
|
|
231
|
+
uuid: string;
|
|
232
|
+
constructor(partial: Partial<BaseObject>);
|
|
233
|
+
}
|
|
234
|
+
declare class BaseObjectType {
|
|
235
|
+
id: number;
|
|
236
|
+
labelKey: string;
|
|
237
|
+
labelKeyValEn: string;
|
|
238
|
+
labelKeyValDe: string;
|
|
239
|
+
labelKeyValSr?: string;
|
|
240
|
+
labelKeyVal?: string;
|
|
241
|
+
[key: string]: any;
|
|
242
|
+
constructor(partial: Partial<BaseObjectType>);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
declare class SearchResult {
|
|
246
|
+
name: string;
|
|
247
|
+
title: string;
|
|
248
|
+
uuid: string;
|
|
249
|
+
type?: BaseObjectType;
|
|
250
|
+
entity?: BaseObject;
|
|
251
|
+
scopes?: BaseObject[];
|
|
252
|
+
asset?: BaseObject;
|
|
253
|
+
score?: number;
|
|
254
|
+
togType?: string;
|
|
255
|
+
url?: string;
|
|
256
|
+
constructor(partial: Partial<SearchResult>);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
interface TypesFilter {
|
|
260
|
+
title: string;
|
|
261
|
+
checkboxes: any;
|
|
262
|
+
}
|
|
263
|
+
declare class SearchBarComponent {
|
|
264
|
+
translate: TranslateService;
|
|
265
|
+
op: any;
|
|
266
|
+
elm: ElementRef;
|
|
267
|
+
private crudService;
|
|
268
|
+
tabs: i0.InputSignal<SearchTabs[] | undefined>;
|
|
269
|
+
isOpen: boolean;
|
|
270
|
+
valueChanges: Subject<Event>;
|
|
271
|
+
inputEvent: Event;
|
|
272
|
+
clonedData?: SearchResult[];
|
|
273
|
+
searchData?: SearchResult[];
|
|
274
|
+
size: number;
|
|
275
|
+
tabIndex: number;
|
|
276
|
+
trigg: boolean;
|
|
277
|
+
inputText?: string;
|
|
278
|
+
textValue: string;
|
|
279
|
+
checkboxes: {
|
|
280
|
+
[key: string]: boolean;
|
|
281
|
+
};
|
|
282
|
+
valueSub$: Subscription;
|
|
283
|
+
reloadSubscription$?: Subscription;
|
|
284
|
+
mocekedFilters: TypesFilter[];
|
|
285
|
+
constructor(translate: TranslateService);
|
|
286
|
+
expand(): void;
|
|
287
|
+
onParentClick(event: Event): void;
|
|
288
|
+
onTabClick(id: number): void;
|
|
289
|
+
onScroll(scrollObj: Event): void;
|
|
290
|
+
populateFilters(data?: SearchResult[]): void;
|
|
291
|
+
onClick(data: {
|
|
292
|
+
value: {
|
|
293
|
+
checked: boolean;
|
|
294
|
+
};
|
|
295
|
+
name: string;
|
|
296
|
+
}): void;
|
|
297
|
+
filterData(makeNewFilters?: boolean): void;
|
|
298
|
+
setCheckBoxes(): void;
|
|
299
|
+
setLinkUrl(data?: any): void;
|
|
300
|
+
ngOnDestroy(): void;
|
|
301
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SearchBarComponent, never>;
|
|
302
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SearchBarComponent, "pho-search-bar", never, { "tabs": { "alias": "tabs"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
declare class SidebarItemComponent implements OnChanges {
|
|
306
|
+
private router;
|
|
307
|
+
item: any;
|
|
308
|
+
classname: string;
|
|
309
|
+
sliderClick: EventEmitter<any>;
|
|
310
|
+
constructor(router: Router);
|
|
311
|
+
onSliderClick($event: any, menu: any): void;
|
|
312
|
+
onSliderItemsClick(event: any): void;
|
|
313
|
+
ngOnChanges(_: SimpleChanges): void;
|
|
314
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SidebarItemComponent, never>;
|
|
315
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SidebarItemComponent, "pho-sidebar-item", never, { "item": { "alias": "item"; "required": false; }; "classname": { "alias": "classname"; "required": false; }; }, { "sliderClick": "sliderClick"; }, never, never, true, never>;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
declare class UserComponent {
|
|
319
|
+
user: User;
|
|
320
|
+
actionEmmiter: EventEmitter<string>;
|
|
321
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UserComponent, never>;
|
|
322
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UserComponent, "pho-user", never, { "user": { "alias": "user"; "required": false; }; }, { "actionEmmiter": "actionEmmiter"; }, never, never, true, never>;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
declare class StatusHeaderComponent {
|
|
326
|
+
onQuickPickClickEmiter: EventEmitter<void>;
|
|
327
|
+
onToggleClickEmmiter: EventEmitter<"forward" | "back">;
|
|
328
|
+
onCloseEvent: EventEmitter<void>;
|
|
329
|
+
type: any;
|
|
330
|
+
items: any;
|
|
331
|
+
name: string;
|
|
332
|
+
title: string;
|
|
333
|
+
tag?: {
|
|
334
|
+
icon?: string;
|
|
335
|
+
text?: string;
|
|
336
|
+
variant?: string;
|
|
337
|
+
tooltip?: string;
|
|
338
|
+
};
|
|
339
|
+
tags?: Array<{
|
|
340
|
+
icon?: string;
|
|
341
|
+
value?: string;
|
|
342
|
+
variant?: string;
|
|
343
|
+
color?: string;
|
|
344
|
+
tooltip?: string;
|
|
345
|
+
}>;
|
|
346
|
+
enableQuickPick: boolean;
|
|
347
|
+
actions: any[];
|
|
348
|
+
panelState: boolean;
|
|
349
|
+
customClose: boolean;
|
|
350
|
+
validSeverities: string[];
|
|
351
|
+
onToggleClick(direction: 'forward' | 'back'): void;
|
|
352
|
+
toggleSidePanel(): void;
|
|
353
|
+
closePanel(): void;
|
|
354
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StatusHeaderComponent, never>;
|
|
355
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StatusHeaderComponent, "phoenix-status-header", never, { "type": { "alias": "type"; "required": false; }; "items": { "alias": "items"; "required": false; }; "name": { "alias": "name"; "required": false; }; "title": { "alias": "title"; "required": false; }; "tag": { "alias": "tag"; "required": false; }; "tags": { "alias": "tags"; "required": false; }; "enableQuickPick": { "alias": "enableQuickPick"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; "panelState": { "alias": "panelState"; "required": false; }; "customClose": { "alias": "customClose"; "required": false; }; }, { "onQuickPickClickEmiter": "onQuickPickClickEmiter"; "onToggleClickEmmiter": "onToggleClickEmmiter"; "onCloseEvent": "onCloseEvent"; }, never, never, true, never>;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
declare enum StatusColType {
|
|
359
|
+
TAG = "TAG",
|
|
360
|
+
STRING = "STRING",
|
|
361
|
+
PERSON = "PERSON",
|
|
362
|
+
LINK = "LINK",
|
|
363
|
+
DATE = "DATE",
|
|
364
|
+
DATE_ONLY = "DATE_ONLY",
|
|
365
|
+
LIST = "LIST",
|
|
366
|
+
COUNTRY = "COUNTRY",
|
|
367
|
+
COPY_TO_CLIPBOARD = "COPY_TO_CLIPBOARD"
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
declare enum StatusTooltipType {
|
|
371
|
+
TAG = "TAG",
|
|
372
|
+
STRING = "STRING",
|
|
373
|
+
PERSON = "PERSON",
|
|
374
|
+
LINK = "LINK",
|
|
375
|
+
DATE = "DATE",
|
|
376
|
+
DATE_ONLY = "DATE_ONLY",
|
|
377
|
+
COPY_TO_CLIPBOARD = "COPY_TO_CLIPBOARD",
|
|
378
|
+
DATE_PERSON = "DATE_PERSON"
|
|
379
|
+
}
|
|
380
|
+
interface StatusTooltipItem {
|
|
381
|
+
/** Optional field caption shown as "Label:". Omit for a label-less info line. */
|
|
382
|
+
label?: string;
|
|
383
|
+
value: string | null;
|
|
384
|
+
type: StatusTooltipType;
|
|
385
|
+
value1?: string;
|
|
386
|
+
value2?: string;
|
|
387
|
+
}
|
|
388
|
+
interface StatusAttribute {
|
|
389
|
+
type: StatusColType;
|
|
390
|
+
label: string;
|
|
391
|
+
value: any;
|
|
392
|
+
dateFormat?: string;
|
|
393
|
+
key?: string;
|
|
394
|
+
color?: string;
|
|
395
|
+
icon?: string;
|
|
396
|
+
value1?: string;
|
|
397
|
+
value2?: string;
|
|
398
|
+
tooltip?: StatusTooltipItem[];
|
|
399
|
+
url?: string;
|
|
400
|
+
/** Same-tab in-app navigation for a LINK: when set, the link uses routerLink
|
|
401
|
+
* (no target=_blank, no external icon) instead of opening a new tab. */
|
|
402
|
+
routerLink?: any[] | string;
|
|
403
|
+
item?: {
|
|
404
|
+
name: string;
|
|
405
|
+
url?: string;
|
|
406
|
+
disabled?: boolean;
|
|
407
|
+
}[] | string | null;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
interface ContextObjectTag {
|
|
411
|
+
text: string;
|
|
412
|
+
icon?: string;
|
|
413
|
+
variant?: string;
|
|
414
|
+
color?: string;
|
|
415
|
+
label?: string;
|
|
416
|
+
group?: string;
|
|
417
|
+
}
|
|
418
|
+
interface ContextObjectConfig {
|
|
419
|
+
showHeader?: boolean;
|
|
420
|
+
type?: string;
|
|
421
|
+
name?: string;
|
|
422
|
+
title?: string;
|
|
423
|
+
tags?: ContextObjectTag[];
|
|
424
|
+
labels?: ContextObjectTag[];
|
|
425
|
+
otherInfo?: StatusAttribute[];
|
|
426
|
+
backRoute?: any[];
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
declare class ContexObjectComponent {
|
|
430
|
+
config?: ContextObjectConfig;
|
|
431
|
+
dateFormat: string;
|
|
432
|
+
dateOnlyFormat: string;
|
|
433
|
+
router: Router;
|
|
434
|
+
statusTooltipType: typeof StatusTooltipType;
|
|
435
|
+
validSeverities: string[];
|
|
436
|
+
get ctxType(): string | undefined;
|
|
437
|
+
get ctxName(): string;
|
|
438
|
+
get ctxTitle(): string;
|
|
439
|
+
get ctxTags(): ContextObjectTag[];
|
|
440
|
+
/**
|
|
441
|
+
* Groups tags by their `group` property.
|
|
442
|
+
* Ungrouped tags are returned as-is.
|
|
443
|
+
* Grouped tags collapse into one display entry showing the first tag + remaining count.
|
|
444
|
+
*/
|
|
445
|
+
get displayTags(): {
|
|
446
|
+
tag: ContextObjectTag;
|
|
447
|
+
groupedTags: ContextObjectTag[];
|
|
448
|
+
remainingCount: number;
|
|
449
|
+
}[];
|
|
450
|
+
get ctxLabels(): {
|
|
451
|
+
text: string;
|
|
452
|
+
}[];
|
|
453
|
+
get ctxBackRoute(): any[] | undefined;
|
|
454
|
+
get ctxOtherInfo(): StatusAttribute[];
|
|
455
|
+
tagPopovers: QueryList<Popover>;
|
|
456
|
+
onTagPopoverEnter(event: Event, currentPopover: Popover): void;
|
|
457
|
+
onTagPopoverLeave(event: Event, currentPopover: Popover): void;
|
|
458
|
+
onBackClick(): void;
|
|
459
|
+
getFullUrl(path: string): string;
|
|
460
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ContexObjectComponent, never>;
|
|
461
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ContexObjectComponent, "phoenix-contex-object", never, { "config": { "alias": "config"; "required": false; }; "dateFormat": { "alias": "dateFormat"; "required": false; }; "dateOnlyFormat": { "alias": "dateOnlyFormat"; "required": false; }; }, {}, never, never, true, never>;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
interface ShellTheme {
|
|
465
|
+
mode: 'light' | 'dark' | 'system';
|
|
466
|
+
}
|
|
467
|
+
declare class ShellComponent {
|
|
468
|
+
config: {
|
|
469
|
+
user: any;
|
|
470
|
+
shortModuleName: string;
|
|
471
|
+
hidelogo?: boolean;
|
|
472
|
+
/** header control */
|
|
473
|
+
headerContext?: ContextObjectConfig;
|
|
474
|
+
searchConfig?: any;
|
|
475
|
+
topbarModulesMenu?: any;
|
|
476
|
+
urlConfig?: {
|
|
477
|
+
url: string | null;
|
|
478
|
+
disabled?: boolean;
|
|
479
|
+
};
|
|
480
|
+
mainItems?: any[];
|
|
481
|
+
footerItem?: any;
|
|
482
|
+
};
|
|
483
|
+
darkModeSelector: {
|
|
484
|
+
mode: string;
|
|
485
|
+
};
|
|
486
|
+
theme: ShellTheme;
|
|
487
|
+
onDarkModeSelect: EventEmitter<any>;
|
|
488
|
+
onIsSlimSelect: EventEmitter<any>;
|
|
489
|
+
onUserAction: EventEmitter<string>;
|
|
490
|
+
sliderClick: EventEmitter<any>;
|
|
491
|
+
themeChange: EventEmitter<ShellTheme>;
|
|
492
|
+
isSlim: boolean;
|
|
493
|
+
readonly gridTemplateColumns = "auto 1fr";
|
|
494
|
+
/** if showHeader=true adding additional row between topbar and content */
|
|
495
|
+
get gridTemplateRows(): string;
|
|
496
|
+
toggleSidebar(isSlim: boolean): void;
|
|
497
|
+
onThemeChange(mode: ShellTheme['mode']): void;
|
|
498
|
+
selectDarkMode(): void;
|
|
499
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ShellComponent, never>;
|
|
500
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ShellComponent, "pho-shell", never, { "config": { "alias": "config"; "required": false; }; "darkModeSelector": { "alias": "darkModeSelector"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; }, { "onDarkModeSelect": "onDarkModeSelect"; "onIsSlimSelect": "onIsSlimSelect"; "onUserAction": "onUserAction"; "sliderClick": "sliderClick"; "themeChange": "themeChange"; }, never, ["*"], true, never>;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
declare enum tableActionType {
|
|
504
|
+
CREATE = "create",
|
|
505
|
+
EDIT = "edit",
|
|
506
|
+
BULK_EDIT = "bulk_edit",
|
|
507
|
+
DELETE = "delete",
|
|
508
|
+
DETAILS = "details",
|
|
509
|
+
ASSIGN = "assign",
|
|
510
|
+
APPLY = "apply",
|
|
511
|
+
OPEN_IN_NEW_TAB = "open_in_new_tab",
|
|
512
|
+
TAB = "tab",
|
|
513
|
+
OPEN_FULL_SCREEN = "open_full_screen",
|
|
514
|
+
ADD_LINK = "add_link",
|
|
515
|
+
DISCONNECT = "disconnect",
|
|
516
|
+
REMOVE = "remove",
|
|
517
|
+
SYNC = "sync",
|
|
518
|
+
MENU = "menu",
|
|
519
|
+
DROP = "drop",
|
|
520
|
+
OVERVIEW = "overview",
|
|
521
|
+
HISTORY = "syncHistory",
|
|
522
|
+
DOWNLOAD = "download",
|
|
523
|
+
ATTACH = "attach",
|
|
524
|
+
IMPORT = "import",
|
|
525
|
+
ROW_DELETE = "row_delete",
|
|
526
|
+
RUN = "run",
|
|
527
|
+
ASSIGN_FROM_CATALOG = "ASSIGN_FROM_CATALOG",
|
|
528
|
+
ASSIGN_FROM_ITEM = "ASSIGN_FROM_ITEM",
|
|
529
|
+
ASSIGN_CONTROLS = "ASSING_CONTROLS",
|
|
530
|
+
ASSIGN_MEASURE = "ASSGIN_MEASURE",
|
|
531
|
+
CREATE_ADITIONAL_MEASURE = "CREATE_ADITIONAL_MEASURE"
|
|
532
|
+
}
|
|
533
|
+
declare enum tableButtonFormat {
|
|
534
|
+
TEXT_ICON = "TEXT_ICON",
|
|
535
|
+
TEXT = "TEXT",
|
|
536
|
+
ICON = "ICON",
|
|
537
|
+
ICON_ROUNDED = "ICON_ROUNDED"
|
|
538
|
+
}
|
|
539
|
+
declare enum tableButtonContext {
|
|
540
|
+
GLOBAL = "GLOBAL",
|
|
541
|
+
MORE = "MORE",
|
|
542
|
+
BULK = "BULK",
|
|
543
|
+
ROW = "ROW"
|
|
544
|
+
}
|
|
545
|
+
declare enum tableColumnType {
|
|
546
|
+
TEXT = "TEXT",
|
|
547
|
+
TIMEPERIOD = "TIMEPERIOD",
|
|
548
|
+
RICH_TEXT = "RICH_TEXT",
|
|
549
|
+
TEXT_AREA = "TEXT_AREA",
|
|
550
|
+
DATE = "DATE",
|
|
551
|
+
DATE_COMPLEX = "DATE_COMPLEX",//Date and time
|
|
552
|
+
TAG = "TAG",
|
|
553
|
+
OBJ_TAG = "OBJ_TAG",
|
|
554
|
+
LIST_TAG = "LIST_TAG",
|
|
555
|
+
NUMBER = "NUMBER",
|
|
556
|
+
PERSON = "PERSON",
|
|
557
|
+
COMPLETNESS = "COMPLETNESS",
|
|
558
|
+
BOOLEAN = "BOOLEAN",
|
|
559
|
+
LIST = "LIST",
|
|
560
|
+
CUSTOM = "CUSTOM",
|
|
561
|
+
EMAIL = "EMAIL"
|
|
562
|
+
}
|
|
563
|
+
declare enum tableSelectionType {
|
|
564
|
+
CHECKBOX = "checkbox",
|
|
565
|
+
RADIO_BTN = "radio_btn"
|
|
566
|
+
}
|
|
567
|
+
declare enum tableFilterType {
|
|
568
|
+
DATE = "date",
|
|
569
|
+
BOOLEAN = "boolean",
|
|
570
|
+
MULTISELECT = "multiselect",
|
|
571
|
+
COMPLETNESS = "completness",
|
|
572
|
+
RANGE = "range"
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
type SortOrder = 1 | -1;
|
|
576
|
+
interface InitialSortMeta {
|
|
577
|
+
/**
|
|
578
|
+
* Column field used for initial sorting.
|
|
579
|
+
* Must match TableColumn.field (dot paths allowed if your table supports it).
|
|
580
|
+
*/
|
|
581
|
+
field: string;
|
|
582
|
+
/**
|
|
583
|
+
* Sort direction:
|
|
584
|
+
* 1 => ASC
|
|
585
|
+
* -1 => DESC
|
|
586
|
+
* Defaults to ASC (1).
|
|
587
|
+
*/
|
|
588
|
+
order?: SortOrder;
|
|
589
|
+
}
|
|
590
|
+
interface TableConfiguration {
|
|
591
|
+
/**
|
|
592
|
+
* Unique table key (used for caching filters/columns state, analytics, etc).
|
|
593
|
+
* NOTE: you already use `key` for checkbox id override; keep that,
|
|
594
|
+
* but consider also adding tableKey if you want to separate concerns.
|
|
595
|
+
*/
|
|
596
|
+
key?: string;
|
|
597
|
+
/**
|
|
598
|
+
* Alternative unique key ONLY for localStorage/state (recommended).
|
|
599
|
+
* If not provided, fallback to `key`.
|
|
600
|
+
*/
|
|
601
|
+
stateKey?: string;
|
|
602
|
+
/**
|
|
603
|
+
* Optional namespace for the persisted state keys (filters/columns), e.g. the
|
|
604
|
+
* current user id. Scopes state per user so a shared machine does not leak one
|
|
605
|
+
* user's filters/columns to another. Empty/omitted = unscoped (legacy).
|
|
606
|
+
*/
|
|
607
|
+
stateKeyPrefix?: string;
|
|
608
|
+
/**
|
|
609
|
+
* Row identity field used by PrimeNG dataKey (default: 'id').
|
|
610
|
+
* Use this when records don’t have `id` (e.g. GAP tab).
|
|
611
|
+
*/
|
|
612
|
+
dataKey?: string;
|
|
613
|
+
/** Actions rendered in bulk mode (when selection exists). */
|
|
614
|
+
bulkActions?: TableAction[];
|
|
615
|
+
/** Actions rendered per row (right-side action column). */
|
|
616
|
+
rowActions?: TableAction[];
|
|
617
|
+
/** Actions rendered in caption left side (near tabs). */
|
|
618
|
+
globalActions?: TableAction[];
|
|
619
|
+
/** “More” dropdown action config (menu/split button). */
|
|
620
|
+
moreActions?: TableAction;
|
|
621
|
+
/** Tabs in table (if exists). */
|
|
622
|
+
tabs?: TabAction[];
|
|
623
|
+
/**
|
|
624
|
+
* Optional "type switcher" band, rendered as a separate header row ABOVE the
|
|
625
|
+
* caption (opt-in — present only when set). A rounded pill group that flips
|
|
626
|
+
* the table between sibling record types (e.g. Business Processes / Resources)
|
|
627
|
+
* without crowding the caption's own actions, which stay where they always
|
|
628
|
+
* are. Clicking a pill fires the ordinary `actionClick` carrying that tab
|
|
629
|
+
* (`type: tableActionType.TAB`); the host swaps the data/config and updates
|
|
630
|
+
* `activeKey`.
|
|
631
|
+
*/
|
|
632
|
+
typeSwitch?: TableTypeSwitch;
|
|
633
|
+
/** Enables export buttons / export actions. */
|
|
634
|
+
exportTable: boolean;
|
|
635
|
+
/** Enables filter popover + filter icon. */
|
|
636
|
+
hasFilter?: boolean;
|
|
637
|
+
/** Enables column visibility popover + columns icon. */
|
|
638
|
+
hasColumns?: boolean;
|
|
639
|
+
/** Enables global search input. */
|
|
640
|
+
hasSearch?: boolean;
|
|
641
|
+
/**
|
|
642
|
+
* Message shown when the table has no rows. An i18n key (translated) or plain
|
|
643
|
+
* text; falls back to the generic "NO_RESULTS_FOUND" when unset.
|
|
644
|
+
*/
|
|
645
|
+
emptyMessage?: string;
|
|
646
|
+
/** Enables “More” dropdown area. */
|
|
647
|
+
hasMore?: boolean;
|
|
648
|
+
/** Show/hide columns feature (legacy) */
|
|
649
|
+
toggleColumns?: boolean;
|
|
650
|
+
toogleColumnsData?: TableColumn[];
|
|
651
|
+
/** Enables row cell click behavior (open details etc). */
|
|
652
|
+
hasCellClick?: boolean;
|
|
653
|
+
/**
|
|
654
|
+
* How many left-most columns are clickable (default: 1).
|
|
655
|
+
* If hasCellClick = true, only first N columns will trigger row click.
|
|
656
|
+
*/
|
|
657
|
+
clickableColumnCount?: number;
|
|
658
|
+
/** Table height, required for scroll/virtual scroll. */
|
|
659
|
+
scrollHeight?: string;
|
|
660
|
+
/**
|
|
661
|
+
* Disables all column sorting: no sort icons, no click-to-sort, and no initial
|
|
662
|
+
* fallback sort — rows render in the exact order they arrive. For lists whose
|
|
663
|
+
* order is meaningful (config-driven tables that pre-order their own data).
|
|
664
|
+
*/
|
|
665
|
+
disableSort?: boolean;
|
|
666
|
+
/**
|
|
667
|
+
* Fit-to-content height: the table grows to its rows (no fixed viewport height,
|
|
668
|
+
* no virtual scroll) and only starts scrolling once it exceeds `scrollHeight`,
|
|
669
|
+
* which acts as a max-height. Best for short config lists that shouldn't leave
|
|
670
|
+
* a large empty area below the rows.
|
|
671
|
+
*/
|
|
672
|
+
autoHeight?: boolean;
|
|
673
|
+
/**
|
|
674
|
+
* Override virtual scrolling. By default the table virtualises whenever it is
|
|
675
|
+
* NOT `autoHeight` (fixed/fill height). Set `false` to keep a fixed, scrollable
|
|
676
|
+
* body WITHOUT virtualisation — required for tables with expandable rows, since
|
|
677
|
+
* virtual scroll assumes a fixed row height and a variable-height expanded row
|
|
678
|
+
* breaks its scroll math (scrolling snaps back to the top). Leave undefined for
|
|
679
|
+
* the default behaviour.
|
|
680
|
+
*/
|
|
681
|
+
virtualScroll?: boolean;
|
|
682
|
+
/**
|
|
683
|
+
* Enables drag-to-reorder rows via a handle column; the table emits
|
|
684
|
+
* `rowReorder` with the new order. Pair with `autoHeight` (reorder does not
|
|
685
|
+
* work with virtual scroll) and `disableSort`.
|
|
686
|
+
*/
|
|
687
|
+
reorderable?: boolean;
|
|
688
|
+
/**
|
|
689
|
+
* Fill the available flex height: the table expands to fill its (flex) parent
|
|
690
|
+
* and the body scrolls internally only when the rows exceed that space — the
|
|
691
|
+
* page never grows a scrollbar. Needs an unbroken flex-height parent chain.
|
|
692
|
+
* Mutually exclusive with `autoHeight`; `scrollHeight` is ignored.
|
|
693
|
+
*/
|
|
694
|
+
fillHeight?: boolean;
|
|
695
|
+
/**
|
|
696
|
+
* Row density. Defaults to compact (`small`). Set `false` for taller,
|
|
697
|
+
* roomier rows (better for lists with wrapping text).
|
|
698
|
+
*/
|
|
699
|
+
dense?: boolean;
|
|
700
|
+
/**
|
|
701
|
+
* Optional per-row inline style, e.g. a danger background for rows that fail a
|
|
702
|
+
* check. Returns a style object (or null) for each row.
|
|
703
|
+
*/
|
|
704
|
+
rowStyle?: (row: any) => {
|
|
705
|
+
[key: string]: string;
|
|
706
|
+
} | null;
|
|
707
|
+
/** Number of rows per page (PrimeNG paginator / virtual scroll configs). */
|
|
708
|
+
rows?: number;
|
|
709
|
+
/** Checkbox / radio selection behavior. */
|
|
710
|
+
selectionType?: tableSelectionType;
|
|
711
|
+
/**
|
|
712
|
+
* If you need click on row table use 'single'.
|
|
713
|
+
* If using radio/checkbox selection, omit or manage carefully.
|
|
714
|
+
*/
|
|
715
|
+
selectionMode?: 'single' | 'multiple';
|
|
716
|
+
/** Enables global filter (legacy flag). */
|
|
717
|
+
globalFilter?: boolean;
|
|
718
|
+
/** Filter config shown in caption/popover (your old config). */
|
|
719
|
+
filterConfiguration?: any[];
|
|
720
|
+
/**
|
|
721
|
+
* Initial sort configuration.
|
|
722
|
+
* - Single column: { field: 'createdAt', order: -1 }
|
|
723
|
+
* - Multi-sort: [{ field: 'status', order: 1 }, { field: 'createdAt', order: -1 }]
|
|
724
|
+
*/
|
|
725
|
+
initialSort?: InitialSortMeta | InitialSortMeta[];
|
|
726
|
+
/**
|
|
727
|
+
* @deprecated Legacy single-field initial sort support.
|
|
728
|
+
* Prefer `initialSort`.
|
|
729
|
+
*/
|
|
730
|
+
initialSortField?: string;
|
|
731
|
+
/**
|
|
732
|
+
* @deprecated Legacy order for initialSortField.
|
|
733
|
+
* 1 = ASC, -1 = DESC
|
|
734
|
+
*/
|
|
735
|
+
initialSortOrder?: SortOrder;
|
|
736
|
+
}
|
|
737
|
+
interface TableAction {
|
|
738
|
+
key?: string;
|
|
739
|
+
label: string;
|
|
740
|
+
format?: tableButtonFormat;
|
|
741
|
+
context: tableButtonContext;
|
|
742
|
+
type: tableActionType;
|
|
743
|
+
disabled?: boolean;
|
|
744
|
+
notauthorized?: boolean;
|
|
745
|
+
buttonType?: string;
|
|
746
|
+
ui?: 'button' | 'menu' | 'switch' | 'checkbox';
|
|
747
|
+
/** Action menu items (type-safe version recommended later). */
|
|
748
|
+
items?: any;
|
|
749
|
+
checkboxrelatedauth?: boolean;
|
|
750
|
+
icon?: string;
|
|
751
|
+
/** Optional confirmation behavior. */
|
|
752
|
+
confirmationMsgKey?: string;
|
|
753
|
+
confirmationMode?: ConfirmationMode;
|
|
754
|
+
typing?: TypingConfirmationConfig;
|
|
755
|
+
}
|
|
756
|
+
interface TabAction {
|
|
757
|
+
key?: string;
|
|
758
|
+
label: string;
|
|
759
|
+
type: tableActionType;
|
|
760
|
+
badgeCount?: number;
|
|
761
|
+
disabled?: boolean;
|
|
762
|
+
}
|
|
763
|
+
/** Config for the optional {@link TableConfiguration.typeSwitch} band. */
|
|
764
|
+
interface TableTypeSwitch {
|
|
765
|
+
/** Pills to render, left to right. `badgeCount` shows as a count bubble. */
|
|
766
|
+
tabs: TabAction[];
|
|
767
|
+
/** `key` of the currently selected tab. */
|
|
768
|
+
activeKey: string;
|
|
769
|
+
}
|
|
770
|
+
type ConfirmationMode = 'DEFAULT' | 'TYPING';
|
|
771
|
+
interface TypingConfirmationConfig {
|
|
772
|
+
confirmText?: string;
|
|
773
|
+
warningKey?: string;
|
|
774
|
+
typeBelowKey?: string;
|
|
775
|
+
submitLabelKey?: string;
|
|
776
|
+
cancelLabelKey?: string;
|
|
777
|
+
subtitleKey?: string;
|
|
778
|
+
caseInsensitive?: boolean;
|
|
779
|
+
}
|
|
780
|
+
interface TableColumn {
|
|
781
|
+
header: string;
|
|
782
|
+
field: string;
|
|
783
|
+
columnType: string;
|
|
784
|
+
filter?: string;
|
|
785
|
+
filterOptions?: any;
|
|
786
|
+
/** Enables/disables sorting for the column. */
|
|
787
|
+
sortable?: boolean;
|
|
788
|
+
/** Custom cell HTML renderer. Receives the raw cell value and the row. */
|
|
789
|
+
customRenderer?: (value: any, rowData?: any) => string;
|
|
790
|
+
/**
|
|
791
|
+
* LIST_TAG only: read the badge label from this field of each item (for
|
|
792
|
+
* arrays of objects). Omit for arrays of primitives.
|
|
793
|
+
*/
|
|
794
|
+
tagLabel?: string;
|
|
795
|
+
/**
|
|
796
|
+
* LIST_TAG only: how many badges to show before collapsing the rest into a
|
|
797
|
+
* "+N" badge that opens a popover. Omit to show all.
|
|
798
|
+
*/
|
|
799
|
+
tagMax?: number;
|
|
800
|
+
/** LIST_TAG only: p-badge severity for the item badges. Default 'warn'. */
|
|
801
|
+
tagSeverity?: string;
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
type SortMeta = {
|
|
805
|
+
field: string;
|
|
806
|
+
order: 1 | -1;
|
|
807
|
+
};
|
|
808
|
+
type ColumnTypeMap = Record<string, string>;
|
|
809
|
+
interface SortRequest {
|
|
810
|
+
reqId: number;
|
|
811
|
+
data: any[];
|
|
812
|
+
multiSortMeta: SortMeta[];
|
|
813
|
+
columnTypeMap: ColumnTypeMap;
|
|
814
|
+
dateTypeKey?: string;
|
|
815
|
+
}
|
|
816
|
+
interface SortResponse {
|
|
817
|
+
reqId: number;
|
|
818
|
+
sorted: any[];
|
|
819
|
+
}
|
|
820
|
+
declare class TableComponent implements OnChanges, OnDestroy {
|
|
821
|
+
/** PrimeNG Table reference (used for sort meta + virtual scroll helpers). */
|
|
822
|
+
dt: Table;
|
|
823
|
+
translateService: TranslateService;
|
|
824
|
+
private cdr;
|
|
825
|
+
/**
|
|
826
|
+
* originalData:
|
|
827
|
+
* The raw dataset received through @Input() set data().
|
|
828
|
+
* We never mutate this array; it is the "source of truth".
|
|
829
|
+
*/
|
|
830
|
+
originalData: any[];
|
|
831
|
+
/**
|
|
832
|
+
* allData:
|
|
833
|
+
* The dataset after applying filters and global search.
|
|
834
|
+
* This is the "base dataset" that sorting runs on.
|
|
835
|
+
*/
|
|
836
|
+
allData: any[];
|
|
837
|
+
/**
|
|
838
|
+
* tableData:
|
|
839
|
+
* The final dataset rendered by the table.
|
|
840
|
+
* IMPORTANT: This is still the full array; PrimeNG virtual scroll renders only visible rows.
|
|
841
|
+
*/
|
|
842
|
+
tableData: any[];
|
|
843
|
+
/** Total record count shown (used in footer and table metadata). */
|
|
844
|
+
totalRecords: number;
|
|
845
|
+
/** Selected rows (signal so UI updates fast). */
|
|
846
|
+
selectedItems: i0.WritableSignal<any[]>;
|
|
847
|
+
/** Currently visible columns (based on table-caption selection). */
|
|
848
|
+
selectedColumns: any[];
|
|
849
|
+
searchQuery: string;
|
|
850
|
+
bulkMode: boolean;
|
|
851
|
+
selectionTypeEnum: typeof tableSelectionType;
|
|
852
|
+
columnTypeEnum: typeof tableColumnType;
|
|
853
|
+
/** Latest active filters coming from table-caption. */
|
|
854
|
+
private currentFilters;
|
|
855
|
+
private SORT_KEY;
|
|
856
|
+
/** When stale filter values are detected, holds the remaining valid values per key. */
|
|
857
|
+
filterValidValues: Record<string, any[]> | null;
|
|
858
|
+
/**
|
|
859
|
+
* columnTypeMap:
|
|
860
|
+
* field -> columnType (DATE/BOOLEAN/TEXT/etc).
|
|
861
|
+
* The sort worker uses this to normalize values correctly (e.g., DATE parsing, BOOLEAN 0/1).
|
|
862
|
+
*/
|
|
863
|
+
columnTypeMap: Record<string, string>;
|
|
864
|
+
dateFormat: string;
|
|
865
|
+
columns: any[];
|
|
866
|
+
selectedColumnsInput: any[];
|
|
867
|
+
tableConfiguration: TableConfiguration;
|
|
868
|
+
filters: any;
|
|
869
|
+
/**
|
|
870
|
+
* Filters passed down to table-caption.
|
|
871
|
+
* Identical to `filters`, except range filters get their numeric bounds
|
|
872
|
+
* (min/max) derived from the actual dataset so the slider reflects the
|
|
873
|
+
* real values present in the table. Explicit min/max in config still win.
|
|
874
|
+
*/
|
|
875
|
+
computedFilters: any;
|
|
876
|
+
actionClick: EventEmitter<any>;
|
|
877
|
+
rowSelection: EventEmitter<any>;
|
|
878
|
+
checkBoxSelection: EventEmitter<any>;
|
|
879
|
+
saveColumns: EventEmitter<string[]>;
|
|
880
|
+
/** Emits the full data array in its new order after a drag reorder. */
|
|
881
|
+
rowReorder: EventEmitter<any[]>;
|
|
882
|
+
/**
|
|
883
|
+
* Optional expandable-row content, projected as
|
|
884
|
+
* `<ng-template #rowExpansion let-row>…</ng-template>`. When present, a toggler
|
|
885
|
+
* column is shown and each row can expand to render this template.
|
|
886
|
+
*/
|
|
887
|
+
rowExpansionTpl?: TemplateRef<any>;
|
|
888
|
+
/** Host class so `:host(.fill)` can make the table fill its flex parent. */
|
|
889
|
+
get fillHost(): boolean;
|
|
890
|
+
private sortWorker;
|
|
891
|
+
/**
|
|
892
|
+
* reqId counters ensure we can ignore outdated results
|
|
893
|
+
* if user triggers multiple sorts quickly.
|
|
894
|
+
*/
|
|
895
|
+
private workerReqId;
|
|
896
|
+
private latestWorkerReqId;
|
|
897
|
+
/**
|
|
898
|
+
* lastSortKey prevents re-sorting when PrimeNG emits same multiSortMeta repeatedly.
|
|
899
|
+
*/
|
|
900
|
+
private lastSortKey;
|
|
901
|
+
/** Ensures initial sort runs only once per dataset/config change */
|
|
902
|
+
private initialSortApplied;
|
|
903
|
+
/** Remembers which field was used last time for initial sort (optional safety) */
|
|
904
|
+
private initialSortFieldApplied;
|
|
905
|
+
/** True while initial sort is running to avoid "flash" of unsorted data */
|
|
906
|
+
initialSortLoading: boolean;
|
|
907
|
+
private createSortWorkerInline;
|
|
908
|
+
constructor();
|
|
909
|
+
ngOnDestroy(): void;
|
|
910
|
+
/**
|
|
911
|
+
* Whenever parent sets data, we reset base datasets and invalidate sort cache.
|
|
912
|
+
*/
|
|
913
|
+
set data(value: any[]);
|
|
914
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
915
|
+
/**
|
|
916
|
+
* PrimeNG calls this when sorting changes.
|
|
917
|
+
* We run worker sort only when meta changes.
|
|
918
|
+
*/
|
|
919
|
+
onCustomSort(event: any): void;
|
|
920
|
+
/**
|
|
921
|
+
* Dispatches sort request to the worker (or sync fallback).
|
|
922
|
+
*/
|
|
923
|
+
private runWorkerSort;
|
|
924
|
+
/**
|
|
925
|
+
* Synchronous sort fallback (used if WebWorker is not available).
|
|
926
|
+
* Uses the same normalization logic as your worker approach.
|
|
927
|
+
*/
|
|
928
|
+
private sortSync;
|
|
929
|
+
private normalizeInitialSort;
|
|
930
|
+
/**
|
|
931
|
+
* Applies initial sort once:
|
|
932
|
+
* - Uses tableConfiguration.initialSortField if provided
|
|
933
|
+
* - Otherwise uses the first available column field
|
|
934
|
+
* - Always ASC (order = 1)
|
|
935
|
+
*
|
|
936
|
+
* Runs only when:
|
|
937
|
+
* - we have data
|
|
938
|
+
* - we have columns/selectedColumns
|
|
939
|
+
* - it hasn't been applied yet for current dataset
|
|
940
|
+
*/
|
|
941
|
+
private applyInitialSortIfNeeded;
|
|
942
|
+
/**
|
|
943
|
+
* Applies global search over the currently filtered dataset.
|
|
944
|
+
* Then re-applies sort if any sort is active.
|
|
945
|
+
*/
|
|
946
|
+
onSearch(query: string): void;
|
|
947
|
+
/**
|
|
948
|
+
* Called from table-caption when filter form changes.
|
|
949
|
+
* Rebuilds allData and re-applies current sorting.
|
|
950
|
+
*/
|
|
951
|
+
applyFilters(filters: Record<string, any>): void;
|
|
952
|
+
/**
|
|
953
|
+
* If table is currently sorted, re-run sort on new base dataset.
|
|
954
|
+
* Otherwise just render base dataset.
|
|
955
|
+
*/
|
|
956
|
+
private applyCurrentSortOrReset;
|
|
957
|
+
private getValidFilterValues;
|
|
958
|
+
private getValueByPath;
|
|
959
|
+
private matchesQuery;
|
|
960
|
+
/**
|
|
961
|
+
* Applies currentFilters to originalData and returns the filtered result.
|
|
962
|
+
* Supports:
|
|
963
|
+
* - single value (primitive or {key,...})
|
|
964
|
+
* - multi-select arrays (primitives or objects with .key)
|
|
965
|
+
* - empty filters mean "match all"
|
|
966
|
+
*/
|
|
967
|
+
private getFilteredData;
|
|
968
|
+
/**
|
|
969
|
+
* Rebuild `computedFilters` from `filters`, deriving numeric bounds
|
|
970
|
+
* (min/max) for every range filter from the current dataset.
|
|
971
|
+
* An explicitly configured min/max always wins over the data-derived value.
|
|
972
|
+
*/
|
|
973
|
+
private enrichRangeFilters;
|
|
974
|
+
/**
|
|
975
|
+
* Min/max numeric bounds for a field across originalData.
|
|
976
|
+
* Falls back to [0, 100] when no numeric values are present.
|
|
977
|
+
*/
|
|
978
|
+
private computeDataBounds;
|
|
979
|
+
/**
|
|
980
|
+
* Reads nested values using dot paths and unwraps `.key` when present.
|
|
981
|
+
*/
|
|
982
|
+
private getNestedValue;
|
|
983
|
+
/**
|
|
984
|
+
* Produces comparable primitives for sorting (sync fallback).
|
|
985
|
+
* The worker uses its own copy of this logic.
|
|
986
|
+
*/
|
|
987
|
+
private getComparableValue;
|
|
988
|
+
private compareStringsNatural;
|
|
989
|
+
onSelectionChange(selected: any[]): void;
|
|
990
|
+
onRowClick(event: Event, rowData: any): void;
|
|
991
|
+
clearSelection(): void;
|
|
992
|
+
/**
|
|
993
|
+
* Handles export actions locally, otherwise bubbles up to parent.
|
|
994
|
+
*/
|
|
995
|
+
handleActionClick(event: any): void;
|
|
996
|
+
/**
|
|
997
|
+
* Bound to p-table [rowSelectable]: a row whose `canSelect` is false cannot be selected — its
|
|
998
|
+
* checkbox is disabled and the header "select all" skips it, so bulk actions never include it.
|
|
999
|
+
*/
|
|
1000
|
+
isRowSelectable(event: any): boolean;
|
|
1001
|
+
/**
|
|
1002
|
+
* Some tables allow click on first N columns to open details.
|
|
1003
|
+
*/
|
|
1004
|
+
isColumnClickable(columnIndex: number): boolean;
|
|
1005
|
+
/** Labels currently shown in the overflow popover. */
|
|
1006
|
+
overflowTags: string[];
|
|
1007
|
+
/** Badge severity for the overflow popover (matches the column). */
|
|
1008
|
+
overflowSeverity: string;
|
|
1009
|
+
/** Badge label for one list item (string item, or `col.tagLabel` field). */
|
|
1010
|
+
tagLabelOf(item: any, col: any): string;
|
|
1011
|
+
/** The first `tagMax` items (all of them when `tagMax` is unset). */
|
|
1012
|
+
visibleTags(list: any[], col: any): any[];
|
|
1013
|
+
/** How many items are hidden behind the "+N" badge. */
|
|
1014
|
+
tagOverflowCount(list: any[], col: any): number;
|
|
1015
|
+
/** PrimeNG has already reordered `tableData` in place; emit the new order. */
|
|
1016
|
+
onRowReorder(_event: any): void;
|
|
1017
|
+
/** Colspan for the expanded row's single cell — spans every visible column. */
|
|
1018
|
+
get expansionColspan(): number;
|
|
1019
|
+
/** Open the overflow popover with the hidden items' labels. */
|
|
1020
|
+
openTagOverflow(event: Event, panel: any, list: any[], col: any): void;
|
|
1021
|
+
/**
|
|
1022
|
+
* Utility for copy icons inside cells (prevents row-click).
|
|
1023
|
+
*/
|
|
1024
|
+
copyToClipboard(event: Event, text: string): void;
|
|
1025
|
+
/**
|
|
1026
|
+
* Generic nested getter used by templates (flags etc).
|
|
1027
|
+
*/
|
|
1028
|
+
getNested(obj: any, path?: string): any;
|
|
1029
|
+
/**
|
|
1030
|
+
* Applies column selection coming from table-caption (array of field names).
|
|
1031
|
+
*/
|
|
1032
|
+
applyColumns(selected: any[]): void;
|
|
1033
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent, never>;
|
|
1034
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent, "phoenix-table", never, { "columns": { "alias": "columns"; "required": false; }; "selectedColumnsInput": { "alias": "selectedColumnsInput"; "required": false; }; "tableConfiguration": { "alias": "tableConfiguration"; "required": false; }; "filters": { "alias": "filters"; "required": false; }; "data": { "alias": "data"; "required": false; }; }, { "actionClick": "actionClick"; "rowSelection": "rowSelection"; "checkBoxSelection": "checkBoxSelection"; "saveColumns": "saveColumns"; "rowReorder": "rowReorder"; }, ["rowExpansionTpl"], never, true, never>;
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
interface MetaControl {
|
|
1038
|
+
id: any;
|
|
1039
|
+
position: number;
|
|
1040
|
+
readOnly?: boolean;
|
|
1041
|
+
userFriendlyMessage: string;
|
|
1042
|
+
mandatory: boolean;
|
|
1043
|
+
hidden?: boolean;
|
|
1044
|
+
style: {
|
|
1045
|
+
colWidth: number;
|
|
1046
|
+
};
|
|
1047
|
+
configuration: {
|
|
1048
|
+
id?: number;
|
|
1049
|
+
key: string;
|
|
1050
|
+
type: string;
|
|
1051
|
+
options?: {
|
|
1052
|
+
key: string;
|
|
1053
|
+
userFriendlyMessage: string;
|
|
1054
|
+
}[];
|
|
1055
|
+
};
|
|
1056
|
+
validators?: any;
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
declare class MetaFormService {
|
|
1060
|
+
router: Router;
|
|
1061
|
+
private formEvent;
|
|
1062
|
+
private formReadOnlySubject;
|
|
1063
|
+
private formTabContent;
|
|
1064
|
+
private formDirtyStatus;
|
|
1065
|
+
private formBuildCompletedSubject;
|
|
1066
|
+
currentFormState: rxjs.Observable<any>;
|
|
1067
|
+
formReadOnlyState: rxjs.Observable<boolean>;
|
|
1068
|
+
currentFormTabContent: rxjs.Observable<string>;
|
|
1069
|
+
currentFormDirtyStatus: rxjs.Observable<boolean>;
|
|
1070
|
+
/**
|
|
1071
|
+
* Notify when form is completed
|
|
1072
|
+
* @description Notifies you about when form bild is completed in meta-form component class. Usefull when you need to attach some listeners on form controls or any other action related to form when all controls are avaiable
|
|
1073
|
+
* @returns {boolean}
|
|
1074
|
+
*/
|
|
1075
|
+
formBuildCompleted: rxjs.Observable<boolean>;
|
|
1076
|
+
constructor();
|
|
1077
|
+
setFormEvent(event: any): void;
|
|
1078
|
+
setFormReadOnlyState(state: boolean): void;
|
|
1079
|
+
setFormTabContent(tabContent: string): void;
|
|
1080
|
+
setFormDirtyStatus(status: boolean): void;
|
|
1081
|
+
/**
|
|
1082
|
+
* Sets the form build completion status to indicate when the form is created.
|
|
1083
|
+
*
|
|
1084
|
+
* @param {boolean} isCompleted - A boolean value to indicate whether the form build is completed.
|
|
1085
|
+
* Set to `true` when the form is fully created.
|
|
1086
|
+
*
|
|
1087
|
+
* @description This method is used to notify when the form is created and ready for use.
|
|
1088
|
+
*/
|
|
1089
|
+
setFormBuildCompletition(isCompleted: boolean): void;
|
|
1090
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MetaFormService, never>;
|
|
1091
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MetaFormService>;
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
declare abstract class MetaFormAbstract {
|
|
1095
|
+
private fb;
|
|
1096
|
+
metaService: MetaFormService;
|
|
1097
|
+
private translateService;
|
|
1098
|
+
private http;
|
|
1099
|
+
metaForm: FormGroup;
|
|
1100
|
+
metaFormValues: any;
|
|
1101
|
+
metaFormControls: any;
|
|
1102
|
+
loading: boolean;
|
|
1103
|
+
disableForm: boolean;
|
|
1104
|
+
formButtons: boolean;
|
|
1105
|
+
groupForm: boolean;
|
|
1106
|
+
formStyle: any;
|
|
1107
|
+
onFormSubmit: EventEmitter<any>;
|
|
1108
|
+
onFormCancel: EventEmitter<any>;
|
|
1109
|
+
formActive$: Observable<boolean>;
|
|
1110
|
+
formSub$: Subscription;
|
|
1111
|
+
constructor(fb: FormBuilder, metaService: MetaFormService, translateService: TranslateService, http: HttpClient);
|
|
1112
|
+
createForm(controls: MetaControl[] | any): void;
|
|
1113
|
+
activateForm(): void;
|
|
1114
|
+
addControlValidators(control: any): void;
|
|
1115
|
+
onSubmit(): void;
|
|
1116
|
+
onCancel(): void;
|
|
1117
|
+
/**
|
|
1118
|
+
* Resets form to initial state
|
|
1119
|
+
*
|
|
1120
|
+
* @description Useful when user interact with form (edit some inputs) and than clicks CANCEL. This method patch original values to FormGroup again
|
|
1121
|
+
*
|
|
1122
|
+
*/
|
|
1123
|
+
resetToInitialValues(): void;
|
|
1124
|
+
ngOnDestroy(): void;
|
|
1125
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MetaFormAbstract, never>;
|
|
1126
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MetaFormAbstract, never, never, { "metaForm": { "alias": "metaForm"; "required": false; }; "metaFormValues": { "alias": "metaFormValues"; "required": false; }; "metaFormControls": { "alias": "metaFormControls"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "disableForm": { "alias": "disableForm"; "required": false; }; "formButtons": { "alias": "formButtons"; "required": false; }; "groupForm": { "alias": "groupForm"; "required": false; }; "formStyle": { "alias": "formStyle"; "required": false; }; }, { "onFormSubmit": "onFormSubmit"; "onFormCancel": "onFormCancel"; }, never, never, true, never>;
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
declare enum ControlType {
|
|
1130
|
+
TEXT = "TEXT",
|
|
1131
|
+
NUMBER = "NUMBER",
|
|
1132
|
+
MS_OPTION = "MS_OPTION",
|
|
1133
|
+
SS_OPTION = "SS_OPTION",
|
|
1134
|
+
TEXT_AREA = "TEXT_AREA",
|
|
1135
|
+
TEXT_EDITOR = "TEXT_EDITOR",
|
|
1136
|
+
DATE = "DATE",
|
|
1137
|
+
START_DUE_DATE = "START_DUE_DATE",
|
|
1138
|
+
CHECKBOX = "CHECKBOX",
|
|
1139
|
+
CHECKBOX_COLOR = "CHECKBOX_COLOR",
|
|
1140
|
+
LINKS_DATA = "LINKS_DATA",
|
|
1141
|
+
PASSWORD = "PASSWORD",
|
|
1142
|
+
SWITCH = "SWITCH",
|
|
1143
|
+
TIMEPERIOD = "TIMEPERIOD",
|
|
1144
|
+
CURRENCY = "CURRENCY",
|
|
1145
|
+
ASSIGN = "ASSIGN",
|
|
1146
|
+
ASSIGN_ASSET = "ASSIGN_ASSET",
|
|
1147
|
+
COLOR = "COLOR",
|
|
1148
|
+
SELECT_BUTTON = "SELECT_BUTTON",
|
|
1149
|
+
UPLOAD = "UPLOAD",
|
|
1150
|
+
UPLOAD_DRAG_DROP = "UPLOAD_DRAG_DROP",
|
|
1151
|
+
SLOT = "SLOT",
|
|
1152
|
+
SS_OPTION_OBJECT_BASED = "SS_OPTION_OBJECT_BASED"
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
declare class MetaFormComponent extends MetaFormAbstract implements OnChanges {
|
|
1156
|
+
constructor(fb: FormBuilder, metaService: MetaFormService, translateService: TranslateService, http: HttpClient);
|
|
1157
|
+
ControlType: typeof ControlType;
|
|
1158
|
+
optionLabel: string;
|
|
1159
|
+
ngOnChanges(simpleChanges: SimpleChanges): void;
|
|
1160
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MetaFormComponent, never>;
|
|
1161
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MetaFormComponent, "phoenix-meta-form", never, {}, {}, never, ["*"], true, never>;
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
declare class MetaFormButtonsComponent implements OnInit, OnDestroy {
|
|
1165
|
+
private metaFormService;
|
|
1166
|
+
isDisabled: i0.InputSignal<boolean | undefined>;
|
|
1167
|
+
isCreateAnother: i0.InputSignal<boolean>;
|
|
1168
|
+
isLoading: i0.InputSignal<boolean>;
|
|
1169
|
+
handleSave: EventEmitter<any>;
|
|
1170
|
+
handleCancel: EventEmitter<any>;
|
|
1171
|
+
display: boolean;
|
|
1172
|
+
formActive$: Observable<boolean>;
|
|
1173
|
+
createAnother: boolean;
|
|
1174
|
+
sub$: Subscription;
|
|
1175
|
+
constructor(metaFormService: MetaFormService);
|
|
1176
|
+
ngOnInit(): void;
|
|
1177
|
+
ngOnDestroy(): void;
|
|
1178
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MetaFormButtonsComponent, never>;
|
|
1179
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MetaFormButtonsComponent, "phoenix-meta-form-buttons", never, { "isDisabled": { "alias": "isDisabled"; "required": false; "isSignal": true; }; "isCreateAnother": { "alias": "isCreateAnother"; "required": false; "isSignal": true; }; "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; }, { "handleSave": "handleSave"; "handleCancel": "handleCancel"; }, never, never, true, never>;
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
declare class GroupsFormComponent extends MetaFormAbstract implements OnChanges {
|
|
1183
|
+
activePanelsIndex: number[];
|
|
1184
|
+
ControlType: typeof ControlType;
|
|
1185
|
+
optionLabel: string;
|
|
1186
|
+
notiffication?: any;
|
|
1187
|
+
private trans;
|
|
1188
|
+
ngOnChanges(simpleChanges?: SimpleChanges): void;
|
|
1189
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GroupsFormComponent, never>;
|
|
1190
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GroupsFormComponent, "phoenix-groups-form", never, { "activePanelsIndex": { "alias": "activePanelsIndex"; "required": false; }; }, {}, never, never, true, never>;
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
declare enum SimpleButtonType {
|
|
1194
|
+
REGULAR = "regular",
|
|
1195
|
+
SPLIT = "split"
|
|
1196
|
+
}
|
|
1197
|
+
type Severity = 'success' | 'info' | 'warn' | 'danger' | 'help' | 'primary' | 'secondary' | 'contrast' | null | undefined;
|
|
1198
|
+
interface ActionButton {
|
|
1199
|
+
id?: number | string;
|
|
1200
|
+
label: string;
|
|
1201
|
+
icon?: string;
|
|
1202
|
+
disabled?: boolean;
|
|
1203
|
+
type?: SimpleButtonType;
|
|
1204
|
+
severity?: Severity;
|
|
1205
|
+
tooltip?: string;
|
|
1206
|
+
action?: () => void;
|
|
1207
|
+
splitItems?: {
|
|
1208
|
+
label: string;
|
|
1209
|
+
icon?: string;
|
|
1210
|
+
command: () => void;
|
|
1211
|
+
}[];
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
declare class ObjectItemDialogComponent implements OnInit {
|
|
1215
|
+
ref: DynamicDialogRef;
|
|
1216
|
+
config: DynamicDialogConfig;
|
|
1217
|
+
table: TableComponent;
|
|
1218
|
+
columns: any;
|
|
1219
|
+
disableButton: boolean;
|
|
1220
|
+
tableData: never[];
|
|
1221
|
+
hasSelection: boolean;
|
|
1222
|
+
constructor(ref: DynamicDialogRef, config: DynamicDialogConfig);
|
|
1223
|
+
ngOnInit(): void;
|
|
1224
|
+
actions: ActionButton[];
|
|
1225
|
+
onSelectionChanged(selectedItem: any): void;
|
|
1226
|
+
actionClick(key: any): void;
|
|
1227
|
+
tableConfiguration: {
|
|
1228
|
+
lazy: boolean;
|
|
1229
|
+
scrollHeight: string;
|
|
1230
|
+
hasSearch: boolean;
|
|
1231
|
+
hasFilter: boolean;
|
|
1232
|
+
key: string;
|
|
1233
|
+
rows: number;
|
|
1234
|
+
selectionType: tableSelectionType;
|
|
1235
|
+
actions: never[];
|
|
1236
|
+
exportTable: boolean;
|
|
1237
|
+
filterConfiguration: never[];
|
|
1238
|
+
};
|
|
1239
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ObjectItemDialogComponent, never>;
|
|
1240
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ObjectItemDialogComponent, "phoenix-object-item-dialog", never, {}, {}, never, never, true, never>;
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
declare class QuickPickComponent {
|
|
1244
|
+
onBack: EventEmitter<void>;
|
|
1245
|
+
onQuickPick: EventEmitter<void>;
|
|
1246
|
+
onForward: EventEmitter<void>;
|
|
1247
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<QuickPickComponent, never>;
|
|
1248
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<QuickPickComponent, "phoenix-quick-pick", never, {}, { "onBack": "onBack"; "onQuickPick": "onQuickPick"; "onForward": "onForward"; }, never, never, true, never>;
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
interface StatusBarConfig {
|
|
1252
|
+
type?: string;
|
|
1253
|
+
icon?: string;
|
|
1254
|
+
name: string;
|
|
1255
|
+
title: string;
|
|
1256
|
+
/** Optional neutral tag shown in the identity line next to name/code
|
|
1257
|
+
* (e.g. a Resource type or a Recovery-gap category). */
|
|
1258
|
+
tag?: {
|
|
1259
|
+
icon?: string;
|
|
1260
|
+
text?: string;
|
|
1261
|
+
variant?: string;
|
|
1262
|
+
tooltip?: string;
|
|
1263
|
+
};
|
|
1264
|
+
description?: {
|
|
1265
|
+
label: string;
|
|
1266
|
+
value: any;
|
|
1267
|
+
icon?: string;
|
|
1268
|
+
type?: StatusColType;
|
|
1269
|
+
dateFormat?: string;
|
|
1270
|
+
/** Optional info popover for this context line: an ⓘ that opens a list
|
|
1271
|
+
* (e.g. related-resource names behind a count). */
|
|
1272
|
+
popoverList?: string[];
|
|
1273
|
+
popoverTitle?: string;
|
|
1274
|
+
}[];
|
|
1275
|
+
attributes?: StatusAttribute[];
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
declare class StatusBarComponent {
|
|
1279
|
+
statusBarConfig: StatusBarConfig;
|
|
1280
|
+
iconEnable: boolean;
|
|
1281
|
+
enableClosing: boolean;
|
|
1282
|
+
description: boolean;
|
|
1283
|
+
dateFormat: string;
|
|
1284
|
+
onListItemClick: EventEmitter<any>;
|
|
1285
|
+
StatusColType: typeof StatusColType;
|
|
1286
|
+
iconStyle: {
|
|
1287
|
+
height: number;
|
|
1288
|
+
width: number;
|
|
1289
|
+
};
|
|
1290
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StatusBarComponent, never>;
|
|
1291
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StatusBarComponent, "phoenix-status-bar", never, { "statusBarConfig": { "alias": "statusBarConfig"; "required": false; }; "iconEnable": { "alias": "iconEnable"; "required": false; }; "enableClosing": { "alias": "enableClosing"; "required": false; }; "description": { "alias": "description"; "required": false; }; "dateFormat": { "alias": "dateFormat"; "required": false; }; }, { "onListItemClick": "onListItemClick"; }, never, never, true, never>;
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
declare class QuickPickSidePanelComponent {
|
|
1295
|
+
drawer: Drawer;
|
|
1296
|
+
title: i0.InputSignal<string>;
|
|
1297
|
+
data: i0.InputSignal<any[]>;
|
|
1298
|
+
columns: i0.InputSignal<any[]>;
|
|
1299
|
+
tableConfiguration: i0.InputSignal<any>;
|
|
1300
|
+
widthClass: i0.InputSignal<string>;
|
|
1301
|
+
isFullScreen: i0.InputSignal<boolean>;
|
|
1302
|
+
filters: i0.Signal<any[]>;
|
|
1303
|
+
private _panelVisible;
|
|
1304
|
+
set panelState(value: boolean);
|
|
1305
|
+
panelStateChange: EventEmitter<boolean>;
|
|
1306
|
+
onRowClick: EventEmitter<any>;
|
|
1307
|
+
lazyLoadData: EventEmitter<void>;
|
|
1308
|
+
handlePanelFullScreen: EventEmitter<void>;
|
|
1309
|
+
drawerVisible: i0.Signal<boolean>;
|
|
1310
|
+
visibleChange(newVal: boolean): void;
|
|
1311
|
+
onDrawerShow(): void;
|
|
1312
|
+
onTableRowClick(row: any): void;
|
|
1313
|
+
createDynamicFilters(data: any[], fields: any[], defaultFilterType?: string): any[];
|
|
1314
|
+
toDisplay(val: any): string;
|
|
1315
|
+
/**
|
|
1316
|
+
* Extracts a displayable value from an object or primitive.
|
|
1317
|
+
* - Prefers object.name, then object.label, object.value, or object.title.
|
|
1318
|
+
* - Falls back to JSON stringification for objects without display fields.
|
|
1319
|
+
* - Returns primitive values as-is.
|
|
1320
|
+
*/
|
|
1321
|
+
extractItemNameOrValue(item: any): any;
|
|
1322
|
+
getNestedValue(obj: any, path: string): any;
|
|
1323
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<QuickPickSidePanelComponent, never>;
|
|
1324
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<QuickPickSidePanelComponent, "phoenix-quick-pick-sidepanel", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "tableConfiguration": { "alias": "tableConfiguration"; "required": false; "isSignal": true; }; "widthClass": { "alias": "widthClass"; "required": false; "isSignal": true; }; "isFullScreen": { "alias": "isFullScreen"; "required": false; "isSignal": true; }; "panelState": { "alias": "panelState"; "required": false; }; }, { "panelStateChange": "panelStateChange"; "onRowClick": "onRowClick"; "lazyLoadData": "lazyLoadData"; "handlePanelFullScreen": "handlePanelFullScreen"; }, never, never, true, never>;
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1
1327
|
/**
|
|
2
|
-
*
|
|
1328
|
+
* Remove the data-table's persisted UI state (filters, selected columns, sort)
|
|
1329
|
+
* from localStorage. Call this on logout so a user's saved table views do not
|
|
1330
|
+
* carry over into the next login on a shared machine.
|
|
1331
|
+
*
|
|
1332
|
+
* @param userPrefix When the app persists state user-scoped
|
|
1333
|
+
* (`tableConfiguration.stateKeyPrefix`, e.g. the user id), pass the SAME value
|
|
1334
|
+
* to clear only that user's state — other users' saved views on this browser
|
|
1335
|
+
* stay intact. Omit to clear all persisted table state on this browser.
|
|
3
1336
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
1337
|
+
declare function clearPersistedTableState(userPrefix?: string): void;
|
|
1338
|
+
|
|
1339
|
+
type MetaFieldType = 'TEXT' | 'URL' | 'NUMBER' | 'TIMEPERIOD' | 'CURRENCY' | 'TEXT_AREA' | 'SS_OPTION' | 'SS_OPTION_OBJECT_BASED' | 'MS_OPTION' | 'START_DUE_DATE' | 'DATE' | 'TEXT_EDITOR' | 'CHECKBOX' | 'CHECKBOX_COLOR' | 'SWITCH' | 'SELECT_BUTTON' | 'ASSIGN' | 'ASSIGN_ASSET' | 'PASSWORD' | 'COLOR' | 'UPLOAD' | 'UPLOAD_DRAG_DROP' | 'LINKS_DATA' | 'SLOT';
|
|
1340
|
+
type MetaOption = {
|
|
1341
|
+
label: string;
|
|
1342
|
+
value: any;
|
|
1343
|
+
disabled?: boolean;
|
|
1344
|
+
};
|
|
1345
|
+
type MetaValidators = {
|
|
1346
|
+
min?: number;
|
|
1347
|
+
max?: number;
|
|
1348
|
+
minLength?: number;
|
|
1349
|
+
maxLength?: number;
|
|
1350
|
+
email?: boolean;
|
|
1351
|
+
regex?: {
|
|
1352
|
+
regexType: string;
|
|
1353
|
+
};
|
|
1354
|
+
phone?: boolean;
|
|
1355
|
+
timeperiod?: boolean;
|
|
1356
|
+
tpMin?: number;
|
|
1357
|
+
dueDate?: boolean;
|
|
1358
|
+
};
|
|
1359
|
+
interface MetaFieldConfig {
|
|
1360
|
+
id?: string | number;
|
|
1361
|
+
order?: number;
|
|
1362
|
+
hidden?: boolean;
|
|
1363
|
+
userFriendlyMessage: string;
|
|
1364
|
+
configuration: {
|
|
1365
|
+
key: string;
|
|
1366
|
+
type: MetaFieldType;
|
|
1367
|
+
placeholderKey?: string;
|
|
1368
|
+
options?: MetaOption[];
|
|
1369
|
+
extra?: Record<string, any>;
|
|
1370
|
+
};
|
|
1371
|
+
mandatory?: boolean;
|
|
1372
|
+
disable?: boolean;
|
|
1373
|
+
readOnly?: boolean;
|
|
1374
|
+
validators?: MetaValidators;
|
|
1375
|
+
/**
|
|
1376
|
+
* Per-field validation message overrides, keyed by error type (e.g.
|
|
1377
|
+
* `{ required: 'CONTINUITY.VALIDATION.GAP_TITLE_REQUIRED' }`). The value is an
|
|
1378
|
+
* i18n key (translated) or plain text; when set for the active error it wins
|
|
1379
|
+
* over the generic message.
|
|
1380
|
+
*/
|
|
1381
|
+
errorMessages?: Record<string, string>;
|
|
1382
|
+
style: {
|
|
1383
|
+
colWidth: string;
|
|
1384
|
+
/**
|
|
1385
|
+
* When true, this field forces a hard line break: it starts a brand new
|
|
1386
|
+
* grid row regardless of how much space is left in the current row
|
|
1387
|
+
* (i.e. regardless of whether colWidths in the current row sum to 12).
|
|
1388
|
+
* Default (unset/false): fields keep flowing/wrapping into the current
|
|
1389
|
+
* row as space allows (existing behavior).
|
|
1390
|
+
*/
|
|
1391
|
+
newRow?: boolean;
|
|
1392
|
+
};
|
|
1393
|
+
}
|
|
1394
|
+
type AssignExtra = {
|
|
1395
|
+
items: any[];
|
|
1396
|
+
dialogHeaderKey?: string;
|
|
1397
|
+
columns?: Array<{
|
|
1398
|
+
field: string;
|
|
1399
|
+
header: string;
|
|
1400
|
+
columnType: any;
|
|
1401
|
+
}>;
|
|
1402
|
+
dialog?: {
|
|
1403
|
+
width?: string;
|
|
1404
|
+
modal?: boolean;
|
|
1405
|
+
};
|
|
1406
|
+
};
|
|
1407
|
+
|
|
1408
|
+
type UniqueValidationResponse = {
|
|
1409
|
+
isValid: boolean;
|
|
1410
|
+
control?: string;
|
|
1411
|
+
message?: string;
|
|
1412
|
+
};
|
|
1413
|
+
interface MetaSubmitValidatorConfig {
|
|
1414
|
+
/**
|
|
1415
|
+
* Which control should receive the error when invalid.
|
|
1416
|
+
* If backend returns {control}, that wins.
|
|
1417
|
+
*/
|
|
1418
|
+
controlKey: string;
|
|
1419
|
+
/**
|
|
1420
|
+
* Called ONLY on submit validation.
|
|
1421
|
+
* If returns null/undefined => skip validator (e.g. empty value).
|
|
1422
|
+
*/
|
|
1423
|
+
buildRequest: (form: FormGroup) => {
|
|
1424
|
+
url: string;
|
|
1425
|
+
body?: any;
|
|
1426
|
+
} | null;
|
|
1427
|
+
/**
|
|
1428
|
+
* Optional: map raw response to standard format.
|
|
1429
|
+
* Default expects {isValid, control?}.
|
|
1430
|
+
*/
|
|
1431
|
+
mapResponse?: (raw: any) => UniqueValidationResponse;
|
|
1432
|
+
/**
|
|
1433
|
+
* Error key to set on the target control.
|
|
1434
|
+
* Default: 'unique'
|
|
1435
|
+
*/
|
|
1436
|
+
errorKey?: string;
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
interface MetaFormGroupConfig {
|
|
1440
|
+
id?: string | number;
|
|
1441
|
+
groupName?: string;
|
|
1442
|
+
collapsed?: boolean;
|
|
1443
|
+
ctrl: MetaFieldConfig[];
|
|
1444
|
+
}
|
|
1445
|
+
type MetaFormControls = MetaFieldConfig[] | MetaFormGroupConfig[];
|
|
1446
|
+
interface MetaFormV2Config {
|
|
1447
|
+
controls: MetaFormControls;
|
|
1448
|
+
initialValues?: any;
|
|
1449
|
+
/**
|
|
1450
|
+
* Submit-only async validators (unique name/title etc).
|
|
1451
|
+
* They DO NOT run on valueChanges, only when parent triggers submit validation.
|
|
1452
|
+
*/
|
|
1453
|
+
submitValidators?: MetaSubmitValidatorConfig[];
|
|
1454
|
+
/**
|
|
1455
|
+
* Dependency hook (category -> color, entity -> assignees etc.)
|
|
1456
|
+
* V2 will bind once and clean up on meta change.
|
|
1457
|
+
*/
|
|
1458
|
+
setupDependencies?: (ctx: {
|
|
1459
|
+
form: FormGroup;
|
|
1460
|
+
flatControls: MetaFieldConfig[];
|
|
1461
|
+
initialValues: any;
|
|
1462
|
+
getControl: (key: string) => AbstractControl | null;
|
|
1463
|
+
findField: (key: string) => MetaFieldConfig | null;
|
|
1464
|
+
}) => void | (() => void);
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1467
|
+
type AccordionValue = string | number | string[] | number[] | null | undefined;
|
|
1468
|
+
/**
|
|
1469
|
+
* V2 form host. Signal-based (OnPush): inputs are `input()` signals, the
|
|
1470
|
+
* template-facing structure (`hasControls`/`isGrouped`/`groupedControls`/
|
|
1471
|
+
* `controlRows`) is `computed()` (so `splitControlsIntoRows` runs only when the
|
|
1472
|
+
* config changes, not on every CD pass), and `expandedGroupIds` is a signal.
|
|
1473
|
+
*
|
|
1474
|
+
* Reactive forms aren't signal-native, so control building stays imperative: the
|
|
1475
|
+
* first build runs synchronously in `ngOnInit` (controls exist before first
|
|
1476
|
+
* paint), and an `effect()` re-runs the same build when `config`/`form`/`readOnly`
|
|
1477
|
+
* change — with the same change-detection semantics the old `ngOnChanges` had.
|
|
1478
|
+
*/
|
|
1479
|
+
declare class MetaFormV2Component implements OnInit, OnDestroy {
|
|
1480
|
+
/** Form instance created/owned by the parent (dialog/page). */
|
|
1481
|
+
readonly form: i0.InputSignal<FormGroup<any>>;
|
|
1482
|
+
/** V2 metadata/config (controls, initialValues, submitValidators, setupDependencies). */
|
|
1483
|
+
readonly config: i0.InputSignal<MetaFormV2Config>;
|
|
1484
|
+
/** Page-level readOnly state (rendering + "enter edit mode" behavior). */
|
|
1485
|
+
readonly readOnly: i0.InputSignal<boolean>;
|
|
1486
|
+
/** Optional layout customization for the inner content wrapper. */
|
|
1487
|
+
readonly contentStyle: i0.InputSignal<Record<string, any> | null>;
|
|
1488
|
+
/** Optional class name(s) for the inner content wrapper. */
|
|
1489
|
+
readonly contentClass: i0.InputSignal<string | null>;
|
|
1490
|
+
private fb;
|
|
1491
|
+
private submitValidator;
|
|
1492
|
+
private translate;
|
|
1493
|
+
/** Signature of the current schema (key+type only) to detect real schema changes. */
|
|
1494
|
+
private lastSignature;
|
|
1495
|
+
/** Cleanup from setupDependencies; called on schema change or destroy. */
|
|
1496
|
+
private depCleanup?;
|
|
1497
|
+
/** Previous input references, to reproduce the old SimpleChanges semantics. */
|
|
1498
|
+
private prevConfig;
|
|
1499
|
+
private prevForm;
|
|
1500
|
+
private prevReadOnly;
|
|
1501
|
+
private initialized;
|
|
1502
|
+
/** PrimeNG Accordion opened-panel ids. */
|
|
1503
|
+
readonly expandedGroupIds: i0.WritableSignal<string[]>;
|
|
1504
|
+
readonly hasControls: i0.Signal<boolean>;
|
|
1505
|
+
/** Heuristic: grouped config has "ctrl" on the first element. */
|
|
1506
|
+
readonly isGrouped: i0.Signal<boolean>;
|
|
1507
|
+
readonly groupedControls: i0.Signal<any[]>;
|
|
1508
|
+
readonly flatControls: i0.Signal<any[]>;
|
|
1509
|
+
/** Flat schema split into rows, honoring `style.newRow` hard breaks. */
|
|
1510
|
+
readonly controlRows: i0.Signal<any[][]>;
|
|
1511
|
+
constructor();
|
|
1512
|
+
ngOnInit(): void;
|
|
1513
|
+
/**
|
|
1514
|
+
* Ensures controls, patches initial values, wires validators/dependencies and
|
|
1515
|
+
* initializes accordion state — only when config/form/readOnly actually change
|
|
1516
|
+
* (same early-exit the old ngOnChanges had).
|
|
1517
|
+
*/
|
|
1518
|
+
private rebuild;
|
|
1519
|
+
/** Normalizes PrimeNG Accordion value into a stable string[]. */
|
|
1520
|
+
onAccordionValueChange(v: AccordionValue): void;
|
|
1521
|
+
private normalizeAccordionValue;
|
|
1522
|
+
/** TrackBy for group rendering. */
|
|
1523
|
+
groupTrack(g: any, idx: number): any;
|
|
1524
|
+
/** Group id as a string (matches the accordion `value` type). */
|
|
1525
|
+
panelValue(g: any): string;
|
|
1526
|
+
/** Marks & validates ONLY controls that already have meaningful values. */
|
|
1527
|
+
private touchAndValidateOnlyFilledControls;
|
|
1528
|
+
/** What counts as a "meaningful" value (non-empty string/number/boolean/array/object). */
|
|
1529
|
+
private hasMeaningfulValue;
|
|
1530
|
+
/** "Visible invalid" = invalid AND interacted with (touched/dirty). */
|
|
1531
|
+
private isVisibleInvalid;
|
|
1532
|
+
private groupHasVisibleInvalid;
|
|
1533
|
+
/** Expands groups with visible-invalid controls, preserving user-expanded ones. */
|
|
1534
|
+
private expandVisibleInvalidGroupsUnion;
|
|
1535
|
+
ngOnDestroy(): void;
|
|
1536
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MetaFormV2Component, never>;
|
|
1537
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MetaFormV2Component, "phoenix-meta-form-v2", never, { "form": { "alias": "form"; "required": true; "isSignal": true; }; "config": { "alias": "config"; "required": true; "isSignal": true; }; "readOnly": { "alias": "readOnly"; "required": false; "isSignal": true; }; "contentStyle": { "alias": "contentStyle"; "required": false; "isSignal": true; }; "contentClass": { "alias": "contentClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1540
|
+
/**
|
|
1541
|
+
* Renders one meta field. Signal-based (OnPush): every template-facing value is a
|
|
1542
|
+
* `computed()` so it is memoized and recomputed only when its inputs actually
|
|
1543
|
+
* change — instead of a plain method re-running on every change-detection pass.
|
|
1544
|
+
* Control state (value/status) is bridged into a signal (`controlTick`), so the
|
|
1545
|
+
* error helpers stay reactive without a manual `markForCheck()`.
|
|
1546
|
+
*/
|
|
1547
|
+
declare class MetaFormFieldV2Component {
|
|
1548
|
+
/** Metadata definition of the field (type, key, options, styles, flags, etc.) */
|
|
1549
|
+
readonly field: i0.InputSignal<MetaFieldConfig>;
|
|
1550
|
+
/** Parent FormGroup that contains the FormControl for this field. */
|
|
1551
|
+
readonly form: i0.InputSignal<FormGroup<any>>;
|
|
1552
|
+
/** Page-level read-only flag (renders the read-only view). */
|
|
1553
|
+
readonly readOnly: i0.InputSignal<boolean>;
|
|
1554
|
+
/** Global disable flag (merged with the field-level disable config). */
|
|
1555
|
+
readonly disableForm: i0.InputSignal<boolean>;
|
|
1556
|
+
private translate;
|
|
1557
|
+
/** Enum-like map for the template `@switch`. */
|
|
1558
|
+
readonly MetaFieldType: Readonly<{
|
|
1559
|
+
TEXT: "TEXT";
|
|
1560
|
+
URL: "URL";
|
|
1561
|
+
NUMBER: "NUMBER";
|
|
1562
|
+
TIMEPERIOD: "TIMEPERIOD";
|
|
1563
|
+
CURRENCY: "CURRENCY";
|
|
1564
|
+
TEXT_AREA: "TEXT_AREA";
|
|
1565
|
+
SS_OPTION: "SS_OPTION";
|
|
1566
|
+
SS_OPTION_OBJECT_BASED: "SS_OPTION_OBJECT_BASED";
|
|
1567
|
+
MS_OPTION: "MS_OPTION";
|
|
1568
|
+
START_DUE_DATE: "START_DUE_DATE";
|
|
1569
|
+
DATE: "DATE";
|
|
1570
|
+
TEXT_EDITOR: "TEXT_EDITOR";
|
|
1571
|
+
CHECKBOX: "CHECKBOX";
|
|
1572
|
+
CHECKBOX_COLOR: "CHECKBOX_COLOR";
|
|
1573
|
+
SWITCH: "SWITCH";
|
|
1574
|
+
SELECT_BUTTON: "SELECT_BUTTON";
|
|
1575
|
+
ASSIGN: "ASSIGN";
|
|
1576
|
+
ASSIGN_ASSET: "ASSIGN_ASSET";
|
|
1577
|
+
PASSWORD: "PASSWORD";
|
|
1578
|
+
COLOR: "COLOR";
|
|
1579
|
+
UPLOAD: "UPLOAD";
|
|
1580
|
+
UPLOAD_DRAG_DROP: "UPLOAD_DRAG_DROP";
|
|
1581
|
+
LINKS_DATA: "LINKS_DATA";
|
|
1582
|
+
SLOT: "SLOT";
|
|
1583
|
+
}>;
|
|
1584
|
+
readonly key: i0.Signal<string>;
|
|
1585
|
+
readonly type: i0.Signal<MetaFieldType>;
|
|
1586
|
+
readonly colClass: i0.Signal<string>;
|
|
1587
|
+
readonly userFriendlyMessage: i0.Signal<string | null>;
|
|
1588
|
+
readonly placeholderKey: i0.Signal<string | null>;
|
|
1589
|
+
readonly isReadOnly: i0.Signal<boolean>;
|
|
1590
|
+
readonly isDisabled: i0.Signal<boolean>;
|
|
1591
|
+
readonly isCheckbox: i0.Signal<boolean>;
|
|
1592
|
+
/** The underlying FormControl for this field (recomputed if form/key change). */
|
|
1593
|
+
readonly ctrl: i0.Signal<AbstractControl<any, any, any> | null>;
|
|
1594
|
+
/**
|
|
1595
|
+
* Bridge the current control's value/status stream into a signal so the error
|
|
1596
|
+
* helpers below recompute reactively (reactive forms aren't signal-native yet).
|
|
1597
|
+
* Re-subscribes when the control identity changes.
|
|
1598
|
+
*/
|
|
1599
|
+
private readonly controlTick;
|
|
1600
|
+
/** Bumped for silent (emitEvent:false) programmatic writes, e.g. the date field. */
|
|
1601
|
+
private readonly manualTick;
|
|
1602
|
+
/** Track the active language so translated error text refreshes on lang change. */
|
|
1603
|
+
private readonly lang;
|
|
1604
|
+
/** Show validation only after interaction (touched/dirty). */
|
|
1605
|
+
readonly showError: i0.Signal<boolean>;
|
|
1606
|
+
/** Normalized error key for the current control. */
|
|
1607
|
+
readonly errorKey: i0.Signal<string | null>;
|
|
1608
|
+
/** Translated validation message (the single place that owns error UX text). */
|
|
1609
|
+
readonly errorText: i0.Signal<string>;
|
|
1610
|
+
/** Minimal value formatter for legacy read-only rendering (not used in template). */
|
|
1611
|
+
displayValue(): any;
|
|
1612
|
+
/** Lightweight text formatter for simple read-only/summary display. */
|
|
1613
|
+
valueText(): string;
|
|
1614
|
+
onDateSelected(val: any): void;
|
|
1615
|
+
onDateCleared(): void;
|
|
1616
|
+
/**
|
|
1617
|
+
* Re-anchor the (body-appended) datepicker overlay to its input in viewport
|
|
1618
|
+
* space. PrimeNG positions the body overlay with the page scroll added, so on
|
|
1619
|
+
* a scrolled page — e.g. a modal opened after scrolling down — the panel drops
|
|
1620
|
+
* by roughly the scroll amount. Pinning it `fixed` at the input's viewport
|
|
1621
|
+
* rect keeps it correct regardless of scroll, and flips it up when there is
|
|
1622
|
+
* not enough room below.
|
|
1623
|
+
*/
|
|
1624
|
+
onDateShow(): void;
|
|
1625
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MetaFormFieldV2Component, never>;
|
|
1626
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MetaFormFieldV2Component, "phoenix-meta-form-field-v2", never, { "field": { "alias": "field"; "required": true; "isSignal": true; }; "form": { "alias": "form"; "required": true; "isSignal": true; }; "readOnly": { "alias": "readOnly"; "required": false; "isSignal": true; }; "disableForm": { "alias": "disableForm"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1627
|
+
}
|
|
1628
|
+
|
|
1629
|
+
declare class MetaFormGroupV2Component {
|
|
1630
|
+
group: MetaFormGroupConfig;
|
|
1631
|
+
form: FormGroup;
|
|
1632
|
+
readOnly: boolean;
|
|
1633
|
+
/** Group's fields split into row chunks, honoring `style.newRow` hard breaks. */
|
|
1634
|
+
get rows(): any[][];
|
|
1635
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MetaFormGroupV2Component, never>;
|
|
1636
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MetaFormGroupV2Component, "phoenix-meta-form-group-v2", never, { "group": { "alias": "group"; "required": true; }; "form": { "alias": "form"; "required": true; }; "readOnly": { "alias": "readOnly"; "required": false; }; }, {}, never, never, true, never>;
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
declare class MetaFormButtonsV2Component {
|
|
1640
|
+
/**
|
|
1641
|
+
* Disabled state for Save button (usually: form invalid or readOnly or loading)
|
|
1642
|
+
*/
|
|
1643
|
+
isDisabled: i0.InputSignal<boolean>;
|
|
1644
|
+
/**
|
|
1645
|
+
* Optional feature: "Create another" checkbox.
|
|
1646
|
+
* If false => checkbox is not rendered.
|
|
1647
|
+
*/
|
|
1648
|
+
isCreateAnother: i0.InputSignal<boolean>;
|
|
1649
|
+
/**
|
|
1650
|
+
* Loading indicator for Save button.
|
|
1651
|
+
*/
|
|
1652
|
+
isLoading: i0.InputSignal<boolean>;
|
|
1653
|
+
/**
|
|
1654
|
+
* Emits when user clicks Save.
|
|
1655
|
+
* Payload matches existing contract: { isAnother: boolean }
|
|
1656
|
+
*/
|
|
1657
|
+
handleSave: EventEmitter<{
|
|
1658
|
+
isAnother: boolean;
|
|
1659
|
+
}>;
|
|
1660
|
+
/**
|
|
1661
|
+
* Emits when user clicks Cancel.
|
|
1662
|
+
*/
|
|
1663
|
+
handleCancel: EventEmitter<"CANCEL">;
|
|
1664
|
+
/**
|
|
1665
|
+
* Local checkbox model (kept only in this component).
|
|
1666
|
+
*/
|
|
1667
|
+
createAnother: boolean;
|
|
1668
|
+
onSaveClick(): void;
|
|
1669
|
+
onCancelClick(): void;
|
|
1670
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MetaFormButtonsV2Component, never>;
|
|
1671
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MetaFormButtonsV2Component, "phoenix-meta-form-buttons-v2", never, { "isDisabled": { "alias": "isDisabled"; "required": false; "isSignal": true; }; "isCreateAnother": { "alias": "isCreateAnother"; "required": false; "isSignal": true; }; "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; }, { "handleSave": "handleSave"; "handleCancel": "handleCancel"; }, never, never, true, never>;
|
|
1672
|
+
}
|
|
1673
|
+
|
|
1674
|
+
type MetaAsyncExecutor = (url: string, body?: any) => Observable<any>;
|
|
1675
|
+
/**
|
|
1676
|
+
* You provide this from app (or phoenix-config) so V2 lib doesn't depend on CrudService directly.
|
|
1677
|
+
* Example impl: (url, body) => this.crud.post(url, body)
|
|
1678
|
+
*/
|
|
1679
|
+
declare const META_FORM_ASYNC_EXECUTOR: InjectionToken<MetaAsyncExecutor>;
|
|
1680
|
+
|
|
1681
|
+
declare class MetaSubmitValidatorService {
|
|
1682
|
+
/**
|
|
1683
|
+
* Optional async executor abstraction used to perform server-side validation
|
|
1684
|
+
* (e.g. uniqueness checks).
|
|
1685
|
+
*
|
|
1686
|
+
* If not provided, submit-only validators will be skipped gracefully.
|
|
1687
|
+
*/
|
|
1688
|
+
private executor?;
|
|
1689
|
+
/** Used to automatically clean up subscriptions when the service is destroyed */
|
|
1690
|
+
private dr;
|
|
1691
|
+
constructor(
|
|
1692
|
+
/**
|
|
1693
|
+
* Optional async executor abstraction used to perform server-side validation
|
|
1694
|
+
* (e.g. uniqueness checks).
|
|
1695
|
+
*
|
|
1696
|
+
* If not provided, submit-only validators will be skipped gracefully.
|
|
1697
|
+
*/
|
|
1698
|
+
executor?: MetaAsyncExecutor | undefined);
|
|
1699
|
+
/**
|
|
1700
|
+
* Registers submit-only validators on the given form.
|
|
1701
|
+
*
|
|
1702
|
+
* - Attaches validator metadata to the form instance (via Symbols)
|
|
1703
|
+
* - Cleans up any previous subscriptions
|
|
1704
|
+
* - Subscribes to valueChanges in order to auto-clear submit-only errors
|
|
1705
|
+
* when the user modifies the field after a failed submit
|
|
1706
|
+
*/
|
|
1707
|
+
register(form: FormGroup, validators: MetaSubmitValidatorConfig[] | null | undefined): void;
|
|
1708
|
+
/**
|
|
1709
|
+
* Executes submit-only validators.
|
|
1710
|
+
*
|
|
1711
|
+
* Flow:
|
|
1712
|
+
* 1) Mark all controls as touched/dirty so sync validation messages become visible
|
|
1713
|
+
* 2) If form is sync-invalid, skip async validation
|
|
1714
|
+
* 3) Clear previous submit-only errors
|
|
1715
|
+
* 4) Execute async validators sequentially
|
|
1716
|
+
* 5) Apply mapped errors back to controls
|
|
1717
|
+
*
|
|
1718
|
+
* Returns:
|
|
1719
|
+
* - true → form is valid (sync + submit-only async)
|
|
1720
|
+
* - false → at least one submit-only validator failed
|
|
1721
|
+
*/
|
|
1722
|
+
run(form: FormGroup): Promise<boolean>;
|
|
1723
|
+
/**
|
|
1724
|
+
* Removes a specific submit-only error from the control without
|
|
1725
|
+
* touching other validation errors.
|
|
1726
|
+
*/
|
|
1727
|
+
private removeError;
|
|
1728
|
+
/**
|
|
1729
|
+
* Clears submit-only errors for all controls involved in submit validators.
|
|
1730
|
+
* This does NOT trigger updateValueAndValidity to avoid unnecessary re-validation.
|
|
1731
|
+
*/
|
|
1732
|
+
private clearSubmitErrors;
|
|
1733
|
+
/**
|
|
1734
|
+
* Marks all form controls as touched and dirty.
|
|
1735
|
+
* This is used on submit to make validation errors visible to the user.
|
|
1736
|
+
*/
|
|
1737
|
+
private markAllTouchedOnSubmit;
|
|
1738
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MetaSubmitValidatorService, [{ optional: true; }]>;
|
|
1739
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MetaSubmitValidatorService>;
|
|
1740
|
+
}
|
|
1741
|
+
|
|
1742
|
+
export { ActionTypes, ActionsComponent, CardComponent, ContexObjectComponent, ControlType, GroupsFormComponent, InnerHeaderComponent, META_FORM_ASYNC_EXECUTOR, MetaFormButtonsComponent, MetaFormButtonsV2Component, MetaFormComponent, MetaFormFieldV2Component, MetaFormGroupV2Component, MetaFormService, MetaFormV2Component, MetaSubmitValidatorService, ObjectItemDialogComponent, QuickPickComponent, QuickPickSidePanelComponent, SearchBarComponent, ShellComponent, SidebarComponent, SidebarItemComponent, SimpleButtonType, StatusBarComponent, StatusColType, StatusHeaderComponent, StatusTooltipType, TableComponent, TopbarComponent, UserComponent, clearPersistedTableState, tableActionType, tableButtonContext, tableButtonFormat, tableColumnType, tableFilterType, tableSelectionType };
|
|
1743
|
+
export type { Action, ActionButton, Actions, AllActionValues, AssignExtra, ColumnTypeMap, ConfirmationMode, ContextObjectConfig, ContextObjectTag, InitialSortMeta, MetaAsyncExecutor, MetaFieldConfig, MetaFieldType, MetaFormControls, MetaFormGroupConfig, MetaFormV2Config, MetaOption, MetaSubmitValidatorConfig, MetaValidators, RegisteredActionEnums, Severity, ShellConfig, ShellTheme, SidebarItem, SortMeta, SortOrder, SortRequest, SortResponse, StatusAttribute, StatusBarConfig, StatusTooltipItem, TabAction, TableAction, TableColumn, TableConfiguration, TableTypeSwitch, TopbarFooterConfig, TopbarItem, TopbarModuleGroup, TopbarModuleItem, TypingConfirmationConfig, UniqueValidationResponse, UrlConfig, User, cardConfig };
|