ngwr 6.0.0 → 6.1.1
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/alert/index.d.ts +30 -3
- package/avatar/index.d.ts +30 -5
- package/button/index.d.ts +43 -3
- package/cdk/index.d.ts +22 -3
- package/cdk/rxjs/index.d.ts +38 -3
- package/cdk/types/index.d.ts +25 -3
- package/cdk/utils/index.d.ts +12 -3
- package/checkbox/index.d.ts +29 -3
- package/dialog/index.d.ts +191 -3
- package/divider/index.d.ts +16 -5
- package/dropdown/index.d.ts +66 -3
- package/fesm2022/ngwr-alert.mjs +4 -4
- package/fesm2022/ngwr-alert.mjs.map +1 -1
- package/fesm2022/ngwr-avatar.mjs +4 -4
- package/fesm2022/ngwr-avatar.mjs.map +1 -1
- package/fesm2022/ngwr-button.mjs +6 -6
- package/fesm2022/ngwr-button.mjs.map +1 -1
- package/fesm2022/ngwr-cdk.mjs +3 -3
- package/fesm2022/ngwr-cdk.mjs.map +1 -1
- package/fesm2022/ngwr-checkbox.mjs +5 -5
- package/fesm2022/ngwr-checkbox.mjs.map +1 -1
- package/fesm2022/ngwr-dialog.mjs +31 -37
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-divider.mjs +3 -3
- package/fesm2022/ngwr-divider.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +17 -17
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-form.mjs +6 -6
- package/fesm2022/ngwr-form.mjs.map +1 -1
- package/fesm2022/ngwr-icon.mjs +10 -11
- package/fesm2022/ngwr-icon.mjs.map +1 -1
- package/fesm2022/ngwr-input.mjs +7 -7
- package/fesm2022/ngwr-input.mjs.map +1 -1
- package/fesm2022/ngwr-pagination.mjs +16 -16
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-pipes.mjs +3 -3
- package/fesm2022/ngwr-pipes.mjs.map +1 -1
- package/fesm2022/ngwr-progress.mjs +3 -3
- package/fesm2022/ngwr-progress.mjs.map +1 -1
- package/fesm2022/ngwr-qr.mjs +12 -15
- package/fesm2022/ngwr-qr.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +18 -18
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-skeleton.mjs +3 -3
- package/fesm2022/ngwr-skeleton.mjs.map +1 -1
- package/fesm2022/ngwr-spinner.mjs +5 -5
- package/fesm2022/ngwr-spinner.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +31 -31
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tag.mjs +3 -3
- package/fesm2022/ngwr-tag.mjs.map +1 -1
- package/fesm2022/ngwr-textarea.mjs +5 -5
- package/fesm2022/ngwr-textarea.mjs.map +1 -1
- package/form/index.d.ts +26 -3
- package/icon/index.d.ts +828 -3
- package/index.d.ts +2 -5
- package/input/index.d.ts +41 -3
- package/package.json +5 -5
- package/pagination/index.d.ts +32 -3
- package/pipes/index.d.ts +15 -3
- package/progress/index.d.ts +13 -5
- package/qr/index.d.ts +127 -5
- package/select/index.d.ts +119 -3
- package/skeleton/index.d.ts +13 -1
- package/spinner/index.d.ts +23 -1
- package/table/index.d.ts +101 -5
- package/tag/index.d.ts +24 -5
- package/textarea/index.d.ts +44 -4
- package/alert/alert-type.d.ts +0 -7
- package/alert/alert.component.d.ts +0 -21
- package/alert/public-api.d.ts +0 -8
- package/avatar/avatar.component.d.ts +0 -27
- package/avatar/public-api.d.ts +0 -7
- package/button/button-group.component.d.ts +0 -12
- package/button/button.component.d.ts +0 -31
- package/button/public-api.d.ts +0 -8
- package/cdk/base.directive.d.ts +0 -20
- package/cdk/public-api.d.ts +0 -7
- package/cdk/rxjs/is-array.d.ts +0 -8
- package/cdk/rxjs/is-defined.d.ts +0 -8
- package/cdk/rxjs/is-not-empty-array.d.ts +0 -8
- package/cdk/rxjs/is-observable.d.ts +0 -9
- package/cdk/rxjs/public-api.d.ts +0 -10
- package/cdk/types/maybe.d.ts +0 -7
- package/cdk/types/public-api.d.ts +0 -9
- package/cdk/types/safe-any.d.ts +0 -7
- package/cdk/types/theme-color.d.ts +0 -8
- package/cdk/utils/generate-random-id.d.ts +0 -12
- package/cdk/utils/public-api.d.ts +0 -7
- package/checkbox/checkbox.component.d.ts +0 -28
- package/checkbox/public-api.d.ts +0 -7
- package/dialog/dialog-animations.d.ts +0 -22
- package/dialog/dialog-base.directive.d.ts +0 -40
- package/dialog/dialog-close.directive.d.ts +0 -9
- package/dialog/dialog-content.directive.d.ts +0 -6
- package/dialog/dialog-data.token.d.ts +0 -8
- package/dialog/dialog-footer.directive.d.ts +0 -8
- package/dialog/dialog-options.d.ts +0 -19
- package/dialog/dialog-ref.d.ts +0 -26
- package/dialog/dialog-title.directive.d.ts +0 -6
- package/dialog/dialog.component.d.ts +0 -28
- package/dialog/dialog.module.d.ts +0 -6
- package/dialog/dialog.service.d.ts +0 -28
- package/dialog/public-api.d.ts +0 -18
- package/divider/divider.component.d.ts +0 -13
- package/divider/public-api.d.ts +0 -7
- package/dropdown/dropdown-menu-item.component.d.ts +0 -12
- package/dropdown/dropdown-menu.component.d.ts +0 -14
- package/dropdown/dropdown.directive.d.ts +0 -29
- package/dropdown/dropdown.types.d.ts +0 -9
- package/dropdown/public-api.d.ts +0 -10
- package/form/form-error.component.d.ts +0 -11
- package/form/form-item.component.d.ts +0 -14
- package/form/public-api.d.ts +0 -8
- package/icon/icon.component.d.ts +0 -24
- package/icon/icon.service.d.ts +0 -23
- package/icon/icons.d.ts +0 -770
- package/icon/provide-wr-icons.d.ts +0 -9
- package/icon/public-api.d.ts +0 -10
- package/input/input-types.d.ts +0 -1
- package/input/input.component.d.ts +0 -38
- package/input/public-api.d.ts +0 -8
- package/pagination/pagination.component.d.ts +0 -23
- package/pagination/pagination.types.d.ts +0 -7
- package/pagination/public-api.d.ts +0 -8
- package/pipes/new-array.pipe.d.ts +0 -13
- package/pipes/public-api.d.ts +0 -7
- package/progress/progress.component.d.ts +0 -10
- package/progress/public-api.d.ts +0 -7
- package/public-api.d.ts +0 -2
- package/qr/generator.d.ts +0 -7
- package/qr/public-api.d.ts +0 -7
- package/qr/qr.component.d.ts +0 -31
- package/qr/qrcodegen.d.ts +0 -94
- package/select/public-api.d.ts +0 -10
- package/select/select-option-group.component.d.ts +0 -19
- package/select/select-option.component.d.ts +0 -22
- package/select/select.component.d.ts +0 -63
- package/select/select.types.d.ts +0 -17
- package/skeleton/skeleton.component.d.ts +0 -10
- package/spinner/spinner.component.d.ts +0 -13
- package/spinner/spinner.types.d.ts +0 -7
- package/table/public-api.d.ts +0 -11
- package/table/table-cell/index.d.ts +0 -7
- package/table/table-cell/table-cell.directive.d.ts +0 -8
- package/table/table-filter/index.d.ts +0 -7
- package/table/table-filter/table-filter.component.d.ts +0 -18
- package/table/table-sort/index.d.ts +0 -7
- package/table/table-sort/table-sort.component.d.ts +0 -8
- package/table/table.component.d.ts +0 -33
- package/table/types/index.d.ts +0 -6
- package/table/types/table-cell-context.d.ts +0 -6
- package/table/types/table-columns.d.ts +0 -7
- package/table/types/table-filter-emit.d.ts +0 -5
- package/table/types/table-filter-item.d.ts +0 -6
- package/table/types/table-order-item.d.ts +0 -5
- package/table/types/table-order.enum.d.ts +0 -5
- package/tag/public-api.d.ts +0 -7
- package/tag/tag.component.d.ts +0 -21
- package/textarea/public-api.d.ts +0 -7
- package/textarea/textarea.component.d.ts +0 -44
package/alert/index.d.ts
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { SafeAny } from 'ngwr/cdk/types';
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
5
|
+
* @license
|
|
6
|
+
*
|
|
7
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
8
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
3
9
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
10
|
+
type WrAlertType = 'info' | 'success' | 'warning' | 'danger';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* NGWR alert component.
|
|
14
|
+
* Closeable component for feedback.
|
|
15
|
+
*
|
|
16
|
+
* {@tutorial} [How to use wr-alert]{@link http://ngwr.dev/docs/components/alert}
|
|
17
|
+
*/
|
|
18
|
+
declare class WrAlertComponent {
|
|
19
|
+
title: string;
|
|
20
|
+
message?: string;
|
|
21
|
+
type: WrAlertType;
|
|
22
|
+
closeable: boolean;
|
|
23
|
+
protected readonly isClosed: i0.WritableSignal<boolean>;
|
|
24
|
+
get elClasses(): SafeAny;
|
|
25
|
+
onClose(): void;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrAlertComponent, never>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WrAlertComponent, "wr-alert", never, { "title": { "alias": "title"; "required": true; }; "message": { "alias": "message"; "required": false; }; "type": { "alias": "type"; "required": false; }; "closeable": { "alias": "closeable"; "required": false; }; }, {}, never, never, true, never>;
|
|
28
|
+
static ngAcceptInputType_closeable: unknown;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { WrAlertComponent };
|
|
32
|
+
export type { WrAlertType };
|
package/avatar/index.d.ts
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { ChangeDetectorRef, ElementRef } from '@angular/core';
|
|
3
|
+
import { SafeAny } from 'ngwr/cdk/types';
|
|
4
|
+
|
|
5
|
+
declare class WrAvatarComponent {
|
|
6
|
+
readonly cdr: ChangeDetectorRef;
|
|
7
|
+
readonly elRef: ElementRef<any>;
|
|
8
|
+
readonly remSize: number;
|
|
9
|
+
readonly isImgLoaded: i0.WritableSignal<boolean>;
|
|
10
|
+
private calcRemToPx;
|
|
11
|
+
constructor();
|
|
12
|
+
url: string;
|
|
13
|
+
alt: string;
|
|
14
|
+
rounded: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Width and height in rem
|
|
17
|
+
* @example size="6" transforms to 6 * remSize (16 by default)
|
|
18
|
+
*/
|
|
19
|
+
get size(): number;
|
|
20
|
+
set size(value: number | string);
|
|
21
|
+
private _size;
|
|
22
|
+
get elClasses(): SafeAny;
|
|
23
|
+
get elStyles(): SafeAny;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrAvatarComponent, never>;
|
|
25
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WrAvatarComponent, "wr-avatar", never, { "url": { "alias": "url"; "required": true; }; "alt": { "alias": "alt"; "required": true; }; "rounded": { "alias": "rounded"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
26
|
+
static ngAcceptInputType_rounded: unknown;
|
|
27
|
+
static ngAcceptInputType_size: unknown;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { WrAvatarComponent };
|
package/button/index.d.ts
CHANGED
|
@@ -1,5 +1,45 @@
|
|
|
1
|
+
import { WrThemeColor, SafeAny } from 'ngwr/cdk/types';
|
|
2
|
+
import { wrIconName } from 'ngwr/icon';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
|
|
1
5
|
/**
|
|
2
|
-
*
|
|
6
|
+
* NGWR button component.
|
|
7
|
+
* Trigger an operation or perform an action.
|
|
8
|
+
*
|
|
9
|
+
* {@tutorial} [How to use wr-btn]{@link http://ngwr.dev/docs/components/button}
|
|
3
10
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
11
|
+
declare class WrButtonComponent {
|
|
12
|
+
color?: WrThemeColor | null;
|
|
13
|
+
size: 'default' | 'small';
|
|
14
|
+
icon: wrIconName | null;
|
|
15
|
+
iconPosition: 'start' | 'end';
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
outlined: boolean;
|
|
18
|
+
rounded: boolean;
|
|
19
|
+
block: boolean;
|
|
20
|
+
loading: boolean;
|
|
21
|
+
isDisabledWhenLoading: boolean;
|
|
22
|
+
get nativeDisabled(): '' | null;
|
|
23
|
+
get elClasses(): SafeAny;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrButtonComponent, never>;
|
|
25
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WrButtonComponent, "wr-btn, button[wr-btn], a[wr-btn]", never, { "color": { "alias": "color"; "required": false; }; "size": { "alias": "size"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconPosition": { "alias": "iconPosition"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "outlined": { "alias": "outlined"; "required": false; }; "rounded": { "alias": "rounded"; "required": false; }; "block": { "alias": "block"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "isDisabledWhenLoading": { "alias": "isDisabledWhenLoading"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
26
|
+
static ngAcceptInputType_disabled: unknown;
|
|
27
|
+
static ngAcceptInputType_outlined: unknown;
|
|
28
|
+
static ngAcceptInputType_rounded: unknown;
|
|
29
|
+
static ngAcceptInputType_block: unknown;
|
|
30
|
+
static ngAcceptInputType_loading: unknown;
|
|
31
|
+
static ngAcceptInputType_isDisabledWhenLoading: unknown;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* NGWR button group.
|
|
36
|
+
*
|
|
37
|
+
* {@tutorial} [How to use wr-btn-group]{@link http://ngwr.dev/docs/components/button-group}
|
|
38
|
+
*/
|
|
39
|
+
declare class WrButtonGroupComponent {
|
|
40
|
+
get classes(): SafeAny;
|
|
41
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrButtonGroupComponent, never>;
|
|
42
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WrButtonGroupComponent, "wr-btn-group", never, {}, {}, never, ["*"], true, never>;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { WrButtonComponent, WrButtonGroupComponent };
|
package/cdk/index.d.ts
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { OnDestroy, DestroyRef } from '@angular/core';
|
|
3
|
+
import { Subject } from 'rxjs';
|
|
4
|
+
|
|
1
5
|
/**
|
|
2
|
-
*
|
|
6
|
+
* @license
|
|
7
|
+
*
|
|
8
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
9
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
3
10
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
11
|
+
|
|
12
|
+
declare abstract class WrAbstractBase implements OnDestroy {
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated use destroyRef$ instead
|
|
15
|
+
* @protected
|
|
16
|
+
*/
|
|
17
|
+
protected readonly destroyed$: Subject<void>;
|
|
18
|
+
protected readonly destroyRef$: DestroyRef;
|
|
19
|
+
ngOnDestroy(): void;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrAbstractBase, never>;
|
|
21
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<WrAbstractBase, never, never, {}, {}, never, never, true, never>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { WrAbstractBase };
|
package/cdk/rxjs/index.d.ts
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
|
+
import { Maybe, SafeAny } from 'ngwr/cdk/types';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
5
|
+
* @license
|
|
6
|
+
*
|
|
7
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
8
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
3
9
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
10
|
+
|
|
11
|
+
declare function isArray<T>(val: Maybe<T>): val is T;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @license
|
|
15
|
+
*
|
|
16
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
17
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
declare function isDefined<T>(value: Maybe<T>): value is T;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @license
|
|
24
|
+
*
|
|
25
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
26
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
declare function isNotEmptyArray<T>(val: Maybe<T>): val is T;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @license
|
|
33
|
+
*
|
|
34
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
35
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
declare function isObservable(obj: SafeAny | Observable<SafeAny>): obj is Observable<SafeAny>;
|
|
39
|
+
|
|
40
|
+
export { isArray, isDefined, isNotEmptyArray, isObservable };
|
package/cdk/types/index.d.ts
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
5
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
3
6
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
7
|
+
type Maybe<T> = T | undefined | null;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @license
|
|
11
|
+
*
|
|
12
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
13
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
14
|
+
*/
|
|
15
|
+
type SafeAny = any;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @license
|
|
19
|
+
*
|
|
20
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
21
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
22
|
+
*/
|
|
23
|
+
declare const wrThemeColors: readonly ["primary", "secondary", "success", "warning", "danger", "light", "medium", "dark"];
|
|
24
|
+
type WrThemeColor = (typeof wrThemeColors)[number];
|
|
25
|
+
|
|
26
|
+
export { wrThemeColors };
|
|
27
|
+
export type { Maybe, SafeAny, WrThemeColor };
|
package/cdk/utils/index.d.ts
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
5
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
3
6
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Generates random ID
|
|
9
|
+
*
|
|
10
|
+
* @return {string}
|
|
11
|
+
*/
|
|
12
|
+
declare function generateRandomId(): string;
|
|
13
|
+
|
|
14
|
+
export { generateRandomId };
|
package/checkbox/index.d.ts
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import { WrAbstractBase } from 'ngwr/cdk';
|
|
4
|
+
import { SafeAny } from 'ngwr/cdk/types';
|
|
5
|
+
import { wrIconName } from 'ngwr/icon';
|
|
6
|
+
|
|
1
7
|
/**
|
|
2
|
-
*
|
|
8
|
+
* NGWR checkbox component.
|
|
9
|
+
*
|
|
10
|
+
* {@tutorial} [How to use wr-checkbox]{@link http://ngwr.dev/docs/components/checkbox}
|
|
3
11
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
12
|
+
declare class WrCheckboxComponent extends WrAbstractBase implements ControlValueAccessor {
|
|
13
|
+
id: string;
|
|
14
|
+
icon: wrIconName | null;
|
|
15
|
+
get elClasses(): SafeAny;
|
|
16
|
+
get nativeDisabled(): '' | null;
|
|
17
|
+
protected readonly inputValue: _angular_core.WritableSignal<boolean | null>;
|
|
18
|
+
protected value?: boolean;
|
|
19
|
+
private readonly cdr;
|
|
20
|
+
protected readonly isDisabled: _angular_core.WritableSignal<boolean>;
|
|
21
|
+
onChange: (value: boolean) => void;
|
|
22
|
+
onTouched: () => void;
|
|
23
|
+
registerOnChange(fn: (value: boolean) => void): void;
|
|
24
|
+
registerOnTouched(fn: () => void): void;
|
|
25
|
+
setDisabledState(isDisabled: boolean): void;
|
|
26
|
+
writeValue(value: boolean): void;
|
|
27
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrCheckboxComponent, never>;
|
|
28
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrCheckboxComponent, "wr-checkbox", never, { "id": { "alias": "id"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { WrCheckboxComponent };
|
package/dialog/index.d.ts
CHANGED
|
@@ -1,5 +1,193 @@
|
|
|
1
|
+
import { AnimationEvent, AnimationTriggerMetadata } from '@angular/animations';
|
|
2
|
+
import { ComponentType, PositionStrategy, ScrollStrategy, OverlayRef } from '@angular/cdk/overlay';
|
|
3
|
+
import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal } from '@angular/cdk/portal';
|
|
4
|
+
import * as i0 from '@angular/core';
|
|
5
|
+
import { ViewContainerRef, ChangeDetectorRef, ElementRef, EventEmitter, ComponentRef, EmbeddedViewRef, InjectionToken } from '@angular/core';
|
|
6
|
+
import { SafeAny } from 'ngwr/cdk/types';
|
|
7
|
+
import { Subject } from 'rxjs';
|
|
8
|
+
|
|
1
9
|
/**
|
|
2
|
-
*
|
|
10
|
+
* @license
|
|
11
|
+
*
|
|
12
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
13
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
3
14
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
15
|
+
|
|
16
|
+
declare class WrDialogOptions<C = SafeAny> {
|
|
17
|
+
id?: string;
|
|
18
|
+
component?: ComponentType<C>;
|
|
19
|
+
data?: SafeAny;
|
|
20
|
+
hasBackdrop?: boolean;
|
|
21
|
+
backdropClass?: string;
|
|
22
|
+
positionStrategy?: PositionStrategy;
|
|
23
|
+
scrollStrategy?: ScrollStrategy;
|
|
24
|
+
viewContainerRef?: ViewContainerRef;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* @license
|
|
29
|
+
*
|
|
30
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
31
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
declare class WrDialogRef<C = SafeAny, R = SafeAny> {
|
|
35
|
+
private overlayRef;
|
|
36
|
+
private options;
|
|
37
|
+
baseInstance: WrDialogBaseDirective;
|
|
38
|
+
readonly id?: string;
|
|
39
|
+
componentInstance: C | null;
|
|
40
|
+
result?: R;
|
|
41
|
+
readonly afterOpened: Subject<void>;
|
|
42
|
+
readonly afterClosed: Subject<R | undefined>;
|
|
43
|
+
private closeTimeout?;
|
|
44
|
+
private readonly destroyRef$;
|
|
45
|
+
constructor(overlayRef: OverlayRef, options: WrDialogOptions, baseInstance: WrDialogBaseDirective);
|
|
46
|
+
close(result?: R): void;
|
|
47
|
+
private _finishDialogClose;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @license
|
|
52
|
+
*
|
|
53
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
54
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
declare class WrDialogBaseDirective extends BasePortalOutlet {
|
|
58
|
+
cdr: ChangeDetectorRef;
|
|
59
|
+
options: WrDialogOptions;
|
|
60
|
+
protected overlayRef: OverlayRef;
|
|
61
|
+
portalOutlet: CdkPortalOutlet;
|
|
62
|
+
dialogElementRef: ElementRef<HTMLDivElement>;
|
|
63
|
+
dialogRef: WrDialogRef;
|
|
64
|
+
containerClick: EventEmitter<void>;
|
|
65
|
+
animationStateChanged: EventEmitter<AnimationEvent>;
|
|
66
|
+
state: 'void' | 'enter' | 'exit';
|
|
67
|
+
constructor(cdr: ChangeDetectorRef, options: WrDialogOptions, overlayRef: OverlayRef);
|
|
68
|
+
onContainerClick(e: MouseEvent): void;
|
|
69
|
+
attachComponentPortal<C>(portal: ComponentPortal<C>): ComponentRef<C>;
|
|
70
|
+
attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C>;
|
|
71
|
+
private setEnterAnimationClass;
|
|
72
|
+
private setExitAnimationClass;
|
|
73
|
+
private setMaskExitAnimationClass;
|
|
74
|
+
private cleanAnimationClass;
|
|
75
|
+
onAnimationDone(event: AnimationEvent): void;
|
|
76
|
+
onAnimationStart(event: AnimationEvent): void;
|
|
77
|
+
startExitAnimation(): void;
|
|
78
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrDialogBaseDirective, never>;
|
|
79
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<WrDialogBaseDirective, never, never, {}, {}, never, never, true, never>;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @license
|
|
84
|
+
*
|
|
85
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
86
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
87
|
+
*/
|
|
88
|
+
|
|
89
|
+
declare class WrDialogComponent extends WrDialogBaseDirective {
|
|
90
|
+
options: WrDialogOptions;
|
|
91
|
+
portalOutlet: CdkPortalOutlet;
|
|
92
|
+
dialogElementRef: ElementRef<HTMLDivElement>;
|
|
93
|
+
state: 'void' | 'enter' | 'exit';
|
|
94
|
+
onAnimationStart(event: AnimationEvent): void;
|
|
95
|
+
onAnimationDone(event: AnimationEvent): void;
|
|
96
|
+
onContainerClick(e: MouseEvent): void;
|
|
97
|
+
/** Set element classes */
|
|
98
|
+
get elClasses(): SafeAny;
|
|
99
|
+
constructor(cdr: ChangeDetectorRef, options: WrDialogOptions, overlayRef: OverlayRef);
|
|
100
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrDialogComponent, never>;
|
|
101
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WrDialogComponent, "wr-dialog", never, {}, {}, never, never, true, never>;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
declare class WrDialogModule {
|
|
105
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrDialogModule, never>;
|
|
106
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<WrDialogModule, never, never, never>;
|
|
107
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<WrDialogModule>;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* NGWR dialog service.
|
|
112
|
+
*
|
|
113
|
+
* {@tutorial} [How to use wr-dialog]{@link http://ngwr.dev/docs/components/dialog}
|
|
114
|
+
*/
|
|
115
|
+
declare class WrDialogService {
|
|
116
|
+
private readonly overlay;
|
|
117
|
+
private readonly injector;
|
|
118
|
+
private readonly parentModal;
|
|
119
|
+
private openedDialogsAtThisLevel;
|
|
120
|
+
private readonly afterAllClosedAtThisLevel;
|
|
121
|
+
get openedDialogs(): WrDialogRef[];
|
|
122
|
+
get _afterAllClosed(): Subject<void>;
|
|
123
|
+
open<C = SafeAny, R = SafeAny>(options: WrDialogOptions<C>): WrDialogRef<C, R>;
|
|
124
|
+
private _defaultPositionStrategy;
|
|
125
|
+
private _defaultScrollStrategy;
|
|
126
|
+
private _createOverlay;
|
|
127
|
+
private _attachDialogContainer;
|
|
128
|
+
private _attachDialogContent;
|
|
129
|
+
private _removeOpenedModal;
|
|
130
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrDialogService, never>;
|
|
131
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<WrDialogService>;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* @license
|
|
136
|
+
*
|
|
137
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
138
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
139
|
+
*/
|
|
140
|
+
|
|
141
|
+
declare const WR_ANIMATION_ZOOM_CLASS_NAME_MAP: {
|
|
142
|
+
enter: string;
|
|
143
|
+
enterActive: string;
|
|
144
|
+
leave: string;
|
|
145
|
+
leaveActive: string;
|
|
146
|
+
};
|
|
147
|
+
declare const WR_ANIMATION_FADE_CLASS_NAME_MAP: {
|
|
148
|
+
enter: string;
|
|
149
|
+
enterActive: string;
|
|
150
|
+
leave: string;
|
|
151
|
+
leaveActive: string;
|
|
152
|
+
};
|
|
153
|
+
declare const wrDialogAnimations: {
|
|
154
|
+
readonly dialogComponent: AnimationTriggerMetadata;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
declare class WrDialogCloseDirective {
|
|
158
|
+
dialogRef: WrDialogRef;
|
|
159
|
+
_onButtonClick(event: MouseEvent): void;
|
|
160
|
+
constructor(dialogRef: WrDialogRef);
|
|
161
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrDialogCloseDirective, [{ optional: true; }]>;
|
|
162
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<WrDialogCloseDirective, "[wrDialogClose]", never, {}, {}, never, never, true, never>;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
declare class WrDialogContentDirective {
|
|
166
|
+
class: string;
|
|
167
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrDialogContentDirective, never>;
|
|
168
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<WrDialogContentDirective, "[wrDialogContent]", never, {}, {}, never, never, true, never>;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* @license
|
|
173
|
+
*
|
|
174
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
175
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
176
|
+
*/
|
|
177
|
+
|
|
178
|
+
declare const WR_DIALOG_DATA: InjectionToken<any>;
|
|
179
|
+
|
|
180
|
+
declare class WrDialogFooterDirective {
|
|
181
|
+
position: 'start' | 'center' | 'end';
|
|
182
|
+
get elClasses(): SafeAny;
|
|
183
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrDialogFooterDirective, never>;
|
|
184
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<WrDialogFooterDirective, "[wrDialogFooter]", never, { "position": { "alias": "position"; "required": false; }; }, {}, never, never, true, never>;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
declare class WrDialogTitleDirective {
|
|
188
|
+
class: string;
|
|
189
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrDialogTitleDirective, never>;
|
|
190
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<WrDialogTitleDirective, "[wrDialogTitle]", never, {}, {}, never, never, true, never>;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export { WR_ANIMATION_FADE_CLASS_NAME_MAP, WR_ANIMATION_ZOOM_CLASS_NAME_MAP, WR_DIALOG_DATA, WrDialogBaseDirective, WrDialogCloseDirective, WrDialogComponent, WrDialogContentDirective, WrDialogFooterDirective, WrDialogModule, WrDialogOptions, WrDialogRef, WrDialogService, WrDialogTitleDirective, wrDialogAnimations };
|
package/divider/index.d.ts
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { WrThemeColor, SafeAny } from 'ngwr/cdk/types';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
|
|
4
|
+
declare class WrDividerComponent {
|
|
5
|
+
color: WrThemeColor | null;
|
|
6
|
+
type: 'solid' | 'dashed' | 'dotted';
|
|
7
|
+
width: number;
|
|
8
|
+
get elClasses(): SafeAny;
|
|
9
|
+
get elStyles(): SafeAny;
|
|
10
|
+
role: string;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrDividerComponent, never>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WrDividerComponent, "wr-divider", never, { "color": { "alias": "color"; "required": false; }; "type": { "alias": "type"; "required": false; }; "width": { "alias": "width"; "required": false; }; }, {}, never, never, true, never>;
|
|
13
|
+
static ngAcceptInputType_width: unknown;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { WrDividerComponent };
|
package/dropdown/index.d.ts
CHANGED
|
@@ -1,5 +1,68 @@
|
|
|
1
|
+
import { ConnectedPosition } from '@angular/cdk/overlay';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { TemplateRef, OnDestroy } from '@angular/core';
|
|
4
|
+
import { wrIconName } from 'ngwr/icon';
|
|
5
|
+
|
|
1
6
|
/**
|
|
2
|
-
*
|
|
7
|
+
* @license
|
|
8
|
+
*
|
|
9
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
10
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
3
11
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
12
|
+
|
|
13
|
+
type WrDropdownTrigger = 'click' | 'hover';
|
|
14
|
+
declare const WR_DROPDOWN_POSITIONS: Record<string, ConnectedPosition[]>;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @license
|
|
18
|
+
*
|
|
19
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
20
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
declare class WrDropdownMenuComponent {
|
|
24
|
+
get hostClasses(): Record<string, string>;
|
|
25
|
+
contentTpl: TemplateRef<void>;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrDropdownMenuComponent, never>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WrDropdownMenuComponent, "wr-dropdown-menu", ["wrDropdownMenu"], {}, {}, never, ["*"], true, never>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
declare class WrDropdownDirective implements OnDestroy {
|
|
31
|
+
dropdownMenu: i0.InputSignal<WrDropdownMenuComponent | undefined>;
|
|
32
|
+
trigger: i0.InputSignal<WrDropdownTrigger>;
|
|
33
|
+
position: i0.InputSignal<string>;
|
|
34
|
+
private readonly isOpen;
|
|
35
|
+
private overlayRef?;
|
|
36
|
+
private clickTimeStamp;
|
|
37
|
+
private readonly overlay;
|
|
38
|
+
private readonly elementRef;
|
|
39
|
+
private readonly viewContainerRef;
|
|
40
|
+
private readonly scrollStrategyOptions;
|
|
41
|
+
private readonly destroyRef;
|
|
42
|
+
get hostClasses(): Record<string, boolean>;
|
|
43
|
+
constructor();
|
|
44
|
+
ngOnDestroy(): void;
|
|
45
|
+
protected onClick(event: MouseEvent): void;
|
|
46
|
+
protected onMouseEnter(): void;
|
|
47
|
+
private open;
|
|
48
|
+
private setupClickEvents;
|
|
49
|
+
private setupHoverEvents;
|
|
50
|
+
private close;
|
|
51
|
+
private destroyOverlay;
|
|
52
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrDropdownDirective, never>;
|
|
53
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<WrDropdownDirective, "[wrDropdown]", never, { "dropdownMenu": { "alias": "dropdownMenu"; "required": false; "isSignal": true; }; "trigger": { "alias": "trigger"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
declare class WrDropdownMenuItemComponent {
|
|
57
|
+
icon: i0.InputSignal<wrIconName | null>;
|
|
58
|
+
disabled: i0.InputSignalWithTransform<boolean, unknown>;
|
|
59
|
+
get hostClasses(): Record<string, boolean>;
|
|
60
|
+
attrRole: string;
|
|
61
|
+
tabindex: string;
|
|
62
|
+
protected onClick(event: MouseEvent): void;
|
|
63
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrDropdownMenuItemComponent, never>;
|
|
64
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WrDropdownMenuItemComponent, "wr-dropdown-menu-item", never, { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export { WR_DROPDOWN_POSITIONS, WrDropdownDirective, WrDropdownMenuComponent, WrDropdownMenuItemComponent };
|
|
68
|
+
export type { WrDropdownTrigger };
|
package/fesm2022/ngwr-alert.mjs
CHANGED
|
@@ -25,7 +25,7 @@ class WrAlertComponent {
|
|
|
25
25
|
constructor() {
|
|
26
26
|
this.type = 'info';
|
|
27
27
|
this.closeable = false;
|
|
28
|
-
this.isClosed = signal(false);
|
|
28
|
+
this.isClosed = signal(false, ...(ngDevMode ? [{ debugName: "isClosed" }] : []));
|
|
29
29
|
}
|
|
30
30
|
get elClasses() {
|
|
31
31
|
return {
|
|
@@ -38,10 +38,10 @@ class WrAlertComponent {
|
|
|
38
38
|
onClose() {
|
|
39
39
|
this.isClosed.set(true);
|
|
40
40
|
}
|
|
41
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
42
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
41
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: WrAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
42
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.10", type: WrAlertComponent, isStandalone: true, selector: "wr-alert", inputs: { title: "title", message: "message", type: "type", closeable: ["closeable", "closeable", booleanAttribute] }, host: { properties: { "class": "this.elClasses" } }, providers: [provideWrIcons([close])], ngImport: i0, template: "@if (!isClosed()) {\n <div class=\"wr-alert__wrapper\">\n <div class=\"wr-alert__body\">\n <p class=\"wr-alert__title\">{{ title }}</p>\n @if (message) {\n <p class=\"wr-alert__message\">{{ message }}</p>\n }\n </div>\n\n @if (closeable) {\n <div class=\"wr-alert-close\">\n <wr-icon name=\"close\" (click)=\"onClose()\"></wr-icon>\n </div>\n }\n </div>\n}\n", dependencies: [{ kind: "component", type: WrIconComponent, selector: "wr-icon", inputs: ["name"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
43
43
|
}
|
|
44
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: WrAlertComponent, decorators: [{
|
|
45
45
|
type: Component,
|
|
46
46
|
args: [{ selector: 'wr-alert', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [WrIconComponent], providers: [provideWrIcons([close])], template: "@if (!isClosed()) {\n <div class=\"wr-alert__wrapper\">\n <div class=\"wr-alert__body\">\n <p class=\"wr-alert__title\">{{ title }}</p>\n @if (message) {\n <p class=\"wr-alert__message\">{{ message }}</p>\n }\n </div>\n\n @if (closeable) {\n <div class=\"wr-alert-close\">\n <wr-icon name=\"close\" (click)=\"onClose()\"></wr-icon>\n </div>\n }\n </div>\n}\n" }]
|
|
47
47
|
}], propDecorators: { title: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-alert.mjs","sources":["../../../projects/lib/alert/alert-type.ts","../../../projects/lib/alert/alert.component.ts","../../../projects/lib/alert/alert.component.html","../../../projects/lib/alert/public-api.ts","../../../projects/lib/alert/ngwr-alert.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nexport type WrAlertType = 'info' | 'success' | 'warning' | 'danger';\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Input,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { SafeAny } from 'ngwr/cdk/types';\nimport { provideWrIcons, close, WrIconComponent } from 'ngwr/icon';\n\nimport { WrAlertType } from './alert-type';\n\n/**\n * NGWR alert component.\n * Closeable component for feedback.\n *\n * {@tutorial} [How to use wr-alert]{@link http://ngwr.dev/docs/components/alert}\n */\n@Component({\n selector: 'wr-alert',\n templateUrl: './alert.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [WrIconComponent],\n providers: [provideWrIcons([close])],\n})\nexport class WrAlertComponent {\n @Input({ required: true }) title!: string;\n @Input() message?: string;\n @Input() type: WrAlertType = 'info';\n @Input({ transform: booleanAttribute }) closeable = false;\n\n protected readonly isClosed = signal(false);\n\n @HostBinding('class')\n get elClasses(): SafeAny {\n return {\n 'wr-alert': true,\n 'wr-alert--success': this.type === 'success',\n 'wr-alert--warning': this.type === 'warning',\n 'wr-alert--danger': this.type === 'danger',\n };\n }\n\n onClose(): void {\n this.isClosed.set(true);\n }\n}\n","@if (!isClosed()) {\n <div class=\"wr-alert__wrapper\">\n <div class=\"wr-alert__body\">\n <p class=\"wr-alert__title\">{{ title }}</p>\n @if (message) {\n <p class=\"wr-alert__message\">{{ message }}</p>\n }\n </div>\n\n @if (closeable) {\n <div class=\"wr-alert-close\">\n <wr-icon name=\"close\" (click)=\"onClose()\"></wr-icon>\n </div>\n }\n </div>\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nexport * from './alert-type';\nexport * from './alert.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAAA;;;;;AAKG;;ACLH;;;;;AAKG;AAiBH;;;;;AAKG;MASU,gBAAgB,CAAA;AAR7B,IAAA,WAAA,GAAA;QAWW,IAAI,CAAA,IAAA,GAAgB,MAAM;QACK,IAAS,CAAA,SAAA,GAAG,KAAK;AAEtC,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,KAAK,
|
|
1
|
+
{"version":3,"file":"ngwr-alert.mjs","sources":["../../../projects/lib/alert/alert-type.ts","../../../projects/lib/alert/alert.component.ts","../../../projects/lib/alert/alert.component.html","../../../projects/lib/alert/public-api.ts","../../../projects/lib/alert/ngwr-alert.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nexport type WrAlertType = 'info' | 'success' | 'warning' | 'danger';\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Input,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { SafeAny } from 'ngwr/cdk/types';\nimport { provideWrIcons, close, WrIconComponent } from 'ngwr/icon';\n\nimport { WrAlertType } from './alert-type';\n\n/**\n * NGWR alert component.\n * Closeable component for feedback.\n *\n * {@tutorial} [How to use wr-alert]{@link http://ngwr.dev/docs/components/alert}\n */\n@Component({\n selector: 'wr-alert',\n templateUrl: './alert.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [WrIconComponent],\n providers: [provideWrIcons([close])],\n})\nexport class WrAlertComponent {\n @Input({ required: true }) title!: string;\n @Input() message?: string;\n @Input() type: WrAlertType = 'info';\n @Input({ transform: booleanAttribute }) closeable = false;\n\n protected readonly isClosed = signal(false);\n\n @HostBinding('class')\n get elClasses(): SafeAny {\n return {\n 'wr-alert': true,\n 'wr-alert--success': this.type === 'success',\n 'wr-alert--warning': this.type === 'warning',\n 'wr-alert--danger': this.type === 'danger',\n };\n }\n\n onClose(): void {\n this.isClosed.set(true);\n }\n}\n","@if (!isClosed()) {\n <div class=\"wr-alert__wrapper\">\n <div class=\"wr-alert__body\">\n <p class=\"wr-alert__title\">{{ title }}</p>\n @if (message) {\n <p class=\"wr-alert__message\">{{ message }}</p>\n }\n </div>\n\n @if (closeable) {\n <div class=\"wr-alert-close\">\n <wr-icon name=\"close\" (click)=\"onClose()\"></wr-icon>\n </div>\n }\n </div>\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nexport * from './alert-type';\nexport * from './alert.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAAA;;;;;AAKG;;ACLH;;;;;AAKG;AAiBH;;;;;AAKG;MASU,gBAAgB,CAAA;AAR7B,IAAA,WAAA,GAAA;QAWW,IAAI,CAAA,IAAA,GAAgB,MAAM;QACK,IAAS,CAAA,SAAA,GAAG,KAAK;AAEtC,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,KAAK,oDAAC;AAe5C;AAbC,IAAA,IACI,SAAS,GAAA;QACX,OAAO;AACL,YAAA,UAAU,EAAE,IAAI;AAChB,YAAA,mBAAmB,EAAE,IAAI,CAAC,IAAI,KAAK,SAAS;AAC5C,YAAA,mBAAmB,EAAE,IAAI,CAAC,IAAI,KAAK,SAAS;AAC5C,YAAA,kBAAkB,EAAE,IAAI,CAAC,IAAI,KAAK,QAAQ;SAC3C;;IAGH,OAAO,GAAA;AACL,QAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC;;+GAnBd,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,gBAAgB,EAIP,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,OAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,MAAA,EAAA,SAAA,EAAA,CAAA,WAAA,EAAA,WAAA,EAAA,gBAAgB,CANzB,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,OAAA,EAAA,gBAAA,EAAA,EAAA,EAAA,SAAA,EAAA,CAAC,cAAc,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EClCtC,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,6ZAgBA,4CDiBY,eAAe,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAGd,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAR5B,SAAS;+BACE,UAAU,EAAA,eAAA,EAEH,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,IAAI,EAC5B,OAAA,EAAA,CAAC,eAAe,CAAC,EAAA,SAAA,EACf,CAAC,cAAc,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAA,QAAA,EAAA,6ZAAA,EAAA;;sBAGnC,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;sBACxB;;sBACA;;sBACA,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE;;sBAIrC,WAAW;uBAAC,OAAO;;;AE5CtB;;;;;AAKG;;ACLH;;AAEG;;;;"}
|