@bootkit/ng0 0.0.0-alpha.2 → 0.0.0-alpha.20
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/common/index.d.ts +118 -6
- package/components/accordion/index.d.ts +1 -1
- package/components/backdrop/index.d.ts +12 -0
- package/components/button/index.d.ts +48 -0
- package/components/card/index.d.ts +27 -0
- package/components/code/index.d.ts +35 -0
- package/components/confirmation/index.d.ts +66 -0
- package/components/form-field/index.d.ts +72 -0
- package/components/list/index.d.ts +127 -0
- package/components/modal/index.d.ts +22 -4
- package/components/nav/index.d.ts +23 -19
- package/components/pagination/index.d.ts +35 -9
- package/components/popover/index.d.ts +1 -1
- package/components/select/index.d.ts +120 -0
- package/components/sidenav/index.d.ts +59 -0
- package/components/stepper/index.d.ts +26 -0
- package/components/table/index.d.ts +273 -0
- package/components/toast/index.d.ts +1 -1
- package/components/tooltip/index.d.ts +1 -1
- package/components/vertical-menu/index.d.ts +61 -0
- package/data/index.d.ts +258 -46
- package/date/index.d.ts +34 -0
- package/fesm2022/bootkit-ng0-common.mjs +89 -11
- package/fesm2022/bootkit-ng0-common.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-accordion.mjs +13 -13
- package/fesm2022/bootkit-ng0-components-accordion.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-backdrop.mjs +46 -0
- package/fesm2022/bootkit-ng0-components-backdrop.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-components-button.mjs +119 -0
- package/fesm2022/bootkit-ng0-components-button.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-components-card.mjs +62 -0
- package/fesm2022/bootkit-ng0-components-card.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-components-code.mjs +70 -0
- package/fesm2022/bootkit-ng0-components-code.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-components-collapse.mjs +14 -14
- package/fesm2022/bootkit-ng0-components-collapse.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-confirmation.mjs +167 -0
- package/fesm2022/bootkit-ng0-components-confirmation.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-components-form-field.mjs +147 -0
- package/fesm2022/bootkit-ng0-components-form-field.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-components-list.mjs +331 -0
- package/fesm2022/bootkit-ng0-components-list.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-components-modal.mjs +40 -23
- package/fesm2022/bootkit-ng0-components-modal.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-nav.mjs +58 -59
- package/fesm2022/bootkit-ng0-components-nav.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-offcanvas.mjs +9 -9
- package/fesm2022/bootkit-ng0-components-offcanvas.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-overlay.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-pagination.mjs +58 -23
- package/fesm2022/bootkit-ng0-components-pagination.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-popover.mjs +10 -10
- package/fesm2022/bootkit-ng0-components-popover.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-select.mjs +394 -0
- package/fesm2022/bootkit-ng0-components-select.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-components-sidenav.mjs +153 -0
- package/fesm2022/bootkit-ng0-components-sidenav.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-components-stepper.mjs +91 -0
- package/fesm2022/bootkit-ng0-components-stepper.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-components-table.mjs +461 -0
- package/fesm2022/bootkit-ng0-components-table.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-components-toast.mjs +7 -7
- package/fesm2022/bootkit-ng0-components-toast.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-tooltip.mjs +8 -8
- package/fesm2022/bootkit-ng0-components-tooltip.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-vertical-menu.mjs +161 -0
- package/fesm2022/bootkit-ng0-components-vertical-menu.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-data.mjs +291 -90
- package/fesm2022/bootkit-ng0-data.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-date.mjs +50 -0
- package/fesm2022/bootkit-ng0-date.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-file.mjs +50 -0
- package/fesm2022/bootkit-ng0-file.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-form.mjs +512 -0
- package/fesm2022/bootkit-ng0-form.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-http.mjs +225 -179
- package/fesm2022/bootkit-ng0-http.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-localization-locales.mjs +115 -0
- package/fesm2022/bootkit-ng0-localization-locales.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-localization.mjs +481 -0
- package/fesm2022/bootkit-ng0-localization.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-platform-browser.mjs +51 -0
- package/fesm2022/bootkit-ng0-platform-browser.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-script.mjs +59 -0
- package/fesm2022/bootkit-ng0-script.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-security.mjs +17 -15
- package/fesm2022/bootkit-ng0-security.mjs.map +1 -1
- package/file/index.d.ts +22 -0
- package/form/index.d.ts +126 -0
- package/http/index.d.ts +141 -40
- package/localization/index.d.ts +305 -0
- package/localization/locales/index.d.ts +7 -0
- package/package.json +86 -10
- package/platform/browser/index.d.ts +22 -0
- package/script/index.d.ts +27 -0
- package/security/index.d.ts +3 -9
package/common/index.d.ts
CHANGED
|
@@ -1,12 +1,124 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
2
3
|
|
|
3
|
-
type Placement = 'start' | 'end' | 'top' | 'bottom';
|
|
4
|
-
type Alignment = 'start' | 'center' | 'end';
|
|
5
4
|
declare const RTL: InjectionToken<boolean>;
|
|
5
|
+
/**
|
|
6
|
+
* List item interface.
|
|
7
|
+
*/
|
|
8
|
+
interface SelectOption {
|
|
9
|
+
id: string;
|
|
10
|
+
value: any;
|
|
11
|
+
show?: boolean;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Represents a claim object that can contain multiple claims.
|
|
16
|
+
*/
|
|
17
|
+
interface ClaimObject {
|
|
18
|
+
all?: string[];
|
|
19
|
+
any?: string[];
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Represents a claim that can be a string or an object containing claims.
|
|
23
|
+
* This is useful for defining permissions or roles in a security context.
|
|
24
|
+
* It allows for both simple string claims and more complex claims that can include multiple values.
|
|
25
|
+
* For example:
|
|
26
|
+
* - A simple claim: 'admin'
|
|
27
|
+
* - A complex claim: { all: ['read', 'write']'] }
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
type ClaimLike = string | ClaimObject;
|
|
6
31
|
|
|
7
|
-
|
|
8
|
-
|
|
32
|
+
type Placement = 'start' | 'end' | 'top' | 'bottom';
|
|
33
|
+
type Alignment = 'start' | 'center' | 'end';
|
|
34
|
+
/**
|
|
35
|
+
* Flips the placement direction.
|
|
36
|
+
* @param placement The placement direction to flip.
|
|
37
|
+
* @returns The flipped placement direction.
|
|
38
|
+
*/
|
|
9
39
|
declare function flipPlacement(placement: Placement): "start" | "end" | "top" | "bottom";
|
|
10
40
|
|
|
11
|
-
|
|
12
|
-
|
|
41
|
+
/**
|
|
42
|
+
* Formats a string by replacing placeholders with the provided arguments.
|
|
43
|
+
* @param str The string to format, containing placeholders in the form of {0}, {1}, etc.
|
|
44
|
+
* @param args The values to replace the placeholders with.
|
|
45
|
+
* @returns The formatted string.
|
|
46
|
+
*/
|
|
47
|
+
declare function formatString(str: string, ...args: any[]): string;
|
|
48
|
+
|
|
49
|
+
/** Menu item */
|
|
50
|
+
interface MenuItem {
|
|
51
|
+
type?: string;
|
|
52
|
+
id?: any;
|
|
53
|
+
disabled?: boolean;
|
|
54
|
+
active?: boolean;
|
|
55
|
+
show?: boolean;
|
|
56
|
+
claim?: ClaimLike;
|
|
57
|
+
parent?: MenuItem;
|
|
58
|
+
text?: string;
|
|
59
|
+
expanded?: boolean;
|
|
60
|
+
icon?: string;
|
|
61
|
+
children?: MenuItem[];
|
|
62
|
+
routerLink?: string | string[];
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Converts a value to an Observable.
|
|
67
|
+
* If the value is already an Observable, it returns it directly.
|
|
68
|
+
* If the value is a Promise, it converts it to an Observable.
|
|
69
|
+
* If the value is neither, it wraps it in an Observable using `of`.
|
|
70
|
+
* @param value The value to convert.
|
|
71
|
+
* @returns An Observable that emits the value.
|
|
72
|
+
*/
|
|
73
|
+
declare function toObservable<T>(value: T | Observable<T> | Promise<T>): Observable<T>;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Creates an array of numbers within a specified range.
|
|
77
|
+
* @param start The starting number of the range (inclusive).
|
|
78
|
+
* @param end The ending number of the range (inclusive).
|
|
79
|
+
* @returns An array of numbers within the specified range.
|
|
80
|
+
*/
|
|
81
|
+
declare function numberArray(start: number, end: number): number[];
|
|
82
|
+
|
|
83
|
+
declare function getEnumValues(enumClass: Record<string, string | number>): Array<string | number>;
|
|
84
|
+
|
|
85
|
+
declare abstract class _IdGenerator {
|
|
86
|
+
private static _idCounter;
|
|
87
|
+
static next(): number;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Type definition for an ID generator function.
|
|
91
|
+
*/
|
|
92
|
+
type IdGenerator = (param?: any) => string;
|
|
93
|
+
/**
|
|
94
|
+
* Creates a sequential ID generator function with an optional prefix.
|
|
95
|
+
* @param prefix Optional prefix for the generated IDs.
|
|
96
|
+
* @returns A function that generates sequential IDs with the given prefix.
|
|
97
|
+
*/
|
|
98
|
+
declare function sequentialIdGenerator(prefix?: string): IdGenerator;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* CSS class type which can be a string, array of strings, set of strings, or an object with class names as keys.
|
|
102
|
+
*/
|
|
103
|
+
type CssClass = string | string[] | Set<string> | {
|
|
104
|
+
[klass: string]: any;
|
|
105
|
+
} | null | undefined;
|
|
106
|
+
/**
|
|
107
|
+
* A function that takes an item and returns a CssClass.
|
|
108
|
+
* @param item The item to get the CSS class for.
|
|
109
|
+
* @returns The CSS class for the item.
|
|
110
|
+
*/
|
|
111
|
+
type CssClassGetter = (item: any) => CssClass;
|
|
112
|
+
/**
|
|
113
|
+
* A type that represents a CSS class or a function that returns a CSS class.
|
|
114
|
+
*/
|
|
115
|
+
type CssClassLike = CssClass | CssClassGetter | null | undefined;
|
|
116
|
+
/**
|
|
117
|
+
* Converts a CssClassLike to a CssClassGetter function.
|
|
118
|
+
* @param v The CssClassLike to convert.
|
|
119
|
+
* @returns A function that returns the desired CSS class.
|
|
120
|
+
*/
|
|
121
|
+
declare function CssClassAttribute(v: CssClassLike): CssClassGetter;
|
|
122
|
+
|
|
123
|
+
export { CssClassAttribute, RTL, _IdGenerator, flipPlacement, formatString, getEnumValues, numberArray, sequentialIdGenerator, toObservable };
|
|
124
|
+
export type { Alignment, ClaimLike, ClaimObject, CssClass, CssClassGetter, CssClassLike, IdGenerator, MenuItem, Placement, SelectOption };
|
|
@@ -5,7 +5,7 @@ declare class AccordionItemComponent {
|
|
|
5
5
|
private _element;
|
|
6
6
|
private _renderer;
|
|
7
7
|
private _accordion;
|
|
8
|
-
header: i0.InputSignal<string>;
|
|
8
|
+
header: i0.InputSignal<string | undefined>;
|
|
9
9
|
collapsed: i0.ModelSignal<boolean>;
|
|
10
10
|
constructor(_element: ElementRef, _renderer: Renderer2, _accordion: AccordionComponent);
|
|
11
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<AccordionItemComponent, never>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* This component is used to display a backdrop behind another component.
|
|
5
|
+
*/
|
|
6
|
+
declare class BackdropComponent {
|
|
7
|
+
readonly fixed: i0.WritableSignal<boolean>;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BackdropComponent, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BackdropComponent, "ng0-backdrop", never, {}, {}, never, never, true, never>;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { BackdropComponent };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { OnInit, OnDestroy, ElementRef, Renderer2, DestroyRef } from '@angular/core';
|
|
3
|
+
import { HttpService } from '@bootkit/ng0/http';
|
|
4
|
+
|
|
5
|
+
declare class ButtonDirective implements OnInit, OnDestroy {
|
|
6
|
+
private _element;
|
|
7
|
+
private _renderer;
|
|
8
|
+
private _http;
|
|
9
|
+
private _destroyRef;
|
|
10
|
+
private _loadingElement;
|
|
11
|
+
/**
|
|
12
|
+
* The IDs of the HTTP requests that this button listens to.
|
|
13
|
+
* If one of these requests is in progress, it will show a loading indicator or will be disabled based on 'showLoading' and 'disableOnLoading' properties.
|
|
14
|
+
*/
|
|
15
|
+
request: i0.InputSignal<string | string[] | undefined>;
|
|
16
|
+
/**
|
|
17
|
+
* Whether the button is disabled or not.
|
|
18
|
+
*/
|
|
19
|
+
disabled: i0.ModelSignal<boolean>;
|
|
20
|
+
/**
|
|
21
|
+
* Whether to wait for the HTTP response before enabling the button again.
|
|
22
|
+
* If true, the button will remain disabled until the HTTP request completes.
|
|
23
|
+
* This is useful for preventing multiple clicks while waiting for a response.
|
|
24
|
+
* Default is true.
|
|
25
|
+
*/
|
|
26
|
+
disableDuringRequest: i0.InputSignalWithTransform<boolean, unknown>;
|
|
27
|
+
/**
|
|
28
|
+
* Whether to show a loading indicator when the HTTP request is in progress.
|
|
29
|
+
* If true, a loading spinner will be displayed on the button while the request is being processed.
|
|
30
|
+
* Default is true.
|
|
31
|
+
*/
|
|
32
|
+
loadingIndicator: i0.InputSignalWithTransform<boolean, unknown>;
|
|
33
|
+
constructor(_element: ElementRef, _renderer: Renderer2, _http: HttpService, _destroyRef: DestroyRef);
|
|
34
|
+
ngOnInit(): void;
|
|
35
|
+
private _showLoading;
|
|
36
|
+
private _hideLoading;
|
|
37
|
+
ngOnDestroy(): void;
|
|
38
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ButtonDirective, never>;
|
|
39
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ButtonDirective, "button[ng0Button], a[ng0Button], input[type=button][ng0Button], input[type=submit][ng0Button], input[type=reset][ng0Button]", ["ng0Button"], { "request": { "alias": "request"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "disableDuringRequest": { "alias": "disableDuringRequest"; "required": false; "isSignal": true; }; "loadingIndicator": { "alias": "loadingIndicator"; "required": false; "isSignal": true; }; }, { "disabled": "disabledChange"; }, never, never, true, never>;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
declare class ButtonModule {
|
|
43
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ButtonModule, never>;
|
|
44
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ButtonModule, never, [typeof ButtonDirective], [typeof ButtonDirective]>;
|
|
45
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ButtonModule>;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { ButtonDirective, ButtonModule };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { ElementRef, Renderer2 } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
declare class CardComponent {
|
|
5
|
+
private _element;
|
|
6
|
+
private _renderer;
|
|
7
|
+
header: i0.InputSignal<string | undefined>;
|
|
8
|
+
constructor(_element: ElementRef, _renderer: Renderer2);
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CardComponent, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CardComponent, "ng0-card", ["ng0Card"], { "header": { "alias": "header"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
declare class CardHeaderComponent {
|
|
14
|
+
private _element;
|
|
15
|
+
private _renderer;
|
|
16
|
+
constructor(_element: ElementRef, _renderer: Renderer2);
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CardHeaderComponent, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CardHeaderComponent, "ng0-card-header", ["ng0CardHeader"], {}, {}, never, ["*"], true, never>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare class CardModule {
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CardModule, never>;
|
|
23
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<CardModule, never, [typeof CardComponent, typeof CardHeaderComponent], [typeof CardComponent, typeof CardHeaderComponent]>;
|
|
24
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<CardModule>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { CardComponent, CardHeaderComponent, CardModule };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import * as _angular_platform_browser from '@angular/platform-browser';
|
|
3
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
4
|
+
|
|
5
|
+
type CodeFormatterFunc = (code: string) => string;
|
|
6
|
+
declare class CodeFormatter {
|
|
7
|
+
readonly name: string;
|
|
8
|
+
readonly format: CodeFormatterFunc;
|
|
9
|
+
constructor(name: string, format: CodeFormatterFunc);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare class CodeFormatters {
|
|
13
|
+
private _formatters;
|
|
14
|
+
constructor();
|
|
15
|
+
add(name: string, func: CodeFormatterFunc): CodeFormatter;
|
|
16
|
+
find(name: string): CodeFormatter | undefined;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CodeFormatters, never>;
|
|
18
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CodeFormatters>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare class CodeComponent {
|
|
22
|
+
private formatters;
|
|
23
|
+
private domSanitizer;
|
|
24
|
+
/** Code formatter name */
|
|
25
|
+
formatter: i0.InputSignal<string>;
|
|
26
|
+
/** Code */
|
|
27
|
+
code: i0.InputSignal<string>;
|
|
28
|
+
protected _safeHtml: i0.Signal<_angular_platform_browser.SafeHtml | undefined>;
|
|
29
|
+
constructor(formatters: CodeFormatters, domSanitizer: DomSanitizer);
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CodeComponent, never>;
|
|
31
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CodeComponent, "ng0-code", ["ng0Code"], { "formatter": { "alias": "formatter"; "required": true; "isSignal": true; }; "code": { "alias": "code"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { CodeComponent, CodeFormatter, CodeFormatters };
|
|
35
|
+
export type { CodeFormatterFunc };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { OnInit, EventEmitter } from '@angular/core';
|
|
3
|
+
import * as rxjs from 'rxjs';
|
|
4
|
+
import { DialogRef, Dialog } from '@angular/cdk/dialog';
|
|
5
|
+
|
|
6
|
+
interface ConfirmationConfig {
|
|
7
|
+
message?: string;
|
|
8
|
+
title?: string;
|
|
9
|
+
icon?: 'loading' | 'check';
|
|
10
|
+
/** automaticaly close confirmation after confirmation/cancelation. default is true */
|
|
11
|
+
autoClose?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare class ConfirmationRef {
|
|
14
|
+
private _dialogRef;
|
|
15
|
+
private _config;
|
|
16
|
+
private _configChangeSubject;
|
|
17
|
+
configChanged: rxjs.Observable<ConfirmationConfig>;
|
|
18
|
+
private _confirmSubject;
|
|
19
|
+
confirmed: rxjs.Observable<unknown>;
|
|
20
|
+
private _cancelSubject;
|
|
21
|
+
canceled: rxjs.Observable<unknown>;
|
|
22
|
+
constructor(_dialogRef: DialogRef<any, any>, _config: ConfirmationConfig);
|
|
23
|
+
confirm(): void;
|
|
24
|
+
cancel(): void;
|
|
25
|
+
close(): void;
|
|
26
|
+
update(config: ConfirmationConfig): void;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare class ConfirmationComponent implements OnInit {
|
|
30
|
+
confirmationRef: ConfirmationRef;
|
|
31
|
+
_config?: ConfirmationConfig;
|
|
32
|
+
_clicked: boolean;
|
|
33
|
+
constructor();
|
|
34
|
+
_onClick(result: boolean): void;
|
|
35
|
+
ngOnInit(): void;
|
|
36
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmationComponent, never>;
|
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ConfirmationComponent, "ng0-confirmation", ["ng0Confirmation"], {}, {}, never, never, true, never>;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
declare class ConfirmationService {
|
|
41
|
+
private dialog;
|
|
42
|
+
constructor(dialog: Dialog);
|
|
43
|
+
open(config?: ConfirmationConfig): ConfirmationRef;
|
|
44
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmationService, never>;
|
|
45
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ConfirmationService>;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
declare class ConfirmationDirective {
|
|
49
|
+
private confirmationService;
|
|
50
|
+
config?: ConfirmationConfig;
|
|
51
|
+
confirm: EventEmitter<ConfirmationRef>;
|
|
52
|
+
cancel: EventEmitter<ConfirmationRef>;
|
|
53
|
+
constructor(confirmationService: ConfirmationService);
|
|
54
|
+
private _onClick;
|
|
55
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmationDirective, never>;
|
|
56
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ConfirmationDirective, "[ng0Confirmation]", ["ng0Confirmation"], { "config": { "alias": "config"; "required": false; }; }, { "confirm": "confirm"; "cancel": "cancel"; }, never, never, true, never>;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
declare class ConfirmationModule {
|
|
60
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmationModule, never>;
|
|
61
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ConfirmationModule, never, [typeof ConfirmationComponent, typeof ConfirmationDirective], [typeof ConfirmationComponent, typeof ConfirmationDirective]>;
|
|
62
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ConfirmationModule>;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export { ConfirmationComponent, ConfirmationDirective, ConfirmationModule, ConfirmationRef, ConfirmationService };
|
|
66
|
+
export type { ConfirmationConfig };
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { OnInit, AfterContentInit, OnDestroy, Renderer2, DestroyRef } from '@angular/core';
|
|
3
|
+
import { NgForm } from '@angular/forms';
|
|
4
|
+
import { LocalizationService } from '@bootkit/ng0/localization';
|
|
5
|
+
import * as i1 from '@angular/common';
|
|
6
|
+
|
|
7
|
+
declare class FormFieldComponent implements OnInit, AfterContentInit, OnDestroy {
|
|
8
|
+
private _renderer;
|
|
9
|
+
private _destroyRef;
|
|
10
|
+
private _form;
|
|
11
|
+
private _ls;
|
|
12
|
+
/**
|
|
13
|
+
* The label text for the form field.
|
|
14
|
+
*/
|
|
15
|
+
label: _angular_core.InputSignal<string | undefined>;
|
|
16
|
+
/**
|
|
17
|
+
* The hint text to display below the form field.
|
|
18
|
+
* This is typically used to provide additional information or instructions to the user.
|
|
19
|
+
*/
|
|
20
|
+
hint: _angular_core.InputSignal<string | undefined>;
|
|
21
|
+
/**
|
|
22
|
+
* If true, the form-field will show validation errors.
|
|
23
|
+
* This is useful for displaying validation messages when the form control is invalid.
|
|
24
|
+
*/
|
|
25
|
+
showErrors: _angular_core.InputSignal<boolean>;
|
|
26
|
+
/**
|
|
27
|
+
* If true, the form-field will show a red asterisk for required fields.
|
|
28
|
+
* This is only a visual indicator and does not enforce validation.
|
|
29
|
+
*/
|
|
30
|
+
showRequiredIndicator: _angular_core.InputSignal<boolean>;
|
|
31
|
+
/**
|
|
32
|
+
* If true, the form-field will show subscripts (e.g. hints, errors) for the field label.
|
|
33
|
+
* This is useful for displaying additional information or validation messages.
|
|
34
|
+
*/
|
|
35
|
+
showSubscripts: _angular_core.InputSignal<boolean>;
|
|
36
|
+
/**
|
|
37
|
+
* If true, the form-field will be rendered inside a ".input-group" element.
|
|
38
|
+
*/
|
|
39
|
+
inputGroup: _angular_core.InputSignal<boolean>;
|
|
40
|
+
/**
|
|
41
|
+
* Returns the first localized error of the control
|
|
42
|
+
*/
|
|
43
|
+
get errorText(): string | undefined;
|
|
44
|
+
/** Reports whether the control is touched. */
|
|
45
|
+
get touched(): boolean | null | undefined;
|
|
46
|
+
/** Reports whether the control is dirty. */
|
|
47
|
+
get dirty(): boolean | null | undefined;
|
|
48
|
+
/** Returns true if this form-field is required, otherwise returns false. */
|
|
49
|
+
get isRequired(): boolean;
|
|
50
|
+
private _onFocusOut;
|
|
51
|
+
private _ngControl?;
|
|
52
|
+
private _ngControlElement?;
|
|
53
|
+
private _isRequired;
|
|
54
|
+
private _locale?;
|
|
55
|
+
private _errorText?;
|
|
56
|
+
constructor(_renderer: Renderer2, _destroyRef: DestroyRef, _form: NgForm, _ls: LocalizationService);
|
|
57
|
+
ngOnInit(): void;
|
|
58
|
+
ngAfterContentInit(): void;
|
|
59
|
+
private _validate;
|
|
60
|
+
private _isRequiredField;
|
|
61
|
+
ngOnDestroy(): void;
|
|
62
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormFieldComponent, [null, null, { optional: true; }, null]>;
|
|
63
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormFieldComponent, "ng0-form-field, ng0-field", ["ng0FormField"], { "label": { "alias": "label"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "showErrors": { "alias": "showErrors"; "required": false; "isSignal": true; }; "showRequiredIndicator": { "alias": "showRequiredIndicator"; "required": false; "isSignal": true; }; "showSubscripts": { "alias": "showSubscripts"; "required": false; "isSignal": true; }; "inputGroup": { "alias": "inputGroup"; "required": false; "isSignal": true; }; }, {}, ["_ngControl", "_ngControlElement"], ["*"], true, never>;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
declare class FormFieldModule {
|
|
67
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormFieldModule, never>;
|
|
68
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<FormFieldModule, never, [typeof i1.CommonModule, typeof FormFieldComponent], [typeof FormFieldComponent]>;
|
|
69
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<FormFieldModule>;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export { FormFieldComponent, FormFieldModule };
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import * as _bootkit_ng0_common from '@bootkit/ng0/common';
|
|
2
|
+
import { CssClassLike, IdGenerator } from '@bootkit/ng0/common';
|
|
3
|
+
import * as _bootkit_ng0_localization from '@bootkit/ng0/localization';
|
|
4
|
+
import * as _bootkit_ng0_data from '@bootkit/ng0/data';
|
|
5
|
+
import { DataSource, DataSourceLike, FilterPredicate } from '@bootkit/ng0/data';
|
|
6
|
+
import * as _angular_core from '@angular/core';
|
|
7
|
+
import { OnInit, ElementRef, TemplateRef, Renderer2, DestroyRef } from '@angular/core';
|
|
8
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
9
|
+
|
|
10
|
+
interface ListItem {
|
|
11
|
+
id: string;
|
|
12
|
+
value: any;
|
|
13
|
+
selected?: boolean;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
filtered?: boolean;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Select component that allows users to choose an option from a dropdown list.
|
|
20
|
+
*/
|
|
21
|
+
declare class ListComponent implements OnInit, ControlValueAccessor {
|
|
22
|
+
protected _el: ElementRef<HTMLDivElement>;
|
|
23
|
+
private _renderer;
|
|
24
|
+
private _destroyRef;
|
|
25
|
+
private _document;
|
|
26
|
+
private _ls;
|
|
27
|
+
private _changeDetector;
|
|
28
|
+
protected _value: _angular_core.WritableSignal<any>;
|
|
29
|
+
private _onChangeCallback;
|
|
30
|
+
private _onTouchedCallback;
|
|
31
|
+
protected readonly _items: _angular_core.WritableSignal<ListItem[]>;
|
|
32
|
+
protected readonly _isDisabled: _angular_core.WritableSignal<boolean>;
|
|
33
|
+
protected readonly _activeOptionIndex: _angular_core.WritableSignal<number>;
|
|
34
|
+
protected _itemTemplate?: TemplateRef<any>;
|
|
35
|
+
/**
|
|
36
|
+
* The data source for the select component.
|
|
37
|
+
* This can be an array of data, a function that returns an observable of data,
|
|
38
|
+
* or an instance of DataSource.
|
|
39
|
+
*/
|
|
40
|
+
readonly source: _angular_core.InputSignalWithTransform<DataSource<any>, DataSourceLike<any>>;
|
|
41
|
+
/**
|
|
42
|
+
* Indicates whether multi selection is enabled or not.
|
|
43
|
+
*/
|
|
44
|
+
readonly multiple: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
45
|
+
/**
|
|
46
|
+
* Indicates whether to show selection indicator (checkbox/radio) next to each item.
|
|
47
|
+
* Default is false.
|
|
48
|
+
*/
|
|
49
|
+
readonly showIndicator: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
50
|
+
/**
|
|
51
|
+
* A custom comparer function or the name of a field for comparing two objects.
|
|
52
|
+
*/
|
|
53
|
+
readonly compareBy: _angular_core.InputSignalWithTransform<_bootkit_ng0_data.BooleanValueComparer, _bootkit_ng0_data.BooleanValueComparerLike>;
|
|
54
|
+
/**
|
|
55
|
+
* Custom format function to convert an item to a string for display.
|
|
56
|
+
* Default converts the item to a string using its toString method.
|
|
57
|
+
*/
|
|
58
|
+
readonly formatBy: _angular_core.InputSignalWithTransform<_bootkit_ng0_localization.ValueFormatterFunction, _bootkit_ng0_localization.ValueFormatterLike>;
|
|
59
|
+
/**
|
|
60
|
+
* Custom value extractor function to extract the value of any object while writing values.
|
|
61
|
+
*/
|
|
62
|
+
readonly writeValueBy: _angular_core.InputSignalWithTransform<_bootkit_ng0_data.ValueExtractor, _bootkit_ng0_data.ValueExtractorLike>;
|
|
63
|
+
/**
|
|
64
|
+
* A custom filter predicate function to filter items based on a search string.
|
|
65
|
+
* Default checks if the item's string representation contains the filter string (case-insensitive).
|
|
66
|
+
* The filter predicate can be a function or a string representing the property name to filter.
|
|
67
|
+
*/
|
|
68
|
+
readonly filterBy: _angular_core.InputSignalWithTransform<FilterPredicate, _bootkit_ng0_data.FilterPredicateLike>;
|
|
69
|
+
/**
|
|
70
|
+
* CSS class or classes to apply to the list container.
|
|
71
|
+
* Default is undefined.
|
|
72
|
+
*/
|
|
73
|
+
readonly itemClass: _angular_core.InputSignalWithTransform<_bootkit_ng0_common.CssClassGetter, CssClassLike>;
|
|
74
|
+
readonly focus: _angular_core.InputSignal<"none" | "roving" | "activeDescendant">;
|
|
75
|
+
readonly idGenerator: _angular_core.InputSignal<IdGenerator | undefined>;
|
|
76
|
+
constructor(_el: ElementRef<HTMLDivElement>, _renderer: Renderer2, _destroyRef: DestroyRef);
|
|
77
|
+
ngOnInit(): void;
|
|
78
|
+
/**
|
|
79
|
+
* Sets an option as active
|
|
80
|
+
*/
|
|
81
|
+
active(index: number): void;
|
|
82
|
+
/**
|
|
83
|
+
* Filters the list items based on the provided criteria.
|
|
84
|
+
* @param params The filter parameters to apply.
|
|
85
|
+
* @returns void
|
|
86
|
+
*/
|
|
87
|
+
filter(...params: any[]): void;
|
|
88
|
+
/**
|
|
89
|
+
* Clears any applied filters and shows all items in the list.
|
|
90
|
+
* @returns void
|
|
91
|
+
*/
|
|
92
|
+
clearFilter(): void;
|
|
93
|
+
/**
|
|
94
|
+
* Scrolls the item at the specified index into view within the dropdown list.
|
|
95
|
+
* @param index The index of the item to scroll into view.
|
|
96
|
+
* @param position The vertical alignment of the item after scrolling.
|
|
97
|
+
* Can be 'start', 'center', 'end', or 'nearest'.
|
|
98
|
+
* Default is 'nearest'.
|
|
99
|
+
* @param behavior The scrolling behavior.
|
|
100
|
+
*/
|
|
101
|
+
scrollItemIntoView(index: number, position?: ScrollLogicalPosition, behavior?: ScrollBehavior): void;
|
|
102
|
+
/**
|
|
103
|
+
* Toggles the selection of an option by index
|
|
104
|
+
*/
|
|
105
|
+
toggleSelection(index: number): void;
|
|
106
|
+
writeValue(v: any): void;
|
|
107
|
+
registerOnChange(fn: any): void;
|
|
108
|
+
registerOnTouched(fn: any): void;
|
|
109
|
+
setDisabledState?(isDisabled: boolean): void;
|
|
110
|
+
protected _onKeydown(e: KeyboardEvent, firedByFilter?: boolean): void;
|
|
111
|
+
private _loadItems;
|
|
112
|
+
private _listenToDataSourceChanges;
|
|
113
|
+
private _insertItems;
|
|
114
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListComponent, never>;
|
|
115
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ListComponent, "ng0-list", ["ng0List"], { "source": { "alias": "source"; "required": true; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "showIndicator": { "alias": "showIndicator"; "required": false; "isSignal": true; }; "compareBy": { "alias": "compareBy"; "required": false; "isSignal": true; }; "formatBy": { "alias": "formatBy"; "required": false; "isSignal": true; }; "writeValueBy": { "alias": "writeValueBy"; "required": false; "isSignal": true; }; "filterBy": { "alias": "filterBy"; "required": false; "isSignal": true; }; "itemClass": { "alias": "itemClass"; "required": false; "isSignal": true; }; "focus": { "alias": "focus"; "required": false; "isSignal": true; }; "idGenerator": { "alias": "idGenerator"; "required": false; "isSignal": true; }; }, {}, ["_itemTemplate"], never, true, never>;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* List module.
|
|
120
|
+
*/
|
|
121
|
+
declare class ListModule {
|
|
122
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListModule, never>;
|
|
123
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<ListModule, never, [typeof ListComponent], [typeof ListComponent]>;
|
|
124
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<ListModule>;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export { ListComponent, ListModule };
|
|
@@ -2,20 +2,38 @@ import * as _angular_core from '@angular/core';
|
|
|
2
2
|
import { EventEmitter } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
interface ModalCloseRequest {
|
|
5
|
+
reason: 'backdrop' | 'escape';
|
|
6
|
+
event: Event;
|
|
5
7
|
}
|
|
6
8
|
|
|
7
9
|
declare class ModalComponent {
|
|
10
|
+
/**
|
|
11
|
+
* Is modal scrollable?
|
|
12
|
+
*/
|
|
8
13
|
scrollable: _angular_core.InputSignal<boolean>;
|
|
9
14
|
/** Is modal vertically centered? */
|
|
10
15
|
centered: _angular_core.InputSignal<boolean>;
|
|
16
|
+
/**
|
|
17
|
+
* Size of the modal.
|
|
18
|
+
*/
|
|
11
19
|
size: _angular_core.InputSignal<"sm" | "default" | "lg" | "xl">;
|
|
12
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Is modal fullscreen?
|
|
22
|
+
*/
|
|
23
|
+
fullscreen: _angular_core.InputSignal<"sm" | "lg" | "xl" | "always" | "md" | "xxl" | undefined>;
|
|
24
|
+
/**
|
|
25
|
+
* Emitted when user clicks the backdrop or presses the escape key.
|
|
26
|
+
*/
|
|
13
27
|
closeRequest: EventEmitter<ModalCloseRequest>;
|
|
14
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Emitted when the backdrop is clicked.
|
|
30
|
+
*/
|
|
31
|
+
backdropClick: EventEmitter<Event>;
|
|
15
32
|
protected _modalStatic: _angular_core.WritableSignal<boolean>;
|
|
16
33
|
constructor();
|
|
17
|
-
protected _onBackdropClick(): void;
|
|
18
|
-
|
|
34
|
+
protected _onBackdropClick(event: MouseEvent): void;
|
|
35
|
+
private _onDocumentKeyDown;
|
|
36
|
+
private _shakeModal;
|
|
19
37
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ModalComponent, never>;
|
|
20
38
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ModalComponent, "ng0-modal", ["ng0Modal"], { "scrollable": { "alias": "scrollable"; "required": false; "isSignal": true; }; "centered": { "alias": "centered"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "fullscreen": { "alias": "fullscreen"; "required": false; "isSignal": true; }; }, { "closeRequest": "closeRequest"; "backdropClick": "backdropClick"; }, never, ["*"], true, never>;
|
|
21
39
|
}
|