@bootkit/ng0 0.0.0-alpha.14 → 0.0.0-alpha.15
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/components/modal/index.d.ts +21 -3
- package/components/table/index.d.ts +1 -1
- 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 +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 +11 -11
- 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 +13 -13
- package/fesm2022/bootkit-ng0-components-confirmation.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-form-field.mjs +13 -13
- package/fesm2022/bootkit-ng0-components-form-field.mjs.map +1 -1
- 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 +26 -26
- 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 +14 -14
- 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-sidenav.mjs +20 -20
- package/fesm2022/bootkit-ng0-components-sidenav.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-stepper.mjs +12 -12
- package/fesm2022/bootkit-ng0-components-stepper.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-table.mjs +55 -77
- package/fesm2022/bootkit-ng0-components-table.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-toast.mjs +6 -6
- 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 +24 -24
- package/fesm2022/bootkit-ng0-components-vertical-menu.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-data.mjs +1 -1
- 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 +24 -24
- 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.map +1 -1
- package/fesm2022/bootkit-ng0-localization.mjs +39 -42
- 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/localization/index.d.ts +3 -3
- package/package.json +8 -8
|
@@ -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">;
|
|
20
|
+
/**
|
|
21
|
+
* Is modal fullscreen?
|
|
22
|
+
*/
|
|
12
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
|
}
|
|
@@ -55,7 +55,7 @@ type TableCellType = 'number' | 'currency' | 'date' | 'time' | {
|
|
|
55
55
|
enum?: {
|
|
56
56
|
/** The name of the enum to use for translation */
|
|
57
57
|
name: string;
|
|
58
|
-
|
|
58
|
+
fallback?: string;
|
|
59
59
|
};
|
|
60
60
|
/** Boolean formatting options */
|
|
61
61
|
boolean?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootkit-ng0-common.mjs","sources":["../../../projects/ng0/common/types.ts","../../../projects/ng0/common/utils.ts","../../../projects/ng0/common/string-utils.ts","../../../projects/ng0/common/rxjs-utils.ts","../../../projects/ng0/common/bootkit-ng0-common.ts"],"sourcesContent":["import { InjectionToken } from \"@angular/core\";\n\nexport type Placement = 'start' | 'end' | 'top' | 'bottom';\nexport type Alignment = 'start' | 'center' | 'end';\nexport const RTL = new InjectionToken<boolean>('RTL Direction');","import { Placement } from \"./types\";\n\n/**\n * Flips the placement direction.\n * @param placement The placement direction to flip.\n * @returns The flipped placement direction.\n */\nexport function flipPlacement(placement: Placement) {\n switch (placement) {\n case 'bottom':\n return 'top'\n case 'top':\n return 'bottom'\n case 'start':\n return 'end'\n case 'end':\n return 'start'\n }\n}\n","/**\n * Formats a string by replacing placeholders with the provided arguments.\n * @param str The string to format, containing placeholders in the form of {0}, {1}, etc.\n * @param args The values to replace the placeholders with.\n * @returns The formatted string.\n */\nexport function formatString(str: string, ...args: any[]) {\n return str.replace(/\\{(\\d+)\\}/g, function (match, index) {\n return args[index];\n });\n}\n","import { from, Observable, of } from 'rxjs';\n\n/**\n * Converts a value to an Observable.\n * If the value is already an Observable, it returns it directly.\n * If the value is a Promise, it converts it to an Observable.\n * If the value is neither, it wraps it in an Observable using `of`.\n * @param value The value to convert.\n * @returns An Observable that emits the value.\n */\nexport function toObservable<T>(value: T | Observable<T> | Promise<T>): Observable<T> {\n if (value instanceof Observable) {\n return value;\n } else if (value instanceof Promise) {\n return from(value);\n } else {\n return of(value);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAIa,GAAG,GAAG,IAAI,cAAc,CAAU,eAAe;;ACF9D;;;;AAIG;AACG,SAAU,aAAa,CAAC,SAAoB,EAAA;IAC9C,QAAQ,SAAS;AACb,QAAA,KAAK,QAAQ;AACT,YAAA,OAAO,KAAK;AAChB,QAAA,KAAK,KAAK;AACN,YAAA,OAAO,QAAQ;AACnB,QAAA,KAAK,OAAO;AACR,YAAA,OAAO,KAAK;AAChB,QAAA,KAAK,KAAK;AACN,YAAA,OAAO,OAAO;;AAE1B;;AClBA;;;;;AAKG;SACa,YAAY,CAAC,GAAW,EAAE,GAAG,IAAW,EAAA;IACpD,OAAO,GAAG,CAAC,OAAO,CAAC,YAAY,EAAE,UAAU,KAAK,EAAE,KAAK,EAAA;AACnD,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC;AACtB,
|
|
1
|
+
{"version":3,"file":"bootkit-ng0-common.mjs","sources":["../../../projects/ng0/common/types.ts","../../../projects/ng0/common/utils.ts","../../../projects/ng0/common/string-utils.ts","../../../projects/ng0/common/rxjs-utils.ts","../../../projects/ng0/common/bootkit-ng0-common.ts"],"sourcesContent":["import { InjectionToken } from \"@angular/core\";\n\nexport type Placement = 'start' | 'end' | 'top' | 'bottom';\nexport type Alignment = 'start' | 'center' | 'end';\nexport const RTL = new InjectionToken<boolean>('RTL Direction');","import { Placement } from \"./types\";\n\n/**\n * Flips the placement direction.\n * @param placement The placement direction to flip.\n * @returns The flipped placement direction.\n */\nexport function flipPlacement(placement: Placement) {\n switch (placement) {\n case 'bottom':\n return 'top'\n case 'top':\n return 'bottom'\n case 'start':\n return 'end'\n case 'end':\n return 'start'\n }\n}\n","/**\n * Formats a string by replacing placeholders with the provided arguments.\n * @param str The string to format, containing placeholders in the form of {0}, {1}, etc.\n * @param args The values to replace the placeholders with.\n * @returns The formatted string.\n */\nexport function formatString(str: string, ...args: any[]) {\n return str.replace(/\\{(\\d+)\\}/g, function (match, index) {\n return args[index];\n });\n}\n","import { from, Observable, of } from 'rxjs';\n\n/**\n * Converts a value to an Observable.\n * If the value is already an Observable, it returns it directly.\n * If the value is a Promise, it converts it to an Observable.\n * If the value is neither, it wraps it in an Observable using `of`.\n * @param value The value to convert.\n * @returns An Observable that emits the value.\n */\nexport function toObservable<T>(value: T | Observable<T> | Promise<T>): Observable<T> {\n if (value instanceof Observable) {\n return value;\n } else if (value instanceof Promise) {\n return from(value);\n } else {\n return of(value);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAIa,GAAG,GAAG,IAAI,cAAc,CAAU,eAAe;;ACF9D;;;;AAIG;AACG,SAAU,aAAa,CAAC,SAAoB,EAAA;IAC9C,QAAQ,SAAS;AACb,QAAA,KAAK,QAAQ;AACT,YAAA,OAAO,KAAK;AAChB,QAAA,KAAK,KAAK;AACN,YAAA,OAAO,QAAQ;AACnB,QAAA,KAAK,OAAO;AACR,YAAA,OAAO,KAAK;AAChB,QAAA,KAAK,KAAK;AACN,YAAA,OAAO,OAAO;;AAE1B;;AClBA;;;;;AAKG;SACa,YAAY,CAAC,GAAW,EAAE,GAAG,IAAW,EAAA;IACpD,OAAO,GAAG,CAAC,OAAO,CAAC,YAAY,EAAE,UAAU,KAAK,EAAE,KAAK,EAAA;AACnD,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC;AACtB,KAAC,CAAC;AACN;;ACRA;;;;;;;AAOG;AACG,SAAU,YAAY,CAAI,KAAqC,EAAA;AACjE,IAAA,IAAI,KAAK,YAAY,UAAU,EAAE;AAC7B,QAAA,OAAO,KAAK;;AACT,SAAA,IAAI,KAAK,YAAY,OAAO,EAAE;AACjC,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC;;SACf;AACH,QAAA,OAAO,EAAE,CAAC,KAAK,CAAC;;AAExB;;AClBA;;AAEG;;;;"}
|
|
@@ -6,8 +6,8 @@ class AccordionItemComponent {
|
|
|
6
6
|
_element;
|
|
7
7
|
_renderer;
|
|
8
8
|
_accordion;
|
|
9
|
-
header = input(
|
|
10
|
-
collapsed = model(true
|
|
9
|
+
header = input();
|
|
10
|
+
collapsed = model(true);
|
|
11
11
|
constructor(_element, _renderer, _accordion) {
|
|
12
12
|
this._element = _element;
|
|
13
13
|
this._renderer = _renderer;
|
|
@@ -22,10 +22,10 @@ class AccordionItemComponent {
|
|
|
22
22
|
}
|
|
23
23
|
}, { allowSignalWrites: true });
|
|
24
24
|
}
|
|
25
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
26
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.
|
|
25
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: AccordionItemComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: AccordionComponent }], target: i0.ɵɵFactoryTarget.Component });
|
|
26
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.6", type: AccordionItemComponent, isStandalone: true, selector: "ng0-accordion-item", inputs: { header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collapsed: "collapsedChange" }, exportAs: ["ng0AccordionItem"], ngImport: i0, template: "<h6 class=\"accordion-header\">\n <button class=\"accordion-button\" type=\"button\" [class.collapsed]=\"collapsed()\" (click)=\"collapsed.set(!collapsed())\">\n {{header()}}\n </button>\n</h6>\n\n<ng0-collapse [collapsed]=\"collapsed()\">\n <div class=\"accordion-body\">\n <ng-content></ng-content>\n </div>\n</ng0-collapse>", styles: [":host{display:block}\n"], dependencies: [{ kind: "component", type: CollapseComponent, selector: "ng0-collapse", inputs: ["collapsed", "timings"], outputs: ["collapsedChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
27
27
|
}
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: AccordionItemComponent, decorators: [{
|
|
29
29
|
type: Component,
|
|
30
30
|
args: [{ selector: 'ng0-accordion-item', exportAs: 'ng0AccordionItem', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
31
31
|
CollapseComponent
|
|
@@ -36,17 +36,17 @@ class AccordionComponent {
|
|
|
36
36
|
_element;
|
|
37
37
|
_renderer;
|
|
38
38
|
/** Items open mode */
|
|
39
|
-
mode = input('single'
|
|
39
|
+
mode = input('single');
|
|
40
40
|
items;
|
|
41
41
|
constructor(_element, _renderer) {
|
|
42
42
|
this._element = _element;
|
|
43
43
|
this._renderer = _renderer;
|
|
44
44
|
this._renderer.addClass(this._element.nativeElement, 'accordion');
|
|
45
45
|
}
|
|
46
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
47
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.
|
|
46
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: AccordionComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
47
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.6", type: AccordionComponent, isStandalone: true, selector: "ng0-accordion", inputs: { mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "items", predicate: AccordionItemComponent }], exportAs: ["ng0Accordion"], ngImport: i0, template: "<ng-content></ng-content>", styles: [":host{display:block}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
48
48
|
}
|
|
49
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
49
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: AccordionComponent, decorators: [{
|
|
50
50
|
type: Component,
|
|
51
51
|
args: [{ selector: 'ng0-accordion', exportAs: 'ng0Accordion', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", styles: [":host{display:block}\n"] }]
|
|
52
52
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { items: [{
|
|
@@ -55,13 +55,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImpor
|
|
|
55
55
|
}] } });
|
|
56
56
|
|
|
57
57
|
class AccordionModule {
|
|
58
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
59
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.
|
|
58
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: AccordionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
59
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.6", ngImport: i0, type: AccordionModule, imports: [AccordionComponent,
|
|
60
60
|
AccordionItemComponent], exports: [AccordionComponent,
|
|
61
61
|
AccordionItemComponent] });
|
|
62
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.
|
|
62
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: AccordionModule, imports: [AccordionItemComponent] });
|
|
63
63
|
}
|
|
64
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
64
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: AccordionModule, decorators: [{
|
|
65
65
|
type: NgModule,
|
|
66
66
|
args: [{
|
|
67
67
|
imports: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootkit-ng0-components-accordion.mjs","sources":["../../../projects/ng0/components/accordion/accordion-item.component.ts","../../../projects/ng0/components/accordion/accordion-item.component.html","../../../projects/ng0/components/accordion/accordion.component.ts","../../../projects/ng0/components/accordion/accordion.component.html","../../../projects/ng0/components/accordion/accordion.module.ts","../../../projects/ng0/components/accordion/bootkit-ng0-components-accordion.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, effect, ElementRef, input, model, Renderer2 } from '@angular/core';\nimport { CollapseComponent } from '@bootkit/ng0/components/collapse';\nimport { AccordionComponent } from './accordion.component';\n\n@Component({\n selector: 'ng0-accordion-item',\n exportAs: 'ng0AccordionItem',\n templateUrl: './accordion-item.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n styles: `:host {display: block;}`,\n imports: [\n CollapseComponent\n ]\n})\nexport class AccordionItemComponent {\n public header = input<string>();\n public collapsed = model(true);\n\n constructor(private _element: ElementRef, private _renderer: Renderer2, private _accordion: AccordionComponent) {\n this._renderer.addClass(this._element.nativeElement, 'accordion-item');\n\n effect(() => {\n var collapsed = this.collapsed();\n \n if(_accordion.mode() == 'single') {\n if(!collapsed) {\n this._accordion.items.filter(x => x !== this).forEach(x => x.collapsed.update(x => true));\n }\n }\n }, {allowSignalWrites: true})\n }\n}\n","<h6 class=\"accordion-header\">\n <button class=\"accordion-button\" type=\"button\" [class.collapsed]=\"collapsed()\" (click)=\"collapsed.set(!collapsed())\">\n {{header()}}\n </button>\n</h6>\n\n<ng0-collapse [collapsed]=\"collapsed()\">\n <div class=\"accordion-body\">\n <ng-content></ng-content>\n </div>\n</ng0-collapse>","import { ChangeDetectionStrategy, Component, ContentChildren, ElementRef, input, QueryList, Renderer2 } from '@angular/core';\nimport { AccordionItemComponent } from './accordion-item.component';\n\n@Component({\n selector: 'ng0-accordion',\n exportAs: 'ng0Accordion',\n templateUrl: './accordion.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n styles: `:host {display: block;}`\n})\nexport class AccordionComponent {\n /** Items open mode */\n public mode = input<'single' | 'multiple'>('single');\n\n @ContentChildren(AccordionItemComponent)\n public readonly items!: QueryList<AccordionItemComponent>;\n\n constructor(private _element: ElementRef, private _renderer: Renderer2) {\n this._renderer.addClass(this._element.nativeElement, 'accordion');\n }\n}\n","<ng-content></ng-content>","import { NgModule } from '@angular/core';\nimport { AccordionComponent } from './accordion.component';\nimport { AccordionItemComponent } from './accordion-item.component';\n\n@NgModule({\n imports: [\n AccordionComponent,\n AccordionItemComponent,\n ],\n exports: [\n AccordionComponent,\n AccordionItemComponent,\n ]\n})\nexport class AccordionModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.AccordionComponent"],"mappings":";;;;MAea,sBAAsB,CAAA;AAIX,IAAA,QAAA;AAA8B,IAAA,SAAA;AAA8B,IAAA,UAAA;IAHzE,MAAM,GAAG,KAAK,
|
|
1
|
+
{"version":3,"file":"bootkit-ng0-components-accordion.mjs","sources":["../../../projects/ng0/components/accordion/accordion-item.component.ts","../../../projects/ng0/components/accordion/accordion-item.component.html","../../../projects/ng0/components/accordion/accordion.component.ts","../../../projects/ng0/components/accordion/accordion.component.html","../../../projects/ng0/components/accordion/accordion.module.ts","../../../projects/ng0/components/accordion/bootkit-ng0-components-accordion.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, effect, ElementRef, input, model, Renderer2 } from '@angular/core';\nimport { CollapseComponent } from '@bootkit/ng0/components/collapse';\nimport { AccordionComponent } from './accordion.component';\n\n@Component({\n selector: 'ng0-accordion-item',\n exportAs: 'ng0AccordionItem',\n templateUrl: './accordion-item.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n styles: `:host {display: block;}`,\n imports: [\n CollapseComponent\n ]\n})\nexport class AccordionItemComponent {\n public header = input<string>();\n public collapsed = model(true);\n\n constructor(private _element: ElementRef, private _renderer: Renderer2, private _accordion: AccordionComponent) {\n this._renderer.addClass(this._element.nativeElement, 'accordion-item');\n\n effect(() => {\n var collapsed = this.collapsed();\n \n if(_accordion.mode() == 'single') {\n if(!collapsed) {\n this._accordion.items.filter(x => x !== this).forEach(x => x.collapsed.update(x => true));\n }\n }\n }, {allowSignalWrites: true})\n }\n}\n","<h6 class=\"accordion-header\">\n <button class=\"accordion-button\" type=\"button\" [class.collapsed]=\"collapsed()\" (click)=\"collapsed.set(!collapsed())\">\n {{header()}}\n </button>\n</h6>\n\n<ng0-collapse [collapsed]=\"collapsed()\">\n <div class=\"accordion-body\">\n <ng-content></ng-content>\n </div>\n</ng0-collapse>","import { ChangeDetectionStrategy, Component, ContentChildren, ElementRef, input, QueryList, Renderer2 } from '@angular/core';\nimport { AccordionItemComponent } from './accordion-item.component';\n\n@Component({\n selector: 'ng0-accordion',\n exportAs: 'ng0Accordion',\n templateUrl: './accordion.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n styles: `:host {display: block;}`\n})\nexport class AccordionComponent {\n /** Items open mode */\n public mode = input<'single' | 'multiple'>('single');\n\n @ContentChildren(AccordionItemComponent)\n public readonly items!: QueryList<AccordionItemComponent>;\n\n constructor(private _element: ElementRef, private _renderer: Renderer2) {\n this._renderer.addClass(this._element.nativeElement, 'accordion');\n }\n}\n","<ng-content></ng-content>","import { NgModule } from '@angular/core';\nimport { AccordionComponent } from './accordion.component';\nimport { AccordionItemComponent } from './accordion-item.component';\n\n@NgModule({\n imports: [\n AccordionComponent,\n AccordionItemComponent,\n ],\n exports: [\n AccordionComponent,\n AccordionItemComponent,\n ]\n})\nexport class AccordionModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.AccordionComponent"],"mappings":";;;;MAea,sBAAsB,CAAA;AAIX,IAAA,QAAA;AAA8B,IAAA,SAAA;AAA8B,IAAA,UAAA;IAHzE,MAAM,GAAG,KAAK,EAAU;AACxB,IAAA,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC;AAE9B,IAAA,WAAA,CAAoB,QAAoB,EAAU,SAAoB,EAAU,UAA8B,EAAA;QAA1F,IAAQ,CAAA,QAAA,GAAR,QAAQ;QAAsB,IAAS,CAAA,SAAA,GAAT,SAAS;QAAqB,IAAU,CAAA,UAAA,GAAV,UAAU;AACtF,QAAA,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,gBAAgB,CAAC;QAEtE,MAAM,CAAC,MAAK;AACR,YAAA,IAAI,SAAS,GAAG,IAAI,CAAC,SAAS,EAAE;AAEhC,YAAA,IAAG,UAAU,CAAC,IAAI,EAAE,IAAI,QAAQ,EAAE;gBAC9B,IAAG,CAAC,SAAS,EAAE;AACX,oBAAA,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC;;;AAGrG,SAAC,EAAE,EAAC,iBAAiB,EAAE,IAAI,EAAC,CAAC;;uGAfxB,sBAAsB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,SAAA,EAAA,EAAA,EAAA,KAAA,EAAAA,kBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAtB,s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,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAf,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YARpB,kBAAkB;AAClB,YAAA,sBAAsB,aAGtB,kBAAkB;YAClB,sBAAsB,CAAA,EAAA,CAAA;AAGjB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAPpB,sBAAsB,CAAA,EAAA,CAAA;;2FAOjB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAV3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,kBAAkB;wBAClB,sBAAsB;AACzB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,kBAAkB;wBAClB,sBAAsB;AACzB;AACJ,iBAAA;;;ACbD;;AAEG;;;;"}
|
|
@@ -6,9 +6,9 @@ import { trigger, transition, style, animate } from '@angular/animations';
|
|
|
6
6
|
* This component is used to display a backdrop behind another component.
|
|
7
7
|
*/
|
|
8
8
|
class BackdropComponent {
|
|
9
|
-
fixed = signal(false
|
|
10
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
11
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
9
|
+
fixed = signal(false);
|
|
10
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: BackdropComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.6", type: BackdropComponent, isStandalone: true, selector: "ng0-backdrop", host: { properties: { "@fade": "", "class.fixed": "fixed()" } }, ngImport: i0, template: '', isInline: true, styles: [":host{--ng0-backdrop-background: rgba(0, 0, 0, .5);position:absolute;inset:0;background:var(--ng0-backdrop-background)}:host.fixed{position:fixed}\n"], animations: [
|
|
12
12
|
trigger('fade', [
|
|
13
13
|
transition(':enter', [
|
|
14
14
|
style({ opacity: 0 }),
|
|
@@ -20,7 +20,7 @@ class BackdropComponent {
|
|
|
20
20
|
]),
|
|
21
21
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
22
22
|
}
|
|
23
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: BackdropComponent, decorators: [{
|
|
24
24
|
type: Component,
|
|
25
25
|
args: [{ selector: 'ng0-backdrop', template: '', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, animations: [
|
|
26
26
|
trigger('fade', [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootkit-ng0-components-backdrop.mjs","sources":["../../../projects/ng0/components/backdrop/backdrop.component.ts","../../../projects/ng0/components/backdrop/bootkit-ng0-components-backdrop.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, signal } from '@angular/core';\nimport {\n trigger,\n transition,\n style,\n animate,\n} from '@angular/animations';\n\n/**\n * This component is used to display a backdrop behind another component.\n */\n@Component({\n selector: 'ng0-backdrop',\n template: '',\n styleUrl: 'backdrop.component.scss',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [\n trigger('fade', [\n transition(':enter', [\n style({ opacity: 0 }),\n animate('150ms ease', style({ opacity: 1 })),\n ]),\n transition(':leave', [\n animate('150ms ease', style({ opacity: 0 })),\n ]),\n ]),\n ],\n host: {\n '[@fade]': '', // Binds the animation trigger to the host\n '[class.fixed]': \"fixed()\"\n }\n})\nexport class BackdropComponent {\n public readonly fixed = signal(false);\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAQA;;AAEG;MAuBU,iBAAiB,CAAA;AACZ,IAAA,KAAK,GAAG,MAAM,CAAC,KAAK,
|
|
1
|
+
{"version":3,"file":"bootkit-ng0-components-backdrop.mjs","sources":["../../../projects/ng0/components/backdrop/backdrop.component.ts","../../../projects/ng0/components/backdrop/bootkit-ng0-components-backdrop.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, signal } from '@angular/core';\nimport {\n trigger,\n transition,\n style,\n animate,\n} from '@angular/animations';\n\n/**\n * This component is used to display a backdrop behind another component.\n */\n@Component({\n selector: 'ng0-backdrop',\n template: '',\n styleUrl: 'backdrop.component.scss',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [\n trigger('fade', [\n transition(':enter', [\n style({ opacity: 0 }),\n animate('150ms ease', style({ opacity: 1 })),\n ]),\n transition(':leave', [\n animate('150ms ease', style({ opacity: 0 })),\n ]),\n ]),\n ],\n host: {\n '[@fade]': '', // Binds the animation trigger to the host\n '[class.fixed]': \"fixed()\"\n }\n})\nexport class BackdropComponent {\n public readonly fixed = signal(false);\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAQA;;AAEG;MAuBU,iBAAiB,CAAA;AACZ,IAAA,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;uGAD1B,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,OAAA,EAAA,EAAA,EAAA,aAAA,EAAA,SAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,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 +13,24 @@ class ButtonDirective {
|
|
|
13
13
|
* The IDs of the HTTP requests that this button listens to.
|
|
14
14
|
* If one of these requests is in progress, it will show a loading indicator or will be disabled based on 'showLoading' and 'disableOnLoading' properties.
|
|
15
15
|
*/
|
|
16
|
-
request = input(undefined
|
|
16
|
+
request = input(undefined);
|
|
17
17
|
/**
|
|
18
18
|
* Whether the button is disabled or not.
|
|
19
19
|
*/
|
|
20
|
-
disabled = model(false
|
|
20
|
+
disabled = model(false);
|
|
21
21
|
/**
|
|
22
22
|
* Whether to wait for the HTTP response before enabling the button again.
|
|
23
23
|
* If true, the button will remain disabled until the HTTP request completes.
|
|
24
24
|
* This is useful for preventing multiple clicks while waiting for a response.
|
|
25
25
|
* Default is true.
|
|
26
26
|
*/
|
|
27
|
-
disableDuringRequest = input(true,
|
|
27
|
+
disableDuringRequest = input(true, { transform: booleanAttribute });
|
|
28
28
|
/**
|
|
29
29
|
* Whether to show a loading indicator when the HTTP request is in progress.
|
|
30
30
|
* If true, a loading spinner will be displayed on the button while the request is being processed.
|
|
31
31
|
* Default is true.
|
|
32
32
|
*/
|
|
33
|
-
loadingIndicator = input(false,
|
|
33
|
+
loadingIndicator = input(false, { transform: booleanAttribute });
|
|
34
34
|
constructor(_element, _renderer, _http, _destroyRef) {
|
|
35
35
|
this._element = _element;
|
|
36
36
|
this._renderer = _renderer;
|
|
@@ -76,10 +76,10 @@ class ButtonDirective {
|
|
|
76
76
|
}
|
|
77
77
|
ngOnDestroy() {
|
|
78
78
|
}
|
|
79
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
80
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.
|
|
79
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: ButtonDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.HttpService }, { token: i0.DestroyRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
80
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.6", type: ButtonDirective, isStandalone: true, selector: "button[ng0Button], a[ng0Button], input[type=button][ng0Button], input[type=submit][ng0Button], input[type=reset][ng0Button]", inputs: { request: { classPropertyName: "request", publicName: "request", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, disableDuringRequest: { classPropertyName: "disableDuringRequest", publicName: "disableDuringRequest", isSignal: true, isRequired: false, transformFunction: null }, loadingIndicator: { classPropertyName: "loadingIndicator", publicName: "loadingIndicator", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { disabled: "disabledChange" }, host: { properties: { "class.disabled": "disabled()", "prop.disabled": "disabled()", "attr.aria-disabled": "disabled()", "attr.tabindex": "disabled() ? \"-1\" : \"\" " } }, exportAs: ["ng0Button"], ngImport: i0 });
|
|
81
81
|
}
|
|
82
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
82
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: ButtonDirective, decorators: [{
|
|
83
83
|
type: Directive,
|
|
84
84
|
args: [{
|
|
85
85
|
selector: 'button[ng0Button], a[ng0Button], input[type=button][ng0Button], input[type=submit][ng0Button], input[type=reset][ng0Button]',
|
|
@@ -95,11 +95,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImpor
|
|
|
95
95
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1.HttpService }, { type: i0.DestroyRef }] });
|
|
96
96
|
|
|
97
97
|
class ButtonModule {
|
|
98
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
99
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.
|
|
100
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.
|
|
98
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: ButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
99
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.6", ngImport: i0, type: ButtonModule, imports: [ButtonDirective], exports: [ButtonDirective] });
|
|
100
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: ButtonModule });
|
|
101
101
|
}
|
|
102
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
102
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: ButtonModule, decorators: [{
|
|
103
103
|
type: NgModule,
|
|
104
104
|
args: [{
|
|
105
105
|
imports: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootkit-ng0-components-button.mjs","sources":["../../../projects/ng0/components/button/button.directive.ts","../../../projects/ng0/components/button/button.module.ts","../../../projects/ng0/components/button/bootkit-ng0-components-button.ts"],"sourcesContent":["import { Directive, Renderer2, ElementRef, OnInit, OnDestroy, input, DestroyRef, model, booleanAttribute } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { HttpService } from '@bootkit/ng0/http';\n\n@Directive({\n selector: 'button[ng0Button], a[ng0Button], input[type=button][ng0Button], input[type=submit][ng0Button], input[type=reset][ng0Button]',\n exportAs: 'ng0Button',\n standalone: true,\n host: {\n '[class.disabled]': 'disabled()',\n '[prop.disabled]': 'disabled()',\n '[attr.aria-disabled]': 'disabled()',\n '[attr.tabindex]': 'disabled() ? \"-1\" : \"\" ',\n }\n})\nexport class ButtonDirective implements OnInit, OnDestroy {\n private _loadingElement: any;\n\n /**\n * The IDs of the HTTP requests that this button listens to.\n * If one of these requests is in progress, it will show a loading indicator or will be disabled based on 'showLoading' and 'disableOnLoading' properties.\n */\n public request = input<string | string[] | undefined>(undefined);\n\n /** \n * Whether the button is disabled or not.\n */\n public disabled = model<boolean>(false);\n\n /**\n * Whether to wait for the HTTP response before enabling the button again.\n * If true, the button will remain disabled until the HTTP request completes.\n * This is useful for preventing multiple clicks while waiting for a response.\n * Default is true.\n */\n public disableDuringRequest = input(true, {transform: booleanAttribute});\n\n /**\n * Whether to show a loading indicator when the HTTP request is in progress.\n * If true, a loading spinner will be displayed on the button while the request is being processed.\n * Default is true.\n */\n public loadingIndicator = input(false, {transform: booleanAttribute});\n\n constructor(\n private _element: ElementRef,\n private _renderer: Renderer2,\n private _http: HttpService,\n private _destroyRef: DestroyRef) {\n }\n\n ngOnInit(): void {\n this._renderer.setStyle(this._element.nativeElement, \"position\", \"relative\");\n\n if (this.request()) {\n this._http.events.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(e => {\n var ids = (Array.isArray(this.request()) ? this.request() : [this.request()]) as string[];\n\n if (ids.includes(e?.options?.id)) {\n let requestInProgress = e.type === 'Send' || e.type === 'Progress';\n\n if (this.disableDuringRequest()) {\n this.disabled.set(requestInProgress);\n }\n\n if (this.loadingIndicator()) {\n if (requestInProgress) {\n this._showLoading();\n } else {\n this._hideLoading();\n }\n }\n }\n });\n }\n }\n\n // @HostListener('click', ['$event']) private _onClick(e: MouseEvent): void {\n // if (!this._disabled) {\n // }\n // }\n\n private _showLoading() {\n this._loadingElement = this._renderer.createElement(\"div\");\n [\"spinner-grow\", \"spinner-grow-sm\", \"text-warning\"].forEach(s => this._renderer.addClass(this._loadingElement, s));\n this._renderer.setStyle(this._loadingElement, \"position\", \"absolute\");\n this._renderer.setStyle(this._loadingElement, \"top\", \"-25%\");\n this._renderer.setStyle(this._loadingElement, \"left\", \"-5px\");\n this._renderer.appendChild(this._element.nativeElement, this._loadingElement);\n }\n\n private _hideLoading() {\n this._renderer.removeChild(this._element.nativeElement, this._loadingElement);\n }\n\n ngOnDestroy(): void {\n }\n}\n","import { NgModule } from '@angular/core';\nimport { ButtonDirective } from './button.directive';\n\n@NgModule({\n imports: [\n ButtonDirective,\n ],\n exports: [\n ButtonDirective,\n ]\n})\nexport class ButtonModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAea,eAAe,CAAA;AA8BhB,IAAA,QAAA;AACA,IAAA,SAAA;AACA,IAAA,KAAA;AACA,IAAA,WAAA;AAhCF,IAAA,eAAe;AAEvB;;;AAGG;AACI,IAAA,OAAO,GAAG,KAAK,CAAgC,SAAS,
|
|
1
|
+
{"version":3,"file":"bootkit-ng0-components-button.mjs","sources":["../../../projects/ng0/components/button/button.directive.ts","../../../projects/ng0/components/button/button.module.ts","../../../projects/ng0/components/button/bootkit-ng0-components-button.ts"],"sourcesContent":["import { Directive, Renderer2, ElementRef, OnInit, OnDestroy, input, DestroyRef, model, booleanAttribute } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { HttpService } from '@bootkit/ng0/http';\n\n@Directive({\n selector: 'button[ng0Button], a[ng0Button], input[type=button][ng0Button], input[type=submit][ng0Button], input[type=reset][ng0Button]',\n exportAs: 'ng0Button',\n standalone: true,\n host: {\n '[class.disabled]': 'disabled()',\n '[prop.disabled]': 'disabled()',\n '[attr.aria-disabled]': 'disabled()',\n '[attr.tabindex]': 'disabled() ? \"-1\" : \"\" ',\n }\n})\nexport class ButtonDirective implements OnInit, OnDestroy {\n private _loadingElement: any;\n\n /**\n * The IDs of the HTTP requests that this button listens to.\n * If one of these requests is in progress, it will show a loading indicator or will be disabled based on 'showLoading' and 'disableOnLoading' properties.\n */\n public request = input<string | string[] | undefined>(undefined);\n\n /** \n * Whether the button is disabled or not.\n */\n public disabled = model<boolean>(false);\n\n /**\n * Whether to wait for the HTTP response before enabling the button again.\n * If true, the button will remain disabled until the HTTP request completes.\n * This is useful for preventing multiple clicks while waiting for a response.\n * Default is true.\n */\n public disableDuringRequest = input(true, {transform: booleanAttribute});\n\n /**\n * Whether to show a loading indicator when the HTTP request is in progress.\n * If true, a loading spinner will be displayed on the button while the request is being processed.\n * Default is true.\n */\n public loadingIndicator = input(false, {transform: booleanAttribute});\n\n constructor(\n private _element: ElementRef,\n private _renderer: Renderer2,\n private _http: HttpService,\n private _destroyRef: DestroyRef) {\n }\n\n ngOnInit(): void {\n this._renderer.setStyle(this._element.nativeElement, \"position\", \"relative\");\n\n if (this.request()) {\n this._http.events.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(e => {\n var ids = (Array.isArray(this.request()) ? this.request() : [this.request()]) as string[];\n\n if (ids.includes(e?.options?.id)) {\n let requestInProgress = e.type === 'Send' || e.type === 'Progress';\n\n if (this.disableDuringRequest()) {\n this.disabled.set(requestInProgress);\n }\n\n if (this.loadingIndicator()) {\n if (requestInProgress) {\n this._showLoading();\n } else {\n this._hideLoading();\n }\n }\n }\n });\n }\n }\n\n // @HostListener('click', ['$event']) private _onClick(e: MouseEvent): void {\n // if (!this._disabled) {\n // }\n // }\n\n private _showLoading() {\n this._loadingElement = this._renderer.createElement(\"div\");\n [\"spinner-grow\", \"spinner-grow-sm\", \"text-warning\"].forEach(s => this._renderer.addClass(this._loadingElement, s));\n this._renderer.setStyle(this._loadingElement, \"position\", \"absolute\");\n this._renderer.setStyle(this._loadingElement, \"top\", \"-25%\");\n this._renderer.setStyle(this._loadingElement, \"left\", \"-5px\");\n this._renderer.appendChild(this._element.nativeElement, this._loadingElement);\n }\n\n private _hideLoading() {\n this._renderer.removeChild(this._element.nativeElement, this._loadingElement);\n }\n\n ngOnDestroy(): void {\n }\n}\n","import { NgModule } from '@angular/core';\nimport { ButtonDirective } from './button.directive';\n\n@NgModule({\n imports: [\n ButtonDirective,\n ],\n exports: [\n ButtonDirective,\n ]\n})\nexport class ButtonModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":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,EAAA,CAAA;kBAX3B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,6HAA6H;AACvI,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE;AACJ,wBAAA,kBAAkB,EAAE,YAAY;AAChC,wBAAA,iBAAiB,EAAE,YAAY;AAC/B,wBAAA,sBAAsB,EAAE,YAAY;AACpC,wBAAA,iBAAiB,EAAE,yBAAyB;AAC7C;AACF,iBAAA;;;MCHY,YAAY,CAAA;uGAAZ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAZ,YAAY,EAAA,OAAA,EAAA,CANrB,eAAe,CAAA,EAAA,OAAA,EAAA,CAGf,eAAe,CAAA,EAAA,CAAA;wGAGN,YAAY,EAAA,CAAA;;2FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBARxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,eAAe;AAChB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,eAAe;AAChB;AACF,iBAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -6,16 +6,16 @@ import { CommonModule } from '@angular/common';
|
|
|
6
6
|
class CardComponent {
|
|
7
7
|
_element;
|
|
8
8
|
_renderer;
|
|
9
|
-
header = input(
|
|
9
|
+
header = input();
|
|
10
10
|
constructor(_element, _renderer) {
|
|
11
11
|
this._element = _element;
|
|
12
12
|
this._renderer = _renderer;
|
|
13
13
|
this._renderer.addClass(this._element.nativeElement, 'card');
|
|
14
14
|
}
|
|
15
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
16
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.
|
|
15
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: CardComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
16
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.6", type: CardComponent, isStandalone: true, selector: "ng0-card", inputs: { header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["ng0Card"], ngImport: i0, template: "<div *ngIf=\"header()\" class=\"card-header\">\n {{header()}}\n</div>\n\n<div class=\"card-body\">\n <ng-content></ng-content>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
17
17
|
}
|
|
18
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: CardComponent, decorators: [{
|
|
19
19
|
type: Component,
|
|
20
20
|
args: [{ selector: 'ng0-card', exportAs: 'ng0Card', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule], template: "<div *ngIf=\"header()\" class=\"card-header\">\n {{header()}}\n</div>\n\n<div class=\"card-body\">\n <ng-content></ng-content>\n</div>\n" }]
|
|
21
21
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }] });
|
|
@@ -27,10 +27,10 @@ class CardHeaderComponent {
|
|
|
27
27
|
this._element = _element;
|
|
28
28
|
this._renderer = _renderer;
|
|
29
29
|
}
|
|
30
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
31
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
30
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: CardHeaderComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
31
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.6", type: CardHeaderComponent, isStandalone: true, selector: "ng0-card-header", exportAs: ["ng0CardHeader"], ngImport: i0, template: "<ng-content></ng-content>", dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
32
32
|
}
|
|
33
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: CardHeaderComponent, decorators: [{
|
|
34
34
|
type: Component,
|
|
35
35
|
args: [{ selector: 'ng0-card-header', exportAs: 'ng0CardHeader', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule], template: "<ng-content></ng-content>" }]
|
|
36
36
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }] });
|
|
@@ -40,13 +40,13 @@ const DECLARES = [
|
|
|
40
40
|
CardHeaderComponent
|
|
41
41
|
];
|
|
42
42
|
class CardModule {
|
|
43
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
44
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.
|
|
43
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: CardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
44
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.6", ngImport: i0, type: CardModule, imports: [CardComponent,
|
|
45
45
|
CardHeaderComponent], exports: [CardComponent,
|
|
46
46
|
CardHeaderComponent] });
|
|
47
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.
|
|
47
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: CardModule, imports: [DECLARES] });
|
|
48
48
|
}
|
|
49
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
49
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: CardModule, decorators: [{
|
|
50
50
|
type: NgModule,
|
|
51
51
|
args: [{
|
|
52
52
|
imports: DECLARES,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootkit-ng0-components-card.mjs","sources":["../../../projects/ng0/components/card/card.component.ts","../../../projects/ng0/components/card/card.component.html","../../../projects/ng0/components/card/card-header.component.ts","../../../projects/ng0/components/card/card-header.component.html","../../../projects/ng0/components/card/card.module.ts","../../../projects/ng0/components/card/bootkit-ng0-components-card.ts"],"sourcesContent":["import { Component, ElementRef, Renderer2, ContentChild, ChangeDetectionStrategy, input } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'ng0-card',\n exportAs: 'ng0Card',\n templateUrl: 'card.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [CommonModule]\n})\nexport class CardComponent {\n public header = input<string>();\n \n constructor(private _element: ElementRef, private _renderer: Renderer2) {\n this._renderer.addClass(this._element.nativeElement, 'card'); \n }\n}\n","<div *ngIf=\"header()\" class=\"card-header\">\n {{header()}}\n</div>\n\n<div class=\"card-body\">\n <ng-content></ng-content>\n</div>\n","import { Component, ElementRef, Renderer2, ChangeDetectionStrategy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'ng0-card-header',\n exportAs: 'ng0CardHeader',\n templateUrl: 'card-header.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [CommonModule]\n})\nexport class CardHeaderComponent {\n constructor(private _element: ElementRef, private _renderer: Renderer2) { \n }\n}\n","<ng-content></ng-content>","import { NgModule } from '@angular/core';\nimport { CardComponent } from './card.component';\nimport { CardHeaderComponent } from './card-header.component';\n\nconst DECLARES = [\n CardComponent,\n CardHeaderComponent\n];\n\n@NgModule({\n imports: DECLARES,\n exports: DECLARES\n})\nexport class CardModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAWa,aAAa,CAAA;AAGF,IAAA,QAAA;AAA8B,IAAA,SAAA;IAF3C,MAAM,GAAG,KAAK,
|
|
1
|
+
{"version":3,"file":"bootkit-ng0-components-card.mjs","sources":["../../../projects/ng0/components/card/card.component.ts","../../../projects/ng0/components/card/card.component.html","../../../projects/ng0/components/card/card-header.component.ts","../../../projects/ng0/components/card/card-header.component.html","../../../projects/ng0/components/card/card.module.ts","../../../projects/ng0/components/card/bootkit-ng0-components-card.ts"],"sourcesContent":["import { Component, ElementRef, Renderer2, ContentChild, ChangeDetectionStrategy, input } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'ng0-card',\n exportAs: 'ng0Card',\n templateUrl: 'card.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [CommonModule]\n})\nexport class CardComponent {\n public header = input<string>();\n \n constructor(private _element: ElementRef, private _renderer: Renderer2) {\n this._renderer.addClass(this._element.nativeElement, 'card'); \n }\n}\n","<div *ngIf=\"header()\" class=\"card-header\">\n {{header()}}\n</div>\n\n<div class=\"card-body\">\n <ng-content></ng-content>\n</div>\n","import { Component, ElementRef, Renderer2, ChangeDetectionStrategy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'ng0-card-header',\n exportAs: 'ng0CardHeader',\n templateUrl: 'card-header.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [CommonModule]\n})\nexport class CardHeaderComponent {\n constructor(private _element: ElementRef, private _renderer: Renderer2) { \n }\n}\n","<ng-content></ng-content>","import { NgModule } from '@angular/core';\nimport { CardComponent } from './card.component';\nimport { CardHeaderComponent } from './card-header.component';\n\nconst DECLARES = [\n CardComponent,\n CardHeaderComponent\n];\n\n@NgModule({\n imports: DECLARES,\n exports: DECLARES\n})\nexport class CardModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAWa,aAAa,CAAA;AAGF,IAAA,QAAA;AAA8B,IAAA,SAAA;IAF3C,MAAM,GAAG,KAAK,EAAU;IAE/B,WAAoB,CAAA,QAAoB,EAAU,SAAoB,EAAA;QAAlD,IAAQ,CAAA,QAAA,GAAR,QAAQ;QAAsB,IAAS,CAAA,SAAA,GAAT,SAAS;AACvD,QAAA,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;;uGAJvD,aAAa,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,SAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAb,aAAa,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,EAAA,MAAA,EAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,UAAA,EAAA,QAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECX1B,gJAOA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDEc,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,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EACP,CAAC,YAAY,CAAC,EAAA,QAAA,EAAA,2BAAA,EAAA;;;AEL3B,MAAM,QAAQ,GAAG;IACb,aAAa;IACb;CACH;MAMY,UAAU,CAAA;uGAAV,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAV,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAU,YARnB,aAAa;AACb,YAAA,mBAAmB,aADnB,aAAa;YACb,mBAAmB,CAAA,EAAA,CAAA;AAOV,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAU,YAHV,QAAQ,CAAA,EAAA,CAAA;;2FAGR,UAAU,EAAA,UAAA,EAAA,CAAA;kBAJtB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,QAAQ;AACjB,oBAAA,OAAO,EAAE;AACZ,iBAAA;;;ACZD;;AAEG;;;;"}
|
|
@@ -25,10 +25,10 @@ class CodeFormatters {
|
|
|
25
25
|
find(name) {
|
|
26
26
|
return this._formatters.find(x => x.name == name);
|
|
27
27
|
}
|
|
28
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
29
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
28
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: CodeFormatters, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
29
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: CodeFormatters, providedIn: 'root' });
|
|
30
30
|
}
|
|
31
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: CodeFormatters, decorators: [{
|
|
32
32
|
type: Injectable,
|
|
33
33
|
args: [{
|
|
34
34
|
providedIn: 'root'
|
|
@@ -39,9 +39,9 @@ class CodeComponent {
|
|
|
39
39
|
formatters;
|
|
40
40
|
domSanitizer;
|
|
41
41
|
/** Code formatter name */
|
|
42
|
-
formatter = input.required(
|
|
42
|
+
formatter = input.required();
|
|
43
43
|
/** Code */
|
|
44
|
-
code = input.required(
|
|
44
|
+
code = input.required();
|
|
45
45
|
_safeHtml = computed(() => {
|
|
46
46
|
var frmt = this.formatters.find(this.formatter());
|
|
47
47
|
if (frmt == null) {
|
|
@@ -49,15 +49,15 @@ class CodeComponent {
|
|
|
49
49
|
return undefined;
|
|
50
50
|
}
|
|
51
51
|
return this.domSanitizer.bypassSecurityTrustHtml(frmt.format(this.code()));
|
|
52
|
-
}
|
|
52
|
+
});
|
|
53
53
|
constructor(formatters, domSanitizer) {
|
|
54
54
|
this.formatters = formatters;
|
|
55
55
|
this.domSanitizer = domSanitizer;
|
|
56
56
|
}
|
|
57
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
58
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
57
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: CodeComponent, deps: [{ token: CodeFormatters }, { token: i2.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
|
|
58
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: CodeComponent, isStandalone: true, selector: "ng0-code", inputs: { formatter: { classPropertyName: "formatter", publicName: "formatter", isSignal: true, isRequired: true, transformFunction: null }, code: { classPropertyName: "code", publicName: "code", isSignal: true, isRequired: true, transformFunction: null } }, exportAs: ["ng0Code"], ngImport: i0, template: "<pre class=\"language-{{formatter()}} formatter-{{formatter()}}\">@if(_safeHtml()) {<code class=\"language-{{formatter()}} formatter-{{formatter()}}\" [innerHtml]=\"_safeHtml()\" ></code>}@else {<code class=\"language-{{formatter()}} formatter-{{formatter()}}\" [innerText]=\"code()\"></code>}</pre>", styles: [":host{display:block}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
59
59
|
}
|
|
60
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
60
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: CodeComponent, decorators: [{
|
|
61
61
|
type: Component,
|
|
62
62
|
args: [{ selector: 'ng0-code', exportAs: 'ng0Code', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<pre class=\"language-{{formatter()}} formatter-{{formatter()}}\">@if(_safeHtml()) {<code class=\"language-{{formatter()}} formatter-{{formatter()}}\" [innerHtml]=\"_safeHtml()\" ></code>}@else {<code class=\"language-{{formatter()}} formatter-{{formatter()}}\" [innerText]=\"code()\"></code>}</pre>", styles: [":host{display:block}\n"] }]
|
|
63
63
|
}], ctorParameters: () => [{ type: CodeFormatters }, { type: i2.DomSanitizer }] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootkit-ng0-components-code.mjs","sources":["../../../projects/ng0/components/code/types.ts","../../../projects/ng0/components/code/code-formatters.ts","../../../projects/ng0/components/code/code.component.ts","../../../projects/ng0/components/code/code.component.html","../../../projects/ng0/components/code/bootkit-ng0-components-code.ts"],"sourcesContent":["export type CodeFormatterFunc = (code: string) => string;\n\nexport class CodeFormatter {\n constructor(public readonly name: string, public readonly format: CodeFormatterFunc) {\n }\n}\n","import { Injectable } from '@angular/core';\nimport { CodeFormatter, CodeFormatterFunc } from './types';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CodeFormatters {\n private _formatters = new Array<CodeFormatter>();\n\n constructor() { }\n\n add(name: string, func: CodeFormatterFunc): CodeFormatter {\n var formatter = this._formatters.find(x => x.name == name);\n if (!formatter) {\n formatter = new CodeFormatter(name, func);\n this._formatters.push(formatter);\n }\n\n return formatter;\n }\n\n find(name: string) {\n return this._formatters.find(x => x.name == name);\n }\n}\n\n","import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { CodeFormatters } from './code-formatters';\n\n@Component({\n selector: 'ng0-code',\n exportAs: 'ng0Code',\n styleUrls: ['./code.component.scss'],\n templateUrl: './code.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CodeComponent {\n\n /** Code formatter name */\n formatter = input.required<string>();\n\n /** Code */\n code = input.required<string>();\n\n protected _safeHtml = computed(() => {\n var frmt = this.formatters.find(this.formatter());\n\n if (frmt == null) {\n console.warn(`Code formatter named \"${this.formatter()}\" not found.`)\n return undefined;\n }\n\n return this.domSanitizer.bypassSecurityTrustHtml(frmt.format(this.code()));\n })\n\n constructor(private formatters: CodeFormatters, private domSanitizer: DomSanitizer) { }\n}\n","<pre class=\"language-{{formatter()}} formatter-{{formatter()}}\">@if(_safeHtml()) {<code class=\"language-{{formatter()}} formatter-{{formatter()}}\" [innerHtml]=\"_safeHtml()\" ></code>}@else {<code class=\"language-{{formatter()}} formatter-{{formatter()}}\" [innerText]=\"code()\"></code>}</pre>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.CodeFormatters"],"mappings":";;;;MAEa,aAAa,CAAA;AACM,IAAA,IAAA;AAA8B,IAAA,MAAA;IAA1D,
|
|
1
|
+
{"version":3,"file":"bootkit-ng0-components-code.mjs","sources":["../../../projects/ng0/components/code/types.ts","../../../projects/ng0/components/code/code-formatters.ts","../../../projects/ng0/components/code/code.component.ts","../../../projects/ng0/components/code/code.component.html","../../../projects/ng0/components/code/bootkit-ng0-components-code.ts"],"sourcesContent":["export type CodeFormatterFunc = (code: string) => string;\n\nexport class CodeFormatter {\n constructor(public readonly name: string, public readonly format: CodeFormatterFunc) {\n }\n}\n","import { Injectable } from '@angular/core';\nimport { CodeFormatter, CodeFormatterFunc } from './types';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CodeFormatters {\n private _formatters = new Array<CodeFormatter>();\n\n constructor() { }\n\n add(name: string, func: CodeFormatterFunc): CodeFormatter {\n var formatter = this._formatters.find(x => x.name == name);\n if (!formatter) {\n formatter = new CodeFormatter(name, func);\n this._formatters.push(formatter);\n }\n\n return formatter;\n }\n\n find(name: string) {\n return this._formatters.find(x => x.name == name);\n }\n}\n\n","import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { CodeFormatters } from './code-formatters';\n\n@Component({\n selector: 'ng0-code',\n exportAs: 'ng0Code',\n styleUrls: ['./code.component.scss'],\n templateUrl: './code.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CodeComponent {\n\n /** Code formatter name */\n formatter = input.required<string>();\n\n /** Code */\n code = input.required<string>();\n\n protected _safeHtml = computed(() => {\n var frmt = this.formatters.find(this.formatter());\n\n if (frmt == null) {\n console.warn(`Code formatter named \"${this.formatter()}\" not found.`)\n return undefined;\n }\n\n return this.domSanitizer.bypassSecurityTrustHtml(frmt.format(this.code()));\n })\n\n constructor(private formatters: CodeFormatters, private domSanitizer: DomSanitizer) { }\n}\n","<pre class=\"language-{{formatter()}} formatter-{{formatter()}}\">@if(_safeHtml()) {<code class=\"language-{{formatter()}} formatter-{{formatter()}}\" [innerHtml]=\"_safeHtml()\" ></code>}@else {<code class=\"language-{{formatter()}} formatter-{{formatter()}}\" [innerText]=\"code()\"></code>}</pre>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names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,IAAI,EACC,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,8SAAA,EAAA,MAAA,EAAA,CAAA,wBAAA,CAAA,EAAA;;;AEVjD;;AAEG;;;;"}
|
|
@@ -14,11 +14,11 @@ class CollapseDirective {
|
|
|
14
14
|
* Indicates whether the host element is collapsed.
|
|
15
15
|
* @input
|
|
16
16
|
*/
|
|
17
|
-
collapsed = input(false
|
|
17
|
+
collapsed = input(false);
|
|
18
18
|
/** Animation timings for collapse/expand animations.
|
|
19
19
|
* @input
|
|
20
20
|
*/
|
|
21
|
-
timings = input('0.2s'
|
|
21
|
+
timings = input('0.2s');
|
|
22
22
|
_player;
|
|
23
23
|
_firstExecution = true;
|
|
24
24
|
constructor(el, builder, renderer) {
|
|
@@ -81,10 +81,10 @@ class CollapseDirective {
|
|
|
81
81
|
ngOnDestroy() {
|
|
82
82
|
this._player?.destroy();
|
|
83
83
|
}
|
|
84
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
85
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.
|
|
84
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: CollapseDirective, deps: [{ token: i0.ElementRef }, { token: i1.AnimationBuilder }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
85
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.6", type: CollapseDirective, isStandalone: true, selector: "[ng0Collapse]", inputs: { collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, timings: { classPropertyName: "timings", publicName: "timings", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["ng0Collapse"], ngImport: i0 });
|
|
86
86
|
}
|
|
87
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
87
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: CollapseDirective, decorators: [{
|
|
88
88
|
type: Directive,
|
|
89
89
|
args: [{
|
|
90
90
|
selector: '[ng0Collapse]',
|
|
@@ -101,16 +101,16 @@ class CollapseComponent {
|
|
|
101
101
|
* Indicates whether the host element is collapsed.
|
|
102
102
|
* @model
|
|
103
103
|
*/
|
|
104
|
-
collapsed = model(false
|
|
104
|
+
collapsed = model(false);
|
|
105
105
|
/** Animation timings for collapse/expand animations.
|
|
106
106
|
* @input
|
|
107
107
|
*/
|
|
108
|
-
timings = input('0.2s'
|
|
108
|
+
timings = input('0.2s');
|
|
109
109
|
get _collapseExpand() {
|
|
110
110
|
return { value: this.collapsed() ? 'collapsed' : 'expanded', params: { timings: this.timings() } };
|
|
111
111
|
}
|
|
112
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
113
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.
|
|
112
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: CollapseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
113
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.6", type: CollapseComponent, isStandalone: true, selector: "ng0-collapse", inputs: { collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, timings: { classPropertyName: "timings", publicName: "timings", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collapsed: "collapsedChange" }, host: { properties: { "@collapseExpand": "this._collapseExpand" } }, ngImport: i0, template: "<ng-content></ng-content>", styles: [":host{display:block;overflow:hidden}\n"], animations: [
|
|
114
114
|
trigger('collapseExpand', [
|
|
115
115
|
state('collapsed', style({ height: 0, opacity: 0, })),
|
|
116
116
|
state('expanded', style({ height: '*', opacity: '*', })),
|
|
@@ -120,7 +120,7 @@ class CollapseComponent {
|
|
|
120
120
|
])
|
|
121
121
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
122
122
|
}
|
|
123
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
123
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: CollapseComponent, decorators: [{
|
|
124
124
|
type: Component,
|
|
125
125
|
args: [{ selector: 'ng0-collapse', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, animations: [
|
|
126
126
|
trigger('collapseExpand', [
|
|
@@ -141,13 +141,13 @@ const items = [
|
|
|
141
141
|
CollapseComponent
|
|
142
142
|
];
|
|
143
143
|
class CollapseModule {
|
|
144
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
145
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.
|
|
144
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: CollapseModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
145
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.6", ngImport: i0, type: CollapseModule, imports: [CollapseDirective,
|
|
146
146
|
CollapseComponent], exports: [CollapseDirective,
|
|
147
147
|
CollapseComponent] });
|
|
148
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.
|
|
148
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: CollapseModule });
|
|
149
149
|
}
|
|
150
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
150
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: CollapseModule, decorators: [{
|
|
151
151
|
type: NgModule,
|
|
152
152
|
args: [{
|
|
153
153
|
imports: items,
|