@sdcorejs/angular 20.3.0 → 20.3.1
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/README.md +2 -2
- package/components/file-explorer/index.d.ts +447 -57
- package/components/form-generic/index.d.ts +58 -5
- package/components/index.d.ts +1 -0
- package/components/kanban/index.d.ts +179 -0
- package/components/section/index.d.ts +2 -1
- package/components/tab/index.d.ts +3 -1
- package/fesm2022/sdcorejs-angular-components-button.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-button.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-file-explorer.mjs +2162 -90
- package/fesm2022/sdcorejs-angular-components-file-explorer.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs +638 -35
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-kanban.mjs +441 -0
- package/fesm2022/sdcorejs-angular-components-kanban.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-components-section.mjs +5 -4
- package/fesm2022/sdcorejs-angular-components-section.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-stepper.mjs +5 -1
- package/fesm2022/sdcorejs-angular-components-stepper.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tab.mjs +12 -4
- package/fesm2022/sdcorejs-angular-components-tab.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components.mjs +1 -0
- package/fesm2022/sdcorejs-angular-components.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-segmented.mjs +244 -0
- package/fesm2022/sdcorejs-angular-forms-segmented.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-forms.mjs +8 -0
- package/fesm2022/sdcorejs-angular-forms.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-i18n.mjs +300 -0
- package/fesm2022/sdcorejs-angular-i18n.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-confirm.mjs +2 -2
- package/forms/index.d.ts +8 -6
- package/forms/segmented/index.d.ts +90 -0
- package/i18n/index.d.ts +59 -0
- package/package.json +9 -1
|
@@ -274,13 +274,14 @@ declare function provideSdFormGeneric(config?: SdFormGenericConfig): Environment
|
|
|
274
274
|
*/
|
|
275
275
|
interface SdFormGenericSchema {
|
|
276
276
|
pages: SdFormGenericPage[];
|
|
277
|
-
/**
|
|
277
|
+
/** Tabs or steps across visible pages. Absent preserves first-page rendering. */
|
|
278
278
|
navigation?: SdFormGenericNavigation;
|
|
279
279
|
/** Biến do consumer cấp qua `[variables]`; dùng chung không gian key với field. */
|
|
280
280
|
variables?: SdFormGenericVariable[];
|
|
281
281
|
/** Validation cấp form, chạy trong `validate()`. */
|
|
282
282
|
validations?: SdFormGenericValidation[];
|
|
283
283
|
}
|
|
284
|
+
/** Steps default to `linear: false`; linear forward navigation validates visible predecessor fields. */
|
|
284
285
|
type SdFormGenericNavigation = {
|
|
285
286
|
type: 'tabs';
|
|
286
287
|
} | {
|
|
@@ -361,7 +362,9 @@ type ContainerId = string | null;
|
|
|
361
362
|
* Nguồn schema chuẩn DUY NHẤT của builder. Được thay thế bất biến bởi các command — không component
|
|
362
363
|
* nào sửa object bên trong. Selection, viewport, kéo-thả… là editor state, không nằm ở đây.
|
|
363
364
|
*
|
|
364
|
-
* `elements`
|
|
365
|
+
* `elements` belongs to the edited page. `base.pagePosition` preserves its serialized position;
|
|
366
|
+
* `base` keeps the remaining schema data and pages.
|
|
367
|
+
* `base` giữ phần còn lại của
|
|
365
368
|
* schema (thông tin trang, các trang khác, navigation, khoá lạ) để phát lại nguyên vẹn.
|
|
366
369
|
*/
|
|
367
370
|
interface BuilderDocument {
|
|
@@ -370,6 +373,8 @@ interface BuilderDocument {
|
|
|
370
373
|
readonly validations: readonly SdFormGenericValidation[];
|
|
371
374
|
readonly base: {
|
|
372
375
|
readonly page: Omit<SdFormGenericPage, 'elements'>;
|
|
376
|
+
/** Position of the edited page in serialized pages; editor selection never changes schema order. */
|
|
377
|
+
readonly pagePosition?: number;
|
|
373
378
|
readonly otherPages: readonly SdFormGenericPage[];
|
|
374
379
|
readonly rest: Readonly<Record<string, unknown>>;
|
|
375
380
|
};
|
|
@@ -541,6 +546,11 @@ interface CommitOptions {
|
|
|
541
546
|
declare class FormBuilderStore {
|
|
542
547
|
#private;
|
|
543
548
|
readonly doc: _angular_core.WritableSignal<BuilderDocument>;
|
|
549
|
+
readonly pages: _angular_core.Signal<SdFormGenericPage[]>;
|
|
550
|
+
readonly activePage: _angular_core.Signal<Omit<SdFormGenericPage, "elements">>;
|
|
551
|
+
readonly allElements: _angular_core.Signal<_sdcorejs_angular_components_form_generic.SdFormGenericPageElement[]>;
|
|
552
|
+
readonly navigation: _angular_core.Signal<SdFormGenericNavigation | undefined>;
|
|
553
|
+
readonly canDuplicatePage: _angular_core.Signal<boolean>;
|
|
544
554
|
readonly selectedId: _angular_core.WritableSignal<string | null>;
|
|
545
555
|
readonly mode: _angular_core.WritableSignal<BuilderMode>;
|
|
546
556
|
readonly viewport: _angular_core.WritableSignal<_sdcorejs_angular_components_form_generic.SdFormGenericBreakpoint>;
|
|
@@ -583,6 +593,17 @@ declare class FormBuilderStore {
|
|
|
583
593
|
requestFocus(id: string | null): void;
|
|
584
594
|
announce(message: string): void;
|
|
585
595
|
select(id: string | null): void;
|
|
596
|
+
/** Editor page selection is transient: preserve schema order, values and undo history. */
|
|
597
|
+
selectPage(id: string): void;
|
|
598
|
+
addPage(): void;
|
|
599
|
+
duplicatePage(): string | null;
|
|
600
|
+
removePage(id: string): boolean;
|
|
601
|
+
movePage(id: string, delta: -1 | 1): boolean;
|
|
602
|
+
setPageMetadata(patch: Partial<Pick<SdFormGenericPage, 'label' | 'icon' | 'rules'>>, coalesceKey?: string): boolean;
|
|
603
|
+
setPageRule(key: keyof SdFormGenericVisibilityRules, filter: Filter | undefined): boolean;
|
|
604
|
+
setNavigation(mode: 'single' | 'tabs' | 'steps'): boolean;
|
|
605
|
+
setLinear(linear: boolean): boolean;
|
|
606
|
+
pageDependentsOf(id: string): SdFormGenericKeyReference[];
|
|
586
607
|
setMode(mode: BuilderMode): void;
|
|
587
608
|
toggleCollapsed(groupId: string, collapsed?: boolean): void;
|
|
588
609
|
/** Mở group chứa phần tử (khi chọn từ tab Cấu trúc). */
|
|
@@ -817,6 +838,9 @@ interface VariableDraft {
|
|
|
817
838
|
declare class SdFormBuilder {
|
|
818
839
|
#private;
|
|
819
840
|
readonly store: FormBuilderStore;
|
|
841
|
+
readonly pageIndex: _angular_core.Signal<number>;
|
|
842
|
+
/** Confirm destructive page removal with existing reference ownership warnings. */
|
|
843
|
+
removePage(): Promise<void>;
|
|
820
844
|
/**
|
|
821
845
|
* Schema của builder — `[(schema)]`. Mỗi tham chiếu MỚI có nội dung khác schema hiện tại = nạp form
|
|
822
846
|
* khác: reset lịch sử undo và selection. Nhận lại đúng schema vừa phát, hoặc tham chiếu mới nhưng
|
|
@@ -853,6 +877,8 @@ declare class SdFormBuilder {
|
|
|
853
877
|
constructor();
|
|
854
878
|
/** Snapshot schema hiện tại (bản clone độc lập, sửa thoải mái không ảnh hưởng builder). */
|
|
855
879
|
getSchema: () => SdFormGenericSchema;
|
|
880
|
+
/** Keep native focus visible without moving the page or any surrounding scroll container. */
|
|
881
|
+
protected revealPageHeader(event: Event): void;
|
|
856
882
|
setMode(mode: BuilderMode): void;
|
|
857
883
|
setViewport(viewport: BuilderViewport): void;
|
|
858
884
|
/** Phím của radiogroup (APG): ←/↑ lùi, →/↓ tiến (vòng), Home/End về đầu/cuối. */
|
|
@@ -944,14 +970,31 @@ declare class SdFormRender {
|
|
|
944
970
|
readonly labelPlacement: _angular_core.InputSignal<SdLabelPlacement>;
|
|
945
971
|
/** Chỉ render field có key trong danh sách; `null` = mọi field. */
|
|
946
972
|
readonly keys: _angular_core.InputSignal<readonly string[] | null>;
|
|
973
|
+
/** Active visible page. Consumer forward writes use the same linear gate as Next/header clicks. */
|
|
974
|
+
readonly activePageId: _angular_core.ModelSignal<string | null>;
|
|
975
|
+
/** A forward transition is waiting for predecessor validators; backward navigation remains available. */
|
|
976
|
+
readonly navigationPending: _angular_core.WritableSignal<boolean>;
|
|
977
|
+
protected readonly navigationTip: _angular_core.WritableSignal<boolean>;
|
|
978
|
+
readonly effectivePageId: _angular_core.WritableSignal<string | null>;
|
|
979
|
+
readonly focusedPageId: _angular_core.WritableSignal<string | null>;
|
|
947
980
|
private readonly grid;
|
|
948
981
|
private readonly items;
|
|
949
|
-
readonly
|
|
982
|
+
private readonly pageTabs;
|
|
983
|
+
private readonly pageStepper;
|
|
984
|
+
readonly formGroup: _angular_core.Signal<FormGroup<any>>;
|
|
950
985
|
readonly normalized: _angular_core.Signal<SdFormGenericSchema>;
|
|
951
986
|
readonly scope: _angular_core.Signal<Readonly<Record<string, unknown>>>;
|
|
952
987
|
/** Mức bố cục hiện hành. */
|
|
953
988
|
readonly level: _angular_core.Signal<SdFormGenericBreakpoint>;
|
|
954
|
-
|
|
989
|
+
readonly navigation: _angular_core.Signal<_sdcorejs_angular_components_form_generic.SdFormGenericNavigation | undefined>;
|
|
990
|
+
readonly visiblePages: _angular_core.Signal<SdFormGenericPage[]>;
|
|
991
|
+
readonly activeIndex: _angular_core.Signal<number>;
|
|
992
|
+
/** Eager page regions retain visible controls even before a page is visited. */
|
|
993
|
+
readonly pageRegions: _angular_core.Signal<{
|
|
994
|
+
page: SdFormGenericPage;
|
|
995
|
+
cells: RenderCell[];
|
|
996
|
+
}[]>;
|
|
997
|
+
/** Legacy first-page layout; navigation regions each pack their own page. */
|
|
955
998
|
readonly rows: _angular_core.Signal<SdFormGenericLayoutRow<RenderNode>[]>;
|
|
956
999
|
/** Ô của lưới theo thứ tự tài liệu (DOM phẳng, vị trí từ `rows`). */
|
|
957
1000
|
readonly cells: _angular_core.Signal<RenderCell[]>;
|
|
@@ -961,10 +1004,20 @@ declare class SdFormRender {
|
|
|
961
1004
|
* Luôn trả `{ valid, messages: { error, warning } }`; chỉ lỗi làm `valid = false`.
|
|
962
1005
|
*/
|
|
963
1006
|
validate(): Promise<SdFormGenericValidationResult>;
|
|
1007
|
+
t: (key: string, params?: Record<string, string | number>) => string;
|
|
1008
|
+
pageLabel(page: SdFormGenericPage): string;
|
|
1009
|
+
pageDomId(pageId: string, part: 'tab' | 'panel'): string;
|
|
1010
|
+
protected onCorePageChange(index: number): void;
|
|
1011
|
+
protected onCorePageFocus(event: FocusEvent): void;
|
|
1012
|
+
/** Shared navigation gate for consumer model writes, page headers and Next. */
|
|
1013
|
+
requestPage(pageId: string): Promise<void>;
|
|
1014
|
+
previous(): void;
|
|
1015
|
+
next(): void;
|
|
1016
|
+
onPageKeydown(event: KeyboardEvent, pageId: string): void;
|
|
964
1017
|
/** Tải lên các tệp đang chờ của mọi field upload; kết quả được ghi vào value. Gọi trước khi lưu. */
|
|
965
1018
|
upload(): Promise<void>;
|
|
966
1019
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdFormRender, never>;
|
|
967
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdFormRender, "sd-form-render", never, { "schema": { "alias": "schema"; "required": true; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "variables": { "alias": "variables"; "required": false; "isSignal": true; }; "viewed": { "alias": "viewed"; "required": false; "isSignal": true; }; "breakpoint": { "alias": "breakpoint"; "required": false; "isSignal": true; }; "labelPlacement": { "alias": "labelPlacement"; "required": false; "isSignal": true; }; "keys": { "alias": "keys"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
1020
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdFormRender, "sd-form-render", never, { "schema": { "alias": "schema"; "required": true; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "variables": { "alias": "variables"; "required": false; "isSignal": true; }; "viewed": { "alias": "viewed"; "required": false; "isSignal": true; }; "breakpoint": { "alias": "breakpoint"; "required": false; "isSignal": true; }; "labelPlacement": { "alias": "labelPlacement"; "required": false; "isSignal": true; }; "keys": { "alias": "keys"; "required": false; "isSignal": true; }; "activePageId": { "alias": "activePageId"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "activePageId": "activePageIdChange"; }, never, never, true, never>;
|
|
968
1021
|
}
|
|
969
1022
|
|
|
970
1023
|
declare class SdFormRenderService {
|
package/components/index.d.ts
CHANGED
|
@@ -36,5 +36,6 @@ export * from '@sdcorejs/angular/components/operator';
|
|
|
36
36
|
export * from '@sdcorejs/angular/components/stepper';
|
|
37
37
|
export * from '@sdcorejs/angular/components/tab';
|
|
38
38
|
export * from '@sdcorejs/angular/components/file-explorer';
|
|
39
|
+
export * from '@sdcorejs/angular/components/kanban';
|
|
39
40
|
export * from '@sdcorejs/angular/components/image-editor';
|
|
40
41
|
export * from '@sdcorejs/angular/components/highlight';
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { TemplateRef } from '@angular/core';
|
|
3
|
+
import { CdkDrag, CdkDropList, CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
4
|
+
import { Color } from '@sdcorejs/utils/models';
|
|
5
|
+
|
|
6
|
+
/** Stable identity; number `1` and string `'1'` are distinct. Never use a row index. */
|
|
7
|
+
type SdKanbanId = string | number;
|
|
8
|
+
type SdKanbanMoveSource = 'drag' | 'menu' | 'keyboard' | 'api';
|
|
9
|
+
interface SdKanbanColumn {
|
|
10
|
+
readonly id: SdKanbanId;
|
|
11
|
+
readonly label: string;
|
|
12
|
+
readonly color?: Color;
|
|
13
|
+
readonly prefixIcon?: string;
|
|
14
|
+
readonly disabled?: boolean;
|
|
15
|
+
}
|
|
16
|
+
/** One immutable proposed move. Indexes refer to the complete column, including filtered-out cards. */
|
|
17
|
+
interface SdKanbanMoveRequest<T> {
|
|
18
|
+
readonly item: T;
|
|
19
|
+
readonly itemId: SdKanbanId;
|
|
20
|
+
readonly fromColumnId: SdKanbanId;
|
|
21
|
+
readonly toColumnId: SdKanbanId;
|
|
22
|
+
readonly fromIndex: number;
|
|
23
|
+
/** Insertion index after removing the source card from its column. */
|
|
24
|
+
readonly toIndex: number;
|
|
25
|
+
readonly previousItems: readonly T[];
|
|
26
|
+
readonly nextItems: readonly T[];
|
|
27
|
+
readonly source: SdKanbanMoveSource;
|
|
28
|
+
/** Aborted on replacement data/options/columns, locked state, or destruction. */
|
|
29
|
+
readonly signal: AbortSignal;
|
|
30
|
+
}
|
|
31
|
+
/** Domain mapping and consumer-owned persistence. Replace arrays and options immutably. */
|
|
32
|
+
interface SdKanbanOption<T> {
|
|
33
|
+
readonly getId: (item: T) => SdKanbanId;
|
|
34
|
+
readonly getColumnId: (item: T) => SdKanbanId;
|
|
35
|
+
readonly getTitle: (item: T) => string;
|
|
36
|
+
/** Return a new item preserving its ID; never mutate the supplied item. */
|
|
37
|
+
readonly withColumn: (item: T, columnId: SdKanbanId) => T;
|
|
38
|
+
readonly getSearchText?: (item: T) => string;
|
|
39
|
+
readonly filter?: (item: T) => boolean;
|
|
40
|
+
readonly canMove?: (request: SdKanbanMoveRequest<T>) => boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Omit for local mode. In async mode, resolve `true`/`undefined` to accept or `false` to reject.
|
|
43
|
+
* Rejection/throw keeps the board unchanged and emits `sdMoveError`. No `modelChange`, `sdChange`,
|
|
44
|
+
* or `sdMove` is emitted before acceptance. New input data always wins over a late response.
|
|
45
|
+
* Persist using the stable IDs and full-column indexes, and forward `signal` when supported.
|
|
46
|
+
*/
|
|
47
|
+
readonly move?: (request: SdKanbanMoveRequest<T>) => Promise<boolean | void>;
|
|
48
|
+
readonly searchable?: boolean;
|
|
49
|
+
readonly collapsible?: boolean;
|
|
50
|
+
}
|
|
51
|
+
interface SdKanbanMoveError<T> {
|
|
52
|
+
readonly request: SdKanbanMoveRequest<T>;
|
|
53
|
+
readonly reason: 'rejected' | 'error';
|
|
54
|
+
readonly error?: unknown;
|
|
55
|
+
}
|
|
56
|
+
interface SdKanbanCardTemplateContext<T> {
|
|
57
|
+
readonly $implicit: T;
|
|
58
|
+
readonly item: T;
|
|
59
|
+
readonly column: SdKanbanColumn;
|
|
60
|
+
readonly index: number;
|
|
61
|
+
readonly pending: boolean;
|
|
62
|
+
}
|
|
63
|
+
interface SdKanbanColumnTemplateContext {
|
|
64
|
+
readonly $implicit: SdKanbanColumn;
|
|
65
|
+
readonly column: SdKanbanColumn;
|
|
66
|
+
readonly count: number;
|
|
67
|
+
readonly visibleCount: number;
|
|
68
|
+
readonly collapsed: boolean;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
declare class SdKanbanCardTemplateDirective<T = unknown> {
|
|
72
|
+
/** Bind the option for strict generic template inference, or use the bare attribute. */
|
|
73
|
+
readonly option: _angular_core.InputSignal<"" | SdKanbanOption<T>>;
|
|
74
|
+
readonly template: TemplateRef<SdKanbanCardTemplateContext<T>>;
|
|
75
|
+
static ngTemplateContextGuard<T>(_directive: SdKanbanCardTemplateDirective<T>, _context: unknown): _context is SdKanbanCardTemplateContext<T>;
|
|
76
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdKanbanCardTemplateDirective<any>, never>;
|
|
77
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SdKanbanCardTemplateDirective<any>, "ng-template[sdKanbanCardTemplate]", never, { "option": { "alias": "sdKanbanCardTemplate"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
78
|
+
}
|
|
79
|
+
declare class SdKanbanCardActionsTemplateDirective<T = unknown> {
|
|
80
|
+
readonly option: _angular_core.InputSignal<"" | SdKanbanOption<T>>;
|
|
81
|
+
readonly template: TemplateRef<SdKanbanCardTemplateContext<T>>;
|
|
82
|
+
static ngTemplateContextGuard<T>(_directive: SdKanbanCardActionsTemplateDirective<T>, _context: unknown): _context is SdKanbanCardTemplateContext<T>;
|
|
83
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdKanbanCardActionsTemplateDirective<any>, never>;
|
|
84
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SdKanbanCardActionsTemplateDirective<any>, "ng-template[sdKanbanCardActionsTemplate]", never, { "option": { "alias": "sdKanbanCardActionsTemplate"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
85
|
+
}
|
|
86
|
+
declare class SdKanbanColumnTemplateDirective {
|
|
87
|
+
readonly template: TemplateRef<SdKanbanColumnTemplateContext>;
|
|
88
|
+
static ngTemplateContextGuard(_directive: SdKanbanColumnTemplateDirective, _context: unknown): _context is SdKanbanColumnTemplateContext;
|
|
89
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdKanbanColumnTemplateDirective, never>;
|
|
90
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SdKanbanColumnTemplateDirective, "ng-template[sdKanbanColumnTemplate]", never, {}, {}, never, never, true, never>;
|
|
91
|
+
}
|
|
92
|
+
declare class SdKanbanColumnActionsTemplateDirective {
|
|
93
|
+
readonly template: TemplateRef<SdKanbanColumnTemplateContext>;
|
|
94
|
+
static ngTemplateContextGuard(_directive: SdKanbanColumnActionsTemplateDirective, _context: unknown): _context is SdKanbanColumnTemplateContext;
|
|
95
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdKanbanColumnActionsTemplateDirective, never>;
|
|
96
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SdKanbanColumnActionsTemplateDirective, "ng-template[sdKanbanColumnActionsTemplate]", never, {}, {}, never, never, true, never>;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
interface CardView<T> {
|
|
100
|
+
readonly item: T;
|
|
101
|
+
readonly id: SdKanbanId;
|
|
102
|
+
readonly title: string;
|
|
103
|
+
readonly index: number;
|
|
104
|
+
}
|
|
105
|
+
interface ColumnView<T> {
|
|
106
|
+
readonly column: SdKanbanColumn;
|
|
107
|
+
readonly cards: readonly CardView<T>[];
|
|
108
|
+
readonly count: number;
|
|
109
|
+
}
|
|
110
|
+
/** Generic ordered board with one consumer-confirmed, serial move pipeline. */
|
|
111
|
+
declare class SdKanban<T = unknown> {
|
|
112
|
+
#private;
|
|
113
|
+
readonly id: string;
|
|
114
|
+
readonly columns: _angular_core.InputSignal<readonly SdKanbanColumn[]>;
|
|
115
|
+
readonly option: _angular_core.InputSignal<SdKanbanOption<T>>;
|
|
116
|
+
readonly model: _angular_core.ModelSignal<readonly T[]>;
|
|
117
|
+
readonly keyword: _angular_core.ModelSignal<string>;
|
|
118
|
+
readonly collapsedColumns: _angular_core.ModelSignal<readonly SdKanbanId[]>;
|
|
119
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
120
|
+
readonly readonly: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
121
|
+
readonly loading: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
122
|
+
readonly error: _angular_core.InputSignal<string | null | undefined>;
|
|
123
|
+
readonly ariaLabel: _angular_core.InputSignal<string | null | undefined>;
|
|
124
|
+
readonly autoId: _angular_core.InputSignal<string | null | undefined>;
|
|
125
|
+
readonly sdChange: _angular_core.OutputEmitterRef<readonly T[]>;
|
|
126
|
+
readonly sdMove: _angular_core.OutputEmitterRef<SdKanbanMoveRequest<T>>;
|
|
127
|
+
readonly sdMoveError: _angular_core.OutputEmitterRef<SdKanbanMoveError<T>>;
|
|
128
|
+
readonly sdRetry: _angular_core.OutputEmitterRef<void>;
|
|
129
|
+
readonly pendingId: _angular_core.WritableSignal<SdKanbanId | null>;
|
|
130
|
+
protected readonly cardTemplate: _angular_core.Signal<SdKanbanCardTemplateDirective<T> | undefined>;
|
|
131
|
+
protected readonly cardActionsTemplate: _angular_core.Signal<SdKanbanCardActionsTemplateDirective<T> | undefined>;
|
|
132
|
+
protected readonly columnTemplate: _angular_core.Signal<SdKanbanColumnTemplateDirective | undefined>;
|
|
133
|
+
protected readonly columnActionsTemplate: _angular_core.Signal<SdKanbanColumnActionsTemplateDirective | undefined>;
|
|
134
|
+
protected readonly announcement: _angular_core.WritableSignal<string>;
|
|
135
|
+
protected readonly moveFailure: _angular_core.WritableSignal<string | undefined>;
|
|
136
|
+
/** Card the current failure belongs to; `null` for failures without a card (invalid configuration). */
|
|
137
|
+
protected readonly failedId: _angular_core.WritableSignal<SdKanbanId | null>;
|
|
138
|
+
protected readonly dataInvalid: _angular_core.Signal<boolean>;
|
|
139
|
+
protected readonly locked: _angular_core.Signal<boolean>;
|
|
140
|
+
protected readonly moveBlocked: _angular_core.Signal<boolean>;
|
|
141
|
+
protected readonly boardLabel: _angular_core.Signal<string>;
|
|
142
|
+
protected readonly boardColumns: _angular_core.Signal<readonly ColumnView<T>[]>;
|
|
143
|
+
protected readonly pendingAnchored: _angular_core.Signal<boolean>;
|
|
144
|
+
protected readonly failureAnchored: _angular_core.Signal<boolean>;
|
|
145
|
+
protected readonly enterPredicate: (_drag: CdkDrag<CardView<T>>, drop: CdkDropList<ColumnView<T>>) => boolean;
|
|
146
|
+
constructor();
|
|
147
|
+
/**
|
|
148
|
+
* Propose a full-column insertion, optionally wait for persistence, then commit once.
|
|
149
|
+
* No-op, locked, rejected and stale requests return false without a change event.
|
|
150
|
+
*/
|
|
151
|
+
move(itemId: SdKanbanId, columnId: SdKanbanId, index?: number, source?: SdKanbanMoveSource): Promise<boolean>;
|
|
152
|
+
protected drop(event: CdkDragDrop<ColumnView<T>, ColumnView<T>, CardView<T>>): void;
|
|
153
|
+
protected moveFromMenu(itemId: SdKanbanId, columnId: SdKanbanId, index: number | undefined, trigger: HTMLButtonElement): void;
|
|
154
|
+
protected keydown(event: KeyboardEvent, card: CardView<T>, view: ColumnView<T>): void;
|
|
155
|
+
protected collapsed(id: SdKanbanId): boolean;
|
|
156
|
+
protected toggleColumn(id: SdKanbanId): void;
|
|
157
|
+
protected columnContext(view: ColumnView<T>): {
|
|
158
|
+
$implicit: SdKanbanColumn;
|
|
159
|
+
column: SdKanbanColumn;
|
|
160
|
+
count: number;
|
|
161
|
+
visibleCount: number;
|
|
162
|
+
collapsed: boolean;
|
|
163
|
+
};
|
|
164
|
+
protected cardContext(card: CardView<T>, view: ColumnView<T>): {
|
|
165
|
+
$implicit: T;
|
|
166
|
+
item: T;
|
|
167
|
+
column: SdKanbanColumn;
|
|
168
|
+
index: number;
|
|
169
|
+
pending: boolean;
|
|
170
|
+
};
|
|
171
|
+
protected token(id: SdKanbanId): string;
|
|
172
|
+
protected updateKeyword(event: Event): void;
|
|
173
|
+
protected dismissFailure(): void;
|
|
174
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdKanban<any>, never>;
|
|
175
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdKanban<any>, "sd-kanban", never, { "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "option": { "alias": "option"; "required": true; "isSignal": true; }; "model": { "alias": "model"; "required": false; "isSignal": true; }; "keyword": { "alias": "keyword"; "required": false; "isSignal": true; }; "collapsedColumns": { "alias": "collapsedColumns"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "autoId": { "alias": "autoId"; "required": false; "isSignal": true; }; }, { "model": "modelChange"; "keyword": "keywordChange"; "collapsedColumns": "collapsedColumnsChange"; "sdChange": "sdChange"; "sdMove": "sdMove"; "sdMoveError": "sdMoveError"; "sdRetry": "sdRetry"; }, ["cardTemplate", "cardActionsTemplate", "columnTemplate", "columnActionsTemplate"], never, true, never>;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export { SdKanban, SdKanbanCardActionsTemplateDirective, SdKanbanCardTemplateDirective, SdKanbanColumnActionsTemplateDirective, SdKanbanColumnTemplateDirective };
|
|
179
|
+
export type { SdKanbanCardTemplateContext, SdKanbanColumn, SdKanbanColumnTemplateContext, SdKanbanId, SdKanbanMoveError, SdKanbanMoveRequest, SdKanbanMoveSource, SdKanbanOption };
|
|
@@ -26,10 +26,11 @@ declare class SdSection {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
declare class SdSectionItem {
|
|
29
|
+
/** Left column text. Optional when the left column is projected through `[itemLeft]`. */
|
|
29
30
|
label: _angular_core.InputSignal<string>;
|
|
30
31
|
labelWidth: _angular_core.InputSignalWithTransform<string, string | null | undefined>;
|
|
31
32
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdSectionItem, never>;
|
|
32
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdSectionItem, "sd-section-item", never, { "label": { "alias": "label"; "required":
|
|
33
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdSectionItem, "sd-section-item", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "labelWidth": { "alias": "labelWidth"; "required": false; "isSignal": true; }; }, {}, never, ["[itemLeft]", "*"], true, never>;
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
export { SdSection, SdSectionItem };
|
|
@@ -28,6 +28,8 @@ interface SdTabClosedEvent {
|
|
|
28
28
|
type SdTabRegionStyle = Readonly<Record<string, string | number | null | undefined>>;
|
|
29
29
|
declare class SdTabGroup {
|
|
30
30
|
#private;
|
|
31
|
+
/** Keep visited tab bodies in the DOM so form controls retain their rendered state while inactive. */
|
|
32
|
+
preserveContent: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
31
33
|
tabs: _angular_core.Signal<readonly SdTab[]>;
|
|
32
34
|
selectedIndex: _angular_core.ModelSignal<number>;
|
|
33
35
|
variant: _angular_core.InputSignal<"line" | "pills" | "segmented">;
|
|
@@ -58,7 +60,7 @@ declare class SdTabGroup {
|
|
|
58
60
|
realignInkBar(): void;
|
|
59
61
|
protected onClose(tab: SdTab, index: number, event: MouseEvent): void;
|
|
60
62
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdTabGroup, never>;
|
|
61
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdTabGroup, "sd-tab-group", never, { "selectedIndex": { "alias": "selectedIndex"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "headerPosition": { "alias": "headerPosition"; "required": false; "isSignal": true; }; "headerClass": { "alias": "headerClass"; "required": false; "isSignal": true; }; "headerStyle": { "alias": "headerStyle"; "required": false; "isSignal": true; }; "bodyClass": { "alias": "bodyClass"; "required": false; "isSignal": true; }; "bodyStyle": { "alias": "bodyStyle"; "required": false; "isSignal": true; }; "alignTabs": { "alias": "alignTabs"; "required": false; "isSignal": true; }; "stretchTabs": { "alias": "stretchTabs"; "required": false; "isSignal": true; }; "animationDuration": { "alias": "animationDuration"; "required": false; "isSignal": true; }; "disableRipple": { "alias": "disableRipple"; "required": false; "isSignal": true; }; "dynamicHeight": { "alias": "dynamicHeight"; "required": false; "isSignal": true; }; "autoId": { "alias": "autoId"; "required": false; "isSignal": true; }; }, { "selectedIndex": "selectedIndexChange"; "tabClosed": "tabClosed"; }, ["tabs"], never, true, never>;
|
|
63
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdTabGroup, "sd-tab-group", never, { "preserveContent": { "alias": "preserveContent"; "required": false; "isSignal": true; }; "selectedIndex": { "alias": "selectedIndex"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "headerPosition": { "alias": "headerPosition"; "required": false; "isSignal": true; }; "headerClass": { "alias": "headerClass"; "required": false; "isSignal": true; }; "headerStyle": { "alias": "headerStyle"; "required": false; "isSignal": true; }; "bodyClass": { "alias": "bodyClass"; "required": false; "isSignal": true; }; "bodyStyle": { "alias": "bodyStyle"; "required": false; "isSignal": true; }; "alignTabs": { "alias": "alignTabs"; "required": false; "isSignal": true; }; "stretchTabs": { "alias": "stretchTabs"; "required": false; "isSignal": true; }; "animationDuration": { "alias": "animationDuration"; "required": false; "isSignal": true; }; "disableRipple": { "alias": "disableRipple"; "required": false; "isSignal": true; }; "dynamicHeight": { "alias": "dynamicHeight"; "required": false; "isSignal": true; }; "autoId": { "alias": "autoId"; "required": false; "isSignal": true; }; }, { "selectedIndex": "selectedIndexChange"; "tabClosed": "tabClosed"; }, ["tabs"], never, true, never>;
|
|
62
64
|
}
|
|
63
65
|
|
|
64
66
|
export { SdTab, SdTabGroup };
|