@bootkit/ng0 0.0.0-alpha.33 → 0.0.0-alpha.34

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.
@@ -1,81 +1,122 @@
1
- import * as i0 from '@angular/core';
2
- import { TemplateRef } from '@angular/core';
3
- import { SidenavPosition, SidenavMode } from '@bootkit/ng0/components/sidenav';
1
+ import * as _angular_core from '@angular/core';
2
+ import { TemplateRef, EventEmitter, WritableSignal, QueryList } from '@angular/core';
3
+ import { SidenavMode, SidenavPosition, SidenavSize } from '@bootkit/ng0/components/sidenav';
4
+ import { CssClass } from '@bootkit/ng0/common';
5
+ import * as rxjs from 'rxjs';
4
6
 
5
7
  /**
6
- * Represents a secondary sidenav configuration in the Layout1Component.
8
+ * Directive to define a sidenav within Layout1Component.
7
9
  */
8
- interface Layout1SidenavConfiguration {
10
+ declare class Layout1SidenavDirective {
11
+ readonly template: TemplateRef<any>;
12
+ readonly open: _angular_core.InputSignal<boolean>;
13
+ readonly mode: _angular_core.InputSignal<SidenavMode>;
14
+ readonly hasBackdrop: _angular_core.InputSignal<boolean>;
15
+ readonly zIndex: _angular_core.InputSignal<number | undefined>;
16
+ readonly position: _angular_core.InputSignal<SidenavPosition>;
17
+ readonly size: _angular_core.InputSignal<SidenavSize>;
18
+ readonly css: _angular_core.InputSignal<CssClass>;
19
+ backdropClick: EventEmitter<PointerEvent>;
20
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<Layout1SidenavDirective, never>;
21
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Layout1SidenavDirective, "[ng0Layout1Sidenav]", ["ng0Layout1Sidenav"], { "open": { "alias": "open"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "hasBackdrop": { "alias": "hasBackdrop"; "required": false; "isSignal": true; }; "zIndex": { "alias": "zIndex"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "css": { "alias": "css"; "required": false; "isSignal": true; }; }, { "backdropClick": "backdropClick"; }, never, never, true, never>;
22
+ }
23
+
24
+ /**
25
+ * Represents a secondary sidenav options in the Layout1Component.
26
+ */
27
+ interface Layout1SecondarySidenavOptions {
28
+ size?: number | string | undefined;
29
+ zIndex?: number;
30
+ position?: SidenavPosition;
31
+ mode?: SidenavMode;
32
+ fixedInViewport?: boolean;
33
+ hasBackdrop?: boolean;
34
+ css?: CssClass;
35
+ closeOnBackdropClick?: boolean;
36
+ }
37
+ declare class Layout1SecondarySidenav {
9
38
  template: TemplateRef<any>;
10
- size: number | string | undefined;
11
- position: SidenavPosition;
12
- zIndex: number;
13
- closeByBackdropClick: boolean;
39
+ zIndex: WritableSignal<number | undefined>;
40
+ css: WritableSignal<CssClass>;
41
+ size: WritableSignal<SidenavSize>;
42
+ position: WritableSignal<SidenavPosition>;
43
+ mode: WritableSignal<SidenavMode>;
44
+ hasBackdrop: WritableSignal<boolean>;
45
+ closeOnBackdropClick: WritableSignal<boolean>;
46
+ constructor(template: TemplateRef<any>, options?: Layout1SecondarySidenavOptions);
14
47
  }
15
48
 
16
49
  /**
17
- * Service to manage the configuration and state of Layout1Component.
50
+ * Layout1 component that provides a layout with sidenavs.
18
51
  */
19
- declare class Layout1Manager {
20
- private _zIndexCounter;
21
- /**
22
- * Whether the start sidenav is open.
23
- */
24
- readonly startSidenavOpen: i0.WritableSignal<boolean>;
25
- /**
26
- * The mode of the start sidenav.
27
- */
28
- readonly startSidenavMode: i0.WritableSignal<SidenavMode>;
29
- /**
30
- * Whether the start sidenav is fixed.
31
- */
32
- readonly startSidenavFixed: i0.WritableSignal<boolean>;
33
- /**
34
- * List of secondary sidenavs.
35
- */
36
- readonly secondarySidenavs: i0.WritableSignal<Layout1SidenavConfiguration[]>;
52
+ declare class Layout1Component {
53
+ private readonly _manager;
54
+ protected readonly _sidenavs?: QueryList<Layout1SidenavDirective>;
55
+ protected readonly _secondarySidenavs: _angular_core.WritableSignal<Layout1SecondarySidenav[]>;
56
+ protected readonly _openSecondarySidenavs: Set<Layout1SecondarySidenav>;
57
+ private readonly _changeDetectorRef;
37
58
  /**
38
- * Header mode.
39
- * 'default' - Header scrolls with the page.
40
- * 'sticky' - Header is fixed at the top.
59
+ * Whether the header is sticky.
41
60
  */
42
- readonly headerMode: i0.WritableSignal<"default" | "sticky">;
61
+ readonly stickyHeader: _angular_core.ModelSignal<boolean>;
62
+ constructor();
43
63
  /**
44
- * Push a new secondary sidenav onto the stack.
45
- * @param template TemplateRef of the sidenav content.
46
- * @param options Options for the sidenav.
64
+ * Push a secondary sidenav.
65
+ * @param sidenav
47
66
  */
48
- pushSidenav(template: TemplateRef<any>, options?: Partial<Omit<Layout1SidenavConfiguration, 'template' | 'zIndex'>>): void;
67
+ pushSidenav(sidenav: Layout1SecondarySidenav): void;
49
68
  /**
50
- * Pop the topmost secondary sidenav from the stack.
51
- * @returns The popped secondary sidenav or undefined if the stack is empty.
69
+ * Pop the last secondary sidenav.
52
70
  */
53
- popSidenav(): Layout1SidenavConfiguration | undefined;
71
+ popSidenav(): void;
54
72
  /**
55
- * Toggle the open state of the start sidenav.
73
+ * Remove a secondary sidenav.
74
+ * @param sidenav
56
75
  */
57
- toggleStartSidenav(): void;
58
- static ɵfac: i0.ɵɵFactoryDeclaration<Layout1Manager, never>;
59
- static ɵprov: i0.ɵɵInjectableDeclaration<Layout1Manager>;
76
+ removeSidenav(sidenav: Layout1SecondarySidenav): void;
77
+ protected _onSecondarySidenavTransitionEnd(sidenav: Layout1SecondarySidenav): void;
78
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<Layout1Component, never>;
79
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<Layout1Component, "ng0-layout1", never, { "stickyHeader": { "alias": "stickyHeader"; "required": false; "isSignal": true; }; }, { "stickyHeader": "stickyHeaderChange"; }, ["_sidenavs"], ["ng0-layout1-header", "ng0-layout1-content"], true, never>;
60
80
  }
61
81
 
62
82
  /**
63
- * Layout1Component
83
+ * Layout1Module
64
84
  */
65
- declare class Layout1Component {
66
- readonly config: Layout1Manager;
67
- static ɵfac: i0.ɵɵFactoryDeclaration<Layout1Component, never>;
68
- static ɵcmp: i0.ɵɵComponentDeclaration<Layout1Component, "ng0-layout1", never, {}, {}, never, ["header", "content", "start-sidenav"], true, never>;
85
+ declare class Layout1Module {
86
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<Layout1Module, never>;
87
+ static ɵmod: _angular_core.ɵɵNgModuleDeclaration<Layout1Module, never, [typeof Layout1Component], [typeof Layout1Component]>;
88
+ static ɵinj: _angular_core.ɵɵInjectorDeclaration<Layout1Module>;
69
89
  }
70
90
 
71
91
  /**
72
- * Layout1Module
92
+ * Service to manage the configuration and state of Layout1Component.
73
93
  */
74
- declare class Layout1Module {
75
- static ɵfac: i0.ɵɵFactoryDeclaration<Layout1Module, never>;
76
- static ɵmod: i0.ɵɵNgModuleDeclaration<Layout1Module, never, [typeof Layout1Component], [typeof Layout1Component]>;
77
- static ɵinj: i0.ɵɵInjectorDeclaration<Layout1Module>;
94
+ declare class Layout1Manager {
95
+ private _zIndexCounter;
96
+ private _sidenavPushSubject;
97
+ private _sidenavPopSubject;
98
+ private _sidenavRemoveSubject;
99
+ sidenavPushNotification: rxjs.Observable<Layout1SecondarySidenav>;
100
+ sidenavPopNotification: rxjs.Observable<any>;
101
+ sidenavRemoveNotification: rxjs.Observable<Layout1SecondarySidenav>;
102
+ /**
103
+ * Push a secondary sidenav.
104
+ * @param template
105
+ * @param options
106
+ * @returns
107
+ */
108
+ pushSidenav(template: TemplateRef<any>, options?: Layout1SecondarySidenavOptions): Layout1SecondarySidenav;
109
+ /**
110
+ * Pop the last secondary sidenav.
111
+ */
112
+ popSidenav(): void;
113
+ /**
114
+ * Remove a secondary sidenav.
115
+ * @param sidenav
116
+ */
117
+ removeSidenav(sidenav: Layout1SecondarySidenav): void;
118
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<Layout1Manager, never>;
119
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<Layout1Manager>;
78
120
  }
79
121
 
80
- export { Layout1Component, Layout1Manager, Layout1Module };
81
- export type { Layout1SidenavConfiguration };
122
+ export { Layout1Component, Layout1Manager, Layout1Module, Layout1SidenavDirective };
@@ -12,7 +12,7 @@ type ObjectFormatter = (obj: any, ...params: any[]) => any;
12
12
  /**
13
13
  * Object formatter-like types.
14
14
  */
15
- type ObjectFormatterLike = ObjectFormatter | string | number | Array<ObjectFormatter | string | number | boolean | undefined>;
15
+ type ObjectFormatterLike = ObjectFormatter | string | number | Array<any>;
16
16
  /**
17
17
  * Default object formatter function.
18
18
  * @param value The item to format.
@@ -24,19 +24,13 @@ declare function defaultFormatter(obj: any): string;
24
24
  * @param field The field name to retrieve.
25
25
  * @returns An ObjectFormatter function.
26
26
  */
27
- declare function fieldFormatter(field: string): ObjectFormatter;
27
+ declare function createFieldFormatter(field: string): ObjectFormatter;
28
28
  /**
29
29
  * Creates an index formatter that retrieves the value at a specified index from an array.
30
30
  * @param index The index to retrieve (number or boolean).
31
31
  * @returns An ObjectFormatter function.
32
32
  */
33
- declare function indexFormatter(index: number | boolean): ObjectFormatter;
34
- /**
35
- * Creates an array formatter.
36
- * @param array
37
- * @returns An ObjectFormatter function.
38
- */
39
- declare function arrayFormatter(array: Array<any>): ObjectFormatter;
33
+ declare function createIndexFormatter(index: number | boolean): ObjectFormatter;
40
34
  /**
41
35
  * Creates a number formatter.
42
36
  * @param minimumIntegerDigits
@@ -45,19 +39,20 @@ declare function arrayFormatter(array: Array<any>): ObjectFormatter;
45
39
  * @param useGrouping
46
40
  * @returns An ObjectFormatter function.
47
41
  */
48
- declare function numberFormatter(minimumIntegerDigits?: number, minimumFractionDigits?: number, maximumFractionDigits?: number, useGrouping?: boolean): ObjectFormatter;
42
+ declare function createNumberFormatter(minimumIntegerDigits?: number, minimumFractionDigits?: number, maximumFractionDigits?: number, useGrouping?: boolean): ObjectFormatter;
49
43
  /**
50
44
  * Creates a currency formatter.
51
45
  * @param minFractions
52
46
  * @param maxFractions
53
47
  * @returns
54
48
  */
55
- declare function currencyFormatter(minFractions?: number, maxFractions?: number): ObjectFormatter;
49
+ declare function createCurrencyFormatter(minFractions?: number, maxFractions?: number): ObjectFormatter;
56
50
  /**
57
51
  * Creates a date formatter.
58
- * @returns
59
52
  */
60
- declare function dateFormatter(options?: Intl.DateTimeFormatOptions): ObjectFormatter;
53
+ declare function createDateFormatter(dateStyle?: 'short' | 'medium' | 'long' | 'full', timeStyle?: 'short' | 'medium' | 'long' | 'full', zone?: string[], // zone[0]: name, zone[1]: display ('long' | 'short' | 'shortOffset' | 'longOffset' | 'narrowOffset' | 'longGeneric' | 'shortGeneric')
54
+ calendar?: string): ObjectFormatter;
55
+ declare function createDateFormatter(options?: Intl.DateTimeFormatOptions): ObjectFormatter;
61
56
  /**
62
57
  * Creates a locale-based formatter.
63
58
  * @param locale The Locale object.
@@ -65,13 +60,13 @@ declare function dateFormatter(options?: Intl.DateTimeFormatOptions): ObjectForm
65
60
  * @returns A ValueFormatterFunction
66
61
  * @private
67
62
  */
68
- declare function localeFormatter(formatterName: string): ObjectFormatter;
63
+ declare function createLocaleFormatter(formatterName: string): ObjectFormatter;
69
64
  /**
70
65
  * Creates a composite formatter that applies multiple formatters in sequence.
71
66
  * @param formatters The list of ObjectFormatterLike values to compose.
72
67
  * @returns An ObjectFormatter function.
73
68
  */
74
- declare function composite(...formatters: ObjectFormatterLike[]): ObjectFormatter;
69
+ declare function createCompositeFormatter(...formatters: ObjectFormatterLike[]): ObjectFormatter;
75
70
  /**
76
71
  * Creates an ObjectFormatter from various ObjectFormatterLike types.
77
72
  * @param formatter The ObjectFormatterLike value to convert.
@@ -192,7 +187,7 @@ declare class LocalizationService {
192
187
  static ɵprov: i0.ɵɵInjectableDeclaration<LocalizationService>;
193
188
  }
194
189
 
195
- declare const LOCALE: InjectionToken<Locale | LocalizationService>;
190
+ declare const LOCALE: InjectionToken<LocalizationService | Locale>;
196
191
  interface TranslatedValidationError {
197
192
  /** Error key */
198
193
  key: string;
@@ -300,9 +295,9 @@ declare class TranslateBooleanPipe implements PipeTransform {
300
295
  }
301
296
 
302
297
  declare class DatePipe implements PipeTransform {
303
- private _ls;
304
- constructor(_ls: LocalizationService);
305
- transform(value: Date | string | number, format?: string): string | undefined;
298
+ private _injector;
299
+ transform(value: Date | string | number, dateStyle?: 'short' | 'medium' | 'long' | 'full', timeStyle?: 'short' | 'medium' | 'long' | 'full', zone?: string[], calendar?: string): string;
300
+ transform(value: Date | string | number, options?: Intl.DateTimeFormatOptions): string;
306
301
  static ɵfac: i0.ɵɵFactoryDeclaration<DatePipe, never>;
307
302
  static ɵpipe: i0.ɵɵPipeDeclaration<DatePipe, "ng0Date", true>;
308
303
  }
@@ -368,5 +363,5 @@ declare class LocalizationModule {
368
363
  static ɵinj: i0.ɵɵInjectorDeclaration<LocalizationModule>;
369
364
  }
370
365
 
371
- export { DatePipe, FormatPipe, LOCALE, Locale, LocalizationModule, LocalizationService, LocalizeBooleanPipe, LocalizeDatePipe, LocalizeEnumPipe, LocalizePipe, TranslateBooleanPipe, TranslateEnumPipe, TranslatePipe, arrayFormatter, composite, createObjectFormatter, currencyFormatter, dateFormatter, defaultFormatter, fieldFormatter, indexFormatter, localeFormatter, numberFormatter, objectFormatterAttribute };
366
+ export { DatePipe, FormatPipe, LOCALE, Locale, LocalizationModule, LocalizationService, LocalizeBooleanPipe, LocalizeDatePipe, LocalizeEnumPipe, LocalizePipe, TranslateBooleanPipe, TranslateEnumPipe, TranslatePipe, createCompositeFormatter, createCurrencyFormatter, createDateFormatter, createFieldFormatter, createIndexFormatter, createLocaleFormatter, createNumberFormatter, createObjectFormatter, defaultFormatter, objectFormatterAttribute };
372
367
  export type { LocaleChangeEvent, LocaleDefinition, LocaleDictionary, LocaleEnums, LocaleValidationErrorTranslator, LocaleValidationErrorTranslators, ObjectFormatter, ObjectFormatterLike, TableComponentPagingFormatter, TranslatedValidationError };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bootkit/ng0",
3
- "version": "0.0.0-alpha.33",
3
+ "version": "0.0.0-alpha.34",
4
4
  "description": "Angular+Bootstrap Component Library",
5
5
  "homepage": "https://bootkitlib.github.io/",
6
6
  "author": "BootKit",
@@ -43,10 +43,6 @@
43
43
  "types": "./data/index.d.ts",
44
44
  "default": "./fesm2022/bootkit-ng0-data.mjs"
45
45
  },
46
- "./file": {
47
- "types": "./file/index.d.ts",
48
- "default": "./fesm2022/bootkit-ng0-file.mjs"
49
- },
50
46
  "./date": {
51
47
  "types": "./date/index.d.ts",
52
48
  "default": "./fesm2022/bootkit-ng0-date.mjs"
@@ -55,6 +51,10 @@
55
51
  "types": "./form/index.d.ts",
56
52
  "default": "./fesm2022/bootkit-ng0-form.mjs"
57
53
  },
54
+ "./file": {
55
+ "types": "./file/index.d.ts",
56
+ "default": "./fesm2022/bootkit-ng0-file.mjs"
57
+ },
58
58
  "./http": {
59
59
  "types": "./http/index.d.ts",
60
60
  "default": "./fesm2022/bootkit-ng0-http.mjs"
@@ -63,33 +63,29 @@
63
63
  "types": "./localization/index.d.ts",
64
64
  "default": "./fesm2022/bootkit-ng0-localization.mjs"
65
65
  },
66
- "./routing": {
67
- "types": "./routing/index.d.ts",
68
- "default": "./fesm2022/bootkit-ng0-routing.mjs"
66
+ "./script": {
67
+ "types": "./script/index.d.ts",
68
+ "default": "./fesm2022/bootkit-ng0-script.mjs"
69
69
  },
70
70
  "./security": {
71
71
  "types": "./security/index.d.ts",
72
72
  "default": "./fesm2022/bootkit-ng0-security.mjs"
73
73
  },
74
- "./script": {
75
- "types": "./script/index.d.ts",
76
- "default": "./fesm2022/bootkit-ng0-script.mjs"
74
+ "./routing": {
75
+ "types": "./routing/index.d.ts",
76
+ "default": "./fesm2022/bootkit-ng0-routing.mjs"
77
77
  },
78
78
  "./components/accordion": {
79
79
  "types": "./components/accordion/index.d.ts",
80
80
  "default": "./fesm2022/bootkit-ng0-components-accordion.mjs"
81
81
  },
82
- "./components/backdrop": {
83
- "types": "./components/backdrop/index.d.ts",
84
- "default": "./fesm2022/bootkit-ng0-components-backdrop.mjs"
85
- },
86
82
  "./components/button": {
87
83
  "types": "./components/button/index.d.ts",
88
84
  "default": "./fesm2022/bootkit-ng0-components-button.mjs"
89
85
  },
90
- "./components/card": {
91
- "types": "./components/card/index.d.ts",
92
- "default": "./fesm2022/bootkit-ng0-components-card.mjs"
86
+ "./components/backdrop": {
87
+ "types": "./components/backdrop/index.d.ts",
88
+ "default": "./fesm2022/bootkit-ng0-components-backdrop.mjs"
93
89
  },
94
90
  "./components/code": {
95
91
  "types": "./components/code/index.d.ts",
@@ -99,26 +95,30 @@
99
95
  "types": "./components/collapse/index.d.ts",
100
96
  "default": "./fesm2022/bootkit-ng0-components-collapse.mjs"
101
97
  },
102
- "./components/confirmation": {
103
- "types": "./components/confirmation/index.d.ts",
104
- "default": "./fesm2022/bootkit-ng0-components-confirmation.mjs"
98
+ "./components/card": {
99
+ "types": "./components/card/index.d.ts",
100
+ "default": "./fesm2022/bootkit-ng0-components-card.mjs"
105
101
  },
106
102
  "./components/dropdown": {
107
103
  "types": "./components/dropdown/index.d.ts",
108
104
  "default": "./fesm2022/bootkit-ng0-components-dropdown.mjs"
109
105
  },
106
+ "./components/confirmation": {
107
+ "types": "./components/confirmation/index.d.ts",
108
+ "default": "./fesm2022/bootkit-ng0-components-confirmation.mjs"
109
+ },
110
110
  "./components/form-field": {
111
111
  "types": "./components/form-field/index.d.ts",
112
112
  "default": "./fesm2022/bootkit-ng0-components-form-field.mjs"
113
113
  },
114
- "./components/list": {
115
- "types": "./components/list/index.d.ts",
116
- "default": "./fesm2022/bootkit-ng0-components-list.mjs"
117
- },
118
114
  "./components/modal": {
119
115
  "types": "./components/modal/index.d.ts",
120
116
  "default": "./fesm2022/bootkit-ng0-components-modal.mjs"
121
117
  },
118
+ "./components/list": {
119
+ "types": "./components/list/index.d.ts",
120
+ "default": "./fesm2022/bootkit-ng0-components-list.mjs"
121
+ },
122
122
  "./components/nav": {
123
123
  "types": "./components/nav/index.d.ts",
124
124
  "default": "./fesm2022/bootkit-ng0-components-nav.mjs"
@@ -143,22 +143,22 @@
143
143
  "types": "./components/select/index.d.ts",
144
144
  "default": "./fesm2022/bootkit-ng0-components-select.mjs"
145
145
  },
146
- "./components/sidenav": {
147
- "types": "./components/sidenav/index.d.ts",
148
- "default": "./fesm2022/bootkit-ng0-components-sidenav.mjs"
149
- },
150
146
  "./components/stepper": {
151
147
  "types": "./components/stepper/index.d.ts",
152
148
  "default": "./fesm2022/bootkit-ng0-components-stepper.mjs"
153
149
  },
154
- "./components/table": {
155
- "types": "./components/table/index.d.ts",
156
- "default": "./fesm2022/bootkit-ng0-components-table.mjs"
150
+ "./components/sidenav": {
151
+ "types": "./components/sidenav/index.d.ts",
152
+ "default": "./fesm2022/bootkit-ng0-components-sidenav.mjs"
157
153
  },
158
154
  "./components/toast": {
159
155
  "types": "./components/toast/index.d.ts",
160
156
  "default": "./fesm2022/bootkit-ng0-components-toast.mjs"
161
157
  },
158
+ "./components/table": {
159
+ "types": "./components/table/index.d.ts",
160
+ "default": "./fesm2022/bootkit-ng0-components-table.mjs"
161
+ },
162
162
  "./components/tooltip": {
163
163
  "types": "./components/tooltip/index.d.ts",
164
164
  "default": "./fesm2022/bootkit-ng0-components-tooltip.mjs"