@radix-ng/primitives 0.5.0 → 0.7.0
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-dialog/README.md +1 -0
- package/alert-dialog/index.d.ts +6 -0
- package/alert-dialog/src/alert-dialog-cancel.directive.d.ts +7 -0
- package/alert-dialog/src/alert-dialog-content.directive.d.ts +8 -0
- package/alert-dialog/src/alert-dialog-root.directive.d.ts +9 -0
- package/alert-dialog/src/alert-dialog-title.directive.d.ts +5 -0
- package/alert-dialog/src/alert-dialog-trigger.directive.d.ts +7 -0
- package/alert-dialog/src/alert-dialog.service.d.ts +14 -0
- package/avatar/index.d.ts +3 -1
- package/avatar/src/avatar-fallback.directive.d.ts +10 -17
- package/avatar/src/avatar-image.directive.d.ts +10 -11
- package/avatar/src/avatar-root.directive.d.ts +21 -0
- package/avatar/src/avatar.config.d.ts +3 -2
- package/checkbox/src/checkbox.directive.d.ts +5 -3
- package/collapsible/README.md +1 -0
- package/collapsible/index.d.ts +3 -0
- package/collapsible/src/collapsible-content.directive.d.ts +11 -0
- package/collapsible/src/collapsible-root.directive.d.ts +52 -0
- package/collapsible/src/collapsible-trigger.directive.d.ts +26 -0
- package/esm2022/alert-dialog/index.mjs +7 -0
- package/esm2022/alert-dialog/radix-ng-primitives-alert-dialog.mjs +5 -0
- package/esm2022/alert-dialog/src/alert-dialog-cancel.directive.mjs +24 -0
- package/esm2022/alert-dialog/src/alert-dialog-content.directive.mjs +26 -0
- package/esm2022/alert-dialog/src/alert-dialog-root.directive.mjs +24 -0
- package/esm2022/alert-dialog/src/alert-dialog-title.directive.mjs +14 -0
- package/esm2022/alert-dialog/src/alert-dialog-trigger.directive.mjs +24 -0
- package/esm2022/alert-dialog/src/alert-dialog.service.mjs +45 -0
- package/esm2022/avatar/index.mjs +2 -2
- package/esm2022/avatar/src/avatar-fallback.directive.mjs +23 -30
- package/esm2022/avatar/src/avatar-image.directive.mjs +29 -31
- package/esm2022/avatar/src/avatar-root.directive.mjs +38 -0
- package/esm2022/avatar/src/avatar.config.mjs +2 -2
- package/esm2022/checkbox/src/checkbox-indicator.directive.mjs +3 -3
- package/esm2022/checkbox/src/checkbox.directive.mjs +16 -6
- package/esm2022/collapsible/index.mjs +4 -0
- package/esm2022/collapsible/radix-ng-primitives-collapsible.mjs +5 -0
- package/esm2022/collapsible/src/collapsible-content.directive.mjs +26 -0
- package/esm2022/collapsible/src/collapsible-root.directive.mjs +114 -0
- package/esm2022/collapsible/src/collapsible-trigger.directive.mjs +49 -0
- package/esm2022/label/index.mjs +2 -2
- package/esm2022/label/src/label-root.directive.mjs +48 -0
- package/esm2022/progress/index.mjs +2 -2
- package/esm2022/progress/src/progress-indicator.directive.mjs +11 -10
- package/esm2022/progress/src/progress-root.directive.mjs +71 -0
- package/esm2022/radio/index.mjs +2 -4
- package/esm2022/radio/src/radio-indicator.directive.mjs +8 -13
- package/esm2022/radio/src/radio-item.directive.mjs +27 -42
- package/esm2022/radio/src/radio-root.directive.mjs +104 -0
- package/esm2022/roving-focus/index.mjs +1 -3
- package/esm2022/roving-focus/src/roving-focus-group.directive.mjs +9 -16
- package/esm2022/roving-focus/src/roving-focus-item.directive.mjs +21 -26
- package/esm2022/separator/src/separator.directive.mjs +12 -17
- package/esm2022/switch/index.mjs +3 -3
- package/esm2022/switch/src/switch-input.directive.mjs +30 -0
- package/esm2022/switch/src/switch-root.directive.mjs +71 -0
- package/esm2022/switch/src/switch-thumb.directive.mjs +10 -12
- package/esm2022/toggle/index.mjs +2 -2
- package/esm2022/toggle/src/toggle-root.directive.mjs +49 -0
- package/esm2022/toggle-group/src/toggle-group-button.directive.mjs +9 -14
- package/esm2022/toggle-group/src/toggle-group-multi.directive.mjs +4 -4
- package/esm2022/toggle-group/src/toggle-group.directive.mjs +9 -12
- package/fesm2022/radix-ng-primitives-alert-dialog.mjs +150 -0
- package/fesm2022/radix-ng-primitives-alert-dialog.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-avatar.mjs +79 -90
- package/fesm2022/radix-ng-primitives-avatar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-checkbox.mjs +18 -8
- package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-collapsible.mjs +190 -0
- package/fesm2022/radix-ng-primitives-collapsible.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-label.mjs +20 -32
- package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-progress.mjs +55 -49
- package/fesm2022/radix-ng-primitives-progress.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-radio.mjs +69 -101
- package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-roving-focus.mjs +19 -42
- package/fesm2022/radix-ng-primitives-roving-focus.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-separator.mjs +12 -17
- package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-switch.mjs +77 -110
- package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle-group.mjs +19 -27
- package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle.mjs +16 -32
- package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
- package/label/index.d.ts +1 -1
- package/label/src/label-root.directive.d.ts +13 -0
- package/package.json +14 -21
- package/progress/index.d.ts +2 -1
- package/progress/src/progress-indicator.directive.d.ts +2 -2
- package/progress/src/progress-root.directive.d.ts +29 -0
- package/radio/index.d.ts +1 -3
- package/radio/src/radio-indicator.directive.d.ts +3 -9
- package/radio/src/radio-item.directive.d.ts +9 -28
- package/radio/src/{radio-group.directive.d.ts → radio-root.directive.d.ts} +24 -17
- package/roving-focus/index.d.ts +0 -2
- package/roving-focus/src/roving-focus-group.directive.d.ts +4 -6
- package/roving-focus/src/roving-focus-item.directive.d.ts +6 -8
- package/separator/src/separator.directive.d.ts +14 -8
- package/switch/index.d.ts +3 -2
- package/switch/src/switch-input.directive.d.ts +6 -0
- package/switch/src/switch-root.directive.d.ts +34 -0
- package/switch/src/switch-thumb.directive.d.ts +2 -5
- package/toggle/index.d.ts +2 -1
- package/toggle/src/toggle-root.directive.d.ts +32 -0
- package/toggle-group/src/toggle-group-button.directive.d.ts +1 -4
- package/toggle-group/src/toggle-group-multi.directive.d.ts +1 -1
- package/toggle-group/src/toggle-group.directive.d.ts +2 -2
- package/accordion/README.md +0 -3
- package/accordion/index.d.ts +0 -7
- package/accordion/src/accordion/accordion.directive.d.ts +0 -64
- package/accordion/src/accordion/accordion.token.d.ts +0 -4
- package/accordion/src/accordion-content/accordion-content.directive.d.ts +0 -44
- package/accordion/src/accordion-header/accordion-header.directive.d.ts +0 -6
- package/accordion/src/accordion-item/accordion-item.directive.d.ts +0 -42
- package/accordion/src/accordion-item/accordion-item.token.d.ts +0 -4
- package/accordion/src/accordion-state.directive.d.ts +0 -28
- package/accordion/src/accordion-trigger/accordion-trigger.directive.d.ts +0 -23
- package/accordion/src/accordion.config.d.ts +0 -25
- package/avatar/src/avatar.directive.d.ts +0 -22
- package/avatar/src/avatar.token.d.ts +0 -4
- package/esm2022/accordion/index.mjs +0 -8
- package/esm2022/accordion/radix-ng-primitives-accordion.mjs +0 -5
- package/esm2022/accordion/src/accordion/accordion.directive.mjs +0 -108
- package/esm2022/accordion/src/accordion/accordion.token.mjs +0 -6
- package/esm2022/accordion/src/accordion-content/accordion-content.directive.mjs +0 -75
- package/esm2022/accordion/src/accordion-header/accordion-header.directive.mjs +0 -17
- package/esm2022/accordion/src/accordion-item/accordion-item.directive.mjs +0 -81
- package/esm2022/accordion/src/accordion-item/accordion-item.token.mjs +0 -6
- package/esm2022/accordion/src/accordion-state.directive.mjs +0 -49
- package/esm2022/accordion/src/accordion-trigger/accordion-trigger.directive.mjs +0 -49
- package/esm2022/accordion/src/accordion.config.mjs +0 -27
- package/esm2022/avatar/src/avatar.directive.mjs +0 -38
- package/esm2022/avatar/src/avatar.token.mjs +0 -6
- package/esm2022/label/src/label.directive.mjs +0 -60
- package/esm2022/overlay/index.mjs +0 -5
- package/esm2022/overlay/radix-ng-primitives-overlay.mjs +0 -5
- package/esm2022/overlay/src/overlay-arrow.directive.mjs +0 -59
- package/esm2022/overlay/src/overlay-arrow.token.mjs +0 -3
- package/esm2022/overlay/src/overlay-trigger.directive.mjs +0 -279
- package/esm2022/overlay/src/overlay-trigger.token.mjs +0 -9
- package/esm2022/overlay/src/overlay.directive.mjs +0 -51
- package/esm2022/overlay/src/overlay.token.mjs +0 -3
- package/esm2022/progress/src/progress.directive.mjs +0 -62
- package/esm2022/progress/src/progress.token.mjs +0 -6
- package/esm2022/radio/src/radio-group.directive.mjs +0 -108
- package/esm2022/radio/src/radio-group.token.mjs +0 -6
- package/esm2022/radio/src/radio-item.token.mjs +0 -6
- package/esm2022/roving-focus/src/roving-focus-group.token.mjs +0 -9
- package/esm2022/roving-focus/src/roving-focus-item.token.mjs +0 -6
- package/esm2022/switch/src/switch.directive.mjs +0 -125
- package/esm2022/switch/src/switch.token.mjs +0 -6
- package/esm2022/toggle/src/toggle.directive.mjs +0 -65
- package/esm2022/visually-hidden/index.mjs +0 -2
- package/esm2022/visually-hidden/radix-ng-primitives-visually-hidden.mjs +0 -5
- package/esm2022/visually-hidden/src/visually-hidden.directive.mjs +0 -42
- package/fesm2022/radix-ng-primitives-accordion.mjs +0 -394
- package/fesm2022/radix-ng-primitives-accordion.mjs.map +0 -1
- package/fesm2022/radix-ng-primitives-overlay.mjs +0 -399
- package/fesm2022/radix-ng-primitives-overlay.mjs.map +0 -1
- package/fesm2022/radix-ng-primitives-visually-hidden.mjs +0 -49
- package/fesm2022/radix-ng-primitives-visually-hidden.mjs.map +0 -1
- package/label/src/label.directive.d.ts +0 -19
- package/overlay/README.md +0 -1
- package/overlay/index.d.ts +0 -4
- package/overlay/src/overlay-arrow.directive.d.ts +0 -29
- package/overlay/src/overlay-arrow.token.d.ts +0 -3
- package/overlay/src/overlay-trigger.directive.d.ts +0 -163
- package/overlay/src/overlay-trigger.token.d.ts +0 -7
- package/overlay/src/overlay.directive.d.ts +0 -29
- package/overlay/src/overlay.token.d.ts +0 -3
- package/progress/src/progress.directive.d.ts +0 -26
- package/progress/src/progress.token.d.ts +0 -4
- package/radio/src/radio-group.token.d.ts +0 -4
- package/radio/src/radio-item.token.d.ts +0 -4
- package/roving-focus/src/roving-focus-group.token.d.ts +0 -7
- package/roving-focus/src/roving-focus-item.token.d.ts +0 -4
- package/switch/src/switch.directive.d.ts +0 -73
- package/switch/src/switch.token.d.ts +0 -4
- package/toggle/src/toggle.directive.d.ts +0 -30
- package/visually-hidden/README.md +0 -3
- package/visually-hidden/index.d.ts +0 -1
- package/visually-hidden/src/visually-hidden.directive.d.ts +0 -11
@@ -0,0 +1 @@
|
|
1
|
+
# @radix-ng/primitives/alert-dialog
|
@@ -0,0 +1,6 @@
|
|
1
|
+
export * from './src/alert-dialog-root.directive';
|
2
|
+
export * from './src/alert-dialog-cancel.directive';
|
3
|
+
export * from './src/alert-dialog-content.directive';
|
4
|
+
export * from './src/alert-dialog-trigger.directive';
|
5
|
+
export * from './src/alert-dialog-title.directive';
|
6
|
+
export * from './src/alert-dialog.service';
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
export declare class AlertDialogCancelDirective {
|
3
|
+
private readonly alertDialogService;
|
4
|
+
onClick(): void;
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AlertDialogCancelDirective, never>;
|
6
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AlertDialogCancelDirective, "[rdxAlertDialogCancel]", never, {}, {}, never, never, true, never>;
|
7
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
export declare class AlertDialogContentDirective {
|
3
|
+
private readonly renderer;
|
4
|
+
private readonly elementRef;
|
5
|
+
set maxWidth(value: string);
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AlertDialogContentDirective, never>;
|
7
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AlertDialogContentDirective, "[rdxAlertDialogContent]", never, { "maxWidth": { "alias": "maxWidth"; "required": false; }; }, {}, never, never, true, never>;
|
8
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export declare class AlertDialogRootDirective {
|
4
|
+
private readonly viewContainerRef;
|
5
|
+
private readonly alertDialogService;
|
6
|
+
set content(template: TemplateRef<any>);
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AlertDialogRootDirective, never>;
|
8
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AlertDialogRootDirective, "[rdxAlertDialogRoot]", never, { "content": { "alias": "content"; "required": false; }; }, {}, never, never, true, never>;
|
9
|
+
}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
export declare class AlertDialogTitleDirective {
|
3
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AlertDialogTitleDirective, never>;
|
4
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AlertDialogTitleDirective, "[rdxAlertDialogTitle]", never, {}, {}, never, never, true, never>;
|
5
|
+
}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
export declare class AlertDialogTriggerDirective {
|
3
|
+
private readonly alertDialogService;
|
4
|
+
handleClick(): void;
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AlertDialogTriggerDirective, never>;
|
6
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AlertDialogTriggerDirective, "[rdxAlertDialogTrigger]", never, {}, {}, never, never, true, never>;
|
7
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { Overlay } from '@angular/cdk/overlay';
|
2
|
+
import { TemplateRef, ViewContainerRef } from '@angular/core';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export declare class AlertDialogService {
|
5
|
+
private overlay;
|
6
|
+
private overlayRef;
|
7
|
+
private dialogContent;
|
8
|
+
constructor(overlay: Overlay);
|
9
|
+
setDialogContent(viewContainerRef: ViewContainerRef, template: TemplateRef<any>): void;
|
10
|
+
open(): void;
|
11
|
+
close(): void;
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AlertDialogService, never>;
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AlertDialogService>;
|
14
|
+
}
|
package/avatar/index.d.ts
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
export * from './src/avatar-fallback.directive';
|
2
2
|
export * from './src/avatar-image.directive';
|
3
|
-
export * from './src/avatar.directive';
|
3
|
+
export * from './src/avatar-root.directive';
|
4
4
|
export * from './src/avatar.config';
|
5
|
+
export type { AvatarImageProps } from './src/avatar-image.directive';
|
6
|
+
export type { AvatarFallbackProps } from './src/avatar-fallback.directive';
|
@@ -1,34 +1,27 @@
|
|
1
1
|
import { OnDestroy, OnInit } from '@angular/core';
|
2
2
|
import * as i0 from "@angular/core";
|
3
|
-
export
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
export interface AvatarFallbackProps {
|
4
|
+
delayMs?: number;
|
5
|
+
}
|
6
|
+
export declare class RdxAvatarFallbackDirective implements AvatarFallbackProps, OnInit, OnDestroy {
|
7
7
|
private readonly avatar;
|
8
|
-
/**
|
9
|
-
* Access the global configuration.
|
10
|
-
*/
|
11
8
|
private readonly config;
|
9
|
+
private readonly ngZone;
|
12
10
|
/**
|
13
|
-
* Define a delay before the fallback is shown.
|
11
|
+
* Define a delay before the fallback is shown.
|
12
|
+
* This is useful to only show the fallback for those with slower connections.
|
14
13
|
* @default 0
|
15
14
|
*/
|
16
|
-
|
17
|
-
/**
|
18
|
-
* Determine if this element should be hidden.
|
19
|
-
*/
|
15
|
+
delayMs: number;
|
20
16
|
protected get visible(): boolean;
|
21
17
|
/**
|
22
18
|
* Determine the delay has elapsed, and we can show the fallback.
|
23
19
|
*/
|
24
20
|
private delayElapsed;
|
25
|
-
/**
|
26
|
-
* Store the timeout id.
|
27
|
-
*/
|
28
21
|
private timeoutId;
|
29
22
|
ngOnInit(): void;
|
30
23
|
ngOnDestroy(): void;
|
31
24
|
static ɵfac: i0.ɵɵFactoryDeclaration<RdxAvatarFallbackDirective, never>;
|
32
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxAvatarFallbackDirective, "[
|
33
|
-
static
|
25
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxAvatarFallbackDirective, "span[AvatarFallback]", ["AvatarFallback"], { "delayMs": { "alias": "rdxDelayMs"; "required": false; }; }, {}, never, never, true, never>;
|
26
|
+
static ngAcceptInputType_delayMs: unknown;
|
34
27
|
}
|
@@ -1,17 +1,16 @@
|
|
1
|
-
import { OnInit } from '@angular/core';
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
2
|
+
import { ImageLoadingStatus } from './avatar-root.directive';
|
2
3
|
import * as i0 from "@angular/core";
|
3
|
-
export
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
export interface AvatarImageProps {
|
5
|
+
onLoadingStatusChange?: EventEmitter<ImageLoadingStatus>;
|
6
|
+
}
|
7
|
+
export declare class RdxAvatarImageDirective implements AvatarImageProps, OnInit {
|
7
8
|
private readonly avatar;
|
8
|
-
/**
|
9
|
-
* Access the image element ref.
|
10
|
-
*/
|
11
9
|
private readonly elementRef;
|
10
|
+
onLoadingStatusChange: EventEmitter<ImageLoadingStatus>;
|
12
11
|
ngOnInit(): void;
|
13
|
-
|
14
|
-
|
12
|
+
_onLoad(): void;
|
13
|
+
_onError(): void;
|
15
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<RdxAvatarImageDirective, never>;
|
16
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxAvatarImageDirective, "img[
|
15
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxAvatarImageDirective, "img[AvatarImage]", ["AvatarImage"], {}, { "onLoadingStatusChange": "onLoadingStatusChange"; }, never, never, true, never>;
|
17
16
|
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
export declare function injectAvatar(): RdxAvatarRootDirective;
|
3
|
+
export type ImageLoadingStatus = 'idle' | 'loading' | 'loaded' | 'error';
|
4
|
+
export declare class RdxAvatarRootDirective {
|
5
|
+
/**
|
6
|
+
* A readonly signal property that holds the current state of image loading.
|
7
|
+
* To set a new status, use the `setState` method of the component.
|
8
|
+
* @internal
|
9
|
+
*/
|
10
|
+
readonly _state: import("@angular/core").WritableSignal<ImageLoadingStatus>;
|
11
|
+
/**
|
12
|
+
* Set the avatar state.
|
13
|
+
* @param state The new image loading status to set. This value should be one of the predefined states
|
14
|
+
* in the `ImageLoadingStatus`
|
15
|
+
* @returns void This method does not return a value.
|
16
|
+
* @internal
|
17
|
+
*/
|
18
|
+
_setState(state: ImageLoadingStatus): void;
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdxAvatarRootDirective, never>;
|
20
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxAvatarRootDirective, "span[AvatarRoot]", ["AvatarRoot"], {}, {}, never, never, true, never>;
|
21
|
+
}
|
@@ -1,10 +1,11 @@
|
|
1
1
|
import { InjectionToken, Provider } from '@angular/core';
|
2
2
|
export interface RdxAvatarConfig {
|
3
3
|
/**
|
4
|
-
* Define a delay before the fallback is shown.
|
4
|
+
* Define a delay before the fallback is shown.
|
5
|
+
* This is useful to only show the fallback for those with slower connections.
|
5
6
|
* @default 0
|
6
7
|
*/
|
7
|
-
|
8
|
+
delayMs: number;
|
8
9
|
}
|
9
10
|
export declare const defaultAvatarConfig: RdxAvatarConfig;
|
10
11
|
export declare const RdxAvatarConfigToken: InjectionToken<RdxAvatarConfig>;
|
@@ -1,7 +1,8 @@
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
1
|
+
import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
2
2
|
import { ControlValueAccessor } from '@angular/forms';
|
3
3
|
import * as i0 from "@angular/core";
|
4
|
-
export
|
4
|
+
export type CheckboxState = 'unchecked' | 'checked' | 'indeterminate';
|
5
|
+
export declare class RdxCheckboxDirective implements ControlValueAccessor, OnChanges {
|
5
6
|
/**
|
6
7
|
* Defines whether the checkbox is checked.
|
7
8
|
*/
|
@@ -25,7 +26,7 @@ export declare class RdxCheckboxDirective implements ControlValueAccessor {
|
|
25
26
|
/**
|
26
27
|
* Determine the state
|
27
28
|
*/
|
28
|
-
get state():
|
29
|
+
get state(): CheckboxState;
|
29
30
|
/**
|
30
31
|
* Store the callback function that should be called when the checkbox checked state changes.
|
31
32
|
* @internal
|
@@ -39,6 +40,7 @@ export declare class RdxCheckboxDirective implements ControlValueAccessor {
|
|
39
40
|
onKeydown(event: KeyboardEvent): void;
|
40
41
|
onClick(): void;
|
41
42
|
onBlur(): void;
|
43
|
+
ngOnChanges(changes: SimpleChanges): void;
|
42
44
|
/**
|
43
45
|
* Sets the checked state of the checkbox.
|
44
46
|
* @param checked The checked state of the checkbox.
|
@@ -0,0 +1 @@
|
|
1
|
+
# @radix-ng/primitives/collapsible
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { ElementRef, InjectionToken } from '@angular/core';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export declare const RdxCollapsibleContentToken: InjectionToken<RdxCollapsibleContentDirective>;
|
4
|
+
export declare class RdxCollapsibleContentDirective {
|
5
|
+
/**
|
6
|
+
* Reference to CollapsibleContent host element
|
7
|
+
*/
|
8
|
+
elementRef: ElementRef<HTMLElement>;
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdxCollapsibleContentDirective, never>;
|
10
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxCollapsibleContentDirective, "[CollapsibleContent]", never, {}, {}, never, never, true, never>;
|
11
|
+
}
|
@@ -0,0 +1,52 @@
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export declare function injectCollapsible(): RdxCollapsibleRootDirective;
|
4
|
+
export type RdxCollapsibleState = 'open' | 'closed';
|
5
|
+
export declare class RdxCollapsibleRootDirective {
|
6
|
+
/**
|
7
|
+
* Reference to RdxCollapsibleContent directive
|
8
|
+
* @private
|
9
|
+
* @ignore
|
10
|
+
*/
|
11
|
+
private readonly contentDirective;
|
12
|
+
/**
|
13
|
+
* Stores collapsible state
|
14
|
+
* @private
|
15
|
+
* @ignore
|
16
|
+
*/
|
17
|
+
private _open;
|
18
|
+
/**
|
19
|
+
* Determines whether a directive is available for interaction
|
20
|
+
*/
|
21
|
+
disabled: boolean;
|
22
|
+
/**
|
23
|
+
* Sets the state of the directive. `true` - expanded, `false` - collapsed
|
24
|
+
* @param {boolean} value
|
25
|
+
*/
|
26
|
+
set open(value: boolean);
|
27
|
+
/**
|
28
|
+
* Emitted with new value when directive state changed
|
29
|
+
*/
|
30
|
+
openChange: EventEmitter<boolean>;
|
31
|
+
/**
|
32
|
+
* Allows to change directive state
|
33
|
+
* @param {boolean | undefined} value
|
34
|
+
*/
|
35
|
+
setOpen(value?: boolean): void;
|
36
|
+
/**
|
37
|
+
* Returns directive state (open | closed)
|
38
|
+
*/
|
39
|
+
getState(): RdxCollapsibleState;
|
40
|
+
/**
|
41
|
+
* Returns current directive state
|
42
|
+
*/
|
43
|
+
isOpen(): boolean;
|
44
|
+
/**
|
45
|
+
* Controls visibility of content
|
46
|
+
* @private
|
47
|
+
* @ignore
|
48
|
+
*/
|
49
|
+
private setPresence;
|
50
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdxCollapsibleRootDirective, never>;
|
51
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxCollapsibleRootDirective, "[CollapsibleRoot]", ["collapsibleRoot"], { "disabled": { "alias": "disabled"; "required": false; }; "open": { "alias": "open"; "required": false; }; }, { "openChange": "openChange"; }, ["contentDirective"], never, true, never>;
|
52
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { RdxCollapsibleState } from './collapsible-root.directive';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export declare class RdxCollapsibleTriggerDirective {
|
4
|
+
/**
|
5
|
+
* Reference to CollapsibleRoot
|
6
|
+
* @private
|
7
|
+
* @ignore
|
8
|
+
*/
|
9
|
+
private readonly collapsible;
|
10
|
+
/**
|
11
|
+
* Called on trigger clicked
|
12
|
+
*/
|
13
|
+
onOpenToggle(): void;
|
14
|
+
/**
|
15
|
+
* Returns current directive state (open | closed)
|
16
|
+
* @ignore
|
17
|
+
*/
|
18
|
+
getState(): RdxCollapsibleState;
|
19
|
+
/**
|
20
|
+
* Returns current trigger state
|
21
|
+
* @ignore
|
22
|
+
*/
|
23
|
+
getDisabled(): string | undefined;
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdxCollapsibleTriggerDirective, never>;
|
25
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RdxCollapsibleTriggerDirective, "[CollapsibleTrigger]", never, {}, {}, never, never, true, never>;
|
26
|
+
}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
export * from './src/alert-dialog-root.directive';
|
2
|
+
export * from './src/alert-dialog-cancel.directive';
|
3
|
+
export * from './src/alert-dialog-content.directive';
|
4
|
+
export * from './src/alert-dialog-trigger.directive';
|
5
|
+
export * from './src/alert-dialog-title.directive';
|
6
|
+
export * from './src/alert-dialog.service';
|
7
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wYWNrYWdlcy9wcmltaXRpdmVzL2FsZXJ0LWRpYWxvZy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLG1DQUFtQyxDQUFDO0FBQ2xELGNBQWMscUNBQXFDLENBQUM7QUFDcEQsY0FBYyxzQ0FBc0MsQ0FBQztBQUNyRCxjQUFjLHNDQUFzQyxDQUFDO0FBQ3JELGNBQWMsb0NBQW9DLENBQUM7QUFFbkQsY0FBYyw0QkFBNEIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vc3JjL2FsZXJ0LWRpYWxvZy1yb290LmRpcmVjdGl2ZSc7XG5leHBvcnQgKiBmcm9tICcuL3NyYy9hbGVydC1kaWFsb2ctY2FuY2VsLmRpcmVjdGl2ZSc7XG5leHBvcnQgKiBmcm9tICcuL3NyYy9hbGVydC1kaWFsb2ctY29udGVudC5kaXJlY3RpdmUnO1xuZXhwb3J0ICogZnJvbSAnLi9zcmMvYWxlcnQtZGlhbG9nLXRyaWdnZXIuZGlyZWN0aXZlJztcbmV4cG9ydCAqIGZyb20gJy4vc3JjL2FsZXJ0LWRpYWxvZy10aXRsZS5kaXJlY3RpdmUnO1xuXG5leHBvcnQgKiBmcm9tICcuL3NyYy9hbGVydC1kaWFsb2cuc2VydmljZSc7XG4iXX0=
|
@@ -0,0 +1,5 @@
|
|
1
|
+
/**
|
2
|
+
* Generated bundle index. Do not edit.
|
3
|
+
*/
|
4
|
+
export * from './index';
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmFkaXgtbmctcHJpbWl0aXZlcy1hbGVydC1kaWFsb2cuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wYWNrYWdlcy9wcmltaXRpdmVzL2FsZXJ0LWRpYWxvZy9yYWRpeC1uZy1wcmltaXRpdmVzLWFsZXJ0LWRpYWxvZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2luZGV4JztcbiJdfQ==
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { Directive, inject } from '@angular/core';
|
2
|
+
import { AlertDialogService } from './alert-dialog.service';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export class AlertDialogCancelDirective {
|
5
|
+
constructor() {
|
6
|
+
this.alertDialogService = inject(AlertDialogService);
|
7
|
+
}
|
8
|
+
onClick() {
|
9
|
+
this.alertDialogService.close();
|
10
|
+
}
|
11
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.4", ngImport: i0, type: AlertDialogCancelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
12
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.4", type: AlertDialogCancelDirective, isStandalone: true, selector: "[rdxAlertDialogCancel]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 }); }
|
13
|
+
}
|
14
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.4", ngImport: i0, type: AlertDialogCancelDirective, decorators: [{
|
15
|
+
type: Directive,
|
16
|
+
args: [{
|
17
|
+
selector: '[rdxAlertDialogCancel]',
|
18
|
+
standalone: true,
|
19
|
+
host: {
|
20
|
+
'(click)': 'onClick()'
|
21
|
+
}
|
22
|
+
}]
|
23
|
+
}] });
|
24
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxlcnQtZGlhbG9nLWNhbmNlbC5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9wcmltaXRpdmVzL2FsZXJ0LWRpYWxvZy9zcmMvYWxlcnQtZGlhbG9nLWNhbmNlbC5kaXJlY3RpdmUudHMiXSwibmF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Sk7XG5cbiAgICBvbkNsaWNrKCkge1xuICAgICAgICB0aGlzLmFsZXJ0RGlhbG9nU2VydmljZS5jbG9zZSgpO1xuICAgIH1cbn1cbiJdfQ==
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { Directive, ElementRef, inject, Input, Renderer2 } from '@angular/core';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export class AlertDialogContentDirective {
|
4
|
+
constructor() {
|
5
|
+
this.renderer = inject(Renderer2);
|
6
|
+
this.elementRef = inject(ElementRef);
|
7
|
+
}
|
8
|
+
set maxWidth(value) {
|
9
|
+
this.renderer.setStyle(this.elementRef.nativeElement, 'maxWidth', value);
|
10
|
+
}
|
11
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.4", ngImport: i0, type: AlertDialogContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
12
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.4", type: AlertDialogContentDirective, isStandalone: true, selector: "[rdxAlertDialogContent]", inputs: { maxWidth: "maxWidth" }, host: { properties: { "attr.data-state": "open" } }, ngImport: i0 }); }
|
13
|
+
}
|
14
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.4", ngImport: i0, type: AlertDialogContentDirective, decorators: [{
|
15
|
+
type: Directive,
|
16
|
+
args: [{
|
17
|
+
selector: '[rdxAlertDialogContent]',
|
18
|
+
standalone: true,
|
19
|
+
host: {
|
20
|
+
'[attr.data-state]': 'open'
|
21
|
+
}
|
22
|
+
}]
|
23
|
+
}], propDecorators: { maxWidth: [{
|
24
|
+
type: Input
|
25
|
+
}] } });
|
26
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxlcnQtZGlhbG9nLWNvbnRlbnQuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4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ZGFsb25lOiB0cnVlLFxuICAgIGhvc3Q6IHtcbiAgICAgICAgJ1thdHRyLmRhdGEtc3RhdGVdJzogJ29wZW4nXG4gICAgfVxufSlcbmV4cG9ydCBjbGFzcyBBbGVydERpYWxvZ0NvbnRlbnREaXJlY3RpdmUge1xuICAgIHByaXZhdGUgcmVhZG9ubHkgcmVuZGVyZXIgPSBpbmplY3QoUmVuZGVyZXIyKTtcbiAgICBwcml2YXRlIHJlYWRvbmx5IGVsZW1lbnRSZWYgPSBpbmplY3QoRWxlbWVudFJlZik7XG5cbiAgICBASW5wdXQoKSBzZXQgbWF4V2lkdGgodmFsdWU6IHN0cmluZykge1xuICAgICAgICB0aGlzLnJlbmRlcmVyLnNldFN0eWxlKHRoaXMuZWxlbWVudFJlZi5uYXRpdmVFbGVtZW50LCAnbWF4V2lkdGgnLCB2YWx1ZSk7XG4gICAgfVxufVxuIl19
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { Directive, inject, Input, TemplateRef, ViewContainerRef } from '@angular/core';
|
2
|
+
import { AlertDialogService } from './alert-dialog.service';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export class AlertDialogRootDirective {
|
5
|
+
constructor() {
|
6
|
+
this.viewContainerRef = inject(ViewContainerRef);
|
7
|
+
this.alertDialogService = inject(AlertDialogService);
|
8
|
+
}
|
9
|
+
set content(template) {
|
10
|
+
this.alertDialogService.setDialogContent(this.viewContainerRef, template);
|
11
|
+
}
|
12
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.4", ngImport: i0, type: AlertDialogRootDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
13
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.4", type: AlertDialogRootDirective, isStandalone: true, selector: "[rdxAlertDialogRoot]", inputs: { content: "content" }, ngImport: i0 }); }
|
14
|
+
}
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.4", ngImport: i0, type: AlertDialogRootDirective, decorators: [{
|
16
|
+
type: Directive,
|
17
|
+
args: [{
|
18
|
+
selector: '[rdxAlertDialogRoot]',
|
19
|
+
standalone: true
|
20
|
+
}]
|
21
|
+
}], propDecorators: { content: [{
|
22
|
+
type: Input
|
23
|
+
}] } });
|
24
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxlcnQtZGlhbG9nLXJvb3QuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvcHJpbWl0aXZlcy9hbGVydC1kaWFsb2cvc3JjL2FsZXJ0LWRpYWxvZy1yb290LmRpcmVjdGl2ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sRUFBRSxLQUFLLEVBQUUsV0FBVyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRXhGLE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxNQUFNLHdCQUF3QixDQUFDOztBQU01RCxNQUFNLE9BQU8sd0JBQXdCO0lBSnJDO1FBS3FCLHFCQUFnQixHQUFHLE1BQU0sQ0FBQyxnQkFBZ0IsQ0FBQyxDQUFDO1FBQzVDLHVCQUFrQixHQUFHLE1BQU0sQ0FBQyxrQkFBa0IsQ0FBQyxDQUFDO0tBS3BFO0lBSEcsSUFBYSxPQUFPLENBQUMsUUFBMEI7UUFDM0MsSUFBSSxDQUFDLGtCQUFrQixDQUFDLGdCQUFnQixDQUFDLElBQUksQ0FBQyxnQkFBZ0IsRUFBRSxRQUFRLENBQUMsQ0FBQztJQUM5RSxDQUFDOzhHQU5RLHdCQUF3QjtrR0FBeEIsd0JBQXdCOzsyRkFBeEIsd0JBQXdCO2tCQUpwQyxTQUFTO21CQUFDO29CQUNQLFFBQVEsRUFBRSxzQkFBc0I7b0JBQ2hDLFVBQVUsRUFBRSxJQUFJO2lCQUNuQjs4QkFLZ0IsT0FBTztzQkFBbkIsS0FBSyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IERpcmVjdGl2ZSwgaW5qZWN0LCBJbnB1dCwgVGVtcGxhdGVSZWYsIFZpZXdDb250YWluZXJSZWYgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcblxuaW1wb3J0IHsgQWxlcnREaWFsb2dTZXJ2aWNlIH0gZnJvbSAnLi9hbGVydC1kaWFsb2cuc2VydmljZSc7XG5cbkBEaXJlY3RpdmUoe1xuICAgIHNlbGVjdG9yOiAnW3JkeEFsZXJ0RGlhbG9nUm9vdF0nLFxuICAgIHN0YW5kYWxvbmU6IHRydWVcbn0pXG5leHBvcnQgY2xhc3MgQWxlcnREaWFsb2dSb290RGlyZWN0aXZlIHtcbiAgICBwcml2YXRlIHJlYWRvbmx5IHZpZXdDb250YWluZXJSZWYgPSBpbmplY3QoVmlld0NvbnRhaW5lclJlZik7XG4gICAgcHJpdmF0ZSByZWFkb25seSBhbGVydERpYWxvZ1NlcnZpY2UgPSBpbmplY3QoQWxlcnREaWFsb2dTZXJ2aWNlKTtcblxuICAgIEBJbnB1dCgpIHNldCBjb250ZW50KHRlbXBsYXRlOiBUZW1wbGF0ZVJlZjxhbnk+KSB7XG4gICAgICAgIHRoaXMuYWxlcnREaWFsb2dTZXJ2aWNlLnNldERpYWxvZ0NvbnRlbnQodGhpcy52aWV3Q29udGFpbmVyUmVmLCB0ZW1wbGF0ZSk7XG4gICAgfVxufVxuIl19
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { Directive } from '@angular/core';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export class AlertDialogTitleDirective {
|
4
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.4", ngImport: i0, type: AlertDialogTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
5
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.4", type: AlertDialogTitleDirective, isStandalone: true, selector: "[rdxAlertDialogTitle]", ngImport: i0 }); }
|
6
|
+
}
|
7
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.4", ngImport: i0, type: AlertDialogTitleDirective, decorators: [{
|
8
|
+
type: Directive,
|
9
|
+
args: [{
|
10
|
+
selector: '[rdxAlertDialogTitle]',
|
11
|
+
standalone: true
|
12
|
+
}]
|
13
|
+
}] });
|
14
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxlcnQtZGlhbG9nLXRpdGxlLmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3ByaW1pdGl2ZXMvYWxlcnQtZGlhbG9nL3NyYy9hbGVydC1kaWFsb2ctdGl0bGUuZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxlQUFlLENBQUM7O0FBTTFDLE1BQU0sT0FBTyx5QkFBeUI7OEdBQXpCLHlCQUF5QjtrR0FBekIseUJBQXlCOzsyRkFBekIseUJBQXlCO2tCQUpyQyxTQUFTO21CQUFDO29CQUNQLFFBQVEsRUFBRSx1QkFBdUI7b0JBQ2pDLFVBQVUsRUFBRSxJQUFJO2lCQUNuQiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IERpcmVjdGl2ZSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG5ARGlyZWN0aXZlKHtcbiAgICBzZWxlY3RvcjogJ1tyZHhBbGVydERpYWxvZ1RpdGxlXScsXG4gICAgc3RhbmRhbG9uZTogdHJ1ZVxufSlcbmV4cG9ydCBjbGFzcyBBbGVydERpYWxvZ1RpdGxlRGlyZWN0aXZlIHt9XG4iXX0=
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { Directive, inject } from '@angular/core';
|
2
|
+
import { AlertDialogService } from './alert-dialog.service';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export class AlertDialogTriggerDirective {
|
5
|
+
constructor() {
|
6
|
+
this.alertDialogService = inject(AlertDialogService);
|
7
|
+
}
|
8
|
+
handleClick() {
|
9
|
+
this.alertDialogService.open();
|
10
|
+
}
|
11
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.4", ngImport: i0, type: AlertDialogTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
12
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.4", type: AlertDialogTriggerDirective, isStandalone: true, selector: "[rdxAlertDialogTrigger]", host: { listeners: { "click": "handleClick()" } }, ngImport: i0 }); }
|
13
|
+
}
|
14
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.4", ngImport: i0, type: AlertDialogTriggerDirective, decorators: [{
|
15
|
+
type: Directive,
|
16
|
+
args: [{
|
17
|
+
selector: '[rdxAlertDialogTrigger]',
|
18
|
+
standalone: true,
|
19
|
+
host: {
|
20
|
+
'(click)': 'handleClick()'
|
21
|
+
}
|
22
|
+
}]
|
23
|
+
}] });
|
24
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxlcnQtZGlhbG9nLXRyaWdnZXIuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvcHJpbWl0aXZlcy9hbGVydC1kaWFsb2cvc3JjL2FsZXJ0LWRpYWxvZy10cmlnZ2VyLmRpcmVjdGl2ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxP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UNsaWNrKCkge1xuICAgICAgICB0aGlzLmFsZXJ0RGlhbG9nU2VydmljZS5vcGVuKCk7XG4gICAgfVxufVxuIl19
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import { Overlay } from '@angular/cdk/overlay';
|
2
|
+
import { TemplatePortal } from '@angular/cdk/portal';
|
3
|
+
import { Injectable } from '@angular/core';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
import * as i1 from "@angular/cdk/overlay";
|
6
|
+
export class AlertDialogService {
|
7
|
+
constructor(overlay) {
|
8
|
+
this.overlay = overlay;
|
9
|
+
}
|
10
|
+
setDialogContent(viewContainerRef, template) {
|
11
|
+
this.dialogContent = { viewContainerRef, template };
|
12
|
+
}
|
13
|
+
open() {
|
14
|
+
if (!this.dialogContent) {
|
15
|
+
throw new Error('Dialog content is not set');
|
16
|
+
}
|
17
|
+
this.overlayRef = this.overlay.create({
|
18
|
+
hasBackdrop: true,
|
19
|
+
backdropClass: 'cdk-overlay-dark-backdrop',
|
20
|
+
positionStrategy: this.overlay
|
21
|
+
.position()
|
22
|
+
.global()
|
23
|
+
.centerHorizontally()
|
24
|
+
.centerVertically()
|
25
|
+
});
|
26
|
+
const templatePortal = new TemplatePortal(this.dialogContent.template, this.dialogContent.viewContainerRef);
|
27
|
+
this.overlayRef.attach(templatePortal);
|
28
|
+
this.overlayRef.backdropClick().subscribe(() => this.close());
|
29
|
+
}
|
30
|
+
close() {
|
31
|
+
if (this.overlayRef) {
|
32
|
+
this.overlayRef.dispose();
|
33
|
+
this.overlayRef = null;
|
34
|
+
}
|
35
|
+
}
|
36
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.4", ngImport: i0, type: AlertDialogService, deps: [{ token: i1.Overlay }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
37
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.4", ngImport: i0, type: AlertDialogService, providedIn: 'root' }); }
|
38
|
+
}
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.4", ngImport: i0, type: AlertDialogService, decorators: [{
|
40
|
+
type: Injectable,
|
41
|
+
args: [{
|
42
|
+
providedIn: 'root'
|
43
|
+
}]
|
44
|
+
}], ctorParameters: () => [{ type: i1.Overlay }] });
|
45
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxlcnQtZGlhbG9nLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9wcmltaXRpdmVzL2FsZXJ0LWRpYWxvZy9zcmMvYWxlcnQtZGlhbG9nLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLE9BQU8sRUFBYyxNQUFNLHNCQUFzQixDQUFDO0FBQzNELE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQztBQUNyRCxPQUFPLEVBQUUsVUFBVSxFQUFpQyxNQUFNLGVBQWUsQ0FBQzs7O0FBSzFFLE1BQU0sT0FBTyxrQkFBa0I7SUFTM0IsWUFBb0IsT0FBZ0I7UUFBaEIsWUFBTyxHQUFQLE9BQU8sQ0FBUztJQUFHLENBQUM7SUFFeEMsZ0JBQWdCLENBQUMsZ0JBQWtDLEVBQUUsUUFBMEI7UUFDM0UsSUFBSSxDQUFDLGFBQWEsR0FBRyxFQUFFLGdCQUFnQixFQUFFLFFBQVEsRUFBRSxDQUFDO0lBQ3hELENBQUM7SUFFRCxJQUFJO1FBQ0EsSUFBSSxDQUFDLElBQUksQ0FBQyxhQUFhLEVBQUUsQ0FBQztZQUN0QixNQUFNLElBQUksS0FBSyxDQUFDLDJCQUEyQixDQUFDLENBQUM7UUFDakQsQ0FBQztRQUVELElBQUksQ0FBQyxVQUFVLEdBQUcsSUFBSSxDQUFDLE9BQU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gICAgYmFja2Ryb3BDbGFzczogJ2Nkay1vdmVybGF5LWRhcmstYmFja2Ryb3AnLFxuICAgICAgICAgICAgcG9zaXRpb25TdHJhdGVneTogdGhpcy5vdmVybGF5XG4gICAgICAgICAgICAgICAgLnBvc2l0aW9uKClcbiAgICAgICAgICAgICAgICAuZ2xvYmFsKClcbiAgICAgICAgICAgICAgICAuY2VudGVySG9yaXpvbnRhbGx5KClcbiAgICAgICAgICAgICAgICAuY2VudGVyVmVydGljYWxseSgpXG4gICAgICAgIH0pO1xuXG4gICAgICAgIGNvbnN0IHRlbXBsYXRlUG9ydGFsID0gbmV3IFRlbXBsYXRlUG9ydGFsKFxuICAgICAgICAgICAgdGhpcy5kaWFsb2dDb250ZW50LnRlbXBsYXRlLFxuICAgICAgICAgICAgdGhpcy5kaWFsb2dDb250ZW50LnZpZXdDb250YWluZXJSZWZcbiAgICAgICAgKTtcbiAgICAgICAgdGhpcy5vdmVybGF5UmVmLmF0dGFjaCh0ZW1wbGF0ZVBvcnRhbCk7XG5cbiAgICAgICAgdGhpcy5vdmVybGF5UmVmLmJhY2tkcm9wQ2xpY2soKS5zdWJzY3JpYmUoKCkgPT4gdGhpcy5jbG9zZSgpKTtcbiAgICB9XG5cbiAgICBjbG9zZSgpIHtcbiAgICAgICAgaWYgKHRoaXMub3ZlcmxheVJlZikge1xuICAgICAgICAgICAgdGhpcy5vdmVybGF5UmVmLmRpc3Bvc2UoKTtcbiAgICAgICAgICAgIHRoaXMub3ZlcmxheVJlZiA9IG51bGw7XG4gICAgICAgIH1cbiAgICB9XG59XG4iXX0=
|
package/esm2022/avatar/index.mjs
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
export * from './src/avatar-fallback.directive';
|
2
2
|
export * from './src/avatar-image.directive';
|
3
|
-
export * from './src/avatar.directive';
|
3
|
+
export * from './src/avatar-root.directive';
|
4
4
|
export * from './src/avatar.config';
|
5
|
-
//# sourceMappingURL=data:application/json;base64,
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wYWNrYWdlcy9wcmltaXRpdmVzL2F2YXRhci9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGlDQUFpQyxDQUFDO0FBQ2hELGNBQWMsOEJBQThCLENBQUM7QUFDN0MsY0FBYyw2QkFBNkIsQ0FBQztBQUM1QyxjQUFjLHFCQUFxQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9zcmMvYXZhdGFyLWZhbGxiYWNrLmRpcmVjdGl2ZSc7XG5leHBvcnQgKiBmcm9tICcuL3NyYy9hdmF0YXItaW1hZ2UuZGlyZWN0aXZlJztcbmV4cG9ydCAqIGZyb20gJy4vc3JjL2F2YXRhci1yb290LmRpcmVjdGl2ZSc7XG5leHBvcnQgKiBmcm9tICcuL3NyYy9hdmF0YXIuY29uZmlnJztcblxuZXhwb3J0IHR5cGUgeyBBdmF0YXJJbWFnZVByb3BzIH0gZnJvbSAnLi9zcmMvYXZhdGFyLWltYWdlLmRpcmVjdGl2ZSc7XG5leHBvcnQgdHlwZSB7IEF2YXRhckZhbGxiYWNrUHJvcHMgfSBmcm9tICcuL3NyYy9hdmF0YXItZmFsbGJhY2suZGlyZWN0aXZlJztcbiJdfQ==
|