@bootkit/ng0 0.0.0-alpha.41 → 0.0.0-alpha.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common/index.d.ts +30 -6
- package/components/accordion/index.d.ts +8 -8
- package/components/button/index.d.ts +7 -10
- package/components/card/index.d.ts +2 -6
- package/components/code/index.d.ts +2 -4
- package/components/collapse/index.d.ts +4 -41
- package/components/confirmation/index.d.ts +14 -16
- package/components/dropdown/index.d.ts +3 -3
- package/components/form-field/index.d.ts +1 -1
- package/components/list/index.d.ts +5 -5
- package/components/modal/index.d.ts +14 -10
- package/components/nav/index.d.ts +13 -15
- package/components/pagination/index.d.ts +8 -8
- package/components/popover/index.d.ts +6 -6
- package/components/sidenav/index.d.ts +17 -21
- package/components/stepper/index.d.ts +3 -4
- package/components/table/index.d.ts +29 -31
- package/components/toast/index.d.ts +14 -8
- package/components/tooltip/index.d.ts +18 -13
- package/components/vertical-menu/index.d.ts +78 -37
- package/data/index.d.ts +1 -6
- package/fesm2022/bootkit-ng0-components-accordion.mjs +8 -10
- package/fesm2022/bootkit-ng0-components-accordion.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-button.mjs +10 -18
- package/fesm2022/bootkit-ng0-components-button.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-card.mjs +8 -16
- package/fesm2022/bootkit-ng0-components-card.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-code.mjs +8 -12
- package/fesm2022/bootkit-ng0-components-code.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-collapse.mjs +15 -127
- package/fesm2022/bootkit-ng0-components-collapse.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-confirmation.mjs +15 -25
- package/fesm2022/bootkit-ng0-components-confirmation.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-dropdown.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-form-field.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-list.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-modal.mjs +13 -11
- package/fesm2022/bootkit-ng0-components-modal.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-nav.mjs +7 -14
- package/fesm2022/bootkit-ng0-components-nav.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-pagination.mjs +9 -9
- package/fesm2022/bootkit-ng0-components-pagination.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-popover.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-sidenav.mjs +50 -43
- package/fesm2022/bootkit-ng0-components-sidenav.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-stepper.mjs +6 -33
- package/fesm2022/bootkit-ng0-components-stepper.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-table.mjs +24 -31
- package/fesm2022/bootkit-ng0-components-table.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-toast.mjs +59 -81
- package/fesm2022/bootkit-ng0-components-toast.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-tooltip.mjs +54 -60
- package/fesm2022/bootkit-ng0-components-tooltip.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-vertical-menu.mjs +168 -97
- 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-http.mjs +22 -30
- package/fesm2022/bootkit-ng0-http.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-layouts-layout1.mjs +1 -1
- package/fesm2022/bootkit-ng0-layouts-layout1.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-security.mjs +46 -30
- package/fesm2022/bootkit-ng0-security.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-utils.mjs +49 -2
- package/fesm2022/bootkit-ng0-utils.mjs.map +1 -1
- package/http/index.d.ts +10 -10
- package/package.json +1 -5
- package/security/index.d.ts +17 -11
- package/utils/index.d.ts +22 -1
- package/components/backdrop/index.d.ts +0 -12
- package/fesm2022/bootkit-ng0-components-backdrop.mjs +0 -46
- package/fesm2022/bootkit-ng0-components-backdrop.mjs.map +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, model, booleanAttribute, Directive, NgModule } from '@angular/core';
|
|
2
|
+
import { inject, ElementRef, Renderer2, DestroyRef, input, model, booleanAttribute, Directive, NgModule } from '@angular/core';
|
|
3
3
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
|
-
import
|
|
4
|
+
import { HttpService } from '@bootkit/ng0/http';
|
|
5
5
|
|
|
6
6
|
class ButtonDirective {
|
|
7
|
-
_element;
|
|
8
|
-
_renderer;
|
|
9
|
-
_http;
|
|
10
|
-
_destroyRef;
|
|
11
7
|
_loadingElement;
|
|
8
|
+
_element = inject(ElementRef);
|
|
9
|
+
_renderer = inject(Renderer2);
|
|
10
|
+
_http = inject(HttpService);
|
|
11
|
+
_destroyRef = inject(DestroyRef);
|
|
12
12
|
/**
|
|
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.
|
|
@@ -31,12 +31,6 @@ class ButtonDirective {
|
|
|
31
31
|
* Default is true.
|
|
32
32
|
*/
|
|
33
33
|
loadingIndicator = input(false, ...(ngDevMode ? [{ debugName: "loadingIndicator", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
34
|
-
constructor(_element, _renderer, _http, _destroyRef) {
|
|
35
|
-
this._element = _element;
|
|
36
|
-
this._renderer = _renderer;
|
|
37
|
-
this._http = _http;
|
|
38
|
-
this._destroyRef = _destroyRef;
|
|
39
|
-
}
|
|
40
34
|
ngOnInit() {
|
|
41
35
|
this._renderer.setStyle(this._element.nativeElement, "position", "relative");
|
|
42
36
|
if (this.request()) {
|
|
@@ -74,10 +68,8 @@ class ButtonDirective {
|
|
|
74
68
|
_hideLoading() {
|
|
75
69
|
this._renderer.removeChild(this._element.nativeElement, this._loadingElement);
|
|
76
70
|
}
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.11", 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.3.11", 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 });
|
|
71
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: ButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
72
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.11", 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()", "attr.disabled": "disabled()", "attr.aria-disabled": "disabled()", "attr.tabindex": "disabled() ? \"-1\" : \"\" " } }, exportAs: ["ng0Button"], ngImport: i0 });
|
|
81
73
|
}
|
|
82
74
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: ButtonDirective, decorators: [{
|
|
83
75
|
type: Directive,
|
|
@@ -87,12 +79,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.11", ngImpo
|
|
|
87
79
|
standalone: true,
|
|
88
80
|
host: {
|
|
89
81
|
'[class.disabled]': 'disabled()',
|
|
90
|
-
'[
|
|
82
|
+
'[attr.disabled]': 'disabled()',
|
|
91
83
|
'[attr.aria-disabled]': 'disabled()',
|
|
92
84
|
'[attr.tabindex]': 'disabled() ? "-1" : "" ',
|
|
93
85
|
}
|
|
94
86
|
}]
|
|
95
|
-
}],
|
|
87
|
+
}], propDecorators: { request: [{ type: i0.Input, args: [{ isSignal: true, alias: "request", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }, { type: i0.Output, args: ["disabledChange"] }], disableDuringRequest: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableDuringRequest", required: false }] }], loadingIndicator: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingIndicator", required: false }] }] } });
|
|
96
88
|
|
|
97
89
|
class ButtonModule {
|
|
98
90
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: ButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -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 '[
|
|
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, inject } 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 '[attr.disabled]': 'disabled()',\n '[attr.aria-disabled]': 'disabled()',\n '[attr.tabindex]': 'disabled() ? \"-1\" : \"\" ',\n }\n})\nexport class ButtonDirective implements OnInit {\n private _loadingElement: any;\n private _element = inject(ElementRef);\n private _renderer = inject(Renderer2);\n private _http = inject(HttpService);\n private _destroyRef = inject(DestroyRef);\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 readonly request = input<string | string[] | undefined>(undefined);\n\n /** \n * Whether the button is disabled or not.\n */\n public readonly 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 readonly 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 readonly loadingIndicator = input(false, { transform: booleanAttribute });\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 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","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.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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;wGAAZ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;yGAAZ,YAAY,EAAA,OAAA,EAAA,CANrB,eAAe,CAAA,EAAA,OAAA,EAAA,CAGf,eAAe,CAAA,EAAA,CAAA;yGAGN,YAAY,EAAA,CAAA;;4FAAZ,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;;;;"}
|
|
@@ -1,39 +1,31 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
2
|
+
import { inject, ElementRef, Renderer2, input, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
|
|
6
6
|
class CardComponent {
|
|
7
|
-
_element;
|
|
8
|
-
_renderer;
|
|
7
|
+
_element = inject(ElementRef);
|
|
8
|
+
_renderer = inject(Renderer2);
|
|
9
9
|
header = input(...(ngDevMode ? [undefined, { debugName: "header" }] : []));
|
|
10
|
-
constructor(
|
|
11
|
-
this._element = _element;
|
|
12
|
-
this._renderer = _renderer;
|
|
10
|
+
constructor() {
|
|
13
11
|
this._renderer.addClass(this._element.nativeElement, 'card');
|
|
14
12
|
}
|
|
15
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: CardComponent, deps: [
|
|
13
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: CardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
16
14
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.11", 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
15
|
}
|
|
18
16
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: CardComponent, decorators: [{
|
|
19
17
|
type: Component,
|
|
20
18
|
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
|
-
}], ctorParameters: () => [
|
|
19
|
+
}], ctorParameters: () => [], propDecorators: { header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: false }] }] } });
|
|
22
20
|
|
|
23
21
|
class CardHeaderComponent {
|
|
24
|
-
|
|
25
|
-
_renderer;
|
|
26
|
-
constructor(_element, _renderer) {
|
|
27
|
-
this._element = _element;
|
|
28
|
-
this._renderer = _renderer;
|
|
29
|
-
}
|
|
30
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: CardHeaderComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
22
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: CardHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
31
23
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.11", 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
24
|
}
|
|
33
25
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: CardHeaderComponent, decorators: [{
|
|
34
26
|
type: Component,
|
|
35
27
|
args: [{ selector: 'ng0-card-header', exportAs: 'ng0CardHeader', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule], template: "<ng-content></ng-content>" }]
|
|
36
|
-
}]
|
|
28
|
+
}] });
|
|
37
29
|
|
|
38
30
|
const DECLARES = [
|
|
39
31
|
CardComponent,
|
|
@@ -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,
|
|
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, ChangeDetectionStrategy, input, inject } 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 private _element = inject(ElementRef);\n private _renderer = inject(Renderer2);\n\n public readonly header = input<string>();\n\n constructor() {\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, 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}\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;AACd,IAAA,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC;AAC7B,IAAA,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;IAErB,MAAM,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,QAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;AAExC,IAAA,WAAA,GAAA;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
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
-
import
|
|
2
|
+
import { Injectable, inject, input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
4
4
|
|
|
5
5
|
class CodeFormatter {
|
|
6
6
|
name;
|
|
@@ -36,31 +36,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.11", ngImpo
|
|
|
36
36
|
}], ctorParameters: () => [] });
|
|
37
37
|
|
|
38
38
|
class CodeComponent {
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
_formatters = inject(CodeFormatters);
|
|
40
|
+
_domSanitizer = inject(DomSanitizer);
|
|
41
41
|
/** Code formatter name */
|
|
42
42
|
formatter = input.required(...(ngDevMode ? [{ debugName: "formatter" }] : []));
|
|
43
43
|
/** Code */
|
|
44
44
|
code = input.required(...(ngDevMode ? [{ debugName: "code" }] : []));
|
|
45
45
|
_safeHtml = computed(() => {
|
|
46
|
-
var frmt = this.
|
|
46
|
+
var frmt = this._formatters.find(this.formatter());
|
|
47
47
|
if (frmt == null) {
|
|
48
48
|
console.warn(`Code formatter named "${this.formatter()}" not found.`);
|
|
49
49
|
return undefined;
|
|
50
50
|
}
|
|
51
|
-
return this.
|
|
51
|
+
return this._domSanitizer.bypassSecurityTrustHtml(frmt.format(this.code()));
|
|
52
52
|
}, ...(ngDevMode ? [{ debugName: "_safeHtml" }] : []));
|
|
53
|
-
|
|
54
|
-
this.formatters = formatters;
|
|
55
|
-
this.domSanitizer = domSanitizer;
|
|
56
|
-
}
|
|
57
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: CodeComponent, deps: [{ token: CodeFormatters }, { token: i2.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
|
|
53
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: CodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
58
54
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.11", 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
55
|
}
|
|
60
56
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: CodeComponent, decorators: [{
|
|
61
57
|
type: Component,
|
|
62
58
|
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
|
-
}],
|
|
59
|
+
}], propDecorators: { formatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "formatter", required: true }] }], code: [{ type: i0.Input, args: [{ isSignal: true, alias: "code", required: true }] }] } });
|
|
64
60
|
|
|
65
61
|
/**
|
|
66
62
|
* Generated bundle index. Do not edit.
|
|
@@ -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.
|
|
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, inject, 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 private _formatters = inject(CodeFormatters);\n private _domSanitizer = inject(DomSanitizer);\n\n /** Code formatter name */\n public formatter = input.required<string>();\n\n /** Code */\n public 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","<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":[],"mappings":";;;;MAEa,aAAa,CAAA;AACM,IAAA,IAAA;AAA8B,IAAA,MAAA;IAA1D,WAAA,CAA4B,IAAY,EAAkB,MAAyB,EAAA;QAAvD,IAAA,CAAA,IAAI,GAAJ,IAAI;QAA0B,IAAA,CAAA,MAAM,GAAN,MAAM;IAChE;AACH;;MCCY,cA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;AAClC,QAAA,IAAI,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;AAElD,QAAA,IAAI,IAAI,IAAI,IAAI,EAAE;YAChB,OAAO,CAAC,IAAI,CAAC,CAAA,sBAAA,EAAyB,IAAI,CAAC,SAAS,EAAE,CAAA,YAAA,CAAc,CAAC;AACrE,YAAA,OAAO,SAAS;QAClB;AAEA,QAAA,OAAO,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;AAC7E,IAAA,CAAC,qDAAC;wGAnBS,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAb,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,aAAa,8VCZ1B,8SAAkS,EAAA,MAAA,EAAA,CAAA,wBAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FDYrR,aAAa,EAAA,UAAA,EAAA,CAAA;kBARzB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,UAAU,YACV,SAAS,EAAA,UAAA,EAGP,IAAI,EAAA,eAAA,EACC,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,8SAAA,EAAA,MAAA,EAAA,CAAA,wBAAA,CAAA,EAAA;;;AEVjD;;AAEG;;;;"}
|
|
@@ -1,97 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input,
|
|
3
|
-
import * as i1 from '@angular/animations';
|
|
4
|
-
import { style, animate, trigger, state, transition } from '@angular/animations';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Directive to handle the collapse and expand functionality of a host element.
|
|
8
|
-
*/
|
|
9
|
-
class CollapseDirective {
|
|
10
|
-
el;
|
|
11
|
-
builder;
|
|
12
|
-
renderer;
|
|
13
|
-
/**
|
|
14
|
-
* Indicates whether the host element is collapsed.
|
|
15
|
-
* @input
|
|
16
|
-
*/
|
|
17
|
-
collapsed = input(false, ...(ngDevMode ? [{ debugName: "collapsed" }] : []));
|
|
18
|
-
/** Animation timings for collapse/expand animations.
|
|
19
|
-
* @input
|
|
20
|
-
*/
|
|
21
|
-
timings = input('0.2s', ...(ngDevMode ? [{ debugName: "timings" }] : []));
|
|
22
|
-
_player;
|
|
23
|
-
_firstExecution = true;
|
|
24
|
-
constructor(el, builder, renderer) {
|
|
25
|
-
this.el = el;
|
|
26
|
-
this.builder = builder;
|
|
27
|
-
this.renderer = renderer;
|
|
28
|
-
renderer.setStyle(el.nativeElement, 'overflow', 'hidden');
|
|
29
|
-
effect(() => {
|
|
30
|
-
var collapsed = this.collapsed();
|
|
31
|
-
if (this._firstExecution) {
|
|
32
|
-
this._firstExecution = false;
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
if (collapsed)
|
|
36
|
-
this._collapse();
|
|
37
|
-
else
|
|
38
|
-
this._expand();
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
ngOnInit() {
|
|
42
|
-
this._addClass('collapse');
|
|
43
|
-
if (!this.collapsed()) {
|
|
44
|
-
this._addClass('show');
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
_collapse() {
|
|
48
|
-
if (this._player) {
|
|
49
|
-
this._player.destroy();
|
|
50
|
-
}
|
|
51
|
-
this._playAnimation([
|
|
52
|
-
style({ height: '*', opacity: '*' }),
|
|
53
|
-
animate(this.timings(), style({ height: 0, opacity: 0 })),
|
|
54
|
-
]);
|
|
55
|
-
this._player.onDone(() => {
|
|
56
|
-
if (this.collapsed()) {
|
|
57
|
-
this._removeClass('show');
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
_expand() {
|
|
62
|
-
if (this._player) {
|
|
63
|
-
this._player.destroy();
|
|
64
|
-
}
|
|
65
|
-
this._addClass('show');
|
|
66
|
-
this._playAnimation([
|
|
67
|
-
style({ height: 0, opacity: 0 }),
|
|
68
|
-
animate(this.timings(), style({ height: '*', opacity: '*' })),
|
|
69
|
-
]);
|
|
70
|
-
this._player.onDone(() => {
|
|
71
|
-
this._player.destroy();
|
|
72
|
-
this._player = undefined;
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
_playAnimation(animation) {
|
|
76
|
-
this._player = this.builder.build(animation).create(this.el.nativeElement);
|
|
77
|
-
this._player.play();
|
|
78
|
-
}
|
|
79
|
-
_addClass = (cls) => this.renderer.addClass(this.el.nativeElement, cls);
|
|
80
|
-
_removeClass = (cls) => this.renderer.removeClass(this.el.nativeElement, cls);
|
|
81
|
-
ngOnDestroy() {
|
|
82
|
-
this._player?.destroy();
|
|
83
|
-
}
|
|
84
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.11", 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.3.11", 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
|
-
}
|
|
87
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: CollapseDirective, decorators: [{
|
|
88
|
-
type: Directive,
|
|
89
|
-
args: [{
|
|
90
|
-
selector: '[ng0Collapse]',
|
|
91
|
-
exportAs: 'ng0Collapse',
|
|
92
|
-
standalone: true,
|
|
93
|
-
}]
|
|
94
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.AnimationBuilder }, { type: i0.Renderer2 }], propDecorators: { collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }], timings: [{ type: i0.Input, args: [{ isSignal: true, alias: "timings", required: false }] }] } });
|
|
2
|
+
import { input, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
95
3
|
|
|
96
4
|
/**
|
|
97
5
|
* A component that provides collapse and expand functionality.
|
|
@@ -101,49 +9,27 @@ class CollapseComponent {
|
|
|
101
9
|
* Indicates whether the host element is collapsed.
|
|
102
10
|
* @model
|
|
103
11
|
*/
|
|
104
|
-
collapsed =
|
|
105
|
-
/** Animation timings for collapse/expand animations.
|
|
106
|
-
* @input
|
|
107
|
-
*/
|
|
108
|
-
timings = input('0.2s', ...(ngDevMode ? [{ debugName: "timings" }] : []));
|
|
109
|
-
get _collapseExpand() {
|
|
110
|
-
return { value: this.collapsed() ? 'collapsed' : 'expanded', params: { timings: this.timings() } };
|
|
111
|
-
}
|
|
12
|
+
collapsed = input(false, ...(ngDevMode ? [{ debugName: "collapsed" }] : []));
|
|
112
13
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: CollapseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
113
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.11", type: CollapseComponent, isStandalone: true, selector: "ng0-collapse", inputs: { collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }
|
|
114
|
-
trigger('collapseExpand', [
|
|
115
|
-
state('collapsed', style({ height: 0, opacity: 0, })),
|
|
116
|
-
state('expanded', style({ height: '*', opacity: '*', })),
|
|
117
|
-
transition('collapsed <=> expanded', [
|
|
118
|
-
animate('{{timings}}')
|
|
119
|
-
])
|
|
120
|
-
])
|
|
121
|
-
], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
14
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.11", type: CollapseComponent, isStandalone: true, selector: "ng0-collapse", inputs: { collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.ng0-collapsed": "collapsed()" } }, ngImport: i0, template: "<div class=\"ng0-collapse-content\">\n <ng-content></ng-content>\n</div>", styles: [":root{--ng0-collapse-transition-duration: .2s;--ng0-collapse-transition-timing-function: ease-out}ng0-collapse{display:grid;grid-template-rows:1fr;overflow:hidden;transition:grid-template-rows var(--ng0-collapse-transition-duration);transition-timing-function:var(--ng0-collapse-transition-timing-function)}ng0-collapse.ng0-collapsed{grid-template-rows:0fr}ng0-collapse.ng0-collapsed .ng0-collapse-content{visibility:hidden}.ng0-collapse-content{min-height:0;visibility:visible;transition:visibility .2s}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
122
15
|
}
|
|
123
16
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: CollapseComponent, decorators: [{
|
|
124
17
|
type: Component,
|
|
125
|
-
args: [{ selector: 'ng0-collapse', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush,
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
transition('collapsed <=> expanded', [
|
|
130
|
-
animate('{{timings}}')
|
|
131
|
-
])
|
|
132
|
-
])
|
|
133
|
-
], template: "<ng-content></ng-content>", styles: [":host{display:block;overflow:hidden}\n"] }]
|
|
134
|
-
}], propDecorators: { collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }, { type: i0.Output, args: ["collapsedChange"] }], timings: [{ type: i0.Input, args: [{ isSignal: true, alias: "timings", required: false }] }], _collapseExpand: [{
|
|
135
|
-
type: HostBinding,
|
|
136
|
-
args: ['@collapseExpand']
|
|
137
|
-
}] } });
|
|
18
|
+
args: [{ selector: 'ng0-collapse', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
19
|
+
'[class.ng0-collapsed]': 'collapsed()'
|
|
20
|
+
}, template: "<div class=\"ng0-collapse-content\">\n <ng-content></ng-content>\n</div>", styles: [":root{--ng0-collapse-transition-duration: .2s;--ng0-collapse-transition-timing-function: ease-out}ng0-collapse{display:grid;grid-template-rows:1fr;overflow:hidden;transition:grid-template-rows var(--ng0-collapse-transition-duration);transition-timing-function:var(--ng0-collapse-transition-timing-function)}ng0-collapse.ng0-collapsed{grid-template-rows:0fr}ng0-collapse.ng0-collapsed .ng0-collapse-content{visibility:hidden}.ng0-collapse-content{min-height:0;visibility:visible;transition:visibility .2s}\n"] }]
|
|
21
|
+
}], propDecorators: { collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }] } });
|
|
138
22
|
|
|
139
23
|
const items = [
|
|
140
|
-
CollapseDirective,
|
|
24
|
+
// CollapseDirective,
|
|
141
25
|
CollapseComponent
|
|
142
26
|
];
|
|
143
27
|
class CollapseModule {
|
|
144
28
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: CollapseModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
145
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.11", ngImport: i0, type: CollapseModule, imports: [
|
|
146
|
-
|
|
29
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.11", ngImport: i0, type: CollapseModule, imports: [
|
|
30
|
+
// CollapseDirective,
|
|
31
|
+
CollapseComponent], exports: [
|
|
32
|
+
// CollapseDirective,
|
|
147
33
|
CollapseComponent] });
|
|
148
34
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: CollapseModule });
|
|
149
35
|
}
|
|
@@ -155,9 +41,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.11", ngImpo
|
|
|
155
41
|
}]
|
|
156
42
|
}] });
|
|
157
43
|
|
|
44
|
+
// export * from './collapse.directive';
|
|
45
|
+
|
|
158
46
|
/**
|
|
159
47
|
* Generated bundle index. Do not edit.
|
|
160
48
|
*/
|
|
161
49
|
|
|
162
|
-
export { CollapseComponent,
|
|
50
|
+
export { CollapseComponent, CollapseModule };
|
|
163
51
|
//# sourceMappingURL=bootkit-ng0-components-collapse.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootkit-ng0-components-collapse.mjs","sources":["../../../projects/ng0/components/collapse/collapse.directive.ts","../../../projects/ng0/components/collapse/collapse.component.ts","../../../projects/ng0/components/collapse/collapse.component.html","../../../projects/ng0/components/collapse/collapse.module.ts","../../../projects/ng0/components/collapse/bootkit-ng0-components-collapse.ts"],"sourcesContent":["import { Directive, OnInit, ElementRef, Renderer2, input, effect, OnDestroy } from '@angular/core';\nimport { animate, AnimationBuilder, AnimationMetadata, AnimationPlayer, style } from '@angular/animations';\n\n/** \n * Directive to handle the collapse and expand functionality of a host element. \n */\n@Directive({\n selector: '[ng0Collapse]',\n exportAs: 'ng0Collapse',\n standalone: true,\n})\nexport class CollapseDirective implements OnInit, OnDestroy {\n /**\n * Indicates whether the host element is collapsed. \n * @input \n */\n public collapsed = input(false);\n\n /** Animation timings for collapse/expand animations. \n * @input \n */\n public timings = input<string | number>('0.2s');\n\n private _player?: AnimationPlayer;\n private _firstExecution = true;\n\n constructor(private el: ElementRef, private builder: AnimationBuilder, private renderer: Renderer2) {\n renderer.setStyle(el.nativeElement, 'overflow', 'hidden');\n \n effect(() => {\n var collapsed = this.collapsed();\n if (this._firstExecution) {\n this._firstExecution = false;\n return;\n }\n\n if (collapsed)\n this._collapse()\n else\n this._expand();\n });\n }\n\n ngOnInit(): void {\n this._addClass('collapse');\n if (!this.collapsed()) {\n this._addClass('show');\n }\n }\n\n private _collapse() {\n if (this._player) {\n this._player.destroy();\n }\n\n this._playAnimation([\n style({ height: '*', opacity: '*' }),\n animate(this.timings(), style({ height: 0, opacity: 0 })),\n ])\n\n this._player!.onDone(() => {\n if (this.collapsed()) {\n this._removeClass('show')\n }\n });\n }\n\n private _expand() {\n if (this._player) {\n this._player.destroy();\n }\n\n this._addClass('show')\n this._playAnimation([\n style({ height: 0, opacity: 0 }),\n animate(this.timings(), style({ height: '*', opacity: '*' })),\n ]);\n\n this._player!.onDone(() => {\n this._player!.destroy()\n this._player = undefined;\n });\n }\n\n private _playAnimation(animation: AnimationMetadata | AnimationMetadata[]) {\n this._player = this.builder.build(animation).create(this.el.nativeElement);\n this._player.play();\n }\n\n private _addClass = (cls: string) => this.renderer.addClass(this.el.nativeElement, cls);\n private _removeClass = (cls: string) => this.renderer.removeClass(this.el.nativeElement, cls);\n\n ngOnDestroy(): void {\n this._player?.destroy();\n }\n}\n","import { ChangeDetectionStrategy, Component, HostBinding, input, model } from '@angular/core';\nimport { trigger, state, style, animate, transition } from '@angular/animations';\n\n/**\n * A component that provides collapse and expand functionality. \n*/\n@Component({\n selector: 'ng0-collapse',\n templateUrl: './collapse.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n styles: `:host{display :block; overflow: hidden}`,\n animations: [\n trigger('collapseExpand', [\n state('collapsed', style({ height: 0, opacity: 0, })),\n state('expanded', style({ height: '*', opacity: '*', })),\n transition('collapsed <=> expanded', [\n animate('{{timings}}')\n ])\n ])\n ]\n})\nexport class CollapseComponent {\n /**\n * Indicates whether the host element is collapsed. \n * @model \n */\n public collapsed = model(false);\n\n /** Animation timings for collapse/expand animations. \n * @input \n */\n public timings = input<string | number>('0.2s');\n\n @HostBinding('@collapseExpand')\n private get _collapseExpand() {\n return { value: this.collapsed() ? 'collapsed' : 'expanded', params: { timings: this.timings() } };\n }\n}\n","<ng-content></ng-content>","import { NgModule } from '@angular/core';\nimport { CollapseDirective } from './collapse.directive';\nimport { CollapseComponent } from './collapse.component';\n\nconst items = [\n CollapseDirective,\n CollapseComponent\n];\n\n@NgModule({\n imports: items,\n exports: items\n})\nexport class CollapseModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAGA;;AAEG;MAMU,iBAAiB,CAAA;AAeN,IAAA,EAAA;AAAwB,IAAA,OAAA;AAAmC,IAAA,QAAA;AAd/E;;;AAGG;AACI,IAAA,SAAS,GAAG,KAAK,CAAC,KAAK,qDAAC;AAE/B;;AAEG;AACI,IAAA,OAAO,GAAG,KAAK,CAAkB,MAAM,mDAAC;AAEvC,IAAA,OAAO;IACP,eAAe,GAAG,IAAI;AAE9B,IAAA,WAAA,CAAoB,EAAc,EAAU,OAAyB,EAAU,QAAmB,EAAA;QAA9E,IAAA,CAAA,EAAE,GAAF,EAAE;QAAsB,IAAA,CAAA,OAAO,GAAP,OAAO;QAA4B,IAAA,CAAA,QAAQ,GAAR,QAAQ;QACnF,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,aAAa,EAAE,UAAU,EAAE,QAAQ,CAAC;QAEzD,MAAM,CAAC,MAAK;AACR,YAAA,IAAI,SAAS,GAAG,IAAI,CAAC,SAAS,EAAE;AAChC,YAAA,IAAI,IAAI,CAAC,eAAe,EAAE;AACtB,gBAAA,IAAI,CAAC,eAAe,GAAG,KAAK;gBAC5B;YACJ;AAEA,YAAA,IAAI,SAAS;gBACT,IAAI,CAAC,SAAS,EAAE;;gBAEhB,IAAI,CAAC,OAAO,EAAE;AACtB,QAAA,CAAC,CAAC;IACN;IAEA,QAAQ,GAAA;AACJ,QAAA,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC;AAC1B,QAAA,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE;AACnB,YAAA,IAAI,CAAC,SAAS,CAAC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AA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YARvB,iBAAiB;AACjB,YAAA,iBAAiB,aADjB,iBAAiB;YACjB,iBAAiB,CAAA,EAAA,CAAA;yGAOR,cAAc,EAAA,CAAA;;4FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,KAAK;AACd,oBAAA,OAAO,EAAE;AACZ,iBAAA;;;ACZD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"bootkit-ng0-components-collapse.mjs","sources":["../../../projects/ng0/components/collapse/collapse.component.ts","../../../projects/ng0/components/collapse/collapse.component.html","../../../projects/ng0/components/collapse/collapse.module.ts","../../../projects/ng0/components/collapse/public-api.ts","../../../projects/ng0/components/collapse/bootkit-ng0-components-collapse.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input, ViewEncapsulation } from '@angular/core';\n\n/**\n * A component that provides collapse and expand functionality. \n*/\n@Component({\n selector: 'ng0-collapse',\n templateUrl: './collapse.component.html',\n styleUrl: './collapse.component.scss',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class.ng0-collapsed]': 'collapsed()'\n }\n})\nexport class CollapseComponent {\n /**\n * Indicates whether the host element is collapsed. \n * @model \n */\n public readonly collapsed = input(false);\n}\n","<div class=\"ng0-collapse-content\">\n <ng-content></ng-content>\n</div>","import { NgModule } from '@angular/core';\n// import { CollapseDirective } from './collapse.directive';\nimport { CollapseComponent } from './collapse.component';\n\nconst items = [\n // CollapseDirective,\n CollapseComponent\n];\n\n@NgModule({\n imports: items,\n exports: items\n})\nexport class CollapseModule {\n}\n","// export * from './collapse.directive';\nexport * from './collapse.component';\nexport * from './collapse.module';\n","/**\n * Generated bundle index. Do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AAK;AACd,oBAAA,OAAO,EAAE;AACZ,iBAAA;;;ACZD;;ACAA;;AAEG;;;;"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, Injectable, EventEmitter, HostListener, Output,
|
|
3
|
-
import
|
|
4
|
-
import { DialogModule } from '@angular/cdk/dialog';
|
|
5
|
-
import * as i1 from '@angular/common';
|
|
2
|
+
import { Component, inject, Injectable, input, EventEmitter, HostListener, Output, Directive, NgModule } from '@angular/core';
|
|
3
|
+
import { DialogModule, Dialog } from '@angular/cdk/dialog';
|
|
6
4
|
import { CommonModule } from '@angular/common';
|
|
7
|
-
import * as
|
|
5
|
+
import * as i1 from '@bootkit/ng0/localization';
|
|
8
6
|
import { LocalizationModule } from '@bootkit/ng0/localization';
|
|
9
7
|
import { Subject } from 'rxjs';
|
|
10
8
|
|
|
@@ -35,7 +33,7 @@ class ConfirmationComponent {
|
|
|
35
33
|
// }
|
|
36
34
|
}
|
|
37
35
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: ConfirmationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
38
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
36
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.11", type: ConfirmationComponent, isStandalone: true, selector: "ng0-confirmation", exportAs: ["ng0Confirmation"], ngImport: i0, template: "<div class=\"modal d-block\" tabindex=\"-1\">\n <div class=\"modal-dialog\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">{{_config?.title ?? 'warning' | ng0Translate }}</h5>\n </div>\n\n <div class=\"modal-body\">\n {{ _config?.message ?? 'areYouSure' | ng0Translate }}\n </div>\n\n <div class=\"modal-footer\">\n <div>\n <button type=\"button\" class=\"btn btn-success me-1\" aria-label=\"Confirm\" [disabled]=\"_clicked\"\n (click)=\"_onClick(true)\">\n {{'ok' | ng0Translate}}\n </button>\n\n <button type=\"button\" class=\"btn btn-secondary\" aria-label=\"Close\" [disabled]=\"_clicked\"\n (click)=\"_onClick(false)\">\n {{'cancel' | ng0Translate}}\n </button>\n </div>\n\n <div class=\"ms-auto\">\n @if(_config?.icon == 'loading') {\n <div class=\"spinner-border text-success\" role=\"status\">\n <span class=\"visually-hidden\">Processing</span>\n </div>\n }\n\n @if(_config?.icon == 'check') {\n <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'\n width=\"32\" height=\"32\">\n <path fill='#0493A8'\n d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z' />\n </svg>\n }\n </div>\n </div>\n </div>\n </div>\n</div>", styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: DialogModule }, { kind: "ngmodule", type: LocalizationModule }, { kind: "pipe", type: i1.TranslatePipe, name: "ng0Translate" }] });
|
|
39
37
|
}
|
|
40
38
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: ConfirmationComponent, decorators: [{
|
|
41
39
|
type: Component,
|
|
@@ -43,7 +41,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.11", ngImpo
|
|
|
43
41
|
CommonModule,
|
|
44
42
|
DialogModule,
|
|
45
43
|
LocalizationModule,
|
|
46
|
-
], template: "<div class=\"modal d-block\" tabindex=\"-1\">\n <div class=\"modal-dialog\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">{{_config?.title ?? 'warning' | ng0Translate }}</h5>\n </div>\n\n <div class=\"modal-body\">\n {{ _config?.message ?? 'areYouSure' | ng0Translate }}\n </div>\n\n <div class=\"modal-footer\">\n <div>\n <button type=\"button\" class=\"btn btn-success me-1\" aria-label=\"Confirm\" [disabled]=\"_clicked\"\n (click)=\"_onClick(true)\">\n {{'ok' | ng0Translate}}\n </button>\n\n <button type=\"button\" class=\"btn btn-secondary\" aria-label=\"Close\" [disabled]=\"_clicked\"\n (click)=\"_onClick(false)\">\n {{'cancel' | ng0Translate}}\n </button>\n </div>\n\n <div class=\"ms-auto\">\n <div class=\"spinner-border text-success\" role=\"status\"
|
|
44
|
+
], template: "<div class=\"modal d-block\" tabindex=\"-1\">\n <div class=\"modal-dialog\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">{{_config?.title ?? 'warning' | ng0Translate }}</h5>\n </div>\n\n <div class=\"modal-body\">\n {{ _config?.message ?? 'areYouSure' | ng0Translate }}\n </div>\n\n <div class=\"modal-footer\">\n <div>\n <button type=\"button\" class=\"btn btn-success me-1\" aria-label=\"Confirm\" [disabled]=\"_clicked\"\n (click)=\"_onClick(true)\">\n {{'ok' | ng0Translate}}\n </button>\n\n <button type=\"button\" class=\"btn btn-secondary\" aria-label=\"Close\" [disabled]=\"_clicked\"\n (click)=\"_onClick(false)\">\n {{'cancel' | ng0Translate}}\n </button>\n </div>\n\n <div class=\"ms-auto\">\n @if(_config?.icon == 'loading') {\n <div class=\"spinner-border text-success\" role=\"status\">\n <span class=\"visually-hidden\">Processing</span>\n </div>\n }\n\n @if(_config?.icon == 'check') {\n <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'\n width=\"32\" height=\"32\">\n <path fill='#0493A8'\n d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z' />\n </svg>\n }\n </div>\n </div>\n </div>\n </div>\n</div>", styles: [":host{display:block}\n"] }]
|
|
47
45
|
}], ctorParameters: () => [] });
|
|
48
46
|
|
|
49
47
|
class ConfirmationRef {
|
|
@@ -82,19 +80,16 @@ class ConfirmationRef {
|
|
|
82
80
|
}
|
|
83
81
|
|
|
84
82
|
class ConfirmationService {
|
|
85
|
-
|
|
86
|
-
constructor(dialog) {
|
|
87
|
-
this.dialog = dialog;
|
|
88
|
-
}
|
|
83
|
+
_dialog = inject(Dialog);
|
|
89
84
|
open(config = {}) {
|
|
90
|
-
var dlgRef = this.
|
|
85
|
+
var dlgRef = this._dialog.open(ConfirmationComponent, {
|
|
91
86
|
disableClose: false,
|
|
92
87
|
});
|
|
93
88
|
var componentRef = dlgRef.componentInstance;
|
|
94
89
|
componentRef.confirmationRef = new ConfirmationRef(dlgRef, config);
|
|
95
90
|
return componentRef.confirmationRef;
|
|
96
91
|
}
|
|
97
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: ConfirmationService, deps: [
|
|
92
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: ConfirmationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
98
93
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: ConfirmationService, providedIn: 'root' });
|
|
99
94
|
}
|
|
100
95
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: ConfirmationService, decorators: [{
|
|
@@ -102,23 +97,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.11", ngImpo
|
|
|
102
97
|
args: [{
|
|
103
98
|
providedIn: 'root'
|
|
104
99
|
}]
|
|
105
|
-
}]
|
|
100
|
+
}] });
|
|
106
101
|
|
|
107
102
|
class ConfirmationDirective {
|
|
108
|
-
|
|
109
|
-
config;
|
|
103
|
+
_confirmationService = inject(ConfirmationService);
|
|
104
|
+
config = input(...(ngDevMode ? [undefined, { debugName: "config" }] : []));
|
|
110
105
|
confirm = new EventEmitter();
|
|
111
106
|
cancel = new EventEmitter();
|
|
112
|
-
constructor(confirmationService) {
|
|
113
|
-
this.confirmationService = confirmationService;
|
|
114
|
-
}
|
|
115
107
|
_onClick() {
|
|
116
|
-
var ref = this.
|
|
108
|
+
var ref = this._confirmationService.open(this.config());
|
|
117
109
|
ref.confirmed.subscribe(x => this.confirm.emit(ref));
|
|
118
110
|
ref.canceled.subscribe(x => this.cancel.emit(ref));
|
|
119
111
|
}
|
|
120
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: ConfirmationDirective, deps: [
|
|
121
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
112
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: ConfirmationDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
113
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.11", type: ConfirmationDirective, isStandalone: true, selector: "[ng0Confirmation]", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { confirm: "confirm", cancel: "cancel" }, host: { listeners: { "click": "_onClick()" } }, exportAs: ["ng0Confirmation"], ngImport: i0 });
|
|
122
114
|
}
|
|
123
115
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: ConfirmationDirective, decorators: [{
|
|
124
116
|
type: Directive,
|
|
@@ -127,9 +119,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.11", ngImpo
|
|
|
127
119
|
exportAs: 'ng0Confirmation',
|
|
128
120
|
standalone: true
|
|
129
121
|
}]
|
|
130
|
-
}],
|
|
131
|
-
type: Input
|
|
132
|
-
}], confirm: [{
|
|
122
|
+
}], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], confirm: [{
|
|
133
123
|
type: Output
|
|
134
124
|
}], cancel: [{
|
|
135
125
|
type: Output
|