@seniorsistemas/components-ai 2.2.0 → 2.3.0
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/esm2022/lib/components/dynamic-form/dynamic-form.component.mjs +12 -3
- package/esm2022/lib/components/kanban-board/kanban-board.component.mjs +319 -0
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/seniorsistemas-components-ai.mjs +324 -6
- package/fesm2022/seniorsistemas-components-ai.mjs.map +1 -1
- package/lib/components/dynamic-form/dynamic-form.component.d.ts +6 -0
- package/lib/components/kanban-board/kanban-board.component.d.ts +104 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/src/lib/styles/index.scss +16 -0
|
@@ -75,6 +75,12 @@ export declare class DynamicFormComponent implements OnInit, OnChanges {
|
|
|
75
75
|
updateDisabledFields(): void;
|
|
76
76
|
clearHiddenFields(): void;
|
|
77
77
|
getForm(): FormGroup;
|
|
78
|
+
/**
|
|
79
|
+
* Returns the form values with date/time/lookup fields already converted
|
|
80
|
+
* to the backend-expected format (date → yyyy-MM-dd, time → HH:mm:ss, lookup → object with id).
|
|
81
|
+
* Use this instead of getForm().value when you need processed values without triggering formSubmit.
|
|
82
|
+
*/
|
|
83
|
+
getProcessedValue(): any;
|
|
78
84
|
open(entity?: any): void;
|
|
79
85
|
close(): void;
|
|
80
86
|
handleCancel(): void;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { EventEmitter, OnInit, TemplateRef, ElementRef, AfterViewInit, OnDestroy, NgZone } from '@angular/core';
|
|
2
|
+
import { CdkDragDrop, CdkDragMove } from '@angular/cdk/drag-drop';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export interface KanbanColumn {
|
|
5
|
+
id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
color?: string;
|
|
8
|
+
icon?: string;
|
|
9
|
+
items: KanbanItem[];
|
|
10
|
+
maxItems?: number;
|
|
11
|
+
allowDrop?: boolean;
|
|
12
|
+
metadata?: any;
|
|
13
|
+
}
|
|
14
|
+
export interface KanbanItem {
|
|
15
|
+
id: string;
|
|
16
|
+
title: string;
|
|
17
|
+
description?: string;
|
|
18
|
+
tags?: KanbanTag[];
|
|
19
|
+
metadata?: any;
|
|
20
|
+
}
|
|
21
|
+
export interface KanbanTag {
|
|
22
|
+
label: string;
|
|
23
|
+
severity?: 'success' | 'info' | 'warn' | 'danger' | 'secondary' | 'contrast';
|
|
24
|
+
}
|
|
25
|
+
export interface KanbanDropEvent {
|
|
26
|
+
item: KanbanItem;
|
|
27
|
+
previousColumn: KanbanColumn;
|
|
28
|
+
currentColumn: KanbanColumn;
|
|
29
|
+
previousIndex: number;
|
|
30
|
+
currentIndex: number;
|
|
31
|
+
}
|
|
32
|
+
export declare class KanbanBoardComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
33
|
+
private ngZone;
|
|
34
|
+
columns: KanbanColumn[];
|
|
35
|
+
allowReorder: boolean;
|
|
36
|
+
allowDrag: boolean;
|
|
37
|
+
showAddButton: boolean;
|
|
38
|
+
showEditButton: boolean;
|
|
39
|
+
showDeleteButton: boolean;
|
|
40
|
+
canDeleteColumn?: (column: KanbanColumn) => boolean;
|
|
41
|
+
emptyMessage: string;
|
|
42
|
+
minColumnWidth: string;
|
|
43
|
+
maxColumnWidth: string;
|
|
44
|
+
/** Show scroll hint arrows when columns overflow horizontally. */
|
|
45
|
+
showScrollHints: boolean;
|
|
46
|
+
/** Enable item selection mode. Adds selected state management and CSS class on cards. */
|
|
47
|
+
selectable: boolean;
|
|
48
|
+
itemMoved: EventEmitter<KanbanDropEvent>;
|
|
49
|
+
itemClicked: EventEmitter<KanbanItem>;
|
|
50
|
+
addItem: EventEmitter<KanbanColumn>;
|
|
51
|
+
editColumn: EventEmitter<KanbanColumn>;
|
|
52
|
+
deleteColumn: EventEmitter<KanbanColumn>;
|
|
53
|
+
/** Emitted when selection changes. Payload is the full array of selected KanbanItems. */
|
|
54
|
+
selectionChange: EventEmitter<KanbanItem[]>;
|
|
55
|
+
/** Custom template for the column header. Context: { $implicit: KanbanColumn } */
|
|
56
|
+
columnHeaderTemplate?: TemplateRef<any>;
|
|
57
|
+
/**
|
|
58
|
+
* Custom template for each item card.
|
|
59
|
+
* Context: { $implicit: KanbanItem, column: KanbanColumn, selected: boolean, toggle: () => void }
|
|
60
|
+
*/
|
|
61
|
+
itemTemplate?: TemplateRef<any>;
|
|
62
|
+
scrollContainer?: ElementRef<HTMLElement>;
|
|
63
|
+
columnIds: string[];
|
|
64
|
+
hasHorizontalScroll: boolean;
|
|
65
|
+
scrollPosition: 'start' | 'middle' | 'end';
|
|
66
|
+
private selectedIds;
|
|
67
|
+
private autoScrollActive;
|
|
68
|
+
private autoScrollSpeed;
|
|
69
|
+
private autoScrollRaf;
|
|
70
|
+
private resizeObserver?;
|
|
71
|
+
constructor(ngZone: NgZone);
|
|
72
|
+
ngOnInit(): void;
|
|
73
|
+
ngAfterViewInit(): void;
|
|
74
|
+
ngOnDestroy(): void;
|
|
75
|
+
ngOnChanges(): void;
|
|
76
|
+
private updateColumnIds;
|
|
77
|
+
isSelected(item: KanbanItem): boolean;
|
|
78
|
+
toggleSelection(item: KanbanItem): void;
|
|
79
|
+
/** Clear all selections. Can be called externally via ViewChild. */
|
|
80
|
+
clearSelection(): void;
|
|
81
|
+
/** Get current selected items. */
|
|
82
|
+
getSelectedItems(): KanbanItem[];
|
|
83
|
+
private emitSelectionChange;
|
|
84
|
+
/** Returns the template context for an item (used in the template). */
|
|
85
|
+
getItemContext(item: KanbanItem, column: KanbanColumn): any;
|
|
86
|
+
onScroll(): void;
|
|
87
|
+
private checkScroll;
|
|
88
|
+
scrollLeft(): void;
|
|
89
|
+
scrollRight(): void;
|
|
90
|
+
onDragMoved(event: CdkDragMove): void;
|
|
91
|
+
onDragEnded(): void;
|
|
92
|
+
private startAutoScroll;
|
|
93
|
+
private stopAutoScroll;
|
|
94
|
+
private runAutoScroll;
|
|
95
|
+
onDrop(event: CdkDragDrop<KanbanItem[]>, column: KanbanColumn): void;
|
|
96
|
+
onItemClick(item: KanbanItem): void;
|
|
97
|
+
onAddItem(column: KanbanColumn): void;
|
|
98
|
+
onEditColumn(column: KanbanColumn): void;
|
|
99
|
+
onDeleteColumn(column: KanbanColumn): void;
|
|
100
|
+
canShowDeleteButton(column: KanbanColumn): boolean;
|
|
101
|
+
getColumnStyle(column: KanbanColumn): any;
|
|
102
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KanbanBoardComponent, never>;
|
|
103
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KanbanBoardComponent, "sia-kanban-board", never, { "columns": { "alias": "columns"; "required": false; }; "allowReorder": { "alias": "allowReorder"; "required": false; }; "allowDrag": { "alias": "allowDrag"; "required": false; }; "showAddButton": { "alias": "showAddButton"; "required": false; }; "showEditButton": { "alias": "showEditButton"; "required": false; }; "showDeleteButton": { "alias": "showDeleteButton"; "required": false; }; "canDeleteColumn": { "alias": "canDeleteColumn"; "required": false; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; }; "minColumnWidth": { "alias": "minColumnWidth"; "required": false; }; "maxColumnWidth": { "alias": "maxColumnWidth"; "required": false; }; "showScrollHints": { "alias": "showScrollHints"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; }, { "itemMoved": "itemMoved"; "itemClicked": "itemClicked"; "addItem": "addItem"; "editColumn": "editColumn"; "deleteColumn": "deleteColumn"; "selectionChange": "selectionChange"; }, ["columnHeaderTemplate", "itemTemplate"], never, true, never>;
|
|
104
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export { BreadcrumbComponent } from './lib/components/breadcrumb/breadcrumb.comp
|
|
|
15
15
|
export { LoadingComponent } from './lib/components/loading/loading.component';
|
|
16
16
|
export { IassistIconComponent } from './lib/components/loading/iassist-icon.component';
|
|
17
17
|
export { EntityListBaseComponent } from './lib/components/base/entity-list-base.component';
|
|
18
|
+
export { KanbanBoardComponent, type KanbanColumn, type KanbanItem, type KanbanTag, type KanbanDropEvent } from './lib/components/kanban-board/kanban-board.component';
|
|
18
19
|
export { DynamicFormComponent } from './lib/components/dynamic-form/dynamic-form.component';
|
|
19
20
|
export * from './lib/components/dynamic-form/models/dynamic-form.models';
|
|
20
21
|
export * from './lib/components/dynamic-form/fields';
|
|
@@ -8,3 +8,19 @@
|
|
|
8
8
|
|
|
9
9
|
// Entity List Styles
|
|
10
10
|
@import './entity-list.shared.scss';
|
|
11
|
+
|
|
12
|
+
// Dynamic Form - Date field fix
|
|
13
|
+
// Ensures p-inputmask inside date fields expands to 100% width
|
|
14
|
+
.date-input-group,
|
|
15
|
+
.datetime-input-group {
|
|
16
|
+
width: 100%;
|
|
17
|
+
|
|
18
|
+
p-inputmask {
|
|
19
|
+
width: 100%;
|
|
20
|
+
display: block;
|
|
21
|
+
|
|
22
|
+
input {
|
|
23
|
+
width: 100%;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|