@bootkit/ng0 0.0.0-alpha.17 → 0.0.0-alpha.19
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/common/index.d.ts +60 -4
- package/components/list/index.d.ts +127 -0
- package/components/select/index.d.ts +120 -0
- package/components/table/index.d.ts +66 -10
- package/data/index.d.ts +158 -36
- package/fesm2022/bootkit-ng0-common.mjs +51 -1
- package/fesm2022/bootkit-ng0-common.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-accordion.mjs +14 -14
- package/fesm2022/bootkit-ng0-components-accordion.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-backdrop.mjs +4 -4
- package/fesm2022/bootkit-ng0-components-backdrop.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-button.mjs +11 -11
- package/fesm2022/bootkit-ng0-components-button.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-card.mjs +12 -12
- package/fesm2022/bootkit-ng0-components-card.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-code.mjs +9 -9
- package/fesm2022/bootkit-ng0-components-code.mjs.map +1 -1
- 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 +14 -14
- package/fesm2022/bootkit-ng0-components-confirmation.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-form-field.mjs +14 -14
- package/fesm2022/bootkit-ng0-components-form-field.mjs.map +1 -1
- 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 +13 -13
- package/fesm2022/bootkit-ng0-components-modal.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-nav.mjs +27 -27
- 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 +15 -15
- package/fesm2022/bootkit-ng0-components-pagination.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-popover.mjs +11 -11
- 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 +21 -21
- package/fesm2022/bootkit-ng0-components-sidenav.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-stepper.mjs +13 -13
- package/fesm2022/bootkit-ng0-components-stepper.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-table.mjs +170 -72
- package/fesm2022/bootkit-ng0-components-table.mjs.map +1 -1
- 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 +9 -9
- package/fesm2022/bootkit-ng0-components-tooltip.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-vertical-menu.mjs +26 -26
- package/fesm2022/bootkit-ng0-components-vertical-menu.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-data.mjs +175 -58
- package/fesm2022/bootkit-ng0-data.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-date.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-file.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-form.mjs +148 -126
- package/fesm2022/bootkit-ng0-form.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-http.mjs +3 -3
- package/fesm2022/bootkit-ng0-http.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-localization-locales.mjs +20 -0
- package/fesm2022/bootkit-ng0-localization-locales.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-localization.mjs +100 -35
- package/fesm2022/bootkit-ng0-localization.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-platform-browser.mjs +7 -7
- package/fesm2022/bootkit-ng0-platform-browser.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-script.mjs +3 -3
- package/fesm2022/bootkit-ng0-script.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-security.mjs +15 -15
- package/fesm2022/bootkit-ng0-security.mjs.map +1 -1
- package/fesm2022/bootkit-ng0.mjs.map +1 -1
- package/form/index.d.ts +46 -27
- package/localization/index.d.ts +63 -28
- package/package.json +22 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootkit-ng0.mjs","sources":["../../../projects/ng0/src/lib/index.ts","../../../projects/ng0/src/public-api.ts","../../../projects/ng0/src/bootkit-ng0.ts"],"sourcesContent":["export * from './types';\n \nexport const LibName = 'bootkit/angular-pro';","/*\n * Public API Surface of bootkit\n */\n\nexport * from './lib';\n \n \n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAEO,MAAM,OAAO,GAAG;;ACFvB;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"bootkit-ng0.mjs","sources":["../../../projects/ng0/src/lib/index.ts","../../../projects/ng0/src/public-api.ts","../../../projects/ng0/src/bootkit-ng0.ts"],"sourcesContent":["export * from './types';\r\n \r\nexport const LibName = 'bootkit/angular-pro';","/*\r\n * Public API Surface of bootkit\r\n */\r\n\r\nexport * from './lib';\r\n \r\n \r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAEO,MAAM,OAAO,GAAG;;ACFvB;;AAEG;;ACFH;;AAEG;;;;"}
|
package/form/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { OnInit, OnChanges, ElementRef, SimpleChanges
|
|
2
|
+
import { OnInit, OnChanges, ElementRef, SimpleChanges } from '@angular/core';
|
|
3
3
|
import { ControlValueAccessor, Validator, AbstractControl, ValidationErrors, FormControl, ValidatorFn } from '@angular/forms';
|
|
4
4
|
|
|
5
5
|
declare class FocusDirective implements OnInit, OnChanges {
|
|
@@ -17,38 +17,57 @@ declare class FocusDirective implements OnInit, OnChanges {
|
|
|
17
17
|
static ɵdir: i0.ɵɵDirectiveDeclaration<FocusDirective, "[ng0Focus]", ["ng0Focus"], { "focusOnLoad": { "alias": "focusOnLoad"; "required": false; }; "focusWhen": { "alias": "focusWhen"; "required": false; }; }, {}, never, never, true, never>;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Directive to allow only number input in text fields.
|
|
22
|
+
* It supports integer and decimal numbers, negative numbers, min/max values, thousands separator.
|
|
23
|
+
*/
|
|
20
24
|
declare class NumberDirective implements ControlValueAccessor {
|
|
21
|
-
private
|
|
22
|
-
private
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
25
|
+
private _value?;
|
|
26
|
+
private _decimalSeparator;
|
|
27
|
+
private _thousandsSeparator;
|
|
28
|
+
private _onChangeCallback?;
|
|
29
|
+
private _onTouchedCallback?;
|
|
30
|
+
private _elmRef;
|
|
31
|
+
private _renderer;
|
|
32
|
+
/**
|
|
33
|
+
* The minimum number of digits to display after the decimal point.
|
|
34
|
+
* Applied only when 'numberType' is set to 'decimal'.
|
|
35
|
+
* @default 1
|
|
36
|
+
*/
|
|
37
|
+
minFractionDigits: i0.InputSignalWithTransform<number, unknown>;
|
|
38
|
+
/**
|
|
39
|
+
* The maximum number of digits to display after the decimal point.
|
|
40
|
+
* Applied only when 'numberType' is set to 'decimal'.
|
|
41
|
+
* @default 2
|
|
42
|
+
*/
|
|
43
|
+
maxFractionDigits: i0.InputSignalWithTransform<number, unknown>;
|
|
44
|
+
/**
|
|
45
|
+
* Whether to use grouping separators, such as thousands separators
|
|
46
|
+
* @default false
|
|
47
|
+
*/
|
|
48
|
+
useGrouping: i0.InputSignalWithTransform<boolean, unknown>;
|
|
49
|
+
/**
|
|
50
|
+
* Type of numbers to allow
|
|
51
|
+
* 'decimal' - allow decimal numbers
|
|
52
|
+
* 'integer' - allow integer numbers only
|
|
53
|
+
* @default 'integer'
|
|
54
|
+
*/
|
|
55
|
+
numberType: i0.InputSignal<"integer" | "decimal">;
|
|
56
|
+
constructor();
|
|
39
57
|
ngOnInit(): void;
|
|
40
58
|
registerOnChange(fn: any): void;
|
|
41
59
|
registerOnTouched(fn: any): void;
|
|
42
60
|
setDisabledState?(isDisabled: boolean): void;
|
|
43
61
|
writeValue(value: any): void;
|
|
44
|
-
private
|
|
45
|
-
private
|
|
46
|
-
private
|
|
47
|
-
private
|
|
48
|
-
private
|
|
49
|
-
private
|
|
50
|
-
private
|
|
51
|
-
private
|
|
62
|
+
private _onKeyDown;
|
|
63
|
+
private _onInput;
|
|
64
|
+
private _formatIntegerPart;
|
|
65
|
+
private _onBlur;
|
|
66
|
+
private _onPaste;
|
|
67
|
+
private _getInputState;
|
|
68
|
+
private _formatNumber;
|
|
69
|
+
private _isAllowedKey;
|
|
70
|
+
private _setProperty;
|
|
52
71
|
static ɵfac: i0.ɵɵFactoryDeclaration<NumberDirective, never>;
|
|
53
72
|
static ɵdir: i0.ɵɵDirectiveDeclaration<NumberDirective, "[ng0Number]", never, { "minFractionDigits": { "alias": "minFractionDigits"; "required": false; "isSignal": true; }; "maxFractionDigits": { "alias": "maxFractionDigits"; "required": false; "isSignal": true; }; "useGrouping": { "alias": "useGrouping"; "required": false; "isSignal": true; }; "numberType": { "alias": "numberType"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
54
73
|
}
|
package/localization/index.d.ts
CHANGED
|
@@ -2,6 +2,21 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { InjectionToken, PipeTransform } from '@angular/core';
|
|
3
3
|
import * as rxjs from 'rxjs';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Format function type.
|
|
7
|
+
* @param item The item to format.
|
|
8
|
+
* @returns The formatted string.
|
|
9
|
+
*/
|
|
10
|
+
type ValueFormatterFunction = (value: any, ...options: any[]) => string;
|
|
11
|
+
type ValueFormatterLike = ValueFormatterFunction | string;
|
|
12
|
+
/**
|
|
13
|
+
* Default format function.
|
|
14
|
+
* @param value The item to format.
|
|
15
|
+
* @returns The formatted string.
|
|
16
|
+
*/
|
|
17
|
+
declare function defaultValueFormatter(value: any): string;
|
|
18
|
+
declare function ValueFormatterAttribute(locale?: Locale): ((v: ValueFormatterLike) => ValueFormatterFunction);
|
|
19
|
+
|
|
5
20
|
/** Locale dictionary */
|
|
6
21
|
type LocaleDictionary = {
|
|
7
22
|
[key: string]: string;
|
|
@@ -17,6 +32,28 @@ type LocaleValidationErrorTranslator = (error: any) => string;
|
|
|
17
32
|
type LocaleValidationErrorTranslators = {
|
|
18
33
|
[key: string]: LocaleValidationErrorTranslator;
|
|
19
34
|
};
|
|
35
|
+
/**
|
|
36
|
+
* A function to format the paging info of a table.
|
|
37
|
+
*
|
|
38
|
+
*/
|
|
39
|
+
type TableComponentPagingFormatter = (info: {
|
|
40
|
+
/**
|
|
41
|
+
* The first record in the current page.
|
|
42
|
+
*/
|
|
43
|
+
firstRecord: number;
|
|
44
|
+
/**
|
|
45
|
+
* The last record in the current page.
|
|
46
|
+
*/
|
|
47
|
+
lastRecord: number;
|
|
48
|
+
/**
|
|
49
|
+
* The total number of records.
|
|
50
|
+
*/
|
|
51
|
+
totalRecords?: number;
|
|
52
|
+
/**
|
|
53
|
+
* The current page index.
|
|
54
|
+
*/
|
|
55
|
+
currentPage: number;
|
|
56
|
+
}) => string;
|
|
20
57
|
/**
|
|
21
58
|
* Locale definition
|
|
22
59
|
*/
|
|
@@ -54,30 +91,24 @@ interface LocaleDefinition {
|
|
|
54
91
|
*/
|
|
55
92
|
pagingInfo?: TableComponentPagingFormatter;
|
|
56
93
|
};
|
|
94
|
+
select?: {
|
|
95
|
+
placeholder?: string;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
formatters?: {
|
|
99
|
+
boolean?: {
|
|
100
|
+
[booleanKind: string]: string[];
|
|
101
|
+
};
|
|
102
|
+
enum?: {
|
|
103
|
+
[enumName: string]: {
|
|
104
|
+
[enumValue: string]: string;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
custom?: {
|
|
108
|
+
[formatterName: string]: ValueFormatterFunction;
|
|
109
|
+
};
|
|
57
110
|
};
|
|
58
111
|
}
|
|
59
|
-
/**
|
|
60
|
-
* A function to format the paging info of a table.
|
|
61
|
-
*
|
|
62
|
-
*/
|
|
63
|
-
type TableComponentPagingFormatter = (info: {
|
|
64
|
-
/**
|
|
65
|
-
* The first record in the current page.
|
|
66
|
-
*/
|
|
67
|
-
firstRecord: number;
|
|
68
|
-
/**
|
|
69
|
-
* The last record in the current page.
|
|
70
|
-
*/
|
|
71
|
-
lastRecord: number;
|
|
72
|
-
/**
|
|
73
|
-
* The total number of records.
|
|
74
|
-
*/
|
|
75
|
-
totalRecords?: number;
|
|
76
|
-
/**
|
|
77
|
-
* The current page index.
|
|
78
|
-
*/
|
|
79
|
-
currentPage: number;
|
|
80
|
-
}) => string;
|
|
81
112
|
|
|
82
113
|
declare class LocalizationService {
|
|
83
114
|
private _locales;
|
|
@@ -99,7 +130,7 @@ declare class LocalizationService {
|
|
|
99
130
|
static ɵprov: i0.ɵɵInjectableDeclaration<LocalizationService>;
|
|
100
131
|
}
|
|
101
132
|
|
|
102
|
-
declare const LOCALE: InjectionToken<
|
|
133
|
+
declare const LOCALE: InjectionToken<Locale | LocalizationService>;
|
|
103
134
|
interface TranslatedValidationError {
|
|
104
135
|
/** Error key */
|
|
105
136
|
key: string;
|
|
@@ -133,9 +164,7 @@ declare class Locale {
|
|
|
133
164
|
* Translates an enum value
|
|
134
165
|
* @param enumName The name of the enum
|
|
135
166
|
* @param enumValue The value of the enum to translate
|
|
136
|
-
* @param
|
|
137
|
-
* @param returnEnumAsFallback
|
|
138
|
-
* @param fallbackKey
|
|
167
|
+
* @param fallback
|
|
139
168
|
* @returns The translated string or the enum value itself if not found
|
|
140
169
|
*/
|
|
141
170
|
translateEnum(enumName: string, enumValue: string | number | null | undefined, fallback?: string): string | undefined;
|
|
@@ -167,6 +196,12 @@ declare class Locale {
|
|
|
167
196
|
* @returns Formatted date string based on the locale
|
|
168
197
|
*/
|
|
169
198
|
formatDate(date: Date | string | number, format?: string): string;
|
|
199
|
+
/**
|
|
200
|
+
* Returns a formatter function by its name and parameters.
|
|
201
|
+
* @param format The format string in the form of "formatterName:param1:param2:..."
|
|
202
|
+
* @returns A FormatFunction
|
|
203
|
+
*/
|
|
204
|
+
getFormatter(format: string): ValueFormatterFunction;
|
|
170
205
|
}
|
|
171
206
|
|
|
172
207
|
/**
|
|
@@ -266,5 +301,5 @@ declare class LocalizationModule {
|
|
|
266
301
|
static ɵinj: i0.ɵɵInjectorDeclaration<LocalizationModule>;
|
|
267
302
|
}
|
|
268
303
|
|
|
269
|
-
export { DatePipe, LOCALE, Locale, LocalizationModule, LocalizationService, LocalizeBooleanPipe, LocalizeDatePipe, LocalizeEnumPipe, LocalizePipe, TranslateBooleanPipe, TranslateEnumPipe, TranslatePipe };
|
|
270
|
-
export type { LocaleChangeEvent, LocaleDefinition, LocaleDictionary, LocaleEnums, LocaleValidationErrorTranslator, LocaleValidationErrorTranslators, TableComponentPagingFormatter, TranslatedValidationError };
|
|
304
|
+
export { DatePipe, LOCALE, Locale, LocalizationModule, LocalizationService, LocalizeBooleanPipe, LocalizeDatePipe, LocalizeEnumPipe, LocalizePipe, TranslateBooleanPipe, TranslateEnumPipe, TranslatePipe, ValueFormatterAttribute, defaultValueFormatter };
|
|
305
|
+
export type { LocaleChangeEvent, LocaleDefinition, LocaleDictionary, LocaleEnums, LocaleValidationErrorTranslator, LocaleValidationErrorTranslators, TableComponentPagingFormatter, TranslatedValidationError, ValueFormatterFunction, ValueFormatterLike };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bootkit/ng0",
|
|
3
|
-
"version": "0.0.0-alpha.
|
|
3
|
+
"version": "0.0.0-alpha.19",
|
|
4
4
|
"description": "Angular+Bootstrap Component Library",
|
|
5
5
|
"homepage": "https://bootkitlib.github.io/",
|
|
6
6
|
"author": "BootKit",
|
|
@@ -35,26 +35,26 @@
|
|
|
35
35
|
"types": "./index.d.ts",
|
|
36
36
|
"default": "./fesm2022/bootkit-ng0.mjs"
|
|
37
37
|
},
|
|
38
|
-
"./
|
|
39
|
-
"types": "./
|
|
40
|
-
"default": "./fesm2022/bootkit-ng0-
|
|
38
|
+
"./common": {
|
|
39
|
+
"types": "./common/index.d.ts",
|
|
40
|
+
"default": "./fesm2022/bootkit-ng0-common.mjs"
|
|
41
|
+
},
|
|
42
|
+
"./data": {
|
|
43
|
+
"types": "./data/index.d.ts",
|
|
44
|
+
"default": "./fesm2022/bootkit-ng0-data.mjs"
|
|
41
45
|
},
|
|
42
46
|
"./date": {
|
|
43
47
|
"types": "./date/index.d.ts",
|
|
44
48
|
"default": "./fesm2022/bootkit-ng0-date.mjs"
|
|
45
49
|
},
|
|
46
|
-
"./
|
|
47
|
-
"types": "./
|
|
48
|
-
"default": "./fesm2022/bootkit-ng0-
|
|
50
|
+
"./file": {
|
|
51
|
+
"types": "./file/index.d.ts",
|
|
52
|
+
"default": "./fesm2022/bootkit-ng0-file.mjs"
|
|
49
53
|
},
|
|
50
54
|
"./form": {
|
|
51
55
|
"types": "./form/index.d.ts",
|
|
52
56
|
"default": "./fesm2022/bootkit-ng0-form.mjs"
|
|
53
57
|
},
|
|
54
|
-
"./common": {
|
|
55
|
-
"types": "./common/index.d.ts",
|
|
56
|
-
"default": "./fesm2022/bootkit-ng0-common.mjs"
|
|
57
|
-
},
|
|
58
58
|
"./http": {
|
|
59
59
|
"types": "./http/index.d.ts",
|
|
60
60
|
"default": "./fesm2022/bootkit-ng0-http.mjs"
|
|
@@ -103,6 +103,10 @@
|
|
|
103
103
|
"types": "./components/form-field/index.d.ts",
|
|
104
104
|
"default": "./fesm2022/bootkit-ng0-components-form-field.mjs"
|
|
105
105
|
},
|
|
106
|
+
"./components/list": {
|
|
107
|
+
"types": "./components/list/index.d.ts",
|
|
108
|
+
"default": "./fesm2022/bootkit-ng0-components-list.mjs"
|
|
109
|
+
},
|
|
106
110
|
"./components/modal": {
|
|
107
111
|
"types": "./components/modal/index.d.ts",
|
|
108
112
|
"default": "./fesm2022/bootkit-ng0-components-modal.mjs"
|
|
@@ -127,9 +131,9 @@
|
|
|
127
131
|
"types": "./components/popover/index.d.ts",
|
|
128
132
|
"default": "./fesm2022/bootkit-ng0-components-popover.mjs"
|
|
129
133
|
},
|
|
130
|
-
"./components/
|
|
131
|
-
"types": "./components/
|
|
132
|
-
"default": "./fesm2022/bootkit-ng0-components-
|
|
134
|
+
"./components/select": {
|
|
135
|
+
"types": "./components/select/index.d.ts",
|
|
136
|
+
"default": "./fesm2022/bootkit-ng0-components-select.mjs"
|
|
133
137
|
},
|
|
134
138
|
"./components/sidenav": {
|
|
135
139
|
"types": "./components/sidenav/index.d.ts",
|
|
@@ -139,6 +143,10 @@
|
|
|
139
143
|
"types": "./components/table/index.d.ts",
|
|
140
144
|
"default": "./fesm2022/bootkit-ng0-components-table.mjs"
|
|
141
145
|
},
|
|
146
|
+
"./components/stepper": {
|
|
147
|
+
"types": "./components/stepper/index.d.ts",
|
|
148
|
+
"default": "./fesm2022/bootkit-ng0-components-stepper.mjs"
|
|
149
|
+
},
|
|
142
150
|
"./components/toast": {
|
|
143
151
|
"types": "./components/toast/index.d.ts",
|
|
144
152
|
"default": "./fesm2022/bootkit-ng0-components-toast.mjs"
|