@tekus/design-system 5.28.0 → 5.29.2
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/tekus-design-system-components-bread-crumps.mjs +4 -4
- package/fesm2022/tekus-design-system-components-bread-crumps.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-button.mjs +11 -3
- package/fesm2022/tekus-design-system-components-button.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-card.mjs +1 -1
- package/fesm2022/tekus-design-system-components-card.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-drawer.mjs +17 -3
- package/fesm2022/tekus-design-system-components-drawer.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-dropdown.mjs +13 -3
- package/fesm2022/tekus-design-system-components-dropdown.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-fallback-view.mjs +1 -1
- package/fesm2022/tekus-design-system-components-fallback-view.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-icon.mjs +15 -1
- package/fesm2022/tekus-design-system-components-icon.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-menu.mjs +1 -0
- package/fesm2022/tekus-design-system-components-menu.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-message.mjs +2 -2
- package/fesm2022/tekus-design-system-components-message.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-modal.mjs +60 -27
- package/fesm2022/tekus-design-system-components-modal.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-panel-menu.mjs +1 -0
- package/fesm2022/tekus-design-system-components-panel-menu.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-select.mjs +335 -103
- package/fesm2022/tekus-design-system-components-select.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-sidebar-layout.mjs +1 -1
- package/fesm2022/tekus-design-system-components-sidebar-layout.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-table.mjs +1 -1
- package/fesm2022/tekus-design-system-components-table.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-toast.mjs +1 -1
- package/fesm2022/tekus-design-system-components-toast.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-toolbar.mjs +1 -1
- package/fesm2022/tekus-design-system-components-toolbar.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-topbar.mjs +1 -1
- package/fesm2022/tekus-design-system-components-topbar.mjs.map +1 -1
- package/package.json +1 -1
- package/types/tekus-design-system-components-bread-crumps.d.ts +1 -1
- package/types/tekus-design-system-components-button.d.ts +9 -1
- package/types/tekus-design-system-components-drawer.d.ts +10 -1
- package/types/tekus-design-system-components-dropdown.d.ts +11 -1
- package/types/tekus-design-system-components-modal.d.ts +18 -11
- package/types/tekus-design-system-components-select.d.ts +216 -79
- package/types/tekus-design-system-core-types.d.ts +3 -4
- package/types/tekus-design-system-core.d.ts +3 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tekus-design-system-components-topbar.mjs","sources":["../../../projects/design-system/components/topbar/src/topbar.component.ts","../../../projects/design-system/components/topbar/src/topbar.component.html","../../../projects/design-system/components/topbar/tekus-design-system-components-topbar.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { ButtonComponent } from '@tekus/design-system/components/button';\nimport { TagComponent } from '@tekus/design-system/components/tag';\nimport { BreadCrumpsComponent, BreadCrumpItem } from '@tekus/design-system/components/bread-crumps';\nimport { TopbarAction, TopbarTag } from './topbar.types';\n\n/**\n * @component TopbarComponent\n * @description\n * Layout component that renders a title with optional actions and metadata.\n * It composes `tk-button` and `tk-tag` and uses only design tokens for styles.\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'tk-topbar',\n imports: [ButtonComponent, TagComponent, BreadCrumpsComponent],\n templateUrl: './topbar.component.html',\n styleUrl: './topbar.component.scss',\n})\nexport class TopbarComponent {\n /** Main title text for the topbar. */\n title = input.required<string>();\n\n /** Optional list of actions displayed in the header. */\n actions = input<TopbarAction[] | null>(null);\n \n /** Whether to show breadcrumbs instead of a simple title. */\n showBreadcrumbs = input<boolean>(false);\n\n /** Manual breadcrumb items. If not provided and showBreadcrumbs is true, it uses automatic routing. */\n breadcrumbItems = input<BreadCrumpItem[] | null>(null);\n\n /** Size of the breadcrumbs. Can be 'small' or 'large'. Default is 'large' for topbar. */\n breadcrumbSize = input<'small' | 'large'>('large');\n\n /** Optional list of tags displayed in the meta section. */\n tags = input<TopbarTag[] | null>(null);\n\n /** Optional description displayed in the meta section. */\n description = input<string | null>(null);\n}\n","<div class=\"tk-topbar\">\n <div class=\"tk-topbar__header\">\n @if (showBreadcrumbs()) {\n <tk-bread-crumps [items]=\"breadcrumbItems()\" [size]=\"breadcrumbSize()\"></tk-bread-crumps>\n } @else {\n <h2 class=\"tk-topbar__title\">{{ title() }}</h2>\n }\n\n @if (actions()?.length) {\n <div class=\"tk-topbar__actions\">\n @for (action of actions(); track $index) {\n @if (action.type === 'primary') {\n <tk-button\n [label]=\"action.label\"\n severity=\"primary\"\n [tooltipText]=\"action.tooltipText\"\n (clicked)=\"action.onClick()\">\n </tk-button>\n } @else {\n <tk-button\n [icon]=\"action.icon\"\n severity=\"secondary\"\n [tooltipText]=\"action.tooltipText\"\n (clicked)=\"action.onClick()\">\n </tk-button>\n }\n }\n </div>\n }\n </div>\n\n @if (tags()?.length || description()) {\n <div class=\"tk-topbar__meta\">\n @if (tags()?.length) {\n <div class=\"tk-topbar__tags\">\n @for (tag of tags(); track $index) {\n <tk-tag\n [value]=\"tag.label\"\n [severity]=\"tag.variant ?? 'secondary'\"></tk-tag>\n }\n </div>\n }\n @if (description()) {\n <p class=\"tk-topbar__description\">{{ description() }}</p>\n }\n </div>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAMA;;;;;AAKG;MAQU,eAAe,CAAA;AAP5B,IAAA,WAAA,GAAA;;AASE,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,2EAAU;;AAGhC,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAwB,IAAI,8EAAC;;AAG5C,QAAA,IAAA,CAAA,eAAe,GAAG,KAAK,CAAU,KAAK,sFAAC;;AAGvC,QAAA,IAAA,CAAA,eAAe,GAAG,KAAK,CAA0B,IAAI,sFAAC;;AAGtD,QAAA,IAAA,CAAA,cAAc,GAAG,KAAK,CAAoB,OAAO,qFAAC;;AAGlD,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAqB,IAAI,2EAAC;;AAGtC,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAgB,IAAI,kFAAC;AACzC,IAAA;8GArBY,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAf,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAe,ogCCnB5B,+0CAgDA,EAAA,MAAA,EAAA,CAAA,+rCAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDjCY,eAAe,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,UAAA,EAAA,MAAA,EAAA,UAAA,EAAA,SAAA,EAAA,MAAA,EAAA,MAAA,EAAA,aAAA,EAAA,MAAA,CAAA,EAAA,OAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,YAAY,qGAAE,oBAAoB,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,MAAA,EAAA,aAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAIlD,eAAe,EAAA,UAAA,EAAA,CAAA;kBAP3B,SAAS;sCACS,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC,WAAW,EAAA,OAAA,EACZ,CAAC,eAAe,EAAE,YAAY,EAAE,oBAAoB,CAAC,EAAA,QAAA,EAAA,+0CAAA,EAAA,MAAA,EAAA,CAAA,+rCAAA,CAAA,EAAA;;;AEfhE;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"tekus-design-system-components-topbar.mjs","sources":["../../../projects/design-system/components/topbar/src/topbar.component.ts","../../../projects/design-system/components/topbar/src/topbar.component.html","../../../projects/design-system/components/topbar/tekus-design-system-components-topbar.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { ButtonComponent } from '@tekus/design-system/components/button';\nimport { TagComponent } from '@tekus/design-system/components/tag';\nimport { BreadCrumpsComponent, BreadCrumpItem } from '@tekus/design-system/components/bread-crumps';\nimport { TopbarAction, TopbarTag } from './topbar.types';\n\n/**\n * @component TopbarComponent\n * @description\n * Layout component that renders a title with optional actions and metadata.\n * It composes `tk-button` and `tk-tag` and uses only design tokens for styles.\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'tk-topbar',\n imports: [ButtonComponent, TagComponent, BreadCrumpsComponent],\n templateUrl: './topbar.component.html',\n styleUrl: './topbar.component.scss',\n})\nexport class TopbarComponent {\n /** Main title text for the topbar. */\n title = input.required<string>();\n\n /** Optional list of actions displayed in the header. */\n actions = input<TopbarAction[] | null>(null);\n \n /** Whether to show breadcrumbs instead of a simple title. */\n showBreadcrumbs = input<boolean>(false);\n\n /** Manual breadcrumb items. If not provided and showBreadcrumbs is true, it uses automatic routing. */\n breadcrumbItems = input<BreadCrumpItem[] | null>(null);\n\n /** Size of the breadcrumbs. Can be 'small' or 'large'. Default is 'large' for topbar. */\n breadcrumbSize = input<'small' | 'large'>('large');\n\n /** Optional list of tags displayed in the meta section. */\n tags = input<TopbarTag[] | null>(null);\n\n /** Optional description displayed in the meta section. */\n description = input<string | null>(null);\n}\n","<div class=\"tk-topbar\">\n <div class=\"tk-topbar__header\">\n @if (showBreadcrumbs()) {\n <tk-bread-crumps [items]=\"breadcrumbItems()\" [size]=\"breadcrumbSize()\"></tk-bread-crumps>\n } @else {\n <h2 class=\"tk-topbar__title\">{{ title() }}</h2>\n }\n\n @if (actions()?.length) {\n <div class=\"tk-topbar__actions\">\n @for (action of actions(); track $index) {\n @if (action.type === 'primary') {\n <tk-button\n [label]=\"action.label\"\n severity=\"primary\"\n [tooltipText]=\"action.tooltipText\"\n (clicked)=\"action.onClick()\">\n </tk-button>\n } @else {\n <tk-button\n [icon]=\"action.icon\"\n severity=\"secondary\"\n [tooltipText]=\"action.tooltipText\"\n (clicked)=\"action.onClick()\">\n </tk-button>\n }\n }\n </div>\n }\n </div>\n\n @if (tags()?.length || description()) {\n <div class=\"tk-topbar__meta\">\n @if (tags()?.length) {\n <div class=\"tk-topbar__tags\">\n @for (tag of tags(); track $index) {\n <tk-tag\n [value]=\"tag.label\"\n [severity]=\"tag.variant ?? 'secondary'\"></tk-tag>\n }\n </div>\n }\n @if (description()) {\n <p class=\"tk-topbar__description\">{{ description() }}</p>\n }\n </div>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAMA;;;;;AAKG;MAQU,eAAe,CAAA;AAP5B,IAAA,WAAA,GAAA;;AASE,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,2EAAU;;AAGhC,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAwB,IAAI,8EAAC;;AAG5C,QAAA,IAAA,CAAA,eAAe,GAAG,KAAK,CAAU,KAAK,sFAAC;;AAGvC,QAAA,IAAA,CAAA,eAAe,GAAG,KAAK,CAA0B,IAAI,sFAAC;;AAGtD,QAAA,IAAA,CAAA,cAAc,GAAG,KAAK,CAAoB,OAAO,qFAAC;;AAGlD,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAqB,IAAI,2EAAC;;AAGtC,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAgB,IAAI,kFAAC;AACzC,IAAA;8GArBY,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAf,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAe,ogCCnB5B,+0CAgDA,EAAA,MAAA,EAAA,CAAA,+rCAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDjCY,eAAe,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,UAAA,EAAA,MAAA,EAAA,UAAA,EAAA,SAAA,EAAA,MAAA,EAAA,MAAA,EAAA,cAAA,EAAA,aAAA,EAAA,MAAA,CAAA,EAAA,OAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,YAAY,qGAAE,oBAAoB,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,MAAA,EAAA,aAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAIlD,eAAe,EAAA,UAAA,EAAA,CAAA;kBAP3B,SAAS;sCACS,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC,WAAW,EAAA,OAAA,EACZ,CAAC,eAAe,EAAE,YAAY,EAAE,oBAAoB,CAAC,EAAA,QAAA,EAAA,+0CAAA,EAAA,MAAA,EAAA,CAAA,+rCAAA,CAAA,EAAA;;;AEfhE;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@ declare class BreadCrumpsComponent {
|
|
|
9
9
|
private readonly router;
|
|
10
10
|
/** Optional manual items. If provided, route listening is ignored. */
|
|
11
11
|
items: _angular_core.InputSignal<BreadCrumpItem[] | null>;
|
|
12
|
-
/** Size of the breadcrumbs title. Can be 'small' (24px) or 'large' (32px). Default is '
|
|
12
|
+
/** Size of the breadcrumbs title. Can be 'small' (24px) or 'large' (32px). Default is 'large'. */
|
|
13
13
|
size: _angular_core.InputSignal<"small" | "large">;
|
|
14
14
|
/** If true, only the current (last) item will be displayed. */
|
|
15
15
|
onlyCurrent: _angular_core.InputSignal<boolean>;
|
|
@@ -95,6 +95,14 @@ declare class ButtonComponent {
|
|
|
95
95
|
* @default `undefined`
|
|
96
96
|
*/
|
|
97
97
|
icon: _angular_core.InputSignal<string | undefined>;
|
|
98
|
+
/**
|
|
99
|
+
* @property {'left' | 'right'} iconPosition
|
|
100
|
+
* @description
|
|
101
|
+
* Defines the position of the icon relative to the label.
|
|
102
|
+
*
|
|
103
|
+
* @default `'left'`
|
|
104
|
+
*/
|
|
105
|
+
iconPosition: _angular_core.InputSignal<"left" | "right">;
|
|
98
106
|
/**
|
|
99
107
|
* @event clicked
|
|
100
108
|
* @description
|
|
@@ -134,7 +142,7 @@ declare class ButtonComponent {
|
|
|
134
142
|
*/
|
|
135
143
|
onButtonClick(): void;
|
|
136
144
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ButtonComponent, never>;
|
|
137
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ButtonComponent, "tk-button", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "severity": { "alias": "severity"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "link": { "alias": "link"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "tooltipText": { "alias": "tooltipText"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, never, true, never>;
|
|
145
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ButtonComponent, "tk-button", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "severity": { "alias": "severity"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "link": { "alias": "link"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "iconPosition": { "alias": "iconPosition"; "required": false; "isSignal": true; }; "tooltipText": { "alias": "tooltipText"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, never, true, never>;
|
|
138
146
|
}
|
|
139
147
|
|
|
140
148
|
export { ButtonComponent };
|
|
@@ -14,7 +14,10 @@ interface DrawerHeaderAction {
|
|
|
14
14
|
}
|
|
15
15
|
interface DrawerConfig<T = unknown> {
|
|
16
16
|
title: string;
|
|
17
|
+
tag?: string;
|
|
18
|
+
subtle?: string;
|
|
17
19
|
content?: string | Type<T>;
|
|
20
|
+
hasTabs?: boolean;
|
|
18
21
|
headerAction?: DrawerHeaderAction;
|
|
19
22
|
size?: DrawerSizeType;
|
|
20
23
|
closable?: boolean;
|
|
@@ -70,6 +73,12 @@ declare class DrawerComponent<T = unknown> implements OnDestroy {
|
|
|
70
73
|
content: _angular_core.InputSignal<string | Type<T> | null>;
|
|
71
74
|
/** Optional header action button (displayed before close button) */
|
|
72
75
|
headerAction: _angular_core.InputSignal<DrawerHeaderAction | null>;
|
|
76
|
+
/** Optional tag displayed below the title */
|
|
77
|
+
tag: _angular_core.InputSignal<string | null>;
|
|
78
|
+
/** Optional subtle text displayed next to the tag */
|
|
79
|
+
subtle: _angular_core.InputSignal<string | null>;
|
|
80
|
+
/** Whether the content includes tabs (affects scroll behavior) */
|
|
81
|
+
hasTabs: _angular_core.InputSignal<boolean>;
|
|
73
82
|
/** Drawer size: 'small' (500px), 'large' (1024px) */
|
|
74
83
|
size: _angular_core.InputSignal<DrawerSizeType>;
|
|
75
84
|
/** Whether the drawer can be closed by the user via close button */
|
|
@@ -128,7 +137,7 @@ declare class DrawerComponent<T = unknown> implements OnDestroy {
|
|
|
128
137
|
handleHeaderAction(action: (() => void) | undefined, returnValue: unknown): void;
|
|
129
138
|
private resetClosureState;
|
|
130
139
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DrawerComponent<any>, never>;
|
|
131
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DrawerComponent<any>, "tk-drawer", never, { "dialogRef": { "alias": "dialogRef"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": true; "isSignal": true; }; "content": { "alias": "content"; "required": false; "isSignal": true; }; "headerAction": { "alias": "headerAction"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; "isSignal": true; }; "dismissible": { "alias": "dismissible"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "interceptor": { "alias": "interceptor"; "required": false; "isSignal": true; }; "isOpened": { "alias": "isOpened"; "required": false; "isSignal": true; }; }, { "isOpened": "isOpenedChange"; "closed": "closed"; }, never, never, true, never>;
|
|
140
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DrawerComponent<any>, "tk-drawer", never, { "dialogRef": { "alias": "dialogRef"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": true; "isSignal": true; }; "content": { "alias": "content"; "required": false; "isSignal": true; }; "headerAction": { "alias": "headerAction"; "required": false; "isSignal": true; }; "tag": { "alias": "tag"; "required": false; "isSignal": true; }; "subtle": { "alias": "subtle"; "required": false; "isSignal": true; }; "hasTabs": { "alias": "hasTabs"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; "isSignal": true; }; "dismissible": { "alias": "dismissible"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "interceptor": { "alias": "interceptor"; "required": false; "isSignal": true; }; "isOpened": { "alias": "isOpened"; "required": false; "isSignal": true; }; }, { "isOpened": "isOpenedChange"; "closed": "closed"; }, never, never, true, never>;
|
|
132
141
|
}
|
|
133
142
|
|
|
134
143
|
declare class DrawerService {
|
|
@@ -29,6 +29,16 @@ declare class DropdownComponent {
|
|
|
29
29
|
* @default 'ellipsis-vertical'
|
|
30
30
|
*/
|
|
31
31
|
icon: _angular_core.InputSignal<string>;
|
|
32
|
+
/**
|
|
33
|
+
* Text for the trigger button.
|
|
34
|
+
* If provided, it will be displayed alongside the icon (if any).
|
|
35
|
+
*/
|
|
36
|
+
label: _angular_core.InputSignal<string | undefined>;
|
|
37
|
+
/**
|
|
38
|
+
* Position of the icon relative to the label.
|
|
39
|
+
* @default 'left'
|
|
40
|
+
*/
|
|
41
|
+
iconPosition: _angular_core.InputSignal<"left" | "right">;
|
|
32
42
|
/**
|
|
33
43
|
* Size of the trigger button.
|
|
34
44
|
* @default undefined
|
|
@@ -53,7 +63,7 @@ declare class DropdownComponent {
|
|
|
53
63
|
*/
|
|
54
64
|
onItemClick(): void;
|
|
55
65
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DropdownComponent, never>;
|
|
56
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DropdownComponent, "tk-dropdown", never, { "model": { "alias": "model"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; "tooltipPosition": { "alias": "tooltipPosition"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
66
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DropdownComponent, "tk-dropdown", never, { "model": { "alias": "model"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "iconPosition": { "alias": "iconPosition"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; "tooltipPosition": { "alias": "tooltipPosition"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
57
67
|
}
|
|
58
68
|
|
|
59
69
|
export { DropdownComponent };
|
|
@@ -6,7 +6,7 @@ import { TkCloseInterceptor, TkDialogRef } from '@tekus/design-system/core/types
|
|
|
6
6
|
type ModalSizeType = 'small' | 'large' | 'medium' | 'full';
|
|
7
7
|
type SeverityType = 'primary' | 'secondary' | 'danger';
|
|
8
8
|
interface ModalFooterButton {
|
|
9
|
-
label: string;
|
|
9
|
+
label: string | (() => string);
|
|
10
10
|
severity: SeverityType;
|
|
11
11
|
/** Optional callback function executed when the button is clicked */
|
|
12
12
|
action?: () => void;
|
|
@@ -14,6 +14,10 @@ interface ModalFooterButton {
|
|
|
14
14
|
returnValue?: unknown;
|
|
15
15
|
/** Optional button variant */
|
|
16
16
|
variant?: Variant;
|
|
17
|
+
/** Optional disabled state (boolean or evaluation function) */
|
|
18
|
+
disabled?: boolean | (() => boolean);
|
|
19
|
+
/** Optional flag to prevent auto-closing of the modal when the button is clicked */
|
|
20
|
+
preventClose?: boolean;
|
|
17
21
|
}
|
|
18
22
|
interface ModalConfig<T = unknown> {
|
|
19
23
|
/** The title displayed at the top of the modal */
|
|
@@ -58,7 +62,7 @@ declare class ModalComponent<T = unknown> implements OnDestroy {
|
|
|
58
62
|
/** The main content of the modal. Can be a string or a Component Type. */
|
|
59
63
|
content: _angular_core.InputSignal<string | Type<T> | null>;
|
|
60
64
|
/** Array of footer buttons with label, callback, and return value */
|
|
61
|
-
footerButtons: _angular_core.
|
|
65
|
+
footerButtons: _angular_core.ModelSignal<ModalFooterButton[]>;
|
|
62
66
|
/** Modal size: 'small', 'large', 'medium' or 'full' */
|
|
63
67
|
size: _angular_core.InputSignal<ModalSizeType>;
|
|
64
68
|
/** Whether the modal can be closed by the user via close button */
|
|
@@ -118,16 +122,18 @@ declare class ModalComponent<T = unknown> implements OnDestroy {
|
|
|
118
122
|
open(): void;
|
|
119
123
|
/**
|
|
120
124
|
* @summary Main entry point for closure requests.
|
|
121
|
-
*
|
|
125
|
+
* Supports synchronous and asynchronous (Promise/Observable) evaluations.
|
|
122
126
|
* @param returnValue (Optional) Value to emit on close.
|
|
123
127
|
*/
|
|
124
128
|
tryClose(returnValue?: unknown): void;
|
|
125
129
|
/**
|
|
126
|
-
*
|
|
127
|
-
|
|
128
|
-
|
|
130
|
+
* Evaluates a boolean, Promise or Observable to check if closing is allowed.
|
|
131
|
+
*/
|
|
132
|
+
private evaluateCanClose;
|
|
133
|
+
/**
|
|
134
|
+
* Resolves a static or functional property of a button.
|
|
129
135
|
*/
|
|
130
|
-
|
|
136
|
+
resolveProperty<R>(prop: R | (() => R) | undefined): R | undefined;
|
|
131
137
|
/**
|
|
132
138
|
* @summary Unified logic to execute the final closure state change.
|
|
133
139
|
* @private
|
|
@@ -145,18 +151,19 @@ declare class ModalComponent<T = unknown> implements OnDestroy {
|
|
|
145
151
|
/**
|
|
146
152
|
* @summary Handles actions triggered by footer buttons.
|
|
147
153
|
*/
|
|
148
|
-
handleAction(action: (() => void) | undefined, returnValue: unknown): void;
|
|
154
|
+
handleAction(action: (() => void) | undefined, returnValue: unknown, preventClose?: boolean): void;
|
|
149
155
|
/**
|
|
150
|
-
* @summary Safely closes the modal
|
|
156
|
+
* @summary Safely closes the modal, optionally passing a return value.
|
|
157
|
+
* @param returnValue Value to emit when closing.
|
|
151
158
|
*/
|
|
152
|
-
close(): void;
|
|
159
|
+
close(returnValue?: unknown): void;
|
|
153
160
|
/**
|
|
154
161
|
* @private
|
|
155
162
|
* Encapsulates state cleanup to avoid repetitive assignments
|
|
156
163
|
*/
|
|
157
164
|
private resetClosureState;
|
|
158
165
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ModalComponent<any>, never>;
|
|
159
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ModalComponent<any>, "tk-modal", never, { "dialogRef": { "alias": "dialogRef"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "content": { "alias": "content"; "required": false; "isSignal": true; }; "footerButtons": { "alias": "footerButtons"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; "isSignal": true; }; "closeOnOutsideClick": { "alias": "closeOnOutsideClick"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "interceptor": { "alias": "interceptor"; "required": false; "isSignal": true; }; "responsive": { "alias": "responsive"; "required": false; "isSignal": true; }; "isOpened": { "alias": "isOpened"; "required": false; "isSignal": true; }; }, { "isOpened": "isOpenedChange"; "closed": "closed"; }, never, never, true, never>;
|
|
166
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ModalComponent<any>, "tk-modal", never, { "dialogRef": { "alias": "dialogRef"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "content": { "alias": "content"; "required": false; "isSignal": true; }; "footerButtons": { "alias": "footerButtons"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; "isSignal": true; }; "closeOnOutsideClick": { "alias": "closeOnOutsideClick"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "interceptor": { "alias": "interceptor"; "required": false; "isSignal": true; }; "responsive": { "alias": "responsive"; "required": false; "isSignal": true; }; "isOpened": { "alias": "isOpened"; "required": false; "isSignal": true; }; }, { "footerButtons": "footerButtonsChange"; "isOpened": "isOpenedChange"; "closed": "closed"; }, never, never, true, never>;
|
|
160
167
|
}
|
|
161
168
|
|
|
162
169
|
/**
|
|
@@ -1,155 +1,292 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
3
|
import { ControlValueAccessor, NgControl, FormControl } from '@angular/forms';
|
|
4
|
+
import { Select } from 'primeng/select';
|
|
5
|
+
import { Observable } from 'rxjs';
|
|
3
6
|
|
|
4
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Standard request object for fetching data from an asynchronous source.
|
|
9
|
+
* Aligned with PrimeNG LazyLoadEvent patterns.
|
|
10
|
+
*/
|
|
11
|
+
interface TkSelectRequest {
|
|
12
|
+
filter: string;
|
|
13
|
+
page: number;
|
|
14
|
+
pageSize: number;
|
|
15
|
+
sortField?: string;
|
|
16
|
+
sortOrder?: number;
|
|
17
|
+
params?: Record<string, unknown>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Interface representing the data source for the Select manager.
|
|
21
|
+
*/
|
|
22
|
+
interface SelectDataSource<T> {
|
|
23
|
+
fetch(request: TkSelectRequest): Observable<T[]>;
|
|
24
|
+
}
|
|
25
|
+
declare class TkSelectManager<T> {
|
|
26
|
+
/**
|
|
27
|
+
* Reactive signal for the current search query.
|
|
28
|
+
*/
|
|
29
|
+
searchQuery: _angular_core.WritableSignal<string>;
|
|
30
|
+
/**
|
|
31
|
+
* Reactive signal for the current pagination page.
|
|
32
|
+
*/
|
|
33
|
+
page: _angular_core.WritableSignal<number>;
|
|
34
|
+
/**
|
|
35
|
+
* Data source provider for fetching items.
|
|
36
|
+
*/
|
|
37
|
+
dataSource: SelectDataSource<T> | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Additional parameters to send to the data source.
|
|
40
|
+
*/
|
|
41
|
+
fetchParams: _angular_core.WritableSignal<Record<string, unknown>>;
|
|
42
|
+
/**
|
|
43
|
+
* Sorting field.
|
|
44
|
+
*/
|
|
45
|
+
sortField: _angular_core.WritableSignal<string | undefined>;
|
|
46
|
+
/**
|
|
47
|
+
* Sorting order (1 for ASC, -1 for DESC).
|
|
48
|
+
*/
|
|
49
|
+
sortOrder: _angular_core.WritableSignal<number | undefined>;
|
|
50
|
+
/**
|
|
51
|
+
* Reactive signal indicating if data is currently being fetched.
|
|
52
|
+
*/
|
|
53
|
+
loading: _angular_core.WritableSignal<boolean>;
|
|
54
|
+
/**
|
|
55
|
+
* Reactive signal indicating if there are more items to fetch.
|
|
56
|
+
*/
|
|
57
|
+
hasMore: _angular_core.WritableSignal<boolean>;
|
|
58
|
+
/**
|
|
59
|
+
* Number of items per page to detect the end of data.
|
|
60
|
+
*/
|
|
61
|
+
pageSize: number;
|
|
62
|
+
/**
|
|
63
|
+
* Final accumulated list of items exposed as a Signal.
|
|
64
|
+
*/
|
|
65
|
+
items: _angular_core.Signal<T[]>;
|
|
66
|
+
/**
|
|
67
|
+
* Updates the search query and resets pagination.
|
|
68
|
+
* @param query - The new search string.
|
|
69
|
+
*/
|
|
70
|
+
updateSearch(query: string): void;
|
|
71
|
+
/**
|
|
72
|
+
* Increments the page to trigger the next data chunk.
|
|
73
|
+
*/
|
|
74
|
+
loadNextPage(): void;
|
|
75
|
+
/**
|
|
76
|
+
* Configures the data provider for the manager.
|
|
77
|
+
* @param provider - Object implementing the SelectDataSource interface.
|
|
78
|
+
*/
|
|
79
|
+
setDataSource(provider: SelectDataSource<T>): void;
|
|
80
|
+
/**
|
|
81
|
+
* Updates additional fetch parameters and resets pagination.
|
|
82
|
+
* @param params - The new parameters object.
|
|
83
|
+
*/
|
|
84
|
+
updateParams(params: Record<string, unknown>): void;
|
|
85
|
+
/**
|
|
86
|
+
* Resets the manager state to its initial values.
|
|
87
|
+
*/
|
|
88
|
+
reset(): void;
|
|
89
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TkSelectManager<any>, never>;
|
|
90
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<TkSelectManager<any>>;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
declare class SelectComponent<T = unknown> implements ControlValueAccessor, OnDestroy {
|
|
5
94
|
readonly ngControl: NgControl | null;
|
|
95
|
+
readonly manager: TkSelectManager<any>;
|
|
96
|
+
/** PrimeNG Select instance */
|
|
97
|
+
readonly selectComponent: _angular_core.Signal<Select | undefined>;
|
|
98
|
+
/** Final reactive list of items */
|
|
6
99
|
/**
|
|
7
|
-
*
|
|
8
|
-
* @description
|
|
9
|
-
* HTML id attribute for the multiselect input.
|
|
10
|
-
*
|
|
100
|
+
* HTML id attribute for the select input.
|
|
11
101
|
* @default 'select'
|
|
12
102
|
*/
|
|
13
103
|
id: _angular_core.InputSignal<string>;
|
|
14
104
|
/**
|
|
15
|
-
* @property {InputSignal<FormControl>} control
|
|
16
|
-
* @description
|
|
17
105
|
* External FormControl used to read/set the input value.
|
|
18
|
-
* If not provided, an internal FormControl is created.
|
|
19
106
|
*/
|
|
20
107
|
control: _angular_core.InputSignal<FormControl<any> | undefined>;
|
|
21
108
|
/**
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* Array of available options displayed in the dropdown.
|
|
109
|
+
* Static options for synchronous mode.
|
|
110
|
+
* If provided, they take precedence over the manager's async stream.
|
|
25
111
|
*/
|
|
26
112
|
options: _angular_core.InputSignal<T[]>;
|
|
27
113
|
/**
|
|
28
|
-
*
|
|
29
|
-
|
|
114
|
+
* Data source for asynchronous infinite scroll mode.
|
|
115
|
+
*/
|
|
116
|
+
dataSource: _angular_core.ModelSignal<SelectDataSource<T> | undefined>;
|
|
117
|
+
/**
|
|
30
118
|
* Name of the property used to display the text of each option.
|
|
31
|
-
*
|
|
32
119
|
* @default 'label'
|
|
33
120
|
*/
|
|
34
121
|
optionLabel: _angular_core.InputSignal<string>;
|
|
35
122
|
/**
|
|
36
|
-
* @property {string} label
|
|
37
|
-
* @description
|
|
38
123
|
* Floating label displayed above the select input.
|
|
39
124
|
*/
|
|
40
125
|
label: _angular_core.InputSignal<string>;
|
|
41
126
|
/**
|
|
42
|
-
* @property {boolean} showClear
|
|
43
|
-
* @description
|
|
44
127
|
* Enables the clear button to remove the current selection.
|
|
45
|
-
*
|
|
46
128
|
* @default true
|
|
47
129
|
*/
|
|
48
130
|
showClear: _angular_core.InputSignal<boolean>;
|
|
49
131
|
/**
|
|
50
|
-
* @property {T | null} value
|
|
51
|
-
* @description
|
|
52
|
-
* Internal selected value. Synced with Angular forms and the model signal.
|
|
53
|
-
*
|
|
54
|
-
* @internal
|
|
55
|
-
*/
|
|
56
|
-
value: T | null;
|
|
57
|
-
/**
|
|
58
|
-
* @property {boolean} disabled
|
|
59
|
-
* @description
|
|
60
132
|
* Determines whether the select field is disabled.
|
|
61
|
-
*
|
|
62
133
|
* @default false
|
|
63
134
|
*/
|
|
64
135
|
disabled: _angular_core.InputSignal<boolean>;
|
|
65
|
-
internalDisabled: _angular_core.WritableSignal<boolean>;
|
|
66
136
|
/**
|
|
67
|
-
* @property {InputSignal<string>} errorMessage
|
|
68
|
-
* @description
|
|
69
137
|
* Message to display when the control is invalid and touched.
|
|
70
138
|
*/
|
|
71
139
|
errorMessage: _angular_core.InputSignal<string>;
|
|
72
140
|
/**
|
|
73
|
-
* @property {InputSignal<string>} hint
|
|
74
|
-
* @description
|
|
75
141
|
* Hint text to display below the input.
|
|
76
142
|
*/
|
|
77
143
|
hint: _angular_core.InputSignal<string>;
|
|
78
144
|
/**
|
|
79
|
-
*
|
|
80
|
-
* @
|
|
145
|
+
* Enables filtering/search input.
|
|
146
|
+
* @default false
|
|
147
|
+
*/
|
|
148
|
+
filter: _angular_core.InputSignal<boolean>;
|
|
149
|
+
/**
|
|
150
|
+
* Placeholder text displayed when no value is selected.
|
|
151
|
+
* @default 'Select an option'
|
|
152
|
+
*/
|
|
153
|
+
placeholder: _angular_core.InputSignal<string>;
|
|
154
|
+
/**
|
|
155
|
+
* Loading state for the dropdown.
|
|
156
|
+
*/
|
|
157
|
+
loading: _angular_core.InputSignal<boolean>;
|
|
158
|
+
/**
|
|
159
|
+
* Additional parameters for the async data source.
|
|
160
|
+
* Useful for sending context like categoryId, parentId, etc.
|
|
161
|
+
*/
|
|
162
|
+
fetchParams: _angular_core.InputSignal<Record<string, unknown>>;
|
|
163
|
+
/**
|
|
164
|
+
* Field name to sort by in the async data source.
|
|
165
|
+
*/
|
|
166
|
+
sortField: _angular_core.InputSignal<string | undefined>;
|
|
167
|
+
/**
|
|
168
|
+
* Order to sort by (1 for ASC, -1 for DESC).
|
|
169
|
+
*/
|
|
170
|
+
sortOrder: _angular_core.InputSignal<number | undefined>;
|
|
171
|
+
/**
|
|
172
|
+
* Internal writable signal for the disabled state.
|
|
173
|
+
*/
|
|
174
|
+
internalDisabled: _angular_core.WritableSignal<boolean>;
|
|
175
|
+
/**
|
|
81
176
|
* Two-way binding model using Angular signals.
|
|
82
|
-
*
|
|
177
|
+
* This is the single source of truth for the selected value.
|
|
178
|
+
*/
|
|
179
|
+
model: _angular_core.ModelSignal<T | null>;
|
|
180
|
+
/**
|
|
181
|
+
* Text to display when there are no options.
|
|
83
182
|
*/
|
|
84
|
-
|
|
183
|
+
emptyMessage: _angular_core.InputSignal<string>;
|
|
184
|
+
/**
|
|
185
|
+
* Text to display when no results match the filter.
|
|
186
|
+
*/
|
|
187
|
+
emptyFilterMessage: _angular_core.InputSignal<string>;
|
|
85
188
|
/**
|
|
86
|
-
* @event modelChange
|
|
87
|
-
* @description
|
|
88
189
|
* Emits whenever the value changes.
|
|
89
|
-
* Payload: the selected item of type `T` or `null`.
|
|
90
|
-
*
|
|
91
|
-
* @example
|
|
92
|
-
* <tk-select (modelChange)="onChange($event)"></tk-select>
|
|
93
190
|
*/
|
|
94
191
|
modelChange: _angular_core.OutputEmitterRef<T | null>;
|
|
95
|
-
private onChangeFn;
|
|
96
|
-
private onTouchedFn;
|
|
97
|
-
private readonly init;
|
|
98
192
|
/**
|
|
99
|
-
*
|
|
100
|
-
* @description
|
|
101
|
-
* Synchronizes the disabled input signal with the internal disabled state.
|
|
193
|
+
* Emits the filter search term.
|
|
102
194
|
*/
|
|
103
|
-
|
|
195
|
+
filterChange: _angular_core.OutputEmitterRef<{
|
|
196
|
+
filter: string | null;
|
|
197
|
+
}>;
|
|
198
|
+
private onChangeFn;
|
|
199
|
+
private onTouchedFn;
|
|
200
|
+
private scrollHandler;
|
|
201
|
+
private lastListContainer;
|
|
202
|
+
constructor();
|
|
104
203
|
/**
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
* Ensures consistency between Angular Forms, PrimeNG UI events, and Signals.
|
|
204
|
+
* Displays the items from the manager if provided, otherwise the static options.
|
|
205
|
+
* Includes a "Ghost Option" logic to ensure the selected item is always visible
|
|
206
|
+
* even if it's not in the current loaded chunk of data.
|
|
109
207
|
*/
|
|
110
|
-
|
|
208
|
+
get items(): T[];
|
|
111
209
|
/**
|
|
112
|
-
*
|
|
113
|
-
* @
|
|
114
|
-
* Receives value updates from Angular Forms and writes them into the component.
|
|
115
|
-
*
|
|
116
|
-
* @param {T | null} value - New value from the forms API.
|
|
210
|
+
* Receives value updates from Angular Forms API.
|
|
211
|
+
* @param value - New value from the forms API.
|
|
117
212
|
*/
|
|
118
213
|
writeValue(value: T | null): void;
|
|
119
214
|
/**
|
|
120
|
-
* @method registerOnChange
|
|
121
|
-
* @description
|
|
122
215
|
* Registers a callback that is invoked when the component's value changes.
|
|
216
|
+
* @param fn - The callback function.
|
|
123
217
|
*/
|
|
124
218
|
registerOnChange(fn: (value: T | null) => void): void;
|
|
125
219
|
/**
|
|
126
|
-
* @method registerOnTouched
|
|
127
|
-
* @description
|
|
128
220
|
* Registers a callback invoked when the component is touched.
|
|
221
|
+
* @param fn - The callback function.
|
|
129
222
|
*/
|
|
130
223
|
registerOnTouched(fn: () => void): void;
|
|
131
224
|
/**
|
|
132
|
-
*
|
|
133
|
-
* @
|
|
134
|
-
* Updates the disabled state of the select control.
|
|
135
|
-
*
|
|
136
|
-
* @param {boolean} isDisabled - Whether the component should be disabled.
|
|
225
|
+
* Updates the disabled state of the control.
|
|
226
|
+
* @param isDisabled - Whether the component should be disabled.
|
|
137
227
|
*/
|
|
138
228
|
setDisabledState(isDisabled: boolean): void;
|
|
139
229
|
/**
|
|
140
|
-
*
|
|
141
|
-
* @
|
|
142
|
-
* Handles the selection event emitted by the PrimeNG Select component.
|
|
143
|
-
* Updates Angular Forms, Signals, and emits the modelChange event.
|
|
144
|
-
*
|
|
145
|
-
* @param event - Event containing the `value` of the selected option.
|
|
230
|
+
* Handles UI changes from the PrimeNG Select.
|
|
231
|
+
* @param event - Event containing the selected value.
|
|
146
232
|
*/
|
|
147
233
|
handleChange(event: {
|
|
148
234
|
value: T | null;
|
|
149
235
|
}): void;
|
|
236
|
+
/**
|
|
237
|
+
* Handles filter input changes and notifies the manager.
|
|
238
|
+
* @param event - Filter event containing the search term.
|
|
239
|
+
*/
|
|
240
|
+
handleFilter(event: {
|
|
241
|
+
filter: string | null;
|
|
242
|
+
}): void;
|
|
243
|
+
/**
|
|
244
|
+
* Returns the underlying FormControl for validation state checking.
|
|
245
|
+
*/
|
|
150
246
|
get effectiveControl(): FormControl | null;
|
|
247
|
+
/**
|
|
248
|
+
* Adds a scroll listener to the PrimeNG select list container when the panel opens.
|
|
249
|
+
*/
|
|
250
|
+
onPanelShow(): void;
|
|
251
|
+
/**
|
|
252
|
+
* Cleans up state, removes listeners and resets the manager when the panel closes.
|
|
253
|
+
*/
|
|
254
|
+
onPanelHide(): void;
|
|
255
|
+
/**
|
|
256
|
+
* Cleans up listeners on component destruction.
|
|
257
|
+
*/
|
|
258
|
+
ngOnDestroy(): void;
|
|
259
|
+
/**
|
|
260
|
+
* Safely removes the scroll event listener.
|
|
261
|
+
*/
|
|
262
|
+
private removeScrollListener;
|
|
263
|
+
/**
|
|
264
|
+
* Detects if the user has reached the bottom of the list.
|
|
265
|
+
*/
|
|
266
|
+
private handleScroll;
|
|
151
267
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SelectComponent<any>, never>;
|
|
152
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SelectComponent<any>, "tk-select", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "control": { "alias": "control"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "optionLabel": { "alias": "optionLabel"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "showClear": { "alias": "showClear"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "model": { "alias": "model"; "required": false; "isSignal": true; }; }, { "model": "modelChange"; "modelChange": "modelChange"; }, never, never, true, never>;
|
|
268
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SelectComponent<any>, "tk-select", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "control": { "alias": "control"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "dataSource": { "alias": "dataSource"; "required": false; "isSignal": true; }; "optionLabel": { "alias": "optionLabel"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "showClear": { "alias": "showClear"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "filter": { "alias": "filter"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "fetchParams": { "alias": "fetchParams"; "required": false; "isSignal": true; }; "sortField": { "alias": "sortField"; "required": false; "isSignal": true; }; "sortOrder": { "alias": "sortOrder"; "required": false; "isSignal": true; }; "model": { "alias": "model"; "required": false; "isSignal": true; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; "isSignal": true; }; "emptyFilterMessage": { "alias": "emptyFilterMessage"; "required": false; "isSignal": true; }; }, { "dataSource": "dataSourceChange"; "model": "modelChange"; "modelChange": "modelChange"; "filterChange": "filterChange"; }, never, never, true, never>;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
declare class IntersectionDirective implements OnInit, OnDestroy {
|
|
272
|
+
/**
|
|
273
|
+
* Emits when the element enters the viewport.
|
|
274
|
+
*/
|
|
275
|
+
intersect: _angular_core.OutputEmitterRef<void>;
|
|
276
|
+
private readonly element;
|
|
277
|
+
private observer?;
|
|
278
|
+
constructor();
|
|
279
|
+
/**
|
|
280
|
+
* Initializes the Intersection Observer on component mount.
|
|
281
|
+
*/
|
|
282
|
+
ngOnInit(): void;
|
|
283
|
+
/**
|
|
284
|
+
* Cleans up the observer to prevent memory leaks.
|
|
285
|
+
*/
|
|
286
|
+
ngOnDestroy(): void;
|
|
287
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<IntersectionDirective, never>;
|
|
288
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<IntersectionDirective, "[tkIntersection]", never, {}, { "intersect": "intersect"; }, never, never, true, never>;
|
|
153
289
|
}
|
|
154
290
|
|
|
155
|
-
export { SelectComponent };
|
|
291
|
+
export { IntersectionDirective, SelectComponent, TkSelectManager };
|
|
292
|
+
export type { SelectDataSource, TkSelectRequest };
|
|
@@ -2,7 +2,7 @@ import { ValidatorFn } from '@angular/forms';
|
|
|
2
2
|
import * as _angular_core from '@angular/core';
|
|
3
3
|
import { ComponentRef } from '@angular/core';
|
|
4
4
|
import { Preset } from '@primeuix/themes/types';
|
|
5
|
-
import { PartialObserver, Subscription, Subject } from 'rxjs';
|
|
5
|
+
import { Observable, PartialObserver, Subscription, Subject } from 'rxjs';
|
|
6
6
|
|
|
7
7
|
interface Option {
|
|
8
8
|
ViewValue: string;
|
|
@@ -167,7 +167,7 @@ interface TkCanClose {
|
|
|
167
167
|
* Function or Signal indicating if the component can be closed.
|
|
168
168
|
* When returning false, the overlay will prevent closure.
|
|
169
169
|
*/
|
|
170
|
-
canClose?: () => boolean
|
|
170
|
+
canClose?: () => boolean | Promise<boolean> | Observable<boolean>;
|
|
171
171
|
/**
|
|
172
172
|
* Optional hook called when a user attempt to close the overlay is blocked
|
|
173
173
|
* by the canClose() returning false.
|
|
@@ -176,9 +176,8 @@ interface TkCanClose {
|
|
|
176
176
|
}
|
|
177
177
|
/**
|
|
178
178
|
* Type definition for the overlay closing interceptor.
|
|
179
|
-
* It must be a synchronous function returning the "allowed" state.
|
|
180
179
|
*/
|
|
181
|
-
type TkCloseInterceptor = () => boolean
|
|
180
|
+
type TkCloseInterceptor = () => boolean | Promise<boolean> | Observable<boolean>;
|
|
182
181
|
|
|
183
182
|
/**
|
|
184
183
|
* Reference to a dialog/drawer opened via a service.
|