@wirekyt/angular 0.0.16 → 0.0.18

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.
Files changed (53) hide show
  1. package/README.md +3 -3
  2. package/dist/README.md +3 -3
  3. package/dist/fesm2022/wirekyt-angular-accordion.mjs +16 -16
  4. package/dist/fesm2022/wirekyt-angular-accordion.mjs.map +1 -1
  5. package/dist/fesm2022/wirekyt-angular-angle-slider.mjs +20 -20
  6. package/dist/fesm2022/wirekyt-angular-angle-slider.mjs.map +1 -1
  7. package/dist/fesm2022/wirekyt-angular-avatar.mjs +10 -10
  8. package/dist/fesm2022/wirekyt-angular-avatar.mjs.map +1 -1
  9. package/dist/fesm2022/wirekyt-angular-carousel.mjs +26 -26
  10. package/dist/fesm2022/wirekyt-angular-carousel.mjs.map +1 -1
  11. package/dist/fesm2022/wirekyt-angular-checkbox.mjs +18 -18
  12. package/dist/fesm2022/wirekyt-angular-checkbox.mjs.map +1 -1
  13. package/dist/fesm2022/wirekyt-angular-clipboard.mjs +18 -18
  14. package/dist/fesm2022/wirekyt-angular-clipboard.mjs.map +1 -1
  15. package/dist/fesm2022/wirekyt-angular-collapsible.mjs +10 -10
  16. package/dist/fesm2022/wirekyt-angular-collapsible.mjs.map +1 -1
  17. package/dist/fesm2022/wirekyt-angular-color-picker.mjs +58 -58
  18. package/dist/fesm2022/wirekyt-angular-color-picker.mjs.map +1 -1
  19. package/dist/fesm2022/wirekyt-angular-combobox.mjs +36 -36
  20. package/dist/fesm2022/wirekyt-angular-combobox.mjs.map +1 -1
  21. package/dist/fesm2022/wirekyt-angular-date-input.mjs +18 -18
  22. package/dist/fesm2022/wirekyt-angular-date-input.mjs.map +1 -1
  23. package/dist/fesm2022/wirekyt-angular-date-picker.mjs +58 -58
  24. package/dist/fesm2022/wirekyt-angular-date-picker.mjs.map +1 -1
  25. package/dist/fesm2022/wirekyt-angular-dialog.mjs +20 -20
  26. package/dist/fesm2022/wirekyt-angular-dialog.mjs.map +1 -1
  27. package/dist/fesm2022/wirekyt-angular-download-trigger.mjs +2 -2
  28. package/dist/fesm2022/wirekyt-angular-download-trigger.mjs.map +1 -1
  29. package/dist/fesm2022/wirekyt-angular-drawer.mjs +706 -0
  30. package/dist/fesm2022/wirekyt-angular-drawer.mjs.map +1 -0
  31. package/dist/fesm2022/wirekyt-angular-field.mjs +20 -20
  32. package/dist/fesm2022/wirekyt-angular-field.mjs.map +1 -1
  33. package/dist/fesm2022/wirekyt-angular-fieldset.mjs +10 -10
  34. package/dist/fesm2022/wirekyt-angular-fieldset.mjs.map +1 -1
  35. package/dist/package.json +6 -2
  36. package/dist/types/wirekyt-angular-accordion.d.ts +8 -8
  37. package/dist/types/wirekyt-angular-angle-slider.d.ts +10 -10
  38. package/dist/types/wirekyt-angular-avatar.d.ts +5 -5
  39. package/dist/types/wirekyt-angular-carousel.d.ts +13 -13
  40. package/dist/types/wirekyt-angular-checkbox.d.ts +10 -10
  41. package/dist/types/wirekyt-angular-clipboard.d.ts +9 -9
  42. package/dist/types/wirekyt-angular-collapsible.d.ts +5 -5
  43. package/dist/types/wirekyt-angular-color-picker.d.ts +30 -30
  44. package/dist/types/wirekyt-angular-combobox.d.ts +19 -19
  45. package/dist/types/wirekyt-angular-date-input.d.ts +9 -9
  46. package/dist/types/wirekyt-angular-date-picker.d.ts +30 -30
  47. package/dist/types/wirekyt-angular-dialog.d.ts +10 -10
  48. package/dist/types/wirekyt-angular-download-trigger.d.ts +1 -1
  49. package/dist/types/wirekyt-angular-drawer.d.ts +203 -0
  50. package/dist/types/wirekyt-angular-drawer.d.ts.map +1 -0
  51. package/dist/types/wirekyt-angular-field.d.ts +10 -10
  52. package/dist/types/wirekyt-angular-fieldset.d.ts +5 -5
  53. package/package.json +7 -3
@@ -0,0 +1,706 @@
1
+ import * as drawer from '@wirekyt/dom/machines/drawer';
2
+ export { anatomy as drawerAnatomy } from '@wirekyt/dom/machines/drawer';
3
+ import * as i0 from '@angular/core';
4
+ import { InjectionToken, inject, input, model, booleanAttribute, output, EnvironmentInjector, Injector, forwardRef, Directive, computed, DestroyRef, Renderer2, ElementRef, TemplateRef, ViewContainerRef, effect, untracked, signal } from '@angular/core';
5
+ import { injectLocale, injectEnvironment, createId, useMachine, buildRootCarrier, bindProps, normalizeProps } from '@wirekyt/angular';
6
+ import { PresenceBase, PRESENCE_CONTEXT, injectPresenceContext, usePresence } from '@wirekyt/angular/presence';
7
+
8
+ const DRAWER_CONTEXT = new InjectionToken("WIREKYT.DRAWER_CONTEXT");
9
+ function injectDrawerContext() {
10
+ return inject(DRAWER_CONTEXT);
11
+ }
12
+ const DRAWER_CONTEXT_CARRIER = new InjectionToken("WIREKYT.DRAWER_CONTEXT_CARRIER");
13
+ function injectDrawerContextCarrier() {
14
+ return inject(DRAWER_CONTEXT_CARRIER);
15
+ }
16
+ const DRAWER_RENDER_STRATEGY_CONTEXT = new InjectionToken("WIREKYT.DRAWER_RENDER_STRATEGY_CONTEXT");
17
+ function injectDrawerRenderStrategyContext() {
18
+ return inject(DRAWER_RENDER_STRATEGY_CONTEXT);
19
+ }
20
+
21
+ const DRAWER_STACK_CONTEXT = new InjectionToken("WIREKYT.DRAWER_STACK_CONTEXT");
22
+ function injectDrawerStackContext() {
23
+ return inject(DRAWER_STACK_CONTEXT);
24
+ }
25
+ function injectDrawerStackContextOptional() {
26
+ return inject(DRAWER_STACK_CONTEXT, { optional: true });
27
+ }
28
+
29
+ function useDrawer(options) {
30
+ const locale = injectLocale();
31
+ const environment = injectEnvironment();
32
+ const ancestorStack = injectDrawerStackContextOptional();
33
+ const fallbackId = createId();
34
+ return useMachine({
35
+ machine: drawer.machine,
36
+ context: () => {
37
+ const props = options.context();
38
+ return {
39
+ ...props,
40
+ dir: locale.dir,
41
+ getRootNode: environment.getRootNode,
42
+ id: props.id ?? fallbackId,
43
+ stack: props.stack ?? ancestorStack?.stack,
44
+ };
45
+ },
46
+ connect: (service, normalize) => drawer.connect(service, normalize),
47
+ });
48
+ }
49
+
50
+ class DrawerRoot extends PresenceBase {
51
+ id = input(undefined, /* @ts-ignore */
52
+ ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
53
+ ids = input(undefined, /* @ts-ignore */
54
+ ...(ngDevMode ? [{ debugName: "ids" }] : /* istanbul ignore next */ []));
55
+ open = model(undefined, /* @ts-ignore */
56
+ ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
57
+ defaultOpen = input(false, { ...(ngDevMode ? { debugName: "defaultOpen" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
58
+ modal = input(true, { ...(ngDevMode ? { debugName: "modal" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
59
+ closeOnInteractOutside = input(true, { ...(ngDevMode ? { debugName: "closeOnInteractOutside" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
60
+ closeOnEscape = input(true, { ...(ngDevMode ? { debugName: "closeOnEscape" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
61
+ preventScroll = input(true, { ...(ngDevMode ? { debugName: "preventScroll" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
62
+ trapFocus = input(true, { ...(ngDevMode ? { debugName: "trapFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
63
+ restoreFocus = input(true, { ...(ngDevMode ? { debugName: "restoreFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
64
+ initialFocusEl = input(undefined, /* @ts-ignore */
65
+ ...(ngDevMode ? [{ debugName: "initialFocusEl" }] : /* istanbul ignore next */ []));
66
+ finalFocusEl = input(undefined, /* @ts-ignore */
67
+ ...(ngDevMode ? [{ debugName: "finalFocusEl" }] : /* istanbul ignore next */ []));
68
+ role = input(undefined, /* @ts-ignore */
69
+ ...(ngDevMode ? [{ debugName: "role" }] : /* istanbul ignore next */ []));
70
+ triggerValue = model(undefined, /* @ts-ignore */
71
+ ...(ngDevMode ? [{ debugName: "triggerValue" }] : /* istanbul ignore next */ []));
72
+ defaultTriggerValue = input(undefined, /* @ts-ignore */
73
+ ...(ngDevMode ? [{ debugName: "defaultTriggerValue" }] : /* istanbul ignore next */ []));
74
+ snapPoints = input(undefined, /* @ts-ignore */
75
+ ...(ngDevMode ? [{ debugName: "snapPoints" }] : /* istanbul ignore next */ []));
76
+ swipeDirection = input(undefined, /* @ts-ignore */
77
+ ...(ngDevMode ? [{ debugName: "swipeDirection" }] : /* istanbul ignore next */ []));
78
+ snapToSequentialPoints = input(false, { ...(ngDevMode ? { debugName: "snapToSequentialPoints" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
79
+ swipeVelocityThreshold = input(undefined, /* @ts-ignore */
80
+ ...(ngDevMode ? [{ debugName: "swipeVelocityThreshold" }] : /* istanbul ignore next */ []));
81
+ closeThreshold = input(undefined, /* @ts-ignore */
82
+ ...(ngDevMode ? [{ debugName: "closeThreshold" }] : /* istanbul ignore next */ []));
83
+ preventDragOnScroll = input(true, { ...(ngDevMode ? { debugName: "preventDragOnScroll" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
84
+ snapPoint = model(undefined, /* @ts-ignore */
85
+ ...(ngDevMode ? [{ debugName: "snapPoint" }] : /* istanbul ignore next */ []));
86
+ defaultSnapPoint = input(undefined, /* @ts-ignore */
87
+ ...(ngDevMode ? [{ debugName: "defaultSnapPoint" }] : /* istanbul ignore next */ []));
88
+ stack = input(undefined, /* @ts-ignore */
89
+ ...(ngDevMode ? [{ debugName: "stack" }] : /* istanbul ignore next */ []));
90
+ escapeKeyDown = output();
91
+ focusOutside = output();
92
+ interactOutside = output();
93
+ pointerDownOutside = output();
94
+ requestDismiss = output();
95
+ openChangeDetails = output();
96
+ triggerValueChangeDetails = output();
97
+ snapPointChangeDetails = output();
98
+ machine = useDrawer({
99
+ context: () => ({
100
+ id: this.id(),
101
+ ids: this.ids(),
102
+ open: this.open(),
103
+ defaultOpen: this.defaultOpen(),
104
+ modal: this.modal(),
105
+ closeOnInteractOutside: this.closeOnInteractOutside(),
106
+ closeOnEscape: this.closeOnEscape(),
107
+ preventScroll: this.preventScroll(),
108
+ trapFocus: this.trapFocus(),
109
+ restoreFocus: this.restoreFocus(),
110
+ initialFocusEl: this.initialFocusEl(),
111
+ finalFocusEl: this.finalFocusEl(),
112
+ role: this.role(),
113
+ triggerValue: this.triggerValue(),
114
+ defaultTriggerValue: this.defaultTriggerValue(),
115
+ snapPoints: this.snapPoints(),
116
+ swipeDirection: this.swipeDirection(),
117
+ snapToSequentialPoints: this.snapToSequentialPoints(),
118
+ swipeVelocityThreshold: this.swipeVelocityThreshold(),
119
+ closeThreshold: this.closeThreshold(),
120
+ preventDragOnScroll: this.preventDragOnScroll(),
121
+ snapPoint: this.snapPoint(),
122
+ defaultSnapPoint: this.defaultSnapPoint(),
123
+ stack: this.stack(),
124
+ onOpenChange: (details) => {
125
+ if (this.open() !== details.open)
126
+ this.open.set(details.open);
127
+ this.openChangeDetails.emit(details);
128
+ },
129
+ onTriggerValueChange: (details) => {
130
+ if (this.triggerValue() !== details.value)
131
+ this.triggerValue.set(details.value);
132
+ this.triggerValueChangeDetails.emit(details);
133
+ },
134
+ onSnapPointChange: (details) => {
135
+ if (this.snapPoint() !== details.snapPoint)
136
+ this.snapPoint.set(details.snapPoint);
137
+ this.snapPointChangeDetails.emit(details);
138
+ },
139
+ onEscapeKeyDown: (event) => this.escapeKeyDown.emit(event),
140
+ onFocusOutside: (event) => this.focusOutside.emit(event),
141
+ onInteractOutside: (event) => this.interactOutside.emit(event),
142
+ onPointerDownOutside: (event) => this.pointerDownOutside.emit(event),
143
+ onRequestDismiss: (event) => this.requestDismiss.emit(event),
144
+ }),
145
+ });
146
+ state = this.machine.state;
147
+ api = this.machine.api;
148
+ service = this.machine.service;
149
+ send = this.machine.send;
150
+ presence = this.createPresence(() => this.api().open);
151
+ contextCarrier = buildRootCarrier({
152
+ providers: [
153
+ { provide: PRESENCE_CONTEXT, useValue: this.presence },
154
+ { provide: DRAWER_RENDER_STRATEGY_CONTEXT, useValue: this },
155
+ ],
156
+ root: this,
157
+ rootToken: DRAWER_CONTEXT,
158
+ originInjector: inject(Injector),
159
+ environmentInjector: inject(EnvironmentInjector),
160
+ });
161
+ getContextCarrier() {
162
+ return this.contextCarrier;
163
+ }
164
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DrawerRoot, deps: null, target: i0.ɵɵFactoryTarget.Directive });
165
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: DrawerRoot, isStandalone: true, selector: "[drawer-root]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, ids: { classPropertyName: "ids", publicName: "ids", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, defaultOpen: { classPropertyName: "defaultOpen", publicName: "defaultOpen", isSignal: true, isRequired: false, transformFunction: null }, modal: { classPropertyName: "modal", publicName: "modal", isSignal: true, isRequired: false, transformFunction: null }, closeOnInteractOutside: { classPropertyName: "closeOnInteractOutside", publicName: "closeOnInteractOutside", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null }, preventScroll: { classPropertyName: "preventScroll", publicName: "preventScroll", isSignal: true, isRequired: false, transformFunction: null }, trapFocus: { classPropertyName: "trapFocus", publicName: "trapFocus", isSignal: true, isRequired: false, transformFunction: null }, restoreFocus: { classPropertyName: "restoreFocus", publicName: "restoreFocus", isSignal: true, isRequired: false, transformFunction: null }, initialFocusEl: { classPropertyName: "initialFocusEl", publicName: "initialFocusEl", isSignal: true, isRequired: false, transformFunction: null }, finalFocusEl: { classPropertyName: "finalFocusEl", publicName: "finalFocusEl", isSignal: true, isRequired: false, transformFunction: null }, role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null }, triggerValue: { classPropertyName: "triggerValue", publicName: "triggerValue", isSignal: true, isRequired: false, transformFunction: null }, defaultTriggerValue: { classPropertyName: "defaultTriggerValue", publicName: "defaultTriggerValue", isSignal: true, isRequired: false, transformFunction: null }, snapPoints: { classPropertyName: "snapPoints", publicName: "snapPoints", isSignal: true, isRequired: false, transformFunction: null }, swipeDirection: { classPropertyName: "swipeDirection", publicName: "swipeDirection", isSignal: true, isRequired: false, transformFunction: null }, snapToSequentialPoints: { classPropertyName: "snapToSequentialPoints", publicName: "snapToSequentialPoints", isSignal: true, isRequired: false, transformFunction: null }, swipeVelocityThreshold: { classPropertyName: "swipeVelocityThreshold", publicName: "swipeVelocityThreshold", isSignal: true, isRequired: false, transformFunction: null }, closeThreshold: { classPropertyName: "closeThreshold", publicName: "closeThreshold", isSignal: true, isRequired: false, transformFunction: null }, preventDragOnScroll: { classPropertyName: "preventDragOnScroll", publicName: "preventDragOnScroll", isSignal: true, isRequired: false, transformFunction: null }, snapPoint: { classPropertyName: "snapPoint", publicName: "snapPoint", isSignal: true, isRequired: false, transformFunction: null }, defaultSnapPoint: { classPropertyName: "defaultSnapPoint", publicName: "defaultSnapPoint", isSignal: true, isRequired: false, transformFunction: null }, stack: { classPropertyName: "stack", publicName: "stack", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", triggerValue: "triggerValueChange", snapPoint: "snapPointChange", escapeKeyDown: "escapeKeyDown", focusOutside: "focusOutside", interactOutside: "interactOutside", pointerDownOutside: "pointerDownOutside", requestDismiss: "requestDismiss", openChangeDetails: "openChangeDetails", triggerValueChangeDetails: "triggerValueChangeDetails", snapPointChangeDetails: "snapPointChangeDetails" }, providers: [
166
+ {
167
+ provide: PRESENCE_CONTEXT,
168
+ useFactory: (root) => root.presence,
169
+ deps: [forwardRef(() => DrawerRoot)],
170
+ },
171
+ { provide: DRAWER_RENDER_STRATEGY_CONTEXT, useExisting: forwardRef(() => DrawerRoot) },
172
+ { provide: DRAWER_CONTEXT, useExisting: forwardRef(() => DrawerRoot) },
173
+ {
174
+ provide: DRAWER_CONTEXT_CARRIER,
175
+ useFactory: (root) => root.getContextCarrier(),
176
+ deps: [forwardRef(() => DrawerRoot)],
177
+ },
178
+ ], exportAs: ["drawerRoot"], usesInheritance: true, ngImport: i0 });
179
+ }
180
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DrawerRoot, decorators: [{
181
+ type: Directive,
182
+ args: [{
183
+ selector: "[drawer-root]",
184
+ standalone: true,
185
+ exportAs: "drawerRoot",
186
+ providers: [
187
+ {
188
+ provide: PRESENCE_CONTEXT,
189
+ useFactory: (root) => root.presence,
190
+ deps: [forwardRef(() => DrawerRoot)],
191
+ },
192
+ { provide: DRAWER_RENDER_STRATEGY_CONTEXT, useExisting: forwardRef(() => DrawerRoot) },
193
+ { provide: DRAWER_CONTEXT, useExisting: forwardRef(() => DrawerRoot) },
194
+ {
195
+ provide: DRAWER_CONTEXT_CARRIER,
196
+ useFactory: (root) => root.getContextCarrier(),
197
+ deps: [forwardRef(() => DrawerRoot)],
198
+ },
199
+ ],
200
+ }]
201
+ }], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], ids: [{ type: i0.Input, args: [{ isSignal: true, alias: "ids", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], defaultOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultOpen", required: false }] }], modal: [{ type: i0.Input, args: [{ isSignal: true, alias: "modal", required: false }] }], closeOnInteractOutside: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnInteractOutside", required: false }] }], closeOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnEscape", required: false }] }], preventScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "preventScroll", required: false }] }], trapFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "trapFocus", required: false }] }], restoreFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "restoreFocus", required: false }] }], initialFocusEl: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialFocusEl", required: false }] }], finalFocusEl: [{ type: i0.Input, args: [{ isSignal: true, alias: "finalFocusEl", required: false }] }], role: [{ type: i0.Input, args: [{ isSignal: true, alias: "role", required: false }] }], triggerValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerValue", required: false }] }, { type: i0.Output, args: ["triggerValueChange"] }], defaultTriggerValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultTriggerValue", required: false }] }], snapPoints: [{ type: i0.Input, args: [{ isSignal: true, alias: "snapPoints", required: false }] }], swipeDirection: [{ type: i0.Input, args: [{ isSignal: true, alias: "swipeDirection", required: false }] }], snapToSequentialPoints: [{ type: i0.Input, args: [{ isSignal: true, alias: "snapToSequentialPoints", required: false }] }], swipeVelocityThreshold: [{ type: i0.Input, args: [{ isSignal: true, alias: "swipeVelocityThreshold", required: false }] }], closeThreshold: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeThreshold", required: false }] }], preventDragOnScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "preventDragOnScroll", required: false }] }], snapPoint: [{ type: i0.Input, args: [{ isSignal: true, alias: "snapPoint", required: false }] }, { type: i0.Output, args: ["snapPointChange"] }], defaultSnapPoint: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultSnapPoint", required: false }] }], stack: [{ type: i0.Input, args: [{ isSignal: true, alias: "stack", required: false }] }], escapeKeyDown: [{ type: i0.Output, args: ["escapeKeyDown"] }], focusOutside: [{ type: i0.Output, args: ["focusOutside"] }], interactOutside: [{ type: i0.Output, args: ["interactOutside"] }], pointerDownOutside: [{ type: i0.Output, args: ["pointerDownOutside"] }], requestDismiss: [{ type: i0.Output, args: ["requestDismiss"] }], openChangeDetails: [{ type: i0.Output, args: ["openChangeDetails"] }], triggerValueChangeDetails: [{ type: i0.Output, args: ["triggerValueChangeDetails"] }], snapPointChangeDetails: [{ type: i0.Output, args: ["snapPointChangeDetails"] }] } });
202
+
203
+ class DrawerRootProvider extends PresenceBase {
204
+ value = input.required(/* @ts-ignore */
205
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
206
+ state = computed(() => this.value().state(), /* @ts-ignore */
207
+ ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
208
+ api = computed(() => this.value().api(), /* @ts-ignore */
209
+ ...(ngDevMode ? [{ debugName: "api" }] : /* istanbul ignore next */ []));
210
+ send = (event) => this.value().send(event);
211
+ get service() {
212
+ return this.value().service;
213
+ }
214
+ presence = this.createPresence(() => {
215
+ try {
216
+ return this.api().open;
217
+ }
218
+ catch {
219
+ return false;
220
+ }
221
+ });
222
+ contextCarrier = buildRootCarrier({
223
+ providers: [
224
+ { provide: PRESENCE_CONTEXT, useValue: this.presence },
225
+ { provide: DRAWER_RENDER_STRATEGY_CONTEXT, useValue: this },
226
+ ],
227
+ root: this,
228
+ rootToken: DRAWER_CONTEXT,
229
+ originInjector: inject(Injector),
230
+ environmentInjector: inject(EnvironmentInjector),
231
+ });
232
+ getContextCarrier() {
233
+ return this.contextCarrier;
234
+ }
235
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DrawerRootProvider, deps: null, target: i0.ɵɵFactoryTarget.Directive });
236
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: DrawerRootProvider, isStandalone: true, selector: "[drawer-root-provider]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null } }, providers: [
237
+ {
238
+ provide: PRESENCE_CONTEXT,
239
+ useFactory: (provider) => provider.presence,
240
+ deps: [forwardRef(() => DrawerRootProvider)],
241
+ },
242
+ {
243
+ provide: DRAWER_RENDER_STRATEGY_CONTEXT,
244
+ useExisting: forwardRef(() => DrawerRootProvider),
245
+ },
246
+ { provide: DRAWER_CONTEXT, useExisting: forwardRef(() => DrawerRootProvider) },
247
+ {
248
+ provide: DRAWER_CONTEXT_CARRIER,
249
+ useFactory: (provider) => provider.getContextCarrier(),
250
+ deps: [forwardRef(() => DrawerRootProvider)],
251
+ },
252
+ ], exportAs: ["drawerRootProvider"], usesInheritance: true, ngImport: i0 });
253
+ }
254
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DrawerRootProvider, decorators: [{
255
+ type: Directive,
256
+ args: [{
257
+ selector: "[drawer-root-provider]",
258
+ standalone: true,
259
+ exportAs: "drawerRootProvider",
260
+ providers: [
261
+ {
262
+ provide: PRESENCE_CONTEXT,
263
+ useFactory: (provider) => provider.presence,
264
+ deps: [forwardRef(() => DrawerRootProvider)],
265
+ },
266
+ {
267
+ provide: DRAWER_RENDER_STRATEGY_CONTEXT,
268
+ useExisting: forwardRef(() => DrawerRootProvider),
269
+ },
270
+ { provide: DRAWER_CONTEXT, useExisting: forwardRef(() => DrawerRootProvider) },
271
+ {
272
+ provide: DRAWER_CONTEXT_CARRIER,
273
+ useFactory: (provider) => provider.getContextCarrier(),
274
+ deps: [forwardRef(() => DrawerRootProvider)],
275
+ },
276
+ ],
277
+ }]
278
+ }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }] } });
279
+
280
+ class DrawerTrigger {
281
+ value = input(undefined, /* @ts-ignore */
282
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
283
+ constructor() {
284
+ const context = injectDrawerContext();
285
+ const presence = injectPresenceContext();
286
+ bindProps({
287
+ elementRef: inject(ElementRef),
288
+ renderer: inject(Renderer2),
289
+ destroyRef: inject(DestroyRef),
290
+ props: () => {
291
+ const props = context.api().getTriggerProps({ value: this.value() });
292
+ return {
293
+ ...props,
294
+ "aria-controls": presence.unmounted() ? undefined : props["aria-controls"],
295
+ };
296
+ },
297
+ });
298
+ }
299
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DrawerTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
300
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: DrawerTrigger, isStandalone: true, selector: "[drawer-trigger]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["drawerTrigger"], ngImport: i0 });
301
+ }
302
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DrawerTrigger, decorators: [{
303
+ type: Directive,
304
+ args: [{
305
+ selector: "[drawer-trigger]",
306
+ standalone: true,
307
+ exportAs: "drawerTrigger",
308
+ }]
309
+ }], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }] } });
310
+
311
+ class DrawerBackdrop {
312
+ constructor() {
313
+ const context = injectDrawerContext();
314
+ const renderStrategy = injectDrawerRenderStrategyContext();
315
+ const presence = usePresence({
316
+ context: () => ({
317
+ present: context.api().open,
318
+ lazyMount: renderStrategy.lazyMount(),
319
+ unmountOnExit: renderStrategy.unmountOnExit(),
320
+ }),
321
+ });
322
+ const template = inject((TemplateRef), { optional: true });
323
+ const container = inject(ViewContainerRef);
324
+ const host = inject(ElementRef);
325
+ const elementRef = template ? { nativeElement: null } : host;
326
+ let view;
327
+ effect(() => {
328
+ const unmounted = presence.unmounted();
329
+ if (template) {
330
+ if (unmounted) {
331
+ elementRef.nativeElement = null;
332
+ container.clear();
333
+ view = undefined;
334
+ }
335
+ else if (!view) {
336
+ view = container.createEmbeddedView(template);
337
+ elementRef.nativeElement =
338
+ view.rootNodes.find((node) => node.nodeType === 1) ?? null;
339
+ }
340
+ }
341
+ untracked(() => presence.setNode(elementRef.nativeElement));
342
+ });
343
+ bindProps({
344
+ elementRef,
345
+ renderer: inject(Renderer2),
346
+ destroyRef: inject(DestroyRef),
347
+ props: () => {
348
+ presence.unmounted();
349
+ return { ...context.api().getBackdropProps(), ...presence.getPresenceProps() };
350
+ },
351
+ });
352
+ }
353
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DrawerBackdrop, deps: [], target: i0.ɵɵFactoryTarget.Directive });
354
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: DrawerBackdrop, isStandalone: true, selector: "[drawer-backdrop]", exportAs: ["drawerBackdrop"], ngImport: i0 });
355
+ }
356
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DrawerBackdrop, decorators: [{
357
+ type: Directive,
358
+ args: [{
359
+ selector: "[drawer-backdrop]",
360
+ standalone: true,
361
+ exportAs: "drawerBackdrop",
362
+ }]
363
+ }], ctorParameters: () => [] });
364
+
365
+ class DrawerPositioner {
366
+ constructor() {
367
+ const context = injectDrawerContext();
368
+ const presence = injectPresenceContext();
369
+ const template = inject((TemplateRef), { optional: true });
370
+ const container = inject(ViewContainerRef);
371
+ const host = inject(ElementRef);
372
+ const elementRef = template ? { nativeElement: null } : host;
373
+ let view;
374
+ effect(() => {
375
+ const unmounted = presence.unmounted();
376
+ if (template) {
377
+ if (unmounted) {
378
+ elementRef.nativeElement = null;
379
+ container.clear();
380
+ view = undefined;
381
+ }
382
+ else if (!view) {
383
+ view = container.createEmbeddedView(template);
384
+ elementRef.nativeElement =
385
+ view.rootNodes.find((node) => node.nodeType === 1) ?? null;
386
+ }
387
+ }
388
+ });
389
+ bindProps({
390
+ elementRef,
391
+ renderer: inject(Renderer2),
392
+ destroyRef: inject(DestroyRef),
393
+ props: () => {
394
+ const unmounted = presence.unmounted();
395
+ return { ...context.api().getPositionerProps(), hidden: unmounted };
396
+ },
397
+ });
398
+ }
399
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DrawerPositioner, deps: [], target: i0.ɵɵFactoryTarget.Directive });
400
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: DrawerPositioner, isStandalone: true, selector: "[drawer-positioner]", exportAs: ["drawerPositioner"], ngImport: i0 });
401
+ }
402
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DrawerPositioner, decorators: [{
403
+ type: Directive,
404
+ args: [{
405
+ selector: "[drawer-positioner]",
406
+ standalone: true,
407
+ exportAs: "drawerPositioner",
408
+ }]
409
+ }], ctorParameters: () => [] });
410
+
411
+ class DrawerContent {
412
+ draggable = input(true, { ...(ngDevMode ? { debugName: "draggable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
413
+ constructor() {
414
+ const context = injectDrawerContext();
415
+ const presence = injectPresenceContext();
416
+ const template = inject((TemplateRef), { optional: true });
417
+ const container = inject(ViewContainerRef);
418
+ const host = inject(ElementRef);
419
+ const elementRef = template ? { nativeElement: null } : host;
420
+ let view;
421
+ effect(() => {
422
+ const unmounted = presence.unmounted();
423
+ if (template) {
424
+ if (unmounted) {
425
+ elementRef.nativeElement = null;
426
+ container.clear();
427
+ view = undefined;
428
+ }
429
+ else if (!view) {
430
+ view = container.createEmbeddedView(template);
431
+ elementRef.nativeElement =
432
+ view.rootNodes.find((node) => node.nodeType === 1) ?? null;
433
+ }
434
+ }
435
+ untracked(() => presence.setNode(elementRef.nativeElement));
436
+ });
437
+ bindProps({
438
+ elementRef,
439
+ renderer: inject(Renderer2),
440
+ destroyRef: inject(DestroyRef),
441
+ props: () => {
442
+ presence.unmounted();
443
+ return {
444
+ ...context.api().getContentProps({ draggable: this.draggable() }),
445
+ ...presence.getPresenceProps(),
446
+ };
447
+ },
448
+ });
449
+ }
450
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DrawerContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
451
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: DrawerContent, isStandalone: true, selector: "[drawer-content]", inputs: { draggable: { classPropertyName: "draggable", publicName: "draggable", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["drawerContent"], ngImport: i0 });
452
+ }
453
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DrawerContent, decorators: [{
454
+ type: Directive,
455
+ args: [{
456
+ selector: "[drawer-content]",
457
+ standalone: true,
458
+ exportAs: "drawerContent",
459
+ }]
460
+ }], ctorParameters: () => [], propDecorators: { draggable: [{ type: i0.Input, args: [{ isSignal: true, alias: "draggable", required: false }] }] } });
461
+
462
+ class DrawerTitle {
463
+ constructor() {
464
+ const context = injectDrawerContext();
465
+ bindProps({
466
+ elementRef: inject(ElementRef),
467
+ renderer: inject(Renderer2),
468
+ destroyRef: inject(DestroyRef),
469
+ props: () => context.api().getTitleProps(),
470
+ });
471
+ }
472
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DrawerTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
473
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: DrawerTitle, isStandalone: true, selector: "[drawer-title]", exportAs: ["drawerTitle"], ngImport: i0 });
474
+ }
475
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DrawerTitle, decorators: [{
476
+ type: Directive,
477
+ args: [{
478
+ selector: "[drawer-title]",
479
+ standalone: true,
480
+ exportAs: "drawerTitle",
481
+ }]
482
+ }], ctorParameters: () => [] });
483
+
484
+ class DrawerDescription {
485
+ constructor() {
486
+ const context = injectDrawerContext();
487
+ bindProps({
488
+ elementRef: inject(ElementRef),
489
+ renderer: inject(Renderer2),
490
+ destroyRef: inject(DestroyRef),
491
+ props: () => context.api().getDescriptionProps(),
492
+ });
493
+ }
494
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DrawerDescription, deps: [], target: i0.ɵɵFactoryTarget.Directive });
495
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: DrawerDescription, isStandalone: true, selector: "[drawer-description]", exportAs: ["drawerDescription"], ngImport: i0 });
496
+ }
497
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DrawerDescription, decorators: [{
498
+ type: Directive,
499
+ args: [{
500
+ selector: "[drawer-description]",
501
+ standalone: true,
502
+ exportAs: "drawerDescription",
503
+ }]
504
+ }], ctorParameters: () => [] });
505
+
506
+ class DrawerCloseTrigger {
507
+ constructor() {
508
+ const context = injectDrawerContext();
509
+ bindProps({
510
+ elementRef: inject(ElementRef),
511
+ renderer: inject(Renderer2),
512
+ destroyRef: inject(DestroyRef),
513
+ props: () => context.api().getCloseTriggerProps(),
514
+ });
515
+ }
516
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DrawerCloseTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
517
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: DrawerCloseTrigger, isStandalone: true, selector: "[drawer-close-trigger]", exportAs: ["drawerCloseTrigger"], ngImport: i0 });
518
+ }
519
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DrawerCloseTrigger, decorators: [{
520
+ type: Directive,
521
+ args: [{
522
+ selector: "[drawer-close-trigger]",
523
+ standalone: true,
524
+ exportAs: "drawerCloseTrigger",
525
+ }]
526
+ }], ctorParameters: () => [] });
527
+
528
+ class DrawerGrabber {
529
+ constructor() {
530
+ const context = injectDrawerContext();
531
+ bindProps({
532
+ elementRef: inject(ElementRef),
533
+ renderer: inject(Renderer2),
534
+ destroyRef: inject(DestroyRef),
535
+ props: () => context.api().getGrabberProps(),
536
+ });
537
+ }
538
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DrawerGrabber, deps: [], target: i0.ɵɵFactoryTarget.Directive });
539
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: DrawerGrabber, isStandalone: true, selector: "[drawer-grabber]", exportAs: ["drawerGrabber"], ngImport: i0 });
540
+ }
541
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DrawerGrabber, decorators: [{
542
+ type: Directive,
543
+ args: [{
544
+ selector: "[drawer-grabber]",
545
+ standalone: true,
546
+ exportAs: "drawerGrabber",
547
+ }]
548
+ }], ctorParameters: () => [] });
549
+
550
+ class DrawerGrabberIndicator {
551
+ constructor() {
552
+ const context = injectDrawerContext();
553
+ bindProps({
554
+ elementRef: inject(ElementRef),
555
+ renderer: inject(Renderer2),
556
+ destroyRef: inject(DestroyRef),
557
+ props: () => context.api().getGrabberIndicatorProps(),
558
+ });
559
+ }
560
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DrawerGrabberIndicator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
561
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: DrawerGrabberIndicator, isStandalone: true, selector: "[drawer-grabber-indicator]", exportAs: ["drawerGrabberIndicator"], ngImport: i0 });
562
+ }
563
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DrawerGrabberIndicator, decorators: [{
564
+ type: Directive,
565
+ args: [{
566
+ selector: "[drawer-grabber-indicator]",
567
+ standalone: true,
568
+ exportAs: "drawerGrabberIndicator",
569
+ }]
570
+ }], ctorParameters: () => [] });
571
+
572
+ class DrawerSwipeArea {
573
+ /** Whether the swipe area is disabled. */
574
+ disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
575
+ /** The swipe direction that opens the drawer. */
576
+ swipeDirection = input(undefined, /* @ts-ignore */
577
+ ...(ngDevMode ? [{ debugName: "swipeDirection" }] : /* istanbul ignore next */ []));
578
+ constructor() {
579
+ const context = injectDrawerContext();
580
+ bindProps({
581
+ elementRef: inject(ElementRef),
582
+ renderer: inject(Renderer2),
583
+ destroyRef: inject(DestroyRef),
584
+ props: () => context
585
+ .api()
586
+ .getSwipeAreaProps({ disabled: this.disabled(), swipeDirection: this.swipeDirection() }),
587
+ });
588
+ }
589
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DrawerSwipeArea, deps: [], target: i0.ɵɵFactoryTarget.Directive });
590
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: DrawerSwipeArea, isStandalone: true, selector: "[drawer-swipe-area]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, swipeDirection: { classPropertyName: "swipeDirection", publicName: "swipeDirection", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["drawerSwipeArea"], ngImport: i0 });
591
+ }
592
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DrawerSwipeArea, decorators: [{
593
+ type: Directive,
594
+ args: [{
595
+ selector: "[drawer-swipe-area]",
596
+ standalone: true,
597
+ exportAs: "drawerSwipeArea",
598
+ }]
599
+ }], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], swipeDirection: [{ type: i0.Input, args: [{ isSignal: true, alias: "swipeDirection", required: false }] }] } });
600
+
601
+ class DrawerIndent {
602
+ constructor() {
603
+ const context = injectDrawerStackContext();
604
+ bindProps({
605
+ elementRef: inject(ElementRef),
606
+ renderer: inject(Renderer2),
607
+ destroyRef: inject(DestroyRef),
608
+ props: () => context.api().getIndentProps(),
609
+ });
610
+ }
611
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DrawerIndent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
612
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: DrawerIndent, isStandalone: true, selector: "[drawer-indent]", exportAs: ["drawerIndent"], ngImport: i0 });
613
+ }
614
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DrawerIndent, decorators: [{
615
+ type: Directive,
616
+ args: [{
617
+ selector: "[drawer-indent]",
618
+ standalone: true,
619
+ exportAs: "drawerIndent",
620
+ }]
621
+ }], ctorParameters: () => [] });
622
+
623
+ class DrawerIndentBackground {
624
+ constructor() {
625
+ const context = injectDrawerStackContext();
626
+ bindProps({
627
+ elementRef: inject(ElementRef),
628
+ renderer: inject(Renderer2),
629
+ destroyRef: inject(DestroyRef),
630
+ props: () => context.api().getIndentBackgroundProps(),
631
+ });
632
+ }
633
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DrawerIndentBackground, deps: [], target: i0.ɵɵFactoryTarget.Directive });
634
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: DrawerIndentBackground, isStandalone: true, selector: "[drawer-indent-background]", exportAs: ["drawerIndentBackground"], ngImport: i0 });
635
+ }
636
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DrawerIndentBackground, decorators: [{
637
+ type: Directive,
638
+ args: [{
639
+ selector: "[drawer-indent-background]",
640
+ standalone: true,
641
+ exportAs: "drawerIndentBackground",
642
+ }]
643
+ }], ctorParameters: () => [] });
644
+
645
+ class DrawerStack {
646
+ stack = drawer.createStack();
647
+ snapshot = signal(this.stack.getSnapshot(), /* @ts-ignore */
648
+ ...(ngDevMode ? [{ debugName: "snapshot" }] : /* istanbul ignore next */ []));
649
+ unsubscribe = this.stack.subscribe(() => this.snapshot.set(this.stack.getSnapshot()));
650
+ context = {
651
+ stack: this.stack,
652
+ api: computed(() => drawer.connectStack(this.snapshot(), normalizeProps)),
653
+ };
654
+ constructor() {
655
+ inject(DestroyRef).onDestroy(() => this.unsubscribe());
656
+ }
657
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DrawerStack, deps: [], target: i0.ɵɵFactoryTarget.Directive });
658
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: DrawerStack, isStandalone: true, selector: "[drawer-stack]", providers: [{ provide: DRAWER_STACK_CONTEXT, useFactory: () => inject(DrawerStack).context }], exportAs: ["drawerStack"], ngImport: i0 });
659
+ }
660
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DrawerStack, decorators: [{
661
+ type: Directive,
662
+ args: [{
663
+ selector: "[drawer-stack]",
664
+ standalone: true,
665
+ exportAs: "drawerStack",
666
+ providers: [{ provide: DRAWER_STACK_CONTEXT, useFactory: () => inject(DrawerStack).context }],
667
+ }]
668
+ }], ctorParameters: () => [] });
669
+
670
+ class DrawerContext {
671
+ static ngTemplateContextGuard(_directive, context) {
672
+ void context;
673
+ return true;
674
+ }
675
+ drawer = injectDrawerContext();
676
+ templateRef = inject(TemplateRef);
677
+ viewContainer = inject(ViewContainerRef);
678
+ constructor() {
679
+ const view = this.viewContainer.createEmbeddedView(this.templateRef, {
680
+ $implicit: this.drawer.api,
681
+ api: this.drawer.api,
682
+ });
683
+ effect(() => {
684
+ this.drawer.api();
685
+ view.detectChanges();
686
+ });
687
+ inject(DestroyRef).onDestroy(() => view.destroy());
688
+ }
689
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DrawerContext, deps: [], target: i0.ɵɵFactoryTarget.Directive });
690
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: DrawerContext, isStandalone: true, selector: "[drawer-context]", exportAs: ["drawerContext"], ngImport: i0 });
691
+ }
692
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DrawerContext, decorators: [{
693
+ type: Directive,
694
+ args: [{
695
+ selector: "[drawer-context]",
696
+ standalone: true,
697
+ exportAs: "drawerContext",
698
+ }]
699
+ }], ctorParameters: () => [] });
700
+
701
+ /**
702
+ * Generated bundle index. Do not edit.
703
+ */
704
+
705
+ export { DRAWER_CONTEXT, DRAWER_CONTEXT_CARRIER, DRAWER_RENDER_STRATEGY_CONTEXT, DRAWER_STACK_CONTEXT, DrawerBackdrop, DrawerCloseTrigger, DrawerContent, DrawerContext, DrawerDescription, DrawerGrabber, DrawerGrabberIndicator, DrawerIndent, DrawerIndentBackground, DrawerPositioner, DrawerRoot, DrawerRootProvider, DrawerStack, DrawerSwipeArea, DrawerTitle, DrawerTrigger, injectDrawerContext, injectDrawerContextCarrier, injectDrawerRenderStrategyContext, injectDrawerStackContext, useDrawer };
706
+ //# sourceMappingURL=wirekyt-angular-drawer.mjs.map