@agentsmith.bgd/as-components 21.0.26 → 21.0.30

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, signal, output, ViewContainerRef, ViewChild, ChangeDetectionStrategy, Directive, createComponent, isSignal, Injectable, inject, Injector, ElementRef, input, computed, HostListener, effect, forwardRef } from '@angular/core';
2
+ import { Component, signal, output, ViewContainerRef, ViewChild, ChangeDetectionStrategy, Directive, createComponent, Injectable, inject, Injector, ElementRef, input, computed, HostListener, effect, forwardRef } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule, NgClass } from '@angular/common';
5
5
  import { Subject } from 'rxjs';
@@ -11,19 +11,11 @@ import 'flatpickr/dist/flatpickr.css';
11
11
 
12
12
  class AsComponents {
13
13
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: AsComponents, deps: [], target: i0.ɵɵFactoryTarget.Component });
14
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.0", type: AsComponents, isStandalone: true, selector: "lib-as-components", ngImport: i0, template: `
15
- <p>
16
- as-components works!
17
- </p>
18
- `, isInline: true, styles: [""] });
14
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.0", type: AsComponents, isStandalone: true, selector: "lib-as-components", ngImport: i0, template: ` <p> as-components works! </p> `, isInline: true, styles: [""] });
19
15
  }
20
16
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: AsComponents, decorators: [{
21
17
  type: Component,
22
- args: [{ selector: 'lib-as-components', imports: [], template: `
23
- <p>
24
- as-components works!
25
- </p>
26
- ` }]
18
+ args: [{ selector: 'lib-as-components', imports: [], template: ` <p> as-components works! </p> ` }]
27
19
  }] });
28
20
 
29
21
  class ModalContainerComponent {
@@ -32,7 +24,9 @@ class ModalContainerComponent {
32
24
  title = signal(undefined, ...(ngDevMode ? [{ debugName: "title" }] : []));
33
25
  size = signal('md', ...(ngDevMode ? [{ debugName: "size" }] : []));
34
26
  showClose = signal(true, ...(ngDevMode ? [{ debugName: "showClose" }] : []));
27
+ enableLog = signal(false, ...(ngDevMode ? [{ debugName: "enableLog" }] : []));
35
28
  closed = output();
29
+ modalRef;
36
30
  get sizeClass() {
37
31
  return this.size(); // template uses size() directly; keep helper for compatibility if needed
38
32
  }
@@ -115,18 +109,20 @@ class ModalContainerComponent {
115
109
  //console.log(`setInput: raw assign for ${key}`, targetInstance[key]);
116
110
  }
117
111
  }
118
- backdropClick() {
119
- this.close();
112
+ dismiss() {
113
+ this.modalRef.dismiss();
120
114
  }
121
- close(result) {
122
- this.closed.emit(result);
115
+ log(value, ...rest) {
116
+ if (this.enableLog() || localStorage.getItem('loggerEnable')) {
117
+ console.log('%c DEBUG ', 'background: gray; color: white; font-weight: bold;', `AS modal container -> ${value}`, ...rest);
118
+ }
123
119
  }
124
120
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ModalContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
125
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", type: ModalContainerComponent, isStandalone: true, selector: "as-modal-container", outputs: { closed: "closed" }, viewQueries: [{ propertyName: "contentHost", first: true, predicate: ["contentHost"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "\n <div class=\"as-modal-backdrop\" (click)=\"backdropClick()\"></div>\n <div class=\"as-modal\" [ngClass]=\"size()\" role=\"dialog\" aria-modal=\"true\">\n @if (title() || showClose()) {\n <div class=\"as-modal-header\">\n <h3 class=\"as-modal-title\">{{ title() }}</h3>\n @if (showClose()) {\n <button class=\"btn-close close pull-right\" type=\"button\" (click)=\"backdropClick()\"></button>\n }\n </div>\n }\n <div class=\"as-modal-body\">\n <ng-template #contentHost></ng-template>\n </div>\n </div>\n", styles: [".as-modal-backdrop{position:fixed;inset:0;background:#00000080;z-index:1000}.as-modal{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:1001;background:#fff;border-radius:4px;max-width:90%}.as-modal.sm{width:300px}.as-modal.md{width:600px}.as-modal.lg{width:900px}.as-modal-header{display:flex;justify-content:space-between;align-items:center;padding:12px;border-bottom:1px solid #eee}.as-modal-body{padding:12px}.as-modal-close{background:none;border:0;font-size:20px;cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
121
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", type: ModalContainerComponent, isStandalone: true, selector: "as-modal-container", outputs: { closed: "closed" }, viewQueries: [{ propertyName: "contentHost", first: true, predicate: ["contentHost"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<div class=\"as-modal-backdrop\" (click)=\"dismiss()\"></div>\n<div class=\"as-modal\" [ngClass]=\"size()\" role=\"dialog\" aria-modal=\"true\">\n\t@if (title() || showClose()) {\n\t\t<div class=\"as-modal-header\">\n\t\t\t<h3 class=\"as-modal-title\">{{ title() }}</h3>\n\t\t\t@if (showClose()) {\n\t\t\t\t<button class=\"btn-close close pull-right\" type=\"button\" (click)=\"dismiss()\"></button>\n\t\t\t}\n\t\t</div>\n\t}\n\t<div class=\"as-modal-body\">\n\t\t<ng-template #contentHost></ng-template>\n\t</div>\n</div>\n", styles: [".as-modal-backdrop{position:fixed;inset:0;background:#00000080;z-index:1000}.as-modal{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:1001;background:#fff;border-radius:4px;max-width:90%}.as-modal.sm{width:300px}.as-modal.md{width:600px}.as-modal.lg{width:900px}.as-modal-header{display:flex;justify-content:space-between;align-items:center;padding:12px;border-bottom:1px solid #eee}.as-modal-body{padding:12px}.as-modal-close{background:none;border:0;font-size:20px;cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
126
122
  }
127
123
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ModalContainerComponent, decorators: [{
128
124
  type: Component,
129
- args: [{ selector: 'as-modal-container', imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "\n <div class=\"as-modal-backdrop\" (click)=\"backdropClick()\"></div>\n <div class=\"as-modal\" [ngClass]=\"size()\" role=\"dialog\" aria-modal=\"true\">\n @if (title() || showClose()) {\n <div class=\"as-modal-header\">\n <h3 class=\"as-modal-title\">{{ title() }}</h3>\n @if (showClose()) {\n <button class=\"btn-close close pull-right\" type=\"button\" (click)=\"backdropClick()\"></button>\n }\n </div>\n }\n <div class=\"as-modal-body\">\n <ng-template #contentHost></ng-template>\n </div>\n </div>\n", styles: [".as-modal-backdrop{position:fixed;inset:0;background:#00000080;z-index:1000}.as-modal{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:1001;background:#fff;border-radius:4px;max-width:90%}.as-modal.sm{width:300px}.as-modal.md{width:600px}.as-modal.lg{width:900px}.as-modal-header{display:flex;justify-content:space-between;align-items:center;padding:12px;border-bottom:1px solid #eee}.as-modal-body{padding:12px}.as-modal-close{background:none;border:0;font-size:20px;cursor:pointer}\n"] }]
125
+ args: [{ selector: 'as-modal-container', imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<div class=\"as-modal-backdrop\" (click)=\"dismiss()\"></div>\n<div class=\"as-modal\" [ngClass]=\"size()\" role=\"dialog\" aria-modal=\"true\">\n\t@if (title() || showClose()) {\n\t\t<div class=\"as-modal-header\">\n\t\t\t<h3 class=\"as-modal-title\">{{ title() }}</h3>\n\t\t\t@if (showClose()) {\n\t\t\t\t<button class=\"btn-close close pull-right\" type=\"button\" (click)=\"dismiss()\"></button>\n\t\t\t}\n\t\t</div>\n\t}\n\t<div class=\"as-modal-body\">\n\t\t<ng-template #contentHost></ng-template>\n\t</div>\n</div>\n", styles: [".as-modal-backdrop{position:fixed;inset:0;background:#00000080;z-index:1000}.as-modal{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:1001;background:#fff;border-radius:4px;max-width:90%}.as-modal.sm{width:300px}.as-modal.md{width:600px}.as-modal.lg{width:900px}.as-modal-header{display:flex;justify-content:space-between;align-items:center;padding:12px;border-bottom:1px solid #eee}.as-modal-body{padding:12px}.as-modal-close{background:none;border:0;font-size:20px;cursor:pointer}\n"] }]
130
126
  }], propDecorators: { contentHost: [{
131
127
  type: ViewChild,
132
128
  args: ['contentHost', { read: ViewContainerRef, static: true }]
@@ -134,9 +130,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImpor
134
130
 
135
131
  class BaseModalComponent {
136
132
  onClose = output();
137
- sendEvent(result = undefined) {
133
+ // injected by ModalService
134
+ _dismiss;
135
+ /** called by ModalService */
136
+ _registerDismiss(fn) {
137
+ this._dismiss = fn;
138
+ }
139
+ /** CONFIRM */
140
+ confirm(result) {
138
141
  this.onClose.emit(result);
139
142
  }
143
+ /** CANCEL / SILENT */
144
+ dismiss() {
145
+ this._dismiss?.();
146
+ }
140
147
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: BaseModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
141
148
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.0", type: BaseModalComponent, isStandalone: true, outputs: { onClose: "onClose" }, ngImport: i0 });
142
149
  }
@@ -158,6 +165,10 @@ class ModalRef {
158
165
  this._onClose.complete();
159
166
  this.destroy();
160
167
  }
168
+ dismiss() {
169
+ this._onClose.complete();
170
+ this.destroy();
171
+ }
161
172
  destroy() {
162
173
  try {
163
174
  if (this.componentRef) {
@@ -186,20 +197,28 @@ class ModalService {
186
197
  const hostEl = document.createElement('div');
187
198
  document.body.appendChild(hostEl);
188
199
  const compRef = createComponent(ModalContainerComponent, {
189
- environmentInjector: this.envInjector
200
+ environmentInjector: this.envInjector,
190
201
  });
191
202
  // set container inputs using signal-aware helper
192
203
  this.setInput(compRef.instance, 'title', config.title);
193
204
  this.setInput(compRef.instance, 'size', config.size ?? 'md');
194
205
  this.setInput(compRef.instance, 'showClose', config.showClose !== false);
206
+ this.setInput(compRef.instance, 'enableLog', config.enableLog !== false);
195
207
  this.appRef.attachView(compRef.hostView);
196
208
  hostEl.appendChild(compRef.hostView.rootNodes[0]);
197
209
  // the container's loadComponent handles assigning inputs (including signals) to the child
198
210
  const childRef = compRef.instance.loadComponent(component, config.data);
199
211
  const modalRef = new ModalRef(compRef, hostEl);
212
+ compRef.instance.modalRef = modalRef;
200
213
  compRef.instance.closed.subscribe((result) => {
201
214
  modalRef.close(result);
202
215
  });
216
+ const maybeBase = childRef.instance;
217
+ if (maybeBase._registerDismiss) {
218
+ maybeBase._registerDismiss(() => {
219
+ modalRef.dismiss(); // calls ModalRef.dismiss
220
+ });
221
+ }
203
222
  const maybeEmitter = childRef.instance.onClose;
204
223
  if (maybeEmitter && typeof maybeEmitter.subscribe === 'function') {
205
224
  maybeEmitter.subscribe((res) => modalRef.close(res));
@@ -215,9 +234,6 @@ class ModalService {
215
234
  targetInstance[key] = value;
216
235
  }
217
236
  }
218
- isWritableSignal(s) {
219
- return isSignal(s) && typeof s.set === 'function';
220
- }
221
237
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ModalService, deps: [{ token: i0.Injector }, { token: i0.ApplicationRef }, { token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });
222
238
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ModalService, providedIn: 'root' });
223
239
  }
@@ -234,38 +250,38 @@ class TooltipComponent {
234
250
  placement = signal('bottom', ...(ngDevMode ? [{ debugName: "placement" }] : []));
235
251
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: TooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
236
252
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.0", type: TooltipComponent, isStandalone: true, selector: "as-tooltip", ngImport: i0, template: `
237
- <div
238
- class="as-tooltip"
239
- [class.as-placement-top]="placement() === 'bottom'"
240
- [class.as-placement-bottom]="placement() === 'top'"
241
- [class.as-placement-left]="placement() === 'right'"
242
- [class.as-placement-right]="placement() === 'left'"
243
- [attr.id]="id()"
244
- role="tooltip"
245
- [attr.aria-hidden]="!text()"
246
- >
247
- {{ text() }}
248
- <span class="as-tooltip-arrow" aria-hidden="true"></span>
249
- </div>
250
- `, isInline: true, styles: [":host{display:block}.as-tooltip{position:relative;display:inline-block;background:#616161f2;color:#fff;padding:6px 10px;border-radius:4px;font-size:12px;max-width:240px;box-shadow:0 2px 10px #0003;line-height:1.2}.as-tooltip-arrow{position:absolute;width:0;height:0}.as-placement-bottom .as-tooltip-arrow{left:50%;transform:translate(-50%);top:100%;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid rgba(97,97,97,.95)}.as-placement-top .as-tooltip-arrow{left:50%;transform:translate(-50%);bottom:100%;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid rgba(97,97,97,.95)}.as-placement-left .as-tooltip-arrow{top:50%;transform:translateY(-50%);right:100%;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:6px solid rgba(97,97,97,.95)}.as-placement-right .as-tooltip-arrow{top:50%;transform:translateY(-50%);left:100%;border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:6px solid rgba(97,97,97,.95)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
253
+ <div
254
+ class="as-tooltip"
255
+ [class.as-placement-top]="placement() === 'bottom'"
256
+ [class.as-placement-bottom]="placement() === 'top'"
257
+ [class.as-placement-left]="placement() === 'right'"
258
+ [class.as-placement-right]="placement() === 'left'"
259
+ [attr.id]="id()"
260
+ role="tooltip"
261
+ [attr.aria-hidden]="!text()"
262
+ >
263
+ {{ text() }}
264
+ <span class="as-tooltip-arrow" aria-hidden="true"></span>
265
+ </div>
266
+ `, isInline: true, styles: [":host{display:block}.as-tooltip{position:relative;display:inline-block;background:#616161f2;color:#fff;padding:6px 10px;border-radius:4px;font-size:12px;max-width:240px;box-shadow:0 2px 10px #0003;line-height:1.2}.as-tooltip-arrow{position:absolute;width:0;height:0}.as-placement-bottom .as-tooltip-arrow{left:50%;transform:translate(-50%);top:100%;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid rgba(97,97,97,.95)}.as-placement-top .as-tooltip-arrow{left:50%;transform:translate(-50%);bottom:100%;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid rgba(97,97,97,.95)}.as-placement-left .as-tooltip-arrow{top:50%;transform:translateY(-50%);right:100%;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:6px solid rgba(97,97,97,.95)}.as-placement-right .as-tooltip-arrow{top:50%;transform:translateY(-50%);left:100%;border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:6px solid rgba(97,97,97,.95)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
251
267
  }
252
268
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: TooltipComponent, decorators: [{
253
269
  type: Component,
254
270
  args: [{ selector: 'as-tooltip', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: `
255
- <div
256
- class="as-tooltip"
257
- [class.as-placement-top]="placement() === 'bottom'"
258
- [class.as-placement-bottom]="placement() === 'top'"
259
- [class.as-placement-left]="placement() === 'right'"
260
- [class.as-placement-right]="placement() === 'left'"
261
- [attr.id]="id()"
262
- role="tooltip"
263
- [attr.aria-hidden]="!text()"
264
- >
265
- {{ text() }}
266
- <span class="as-tooltip-arrow" aria-hidden="true"></span>
267
- </div>
268
- `, styles: [":host{display:block}.as-tooltip{position:relative;display:inline-block;background:#616161f2;color:#fff;padding:6px 10px;border-radius:4px;font-size:12px;max-width:240px;box-shadow:0 2px 10px #0003;line-height:1.2}.as-tooltip-arrow{position:absolute;width:0;height:0}.as-placement-bottom .as-tooltip-arrow{left:50%;transform:translate(-50%);top:100%;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid rgba(97,97,97,.95)}.as-placement-top .as-tooltip-arrow{left:50%;transform:translate(-50%);bottom:100%;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid rgba(97,97,97,.95)}.as-placement-left .as-tooltip-arrow{top:50%;transform:translateY(-50%);right:100%;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:6px solid rgba(97,97,97,.95)}.as-placement-right .as-tooltip-arrow{top:50%;transform:translateY(-50%);left:100%;border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:6px solid rgba(97,97,97,.95)}\n"] }]
271
+ <div
272
+ class="as-tooltip"
273
+ [class.as-placement-top]="placement() === 'bottom'"
274
+ [class.as-placement-bottom]="placement() === 'top'"
275
+ [class.as-placement-left]="placement() === 'right'"
276
+ [class.as-placement-right]="placement() === 'left'"
277
+ [attr.id]="id()"
278
+ role="tooltip"
279
+ [attr.aria-hidden]="!text()"
280
+ >
281
+ {{ text() }}
282
+ <span class="as-tooltip-arrow" aria-hidden="true"></span>
283
+ </div>
284
+ `, styles: [":host{display:block}.as-tooltip{position:relative;display:inline-block;background:#616161f2;color:#fff;padding:6px 10px;border-radius:4px;font-size:12px;max-width:240px;box-shadow:0 2px 10px #0003;line-height:1.2}.as-tooltip-arrow{position:absolute;width:0;height:0}.as-placement-bottom .as-tooltip-arrow{left:50%;transform:translate(-50%);top:100%;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid rgba(97,97,97,.95)}.as-placement-top .as-tooltip-arrow{left:50%;transform:translate(-50%);bottom:100%;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid rgba(97,97,97,.95)}.as-placement-left .as-tooltip-arrow{top:50%;transform:translateY(-50%);right:100%;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:6px solid rgba(97,97,97,.95)}.as-placement-right .as-tooltip-arrow{top:50%;transform:translateY(-50%);left:100%;border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:6px solid rgba(97,97,97,.95)}\n"] }]
269
285
  }] });
270
286
 
271
287
  class TooltipDirective {
@@ -317,7 +333,8 @@ class TooltipDirective {
317
333
  this.detachOverlay(true);
318
334
  }
319
335
  createOverlay() {
320
- const strategy = this.overlay.position()
336
+ const strategy = this.overlay
337
+ .position()
321
338
  .flexibleConnectedTo(this.host)
322
339
  .withPositions(this.positions())
323
340
  .withPush(true);
@@ -354,34 +371,47 @@ class TooltipDirective {
354
371
  }
355
372
  buildPositions(preferred) {
356
373
  const top = {
357
- originX: 'center', originY: 'top',
358
- overlayX: 'center', overlayY: 'bottom',
359
- offsetY: -8
374
+ originX: 'center',
375
+ originY: 'top',
376
+ overlayX: 'center',
377
+ overlayY: 'bottom',
378
+ offsetY: -8,
360
379
  };
361
380
  const bottom = {
362
- originX: 'center', originY: 'bottom',
363
- overlayX: 'center', overlayY: 'top',
364
- offsetY: 8
381
+ originX: 'center',
382
+ originY: 'bottom',
383
+ overlayX: 'center',
384
+ overlayY: 'top',
385
+ offsetY: 8,
365
386
  };
366
387
  const left = {
367
- originX: 'start', originY: 'center',
368
- overlayX: 'end', overlayY: 'center',
369
- offsetX: -8
388
+ originX: 'start',
389
+ originY: 'center',
390
+ overlayX: 'end',
391
+ overlayY: 'center',
392
+ offsetX: -8,
370
393
  };
371
394
  const right = {
372
- originX: 'end', originY: 'center',
373
- overlayX: 'start', overlayY: 'center',
374
- offsetX: 8
395
+ originX: 'end',
396
+ originY: 'center',
397
+ overlayX: 'start',
398
+ overlayY: 'center',
399
+ offsetX: 8,
375
400
  };
376
401
  if (preferred === 'auto') {
377
402
  return [bottom, top, right, left];
378
403
  }
379
404
  switch (preferred) {
380
- case 'top': return [top, bottom, right, left];
381
- case 'bottom': return [bottom, top, right, left];
382
- case 'left': return [left, right, bottom, top];
383
- case 'right': return [right, left, bottom, top];
384
- default: return [bottom, top, right, left];
405
+ case 'top':
406
+ return [top, bottom, right, left];
407
+ case 'bottom':
408
+ return [bottom, top, right, left];
409
+ case 'left':
410
+ return [left, right, bottom, top];
411
+ case 'right':
412
+ return [right, left, bottom, top];
413
+ default:
414
+ return [bottom, top, right, left];
385
415
  }
386
416
  }
387
417
  mapPositionToPlacement(pos) {
@@ -443,78 +473,72 @@ class TypeaheadPanelComponent {
443
473
  }
444
474
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: TypeaheadPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
445
475
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", type: TypeaheadPanelComponent, isStandalone: true, selector: "as-typeahead-panel", ngImport: i0, template: `
446
- <div
447
- class="as-typeahead-panel"
448
- role="listbox"
449
- [attr.id]="id()"
450
- [class.as-empty]="items().length === 0"
451
- [style.max-height.px]="visibleCount() * itemHeight"
452
- >
453
- @for (item of items(); track item.key) {
454
- <div
455
- role="option"
456
- [attr.id]="optionId($index)"
457
- [attr.aria-selected]="$index === activeIndex()"
458
- class="as-typeahead-option"
459
- [class.as-active]="$index === activeIndex()"
460
- (mouseenter)="setActive($index)"
461
- (mousemove)="setActive($index)"
462
- (click)="select($index)"
463
- >
464
- @if (optionTemplate) {
465
- <ng-container
466
- *ngTemplateOutlet="optionTemplate; context: { $implicit: items()[$index] }"
467
- ></ng-container>
468
- }
469
- @else {
470
- {{ displayWith()(item) }}
471
- }
472
- </div>
473
- }
476
+ <div
477
+ class="as-typeahead-panel"
478
+ role="listbox"
479
+ [attr.id]="id()"
480
+ [class.as-empty]="items().length === 0"
481
+ [style.max-height.px]="visibleCount() * itemHeight"
482
+ >
483
+ @for (item of items(); track item.key) {
484
+ <div
485
+ role="option"
486
+ [attr.id]="optionId($index)"
487
+ [attr.aria-selected]="$index === activeIndex()"
488
+ class="as-typeahead-option"
489
+ [class.as-active]="$index === activeIndex()"
490
+ (mouseenter)="setActive($index)"
491
+ (mousemove)="setActive($index)"
492
+ (click)="select($index)"
493
+ >
494
+ @if (optionTemplate) {
495
+ <ng-container *ngTemplateOutlet="optionTemplate; context: { $implicit: items()[$index] }"></ng-container>
496
+ } @else {
497
+ {{ displayWith()(item) }}
498
+ }
499
+ </div>
500
+ }
474
501
 
475
- @if (items().length === 0) {
476
- <div class="as-no-results">No results</div>
477
- }
478
- </div>
479
- `, isInline: true, styles: [":host{display:block}.as-typeahead-panel{min-width:160px;overflow:scroll;background:#fff;border:1px solid rgba(0,0,0,.12);box-shadow:0 4px 10px #0000001f;border-radius:4px;padding:4px 0;box-sizing:border-box}.as-typeahead-option{padding:8px 12px;cursor:pointer;-webkit-user-select:none;user-select:none;color:#222;display:block}.as-typeahead-option.as-active{background:#f1f1f1}.as-no-results{padding:8px 12px;color:#00000080}.as-empty{min-width:120px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
502
+ @if (items().length === 0) {
503
+ <div class="as-no-results">No results</div>
504
+ }
505
+ </div>
506
+ `, isInline: true, styles: [":host{display:block}.as-typeahead-panel{min-width:160px;overflow:scroll;background:#fff;border:1px solid rgba(0,0,0,.12);box-shadow:0 4px 10px #0000001f;border-radius:4px;padding:4px 0;box-sizing:border-box}.as-typeahead-option{padding:8px 12px;cursor:pointer;-webkit-user-select:none;user-select:none;color:#222;display:block}.as-typeahead-option.as-active{background:#f1f1f1}.as-no-results{padding:8px 12px;color:#00000080}.as-empty{min-width:120px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
480
507
  }
481
508
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: TypeaheadPanelComponent, decorators: [{
482
509
  type: Component,
483
510
  args: [{ selector: 'as-typeahead-panel', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: `
484
- <div
485
- class="as-typeahead-panel"
486
- role="listbox"
487
- [attr.id]="id()"
488
- [class.as-empty]="items().length === 0"
489
- [style.max-height.px]="visibleCount() * itemHeight"
490
- >
491
- @for (item of items(); track item.key) {
492
- <div
493
- role="option"
494
- [attr.id]="optionId($index)"
495
- [attr.aria-selected]="$index === activeIndex()"
496
- class="as-typeahead-option"
497
- [class.as-active]="$index === activeIndex()"
498
- (mouseenter)="setActive($index)"
499
- (mousemove)="setActive($index)"
500
- (click)="select($index)"
501
- >
502
- @if (optionTemplate) {
503
- <ng-container
504
- *ngTemplateOutlet="optionTemplate; context: { $implicit: items()[$index] }"
505
- ></ng-container>
506
- }
507
- @else {
508
- {{ displayWith()(item) }}
509
- }
510
- </div>
511
- }
511
+ <div
512
+ class="as-typeahead-panel"
513
+ role="listbox"
514
+ [attr.id]="id()"
515
+ [class.as-empty]="items().length === 0"
516
+ [style.max-height.px]="visibleCount() * itemHeight"
517
+ >
518
+ @for (item of items(); track item.key) {
519
+ <div
520
+ role="option"
521
+ [attr.id]="optionId($index)"
522
+ [attr.aria-selected]="$index === activeIndex()"
523
+ class="as-typeahead-option"
524
+ [class.as-active]="$index === activeIndex()"
525
+ (mouseenter)="setActive($index)"
526
+ (mousemove)="setActive($index)"
527
+ (click)="select($index)"
528
+ >
529
+ @if (optionTemplate) {
530
+ <ng-container *ngTemplateOutlet="optionTemplate; context: { $implicit: items()[$index] }"></ng-container>
531
+ } @else {
532
+ {{ displayWith()(item) }}
533
+ }
534
+ </div>
535
+ }
512
536
 
513
- @if (items().length === 0) {
514
- <div class="as-no-results">No results</div>
515
- }
516
- </div>
517
- `, styles: [":host{display:block}.as-typeahead-panel{min-width:160px;overflow:scroll;background:#fff;border:1px solid rgba(0,0,0,.12);box-shadow:0 4px 10px #0000001f;border-radius:4px;padding:4px 0;box-sizing:border-box}.as-typeahead-option{padding:8px 12px;cursor:pointer;-webkit-user-select:none;user-select:none;color:#222;display:block}.as-typeahead-option.as-active{background:#f1f1f1}.as-no-results{padding:8px 12px;color:#00000080}.as-empty{min-width:120px}\n"] }]
537
+ @if (items().length === 0) {
538
+ <div class="as-no-results">No results</div>
539
+ }
540
+ </div>
541
+ `, styles: [":host{display:block}.as-typeahead-panel{min-width:160px;overflow:scroll;background:#fff;border:1px solid rgba(0,0,0,.12);box-shadow:0 4px 10px #0000001f;border-radius:4px;padding:4px 0;box-sizing:border-box}.as-typeahead-option{padding:8px 12px;cursor:pointer;-webkit-user-select:none;user-select:none;color:#222;display:block}.as-typeahead-option.as-active{background:#f1f1f1}.as-no-results{padding:8px 12px;color:#00000080}.as-empty{min-width:120px}\n"] }]
518
542
  }] });
519
543
 
520
544
  class TypeaheadDirective {
@@ -632,9 +656,7 @@ class TypeaheadDirective {
632
656
  const match = this.findMatch(text);
633
657
  if (this.restrictToList()) {
634
658
  this.commitSelection(match);
635
- this.host.nativeElement.value = match
636
- ? this.displayWith()(match)
637
- : '';
659
+ this.host.nativeElement.value = match ? this.displayWith()(match) : '';
638
660
  }
639
661
  else if (match) {
640
662
  this.commitSelection(match);
@@ -675,7 +697,8 @@ class TypeaheadDirective {
675
697
  }
676
698
  }
677
699
  createOverlay() {
678
- const strategy = this.overlay.position()
700
+ const strategy = this.overlay
701
+ .position()
679
702
  .flexibleConnectedTo(this.host)
680
703
  .withPositions(this.positions())
681
704
  .withPush(true);
@@ -695,9 +718,7 @@ class TypeaheadDirective {
695
718
  const key = q.toLowerCase();
696
719
  const list = this.options() ?? [];
697
720
  const filtered = list.filter(it => {
698
- const target = this.filterBy() === 'key'
699
- ? String(it.key)
700
- : String(it.value);
721
+ const target = this.filterBy() === 'key' ? String(it.key) : String(it.value);
701
722
  return target.toLowerCase().includes(key);
702
723
  });
703
724
  this.open();
@@ -712,9 +733,7 @@ class TypeaheadDirective {
712
733
  }
713
734
  findMatch(text) {
714
735
  const list = this.options() ?? [];
715
- return (list.find(it => this.displayWith()(it) === text) ??
716
- list.find(it => String(it.key) === text) ??
717
- null);
736
+ return list.find(it => this.displayWith()(it) === text) ?? list.find(it => String(it.key) === text) ?? null;
718
737
  }
719
738
  isDisabled() {
720
739
  return this.disabled() || this.cvaDisabled();
@@ -981,14 +1000,28 @@ class AsFlatpickrComponent {
981
1000
  useExisting: forwardRef(() => AsFlatpickrComponent),
982
1001
  multi: true,
983
1002
  },
984
- ], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["input"], descendants: true, static: true }], ngImport: i0, template: `<input #input type="text" [attr.placeholder]="placeholder()" [ngClass]="elementClass()" [autocomplete]="autocomplete()" [id]="id()"/>`, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
1003
+ ], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["input"], descendants: true, static: true }], ngImport: i0, template: `<input
1004
+ #input
1005
+ type="text"
1006
+ [attr.placeholder]="placeholder()"
1007
+ [ngClass]="elementClass()"
1008
+ [autocomplete]="autocomplete()"
1009
+ [id]="id()"
1010
+ />`, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
985
1011
  }
986
1012
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: AsFlatpickrComponent, decorators: [{
987
1013
  type: Component,
988
1014
  args: [{
989
1015
  selector: 'as-flatpickr',
990
1016
  standalone: true,
991
- template: `<input #input type="text" [attr.placeholder]="placeholder()" [ngClass]="elementClass()" [autocomplete]="autocomplete()" [id]="id()"/>`,
1017
+ template: `<input
1018
+ #input
1019
+ type="text"
1020
+ [attr.placeholder]="placeholder()"
1021
+ [ngClass]="elementClass()"
1022
+ [autocomplete]="autocomplete()"
1023
+ [id]="id()"
1024
+ />`,
992
1025
  providers: [
993
1026
  {
994
1027
  provide: NG_VALUE_ACCESSOR,
@@ -1 +1 @@
1
- {"version":3,"file":"agentsmith.bgd-as-components.mjs","sources":["../../../projects/as-components/src/lib/as-components.ts","../../../projects/as-components/src/lib/modal-container/modal-container.component.ts","../../../projects/as-components/src/lib/modal-container/modal-container.component.html","../../../projects/as-components/src/lib/modal-container/base-modal.component.ts","../../../projects/as-components/src/lib/services/modal-ref.ts","../../../projects/as-components/src/lib/services/modal.service.ts","../../../projects/as-components/src/lib/tooltip/tooltip.component.ts","../../../projects/as-components/src/lib/tooltip/tooltip.directive.ts","../../../projects/as-components/src/lib/typeahead/typeahead-panel.component.ts","../../../projects/as-components/src/lib/typeahead/typeahead.directive.ts","../../../projects/as-components/src/lib/datepicker/as-flatpickr.component.ts","../../../projects/as-components/src/public-api.ts","../../../projects/as-components/src/agentsmith.bgd-as-components.ts"],"sourcesContent":["import { Component } from '@angular/core';\n\n@Component({\n selector: 'lib-as-components',\n imports: [],\n template: `\n <p>\n as-components works!\n </p>\n `,\n styles: ``,\n})\nexport class AsComponents {\n\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n output,\n signal,\n Type,\n ViewChild,\n ViewContainerRef, ViewEncapsulation\n} from '@angular/core';\nimport {CommonModule} from '@angular/common';\n\nexport interface ResultPayload {\n action: string,\n payload?: unknown\n}\n\n@Component({\n selector: 'as-modal-container',\n templateUrl: 'modal-container.component.html',\n styleUrl: 'modal-container.component.scss',\n imports: [CommonModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class ModalContainerComponent {\n @ViewChild('contentHost', {read: ViewContainerRef, static: true}) contentHost!: ViewContainerRef;\n\n // signal-based inputs\n title = signal<string | undefined>(undefined);\n size = signal<'sm' | 'md' | 'lg'>('md');\n showClose = signal<boolean>(true);\n\n closed = output<ResultPayload | undefined>();\n\n get sizeClass() {\n return this.size(); // template uses size() directly; keep helper for compatibility if needed\n }\n\n /**\n * Create a component inside the container and set inputs.\n * Supports:\n * - assigning to writable signals (calls `.set(...)`)\n * - assigning to plain properties\n * Also handles primitive `inputs` mapping to common names.\n */\n loadComponent<T>(component: Type<T>, inputs?: Partial<T> | any): ComponentRef<T> {\n const compRef = this.contentHost.createComponent<T>(component);\n\n /* 🟡 PRIME every signal (factory → real signal) */\n const inst = compRef.instance as Record<string, any>;\n for (const key in inst) {\n const prop = inst[key];\n //console.log('prop check', { key, prop, typeofProp: typeof prop });\n if (typeof prop === 'function') {\n // **real consumer read** → forces input() to become WritableSignal\n const value = prop(); // ← Angular input() **must** be called\n //console.log('>>> primed', { key, value, constructor: prop?.constructor?.name, proto: Object.prototype.toString.call(prop) });\n }\n }\n\n for (const key in inst) {\n const prop = inst[key];\n if (typeof prop === 'function' && prop.length === 0) {\n // cheap check: call once (forces input() to become WritableSignal)\n prop();\n }\n }\n\n if (inputs !== undefined && inputs !== null) {\n if (typeof inputs === 'object' && !Array.isArray(inputs)) {\n for (const key of Object.keys(inputs)) {\n const prop = (compRef.instance as any)[key];\n // console.log('>>> setInput dump', {\n // key,\n // prop,\n // typeofProp: typeof prop,\n // isFunction: typeof prop === 'function',\n // hasSet: prop?.set !== undefined,\n // constructor: prop?.constructor?.name,\n // proto: Object.prototype.toString.call(prop)\n // });\n this.setInput(compRef.instance as any, key, (inputs as any)[key], compRef);\n }\n } else {\n // primitive mapping\n // const inst = compRef.instance as any;\n const inst = compRef as any;\n if ('message' in inst) this.setInput(inst, 'message', inputs, compRef);\n else if ('data' in inst) this.setInput(inst, 'data', inputs, compRef);\n else this.setInput(inst, 'value', inputs, compRef);\n }\n\n // ensure rendering for OnPush / signal changes\n compRef.changeDetectorRef?.detectChanges();\n }\n\n return compRef;\n }\n\n private setInput(targetInstance: any, key: string, value: any, compRef: ComponentRef<any>) {\n const before = targetInstance[key];\n //console.log('>>> inside setInput BEFORE', key, before);\n const target = targetInstance[key];\n\n if (typeof target === 'function' && 'set' in target && typeof target.set === 'function') {\n // ✅ writable signal\n target.set(value);\n //console.log(`setInput: signal .set() called for ${key}`, targetInstance[key]);\n } else if (typeof target === 'function') {\n // 🔹 signal is readonly → cannot set\n compRef.setInput(key, value);\n //console.log(`setInput: target ${key} is a readonly signal!`, targetInstance[key]);\n } else {\n // fallback for raw primitive (optional)\n targetInstance[key] = value;\n //console.log(`setInput: raw assign for ${key}`, targetInstance[key]);\n }\n }\n\n backdropClick() {\n this.close();\n }\n\n close(result?: ResultPayload) {\n this.closed.emit(result);\n }\n}\n","\n <div class=\"as-modal-backdrop\" (click)=\"backdropClick()\"></div>\n <div class=\"as-modal\" [ngClass]=\"size()\" role=\"dialog\" aria-modal=\"true\">\n @if (title() || showClose()) {\n <div class=\"as-modal-header\">\n <h3 class=\"as-modal-title\">{{ title() }}</h3>\n @if (showClose()) {\n <button class=\"btn-close close pull-right\" type=\"button\" (click)=\"backdropClick()\"></button>\n }\n </div>\n }\n <div class=\"as-modal-body\">\n <ng-template #contentHost></ng-template>\n </div>\n </div>\n","import {Directive, EventEmitter, output} from '@angular/core';\nimport {ResultPayload} from './modal-container.component';\n\n@Directive()\nexport abstract class BaseModalComponent {\n readonly onClose = output<ResultPayload | undefined>();\n\n protected sendEvent(result: ResultPayload | undefined = undefined) {\n this.onClose.emit(result);\n }\n}\n","// TypeScript\nimport { ComponentRef } from '@angular/core';\nimport { Subject, Observable } from 'rxjs';\n\nexport class ModalRef {\n private _onClose = new Subject<any>();\n onClose: Observable<any> = this._onClose.asObservable();\n\n constructor(private componentRef: ComponentRef<any>, private hostElement: HTMLElement) {}\n\n close(result?: any) {\n this._onClose.next(result);\n this._onClose.complete();\n this.destroy();\n }\n\n private destroy() {\n try {\n if (this.componentRef) {\n this.componentRef.destroy();\n }\n } finally {\n if (this.hostElement && this.hostElement.parentNode) {\n this.hostElement.parentNode.removeChild(this.hostElement);\n }\n }\n }\n}\n","// TypeScript\nimport {\n Injectable,\n ApplicationRef,\n Injector,\n Type,\n ComponentRef,\n createComponent,\n EnvironmentInjector,\n isSignal, WritableSignal\n} from '@angular/core';\nimport { ModalRef } from './modal-ref';\nimport {ModalContainerComponent, ResultPayload} from '../modal-container/modal-container.component';\n\nexport interface ModalConfig {\n id?: string;\n size?: 'sm' | 'md' | 'lg';\n title?: string;\n showClose?: boolean;\n data?: any;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ModalService {\n constructor(\n private injector: Injector,\n private appRef: ApplicationRef,\n private envInjector: EnvironmentInjector\n ) {}\n\n show<T>(component: Type<T>, config: ModalConfig = {}): ModalRef {\n const hostEl = document.createElement('div');\n document.body.appendChild(hostEl);\n\n const compRef: ComponentRef<ModalContainerComponent> = createComponent(ModalContainerComponent, {\n environmentInjector: this.envInjector\n });\n\n // set container inputs using signal-aware helper\n this.setInput(compRef.instance as any, 'title', config.title);\n this.setInput(compRef.instance as any, 'size', config.size ?? 'md');\n this.setInput(compRef.instance as any, 'showClose', config.showClose !== false);\n\n this.appRef.attachView(compRef.hostView);\n hostEl.appendChild((compRef.hostView as any).rootNodes[0] as HTMLElement);\n\n // the container's loadComponent handles assigning inputs (including signals) to the child\n const childRef: ComponentRef<T> = compRef.instance.loadComponent(component, config.data);\n\n const modalRef = new ModalRef(compRef as any, hostEl);\n\n compRef.instance.closed.subscribe((result: ResultPayload | undefined) => {\n modalRef.close(result);\n });\n\n const maybeEmitter = (childRef.instance as any).onClose;\n if (maybeEmitter && typeof maybeEmitter.subscribe === 'function') {\n maybeEmitter.subscribe((res: any) => modalRef.close(res));\n }\n\n return modalRef;\n }\n\n private setInput(targetInstance: any, key: string, value: any) {\n const target = targetInstance[key];\n if (typeof target === 'function' && target && 'set' in target && typeof (target as any).set === 'function') {\n (target as any).set(value);\n } else {\n targetInstance[key] = value;\n }\n }\n private isWritableSignal<T>(s: unknown): s is WritableSignal<T> {\n return isSignal(s) && typeof (s as WritableSignal<T>).set === 'function';\n }\n}\n","\nimport { Component, signal, WritableSignal, ChangeDetectionStrategy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'as-tooltip',\n standalone: true,\n imports: [CommonModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div\n class=\"as-tooltip\"\n [class.as-placement-top]=\"placement() === 'bottom'\"\n [class.as-placement-bottom]=\"placement() === 'top'\"\n [class.as-placement-left]=\"placement() === 'right'\"\n [class.as-placement-right]=\"placement() === 'left'\"\n [attr.id]=\"id()\"\n role=\"tooltip\"\n [attr.aria-hidden]=\"!text()\"\n >\n {{ text() }}\n <span class=\"as-tooltip-arrow\" aria-hidden=\"true\"></span>\n </div>\n `,\n styles: [\n `\n :host { display: block; }\n\n .as-tooltip {\n position: relative;\n display: inline-block;\n background: rgba(97, 97, 97, 0.95);\n color: #fff;\n padding: 6px 10px;\n border-radius: 4px;\n font-size: 12px;\n max-width: 240px;\n box-shadow: 0 2px 10px rgba(0,0,0,0.2);\n line-height: 1.2;\n }\n\n /* Arrow base: zero-sized element using borders to form a triangle */\n .as-tooltip-arrow {\n position: absolute;\n width: 0;\n height: 0;\n }\n\n /* Bottom placement: tooltip sits above origin, arrow points downwards (at bottom of tooltip) */\n .as-placement-bottom .as-tooltip-arrow {\n left: 50%;\n transform: translateX(-50%);\n top: 100%;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-top: 6px solid rgba(97, 97, 97, 0.95);\n }\n\n /* Top placement: tooltip sits below origin, arrow points upwards (at top of tooltip) */\n .as-placement-top .as-tooltip-arrow {\n left: 50%;\n transform: translateX(-50%);\n bottom: 100%;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-bottom: 6px solid rgba(97, 97, 97, 0.95);\n }\n\n /* Left placement: tooltip sits to the right of origin, arrow points left (at left edge) */\n .as-placement-left .as-tooltip-arrow {\n top: 50%;\n transform: translateY(-50%);\n right: 100%;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-right: 6px solid rgba(97, 97, 97, 0.95);\n }\n\n /* Right placement: tooltip sits to the left of origin, arrow points right (at right edge) */\n .as-placement-right .as-tooltip-arrow {\n top: 50%;\n transform: translateY(-50%);\n left: 100%;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-left: 6px solid rgba(97, 97, 97, 0.95);\n }\n `\n ]\n})\nexport class TooltipComponent {\n readonly id: WritableSignal<string> = signal(`as-tooltip-${Math.random().toString(36).slice(2, 9)}`);\n\n // Writable text so directive can update via `.set(...)`\n readonly text: WritableSignal<string | null> = signal<string | null>(null);\n\n // Placement signal — set by directive to switch arrow orientation\n readonly placement: WritableSignal<'top' | 'bottom' | 'left' | 'right'> =\n signal<'top' | 'bottom' | 'left' | 'right'>('bottom');\n}\n","import {\n Directive,\n ElementRef,\n HostListener,\n inject,\n input,\n signal,\n computed,\n OnDestroy,\n WritableSignal,\n Injector\n} from '@angular/core';\nimport { Overlay, OverlayRef, FlexibleConnectedPositionStrategy, ConnectedPosition } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { Subscription } from 'rxjs';\nimport { TooltipComponent } from './tooltip.component';\n\n@Directive({\n selector: '[asTooltip]',\n standalone: true,\n})\nexport class TooltipDirective implements OnDestroy {\n private readonly overlay = inject(Overlay);\n private readonly injector = inject(Injector);\n private readonly host = inject(ElementRef<HTMLElement>);\n\n readonly asTooltip = input<string | null>(null);\n readonly asTooltipPlacement= input<'top' | 'bottom' | 'left' | 'right' | 'auto'>('auto');\n\n private overlayRef: OverlayRef | null = null;\n private strategy: FlexibleConnectedPositionStrategy | null = null;\n private posSub: Subscription | null = null;\n\n private readonly positions = computed(() => this.buildPositions(this.asTooltipPlacement()));\n\n @HostListener('mouseenter')\n show(): void {\n const text = this.asTooltip();\n if (!text) return;\n\n if (!this.overlayRef) {\n this.createOverlay();\n }\n\n if (!this.overlayRef!.hasAttached()) {\n const portal = new ComponentPortal(TooltipComponent);\n const compRef = this.overlayRef!.attach(portal);\n\n compRef.instance.text.set(text);\n\n // set aria-describedby\n const id = compRef.instance.id();\n this.host.nativeElement.setAttribute('aria-describedby', id);\n\n // subscribe to CDK's chosen position and write to tooltip placement signal\n if (this.strategy && !this.posSub) {\n this.posSub = this.strategy.positionChanges.subscribe((change: any) => {\n // `change` may contain different property names across CDK versions;\n // try common locations for the resolved connected position.\n const pos: ConnectedPosition | undefined =\n change?.connectionPair ?? change?.connectedPosition ?? change?.lastConnectedPosition ?? change;\n\n if (pos) {\n const placement = this.mapPositionToPlacement(pos);\n compRef.instance.placement.set(placement);\n }\n });\n }\n\n // initial placement hint: map the first position we provided\n const initial = this.positions()[0];\n compRef.instance.placement.set(this.mapPositionToPlacement(initial));\n\n this.overlayRef!.updatePosition();\n }\n }\n\n @HostListener('mouseleave')\n hide(): void {\n this.detachOverlay();\n }\n\n ngOnDestroy(): void {\n this.detachOverlay(true);\n }\n\n private createOverlay(): void {\n const strategy = this.overlay.position()\n .flexibleConnectedTo(this.host)\n .withPositions(this.positions())\n .withPush(true) as FlexibleConnectedPositionStrategy;\n\n // store strategy so we can watch positionChanges\n this.strategy = strategy;\n\n strategy.withDefaultOffsetY(8);\n strategy.withDefaultOffsetX(8);\n\n this.overlayRef = this.overlay.create({\n positionStrategy: strategy,\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n panelClass: 'as-tooltip-panel',\n hasBackdrop: false,\n });\n }\n\n private detachOverlay(dispose = false): void {\n if (!this.overlayRef) return;\n\n if (this.overlayRef.hasAttached()) {\n const hostEl = this.host.nativeElement;\n if (hostEl.getAttribute('aria-describedby')) {\n hostEl.removeAttribute('aria-describedby');\n }\n }\n\n this.overlayRef.detach();\n\n if (this.posSub) {\n this.posSub.unsubscribe();\n this.posSub = null;\n }\n\n if (dispose) {\n this.overlayRef.dispose();\n this.overlayRef = null;\n this.strategy = null;\n }\n }\n\n private buildPositions(preferred: 'top' | 'bottom' | 'left' | 'right' | 'auto'): ConnectedPosition[] {\n const top: ConnectedPosition = {\n originX: 'center', originY: 'top',\n overlayX: 'center', overlayY: 'bottom',\n offsetY: -8\n };\n const bottom: ConnectedPosition = {\n originX: 'center', originY: 'bottom',\n overlayX: 'center', overlayY: 'top',\n offsetY: 8\n };\n const left: ConnectedPosition = {\n originX: 'start', originY: 'center',\n overlayX: 'end', overlayY: 'center',\n offsetX: -8\n };\n const right: ConnectedPosition = {\n originX: 'end', originY: 'center',\n overlayX: 'start', overlayY: 'center',\n offsetX: 8\n };\n\n if (preferred === 'auto') {\n return [bottom, top, right, left];\n }\n\n switch (preferred) {\n case 'top': return [top, bottom, right, left];\n case 'bottom': return [bottom, top, right, left];\n case 'left': return [left, right, bottom, top];\n case 'right': return [right, left, bottom, top];\n default: return [bottom, top, right, left];\n }\n }\n\n private mapPositionToPlacement(pos: ConnectedPosition): 'top' | 'bottom' | 'left' | 'right' {\n // Determine placement by comparing origin/overlay alignment used by CDK\n if (pos.originY === 'top' && pos.overlayY === 'bottom') return 'top';\n if (pos.originY === 'bottom' && pos.overlayY === 'top') return 'bottom';\n if (pos.originX === 'start' && pos.overlayX === 'end') return 'left';\n if (pos.originX === 'end' && pos.overlayX === 'start') return 'right';\n // fallback\n return 'bottom';\n }\n}\n","// typescript\nimport { Component, signal, WritableSignal, ChangeDetectionStrategy, TemplateRef } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nexport interface Option {\n key: string;\n value: string;\n}\n\n@Component({\n selector: 'as-typeahead-panel',\n standalone: true,\n imports: [CommonModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div\n class=\"as-typeahead-panel\"\n role=\"listbox\"\n [attr.id]=\"id()\"\n [class.as-empty]=\"items().length === 0\"\n [style.max-height.px]=\"visibleCount() * itemHeight\"\n >\n @for (item of items(); track item.key) {\n <div\n role=\"option\"\n [attr.id]=\"optionId($index)\"\n [attr.aria-selected]=\"$index === activeIndex()\"\n class=\"as-typeahead-option\"\n [class.as-active]=\"$index === activeIndex()\"\n (mouseenter)=\"setActive($index)\"\n (mousemove)=\"setActive($index)\"\n (click)=\"select($index)\"\n >\n @if (optionTemplate) {\n <ng-container\n *ngTemplateOutlet=\"optionTemplate; context: { $implicit: items()[$index] }\"\n ></ng-container>\n }\n @else {\n {{ displayWith()(item) }}\n }\n </div>\n }\n\n @if (items().length === 0) {\n <div class=\"as-no-results\">No results</div>\n }\n </div>\n `,\n styles: [\n `\n :host { display:block; }\n .as-typeahead-panel {\n min-width: 160px;\n overflow: scroll;\n background: #fff;\n border: 1px solid rgba(0,0,0,0.12);\n box-shadow: 0 4px 10px rgba(0,0,0,0.12);\n border-radius: 4px;\n padding: 4px 0;\n box-sizing: border-box;\n }\n .as-typeahead-option {\n padding: 8px 12px;\n cursor: pointer;\n user-select: none;\n color: #222;\n display: block;\n }\n .as-typeahead-option.as-active {\n background: #f1f1f1;\n }\n .as-no-results {\n padding: 8px 12px;\n color: rgba(0,0,0,0.5);\n }\n .as-empty { min-width: 120px; }\n `\n ]\n})\nexport class TypeaheadPanelComponent {\n readonly id: WritableSignal<string> = signal(`as-typeahead-panel-${Math.random().toString(36).slice(2,9)}`);\n\n readonly items: WritableSignal<Option[]> = signal<Option[]>([]);\n // default shows the `value` field\n readonly displayWith: WritableSignal<(item: Option) => string> =\n signal<(item: Option) => string>((i: Option) => String(i?.value ?? ''));\n\n readonly activeIndex: WritableSignal<number | null> = signal<number | null>(null);\n\n // visual config: how many items visible before scrollbar (set by directive)\n readonly visibleCount: WritableSignal<number> = signal<number>(5);\n readonly itemHeight = 40; // px - used to compute maxHeight\n\n // optional custom template & callback (set by directive)\n optionTemplate: TemplateRef<any> | null = null;\n onSelect: ((item: Option) => void) | null = null;\n\n optionId(i: number) {\n return `${this.id()}-option-${i}`;\n }\n\n setActive(i: number | null) {\n this.activeIndex.set(i);\n }\n\n select(i: number) {\n const items = this.items();\n if (i == null || i < 0 || i >= items.length) return;\n const item = items[i];\n if (this.onSelect) this.onSelect(item);\n }\n}\n","import {\n Directive,\n ElementRef,\n HostListener,\n inject,\n input,\n signal,\n computed,\n OnDestroy,\n TemplateRef,\n ViewContainerRef,\n effect,\n output,\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n NG_VALUE_ACCESSOR,\n} from '@angular/forms';\nimport {\n Overlay,\n OverlayRef,\n FlexibleConnectedPositionStrategy,\n ConnectedPosition,\n} from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { TypeaheadPanelComponent, Option } from './typeahead-panel.component';\n\n@Directive({\n selector: '[asTypeahead]',\n standalone: true,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: TypeaheadDirective,\n multi: true,\n },\n ],\n})\nexport class TypeaheadDirective\n implements ControlValueAccessor, OnDestroy {\n\n /* ---------------- injections ---------------- */\n private readonly overlay = inject(Overlay);\n private readonly host = inject(ElementRef<HTMLInputElement>);\n private readonly vcr = inject(ViewContainerRef);\n\n /* ---------------- inputs ---------------- */\n readonly options = input<Option[] | null>(null);\n readonly displayWith = input<(item: Option) => string>(\n (it: Option) => String(it?.value ?? '')\n );\n readonly filterBy = input<'key' | 'value'>('value');\n readonly visibleCount = input<number>(5);\n readonly restrictToList = input<boolean>(false);\n readonly asTypeaheadTemplate = input<TemplateRef<any> | null>(null);\n readonly disabled = input<boolean>(false);\n readonly enableLog = input<boolean>(false);\n\n /* ---------------- outputs ---------------- */\n readonly typeaheadOnSelect = output<Option | null>();\n\n /* ---------------- internal ---------------- */\n private readonly cvaDisabled = signal(false);\n private readonly selected = signal<Option | null>(null);\n\n private overlayRef: OverlayRef | null = null;\n private panel: TypeaheadPanelComponent | null = null;\n private destroyed = false;\n\n private onChange: (value: any) => void = () => {};\n private onTouched: () => void = () => {};\n\n private readonly positions = computed(() => this.buildPositions());\n\n constructor() {\n\n /* sync initial value -> input text */\n effect(() => {\n const sel = this.selected();\n if (!sel) {\n return;\n }\n this.log('init select value', sel.key, sel.value)\n this.host.nativeElement.value = this.displayWith()(sel);\n });\n }\n\n /* ---------------- CVA ---------------- */\n writeValue(value: any): void {\n if (value == null) {\n this.setInternalSelection(null);\n this.host.nativeElement.value = '';\n return;\n }\n\n const match = this.options()?.find(o => o.key === value) ?? null;\n this.setInternalSelection(match);\n\n if (match) {\n this.host.nativeElement.value = this.displayWith()(match);\n } else {\n this.host.nativeElement.value = String(value);\n }\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.log('component disabled', isDisabled)\n this.cvaDisabled.set(isDisabled);\n }\n\n ngOnDestroy(): void {\n this.destroyed = true;\n this.detach(true);\n }\n\n /* ---------------- host events ---------------- */\n @HostListener('focus')\n @HostListener('click')\n onFocus() {\n if (this.isDisabled()) return;\n this.open();\n this.showAll();\n }\n\n @HostListener('input', ['$event'])\n onInput(e: Event) {\n if (this.isDisabled()) return;\n const value = (e.target as HTMLInputElement).value;\n value ? this.filter(value) : this.showAll();\n }\n\n @HostListener('keydown', ['$event'])\n onKeydown(e: KeyboardEvent) {\n if (this.isDisabled() || !this.panel) return;\n\n const items = this.panel.items();\n if (!items.length) return;\n\n let idx = this.panel.activeIndex();\n\n switch (e.key) {\n case 'ArrowDown':\n e.preventDefault();\n idx = idx == null ? 0 : Math.min(items.length - 1, idx + 1);\n this.panel.setActive(idx);\n break;\n\n case 'ArrowUp':\n e.preventDefault();\n idx = idx == null ? items.length - 1 : Math.max(0, idx - 1);\n this.panel.setActive(idx);\n break;\n\n case 'Enter':\n e.preventDefault();\n if (idx != null) this.panel.select(idx);\n break;\n\n case 'Escape':\n this.close();\n break;\n }\n }\n\n @HostListener('blur')\n onBlur() {\n setTimeout(() => {\n if (this.destroyed) return;\n\n const text = this.host.nativeElement.value;\n const match = this.findMatch(text);\n\n if (this.restrictToList()) {\n this.commitSelection(match);\n this.host.nativeElement.value = match\n ? this.displayWith()(match)\n : '';\n } else if (match) {\n this.commitSelection(match);\n } else {\n this.commitSelection(null);\n }\n\n this.onTouched();\n this.close();\n }, 150);\n }\n\n /* ---------------- overlay ---------------- */\n private open() {\n if (!this.overlayRef) this.createOverlay();\n if (!this.overlayRef!.hasAttached()) {\n const portal = new ComponentPortal(TypeaheadPanelComponent, this.vcr);\n const ref = this.overlayRef!.attach(portal);\n this.panel = ref.instance;\n\n this.panel.displayWith.set(this.displayWith());\n this.panel.optionTemplate = this.asTypeaheadTemplate();\n this.panel.visibleCount.set(this.visibleCount());\n this.panel.onSelect = (it: Option) => this.select(it);\n }\n }\n\n private close() {\n this.detach();\n }\n\n private detach(dispose = false) {\n if (!this.overlayRef) return;\n if (this.overlayRef.hasAttached()) this.overlayRef.detach();\n if (dispose) {\n this.overlayRef.dispose();\n this.overlayRef = null;\n this.panel = null;\n }\n }\n\n private createOverlay() {\n const strategy = this.overlay.position()\n .flexibleConnectedTo(this.host)\n .withPositions(this.positions())\n .withPush(true) as FlexibleConnectedPositionStrategy;\n\n strategy.withDefaultOffsetY(4);\n\n this.overlayRef = this.overlay.create({\n positionStrategy: strategy,\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n });\n }\n\n /* ---------------- helpers ---------------- */\n private showAll() {\n this.open();\n this.panel?.items.set(this.options() ?? []);\n this.panel?.setActive(null);\n }\n\n private filter(q: string) {\n const key = q.toLowerCase();\n const list = this.options() ?? [];\n const filtered = list.filter(it => {\n const target =\n this.filterBy() === 'key'\n ? String(it.key)\n : String(it.value);\n return target.toLowerCase().includes(key);\n });\n\n this.open();\n this.panel?.items.set(filtered);\n this.panel?.setActive(filtered.length ? 0 : null);\n }\n\n private select(item: Option) {\n this.commitSelection(item);\n this.host.nativeElement.value = this.displayWith()(item);\n this.close();\n this.host.nativeElement.focus();\n }\n\n private findMatch(text: string): Option | null {\n const list = this.options() ?? [];\n return (\n list.find(it => this.displayWith()(it) === text) ??\n list.find(it => String(it.key) === text) ??\n null\n );\n }\n\n private isDisabled(): boolean {\n return this.disabled() || this.cvaDisabled();\n }\n\n private buildPositions(): ConnectedPosition[] {\n return [\n {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'top',\n offsetY: 4,\n },\n {\n originX: 'start',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'bottom',\n offsetY: -4,\n },\n ];\n }\n\n private commitSelection(sel: Option | null) {\n this.selected.set(sel);\n this.log('Set value and emit', sel)\n\n // CVA\n this.onChange(sel?.key ?? null);\n\n // OUTPUT\n this.typeaheadOnSelect.emit(sel);\n }\n\n private setInternalSelection(sel: Option | null) {\n this.log('Set value only', sel)\n this.selected.set(sel);\n }\n\n log(value: any, ...rest: any[]): void {\n if (this.enableLog() || localStorage.getItem('loggerEnable')) {\n console.log('%c DEBUG ', 'background: gray; color: white; font-weight: bold;', `AS typeahead -> ${value}`, ...rest);\n }\n }\n\n}\n","import {\n Component,\n ElementRef,\n ViewChild,\n AfterViewInit,\n effect,\n input,\n output,\n signal,\n NgZone,\n OnDestroy,\n forwardRef,\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n NG_VALUE_ACCESSOR,\n} from '@angular/forms';\n\nimport flatpickr from 'flatpickr';\nimport 'flatpickr/dist/flatpickr.css';\nimport { NgClass } from '@angular/common';\n\nimport { FlatpickrValue, FlatpickrMode, FlatpickrDateFormat } from './flatpickr.types';\n\n@Component({\n selector: 'as-flatpickr',\n standalone: true,\n template: `<input #input type=\"text\" [attr.placeholder]=\"placeholder()\" [ngClass]=\"elementClass()\" [autocomplete]=\"autocomplete()\" [id]=\"id()\"/>`,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AsFlatpickrComponent),\n multi: true,\n },\n ],\n imports: [NgClass],\n})\nexport class AsFlatpickrComponent implements ControlValueAccessor, AfterViewInit, OnDestroy {\n /* ---------------- Inputs ---------------- */\n mode = input<FlatpickrMode>('single');\n enableTime = input(false);\n timeOnly = input(false);\n placeholder = input<string | null>(null);\n id = input<string | null>(null);\n dateFormat = input<FlatpickrDateFormat>('Y-m-d');\n elementClass = input<string>('form-control form-icon-calendar');\n time24h = input(true);\n autocomplete = input<'on' | 'off'>('off');\n\n /* External value (string-based now) */\n value = input<FlatpickrValue>(null);\n valueChange = output<FlatpickrValue>();\n\n /* ---------------- Internals ---------------- */\n @ViewChild('input', { static: true }) private inputEl!: ElementRef<HTMLInputElement>;\n private fp: flatpickr.Instance | null = null;\n\n private onChange: (value: FlatpickrValue) => void = () => {};\n private onTouched: () => void = () => {};\n private disabled = false;\n\n constructor(private zone: NgZone) {\n /* ---------------- Signal effect for syncing value ---------------- */\n effect(() => {\n const val = this.value();\n if (!this.fp) return;\n\n this.zone.runOutsideAngular(() => {\n const displayFormat = this.getDisplayFormat();\n if (Array.isArray(val)) {\n const dates = val.map(v => flatpickr.parseDate(v, displayFormat));\n this.fp!.setDate(dates as Date[], false);\n } else if (val) {\n const date = flatpickr.parseDate(val, displayFormat);\n this.fp!.setDate(date ?? [], false);\n } else {\n this.fp!.clear();\n }\n });\n });\n }\n\n private handleOpen = () => {\n if (this.disabled) {\n this.fp?.close();\n }\n };\n\n /* ---------------- Initialize Flatpickr ---------------- */\n ngAfterViewInit() {\n this.zone.runOutsideAngular(() => {\n this.fp = flatpickr(this.inputEl.nativeElement, {\n mode: this.mode(),\n enableTime: this.enableTime() || this.timeOnly(),\n noCalendar: this.timeOnly(),\n allowInput: true,\n time_24hr: this.time24h(),\n dateFormat: this.getDisplayFormat(),\n onOpen: this.handleOpen,\n onChange: (dates, _str, instance) => this.handleChange(dates, instance),\n onClose: () => this.zone.run(() => this.onTouched()),\n });\n\n // Manual validation for typed input\n this.inputEl.nativeElement.addEventListener('blur', () => {\n const typedValue = this.inputEl.nativeElement.value;\n const parsed = this.parseTypedValue(typedValue);\n\n this.zone.run(() => {\n if (parsed === null) {\n this.onChange(null);\n } else {\n this.onChange(parsed);\n }\n });\n });\n });\n }\n\n /* ---------------- CVA Implementation ---------------- */\n writeValue(value: FlatpickrValue): void {\n if (!this.fp) return;\n const displayFormat = this.getDisplayFormat();\n if (Array.isArray(value)) {\n const dates = value.map(v => flatpickr.parseDate(v, displayFormat));\n this.fp.setDate(dates as Date[], false);\n } else if (value) {\n const date = flatpickr.parseDate(value, displayFormat);\n this.fp.setDate(date ?? [], false);\n } else {\n this.fp.clear();\n }\n }\n\n registerOnChange(fn: (value: FlatpickrValue) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(disabled: boolean): void {\n this.disabled = disabled;\n if (this.inputEl) this.inputEl.nativeElement.disabled = disabled;\n }\n\n /* ---------------- Handle Flatpickr changes ---------------- */\n private handleChange(dates: Date[], instance: flatpickr.Instance) {\n const format = this.dateFormat() ?? this.getDefaultDateFormat();\n let value: FlatpickrValue = null;\n\n if (this.mode() === 'range') {\n if (dates.length === 2) {\n value = dates.map(d => flatpickr.formatDate(d, format)) as [string, string];\n }\n } else if (dates[0]) {\n if (this.enableTime() || this.timeOnly()) {\n const timeFormat = this.time24h() ? 'H:i' : 'h:i K';\n value = flatpickr.formatDate(dates[0], `${format} ${timeFormat}`);\n } else {\n value = flatpickr.formatDate(dates[0], format);\n }\n\n // ✅ REMOVE automatic close here\n // instance.close();\n }\n\n this.zone.run(() => {\n this.onChange(value);\n this.valueChange.emit(value);\n });\n }\n\n /* ---------------- Typed input parsing ---------------- */\n private parseTypedValue(inputValue: string): FlatpickrValue {\n try {\n const displayFormat = this.getDisplayFormat();\n if (!inputValue) return null;\n\n if (this.mode() === 'range') {\n const parts = inputValue.split(' to ').map(s => s.trim());\n if (parts.length !== 2) return null;\n\n const start = flatpickr.parseDate(parts[0], displayFormat);\n const end = flatpickr.parseDate(parts[1], displayFormat);\n if (!start || !end || start > end) return null;\n\n return [flatpickr.formatDate(start, displayFormat), flatpickr.formatDate(end, displayFormat)];\n } else {\n const parsed = flatpickr.parseDate(inputValue, displayFormat);\n return parsed ? flatpickr.formatDate(parsed, displayFormat) : null;\n }\n } catch {\n return null;\n }\n }\n\n /* ---------------- Format helpers ---------------- */\n private getDefaultDateFormat(): string {\n if (this.timeOnly()) return 'H:i';\n if (this.enableTime()) return 'Y-m-d';\n return 'Y-m-d';\n }\n\n /** Combine dateFormat + optional time for display/input */\n private getDisplayFormat(): string {\n if (this.timeOnly()) {\n return this.time24h() ? 'H:i' : 'h:i K'; // time only\n }\n const baseFormat = this.dateFormat() ?? 'Y-m-d';\n if (this.enableTime()) {\n const timeFormat = this.time24h() ? 'H:i' : 'h:i K';\n return `${baseFormat} ${timeFormat}`; // date + time\n }\n return baseFormat; // date only\n }\n\n /* ---------------- Cleanup ---------------- */\n ngOnDestroy() {\n this.fp?.destroy();\n this.fp = null;\n }\n}\n","/*\n * Public API Surface of as-components\n */\n\nexport * from './lib/as-components';\nexport * from './lib/modal-container/modal-container.component';\nexport * from './lib/modal-container/base-modal.component';\nexport * from './lib/services/modal-ref';\nexport * from './lib/services/modal.service';\nexport * from './lib/tooltip/tooltip.directive';\nexport * from './lib/tooltip/tooltip.component';\nexport * from './lib/typeahead/typeahead.directive';\nexport * from './lib/typeahead/typeahead-panel.component';\nexport * from './lib/datepicker/as-flatpickr.component';\nexport * from './lib/datepicker/flatpickr.types';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;MAYa,YAAY,CAAA;uGAAZ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAZ,IAAA,OAAA,IAAA,GAAA,EAAA,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AAE,UAAU,CAAC,0BAA0B,CAAC;AACnD,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA;oBACD,OAAO,EAAE,CAAC,OAAO,CAAC;AACnB,iBAAA;;sBAkBE,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,OAAO,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;;ACtDtC;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"agentsmith.bgd-as-components.mjs","sources":["../../../projects/as-components/src/lib/as-components.ts","../../../projects/as-components/src/lib/modal-container/modal-container.component.ts","../../../projects/as-components/src/lib/modal-container/modal-container.component.html","../../../projects/as-components/src/lib/modal-container/base-modal.component.ts","../../../projects/as-components/src/lib/services/modal-ref.ts","../../../projects/as-components/src/lib/services/modal.service.ts","../../../projects/as-components/src/lib/tooltip/tooltip.component.ts","../../../projects/as-components/src/lib/tooltip/tooltip.directive.ts","../../../projects/as-components/src/lib/typeahead/typeahead-panel.component.ts","../../../projects/as-components/src/lib/typeahead/typeahead.directive.ts","../../../projects/as-components/src/lib/datepicker/as-flatpickr.component.ts","../../../projects/as-components/src/public-api.ts","../../../projects/as-components/src/agentsmith.bgd-as-components.ts"],"sourcesContent":["import { Component } from '@angular/core';\n\n@Component({\n\tselector: 'lib-as-components',\n\timports: [],\n\ttemplate: ` <p> as-components works! </p> `,\n\tstyles: ``,\n})\nexport class AsComponents {}\n","import {\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n output,\n signal,\n Type,\n ViewChild,\n ViewContainerRef, ViewEncapsulation\n} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {ModalRef} from '../services/modal-ref';\n\nexport interface ResultPayload {\n action: string,\n payload?: unknown\n}\n\n@Component({\n selector: 'as-modal-container',\n templateUrl: 'modal-container.component.html',\n styleUrl: 'modal-container.component.scss',\n imports: [CommonModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class ModalContainerComponent {\n @ViewChild('contentHost', {read: ViewContainerRef, static: true}) contentHost!: ViewContainerRef;\n\n // signal-based inputs\n title = signal<string | undefined>(undefined);\n size = signal<'sm' | 'md' | 'lg'>('md');\n showClose = signal<boolean>(true);\n enableLog = signal<boolean>(false);\n\n closed = output<ResultPayload | undefined>();\n\n modalRef!: ModalRef;\n\n get sizeClass() {\n return this.size(); // template uses size() directly; keep helper for compatibility if needed\n }\n\n /**\n * Create a component inside the container and set inputs.\n * Supports:\n * - assigning to writable signals (calls `.set(...)`)\n * - assigning to plain properties\n * Also handles primitive `inputs` mapping to common names.\n */\n loadComponent<T>(component: Type<T>, inputs?: Partial<T> | any): ComponentRef<T> {\n const compRef = this.contentHost.createComponent<T>(component);\n\n /* 🟡 PRIME every signal (factory → real signal) */\n const inst = compRef.instance as Record<string, any>;\n for (const key in inst) {\n const prop = inst[key];\n //console.log('prop check', { key, prop, typeofProp: typeof prop });\n if (typeof prop === 'function') {\n // **real consumer read** → forces input() to become WritableSignal\n const value = prop(); // ← Angular input() **must** be called\n //console.log('>>> primed', { key, value, constructor: prop?.constructor?.name, proto: Object.prototype.toString.call(prop) });\n }\n }\n\n for (const key in inst) {\n const prop = inst[key];\n if (typeof prop === 'function' && prop.length === 0) {\n // cheap check: call once (forces input() to become WritableSignal)\n prop();\n }\n }\n\n if (inputs !== undefined && inputs !== null) {\n if (typeof inputs === 'object' && !Array.isArray(inputs)) {\n for (const key of Object.keys(inputs)) {\n const prop = (compRef.instance as any)[key];\n // console.log('>>> setInput dump', {\n // key,\n // prop,\n // typeofProp: typeof prop,\n // isFunction: typeof prop === 'function',\n // hasSet: prop?.set !== undefined,\n // constructor: prop?.constructor?.name,\n // proto: Object.prototype.toString.call(prop)\n // });\n this.setInput(compRef.instance as any, key, (inputs as any)[key], compRef);\n }\n } else {\n // primitive mapping\n // const inst = compRef.instance as any;\n const inst = compRef as any;\n if ('message' in inst) this.setInput(inst, 'message', inputs, compRef);\n else if ('data' in inst) this.setInput(inst, 'data', inputs, compRef);\n else this.setInput(inst, 'value', inputs, compRef);\n }\n\n // ensure rendering for OnPush / signal changes\n compRef.changeDetectorRef?.detectChanges();\n }\n\n return compRef;\n }\n\n private setInput(targetInstance: any, key: string, value: any, compRef: ComponentRef<any>) {\n const before = targetInstance[key];\n //console.log('>>> inside setInput BEFORE', key, before);\n const target = targetInstance[key];\n\n if (typeof target === 'function' && 'set' in target && typeof target.set === 'function') {\n // ✅ writable signal\n target.set(value);\n //console.log(`setInput: signal .set() called for ${key}`, targetInstance[key]);\n } else if (typeof target === 'function') {\n // 🔹 signal is readonly → cannot set\n compRef.setInput(key, value);\n //console.log(`setInput: target ${key} is a readonly signal!`, targetInstance[key]);\n } else {\n // fallback for raw primitive (optional)\n targetInstance[key] = value;\n //console.log(`setInput: raw assign for ${key}`, targetInstance[key]);\n }\n }\n\n dismiss() {\n this.modalRef.dismiss();\n }\n log(value: any, ...rest: any[]): void {\n if (this.enableLog() || localStorage.getItem('loggerEnable')) {\n console.log('%c DEBUG ', 'background: gray; color: white; font-weight: bold;', `AS modal container -> ${value}`, ...rest);\n }\n }\n}\n","<div class=\"as-modal-backdrop\" (click)=\"dismiss()\"></div>\n<div class=\"as-modal\" [ngClass]=\"size()\" role=\"dialog\" aria-modal=\"true\">\n\t@if (title() || showClose()) {\n\t\t<div class=\"as-modal-header\">\n\t\t\t<h3 class=\"as-modal-title\">{{ title() }}</h3>\n\t\t\t@if (showClose()) {\n\t\t\t\t<button class=\"btn-close close pull-right\" type=\"button\" (click)=\"dismiss()\"></button>\n\t\t\t}\n\t\t</div>\n\t}\n\t<div class=\"as-modal-body\">\n\t\t<ng-template #contentHost></ng-template>\n\t</div>\n</div>\n","import { Directive, EventEmitter, output } from '@angular/core';\nimport { ResultPayload } from './modal-container.component';\n\n@Directive()\nexport abstract class BaseModalComponent {\n\treadonly onClose = output<ResultPayload | undefined>();\n\n // injected by ModalService\n private _dismiss?: () => void;\n\n /** called by ModalService */\n _registerDismiss(fn: () => void) {\n this._dismiss = fn;\n }\n\n /** CONFIRM */\n protected confirm(result?: ResultPayload) {\n this.onClose.emit(result);\n }\n\n /** CANCEL / SILENT */\n protected dismiss() {\n this._dismiss?.();\n }\n}\n","// TypeScript\nimport { ComponentRef } from '@angular/core';\nimport { Subject, Observable } from 'rxjs';\nimport {ResultPayload} from '../modal-container/modal-container.component';\n\nexport class ModalRef {\n\tprivate _onClose = new Subject<ResultPayload | undefined>();\n\tonClose: Observable<ResultPayload | undefined> = this._onClose.asObservable();\n\n\tconstructor(\n\t\tprivate componentRef: ComponentRef<any>,\n\t\tprivate hostElement: HTMLElement,\n\t) {}\n\n\tclose(result?: ResultPayload | undefined) {\n\t\tthis._onClose.next(result);\n\t\tthis._onClose.complete();\n\t\tthis.destroy();\n\t}\n\n dismiss() {\n this._onClose.complete();\n this.destroy();\n }\n\n\tprivate destroy() {\n\t\ttry {\n\t\t\tif (this.componentRef) {\n\t\t\t\tthis.componentRef.destroy();\n\t\t\t}\n\t\t} finally {\n\t\t\tif (this.hostElement && this.hostElement.parentNode) {\n\t\t\t\tthis.hostElement.parentNode.removeChild(this.hostElement);\n\t\t\t}\n\t\t}\n\t}\n}\n","// TypeScript\nimport {\n\tInjectable,\n\tApplicationRef,\n\tInjector,\n\tType,\n\tComponentRef,\n\tcreateComponent,\n\tEnvironmentInjector,\n\tisSignal,\n\tWritableSignal,\n} from '@angular/core';\nimport { ModalRef } from './modal-ref';\nimport { ModalContainerComponent, ResultPayload } from '../modal-container/modal-container.component';\nimport {BaseModalComponent} from '../modal-container/base-modal.component';\n\nexport interface ModalConfig {\n\tid?: string;\n\tsize?: 'sm' | 'md' | 'lg';\n\ttitle?: string;\n\tshowClose?: boolean;\n\tenableLog?: boolean;\n\tdata?: any;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ModalService {\n\tconstructor(\n\t\tprivate injector: Injector,\n\t\tprivate appRef: ApplicationRef,\n\t\tprivate envInjector: EnvironmentInjector,\n\t) {}\n\n\tshow<T>(component: Type<T>, config: ModalConfig = {}): ModalRef {\n\t\tconst hostEl = document.createElement('div');\n\t\tdocument.body.appendChild(hostEl);\n\n\t\tconst compRef: ComponentRef<ModalContainerComponent> = createComponent(ModalContainerComponent, {\n\t\t\tenvironmentInjector: this.envInjector,\n\t\t});\n\n\t\t// set container inputs using signal-aware helper\n\t\tthis.setInput(compRef.instance as any, 'title', config.title);\n\t\tthis.setInput(compRef.instance as any, 'size', config.size ?? 'md');\n\t\tthis.setInput(compRef.instance as any, 'showClose', config.showClose !== false);\n\t\tthis.setInput(compRef.instance as any, 'enableLog', config.enableLog !== false);\n\n\t\tthis.appRef.attachView(compRef.hostView);\n\t\thostEl.appendChild((compRef.hostView as any).rootNodes[0] as HTMLElement);\n\n\t\t// the container's loadComponent handles assigning inputs (including signals) to the child\n\t\tconst childRef: ComponentRef<T> = compRef.instance.loadComponent(component, config.data);\n\n\t\tconst modalRef = new ModalRef(compRef as any, hostEl);\n\n (compRef.instance as any).modalRef = modalRef;\n\t\tcompRef.instance.closed.subscribe((result: ResultPayload | undefined) => {\n\t\t\tmodalRef.close(result);\n\t\t});\n\n const maybeBase = childRef.instance as BaseModalComponent;\n if (maybeBase._registerDismiss) {\n maybeBase._registerDismiss(() => {\n modalRef.dismiss(); // calls ModalRef.dismiss\n });\n }\n\n\t\tconst maybeEmitter = (childRef.instance as any).onClose;\n\t\tif (maybeEmitter && typeof maybeEmitter.subscribe === 'function') {\n\t\t\tmaybeEmitter.subscribe((res: any) => modalRef.close(res));\n\t\t}\n\n\t\treturn modalRef;\n\t}\n\n\tprivate setInput(targetInstance: any, key: string, value: any) {\n\t\tconst target = targetInstance[key];\n\t\tif (typeof target === 'function' && target && 'set' in target && typeof (target as any).set === 'function') {\n\t\t\t(target as any).set(value);\n\t\t} else {\n\t\t\ttargetInstance[key] = value;\n\t\t}\n\t}\n}\n","import { Component, signal, WritableSignal, ChangeDetectionStrategy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n\tselector: 'as-tooltip',\n\tstandalone: true,\n\timports: [CommonModule],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\ttemplate: `\n\t\t<div\n\t\t\tclass=\"as-tooltip\"\n\t\t\t[class.as-placement-top]=\"placement() === 'bottom'\"\n\t\t\t[class.as-placement-bottom]=\"placement() === 'top'\"\n\t\t\t[class.as-placement-left]=\"placement() === 'right'\"\n\t\t\t[class.as-placement-right]=\"placement() === 'left'\"\n\t\t\t[attr.id]=\"id()\"\n\t\t\trole=\"tooltip\"\n\t\t\t[attr.aria-hidden]=\"!text()\"\n\t\t>\n\t\t\t{{ text() }}\n\t\t\t<span class=\"as-tooltip-arrow\" aria-hidden=\"true\"></span>\n\t\t</div>\n\t`,\n\tstyles: [\n\t\t`\n\t\t\t:host {\n\t\t\t\tdisplay: block;\n\t\t\t}\n\n\t\t\t.as-tooltip {\n\t\t\t\tposition: relative;\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tbackground: rgba(97, 97, 97, 0.95);\n\t\t\t\tcolor: #fff;\n\t\t\t\tpadding: 6px 10px;\n\t\t\t\tborder-radius: 4px;\n\t\t\t\tfont-size: 12px;\n\t\t\t\tmax-width: 240px;\n\t\t\t\tbox-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);\n\t\t\t\tline-height: 1.2;\n\t\t\t}\n\n\t\t\t/* Arrow base: zero-sized element using borders to form a triangle */\n\t\t\t.as-tooltip-arrow {\n\t\t\t\tposition: absolute;\n\t\t\t\twidth: 0;\n\t\t\t\theight: 0;\n\t\t\t}\n\n\t\t\t/* Bottom placement: tooltip sits above origin, arrow points downwards (at bottom of tooltip) */\n\t\t\t.as-placement-bottom .as-tooltip-arrow {\n\t\t\t\tleft: 50%;\n\t\t\t\ttransform: translateX(-50%);\n\t\t\t\ttop: 100%;\n\t\t\t\tborder-left: 6px solid transparent;\n\t\t\t\tborder-right: 6px solid transparent;\n\t\t\t\tborder-top: 6px solid rgba(97, 97, 97, 0.95);\n\t\t\t}\n\n\t\t\t/* Top placement: tooltip sits below origin, arrow points upwards (at top of tooltip) */\n\t\t\t.as-placement-top .as-tooltip-arrow {\n\t\t\t\tleft: 50%;\n\t\t\t\ttransform: translateX(-50%);\n\t\t\t\tbottom: 100%;\n\t\t\t\tborder-left: 6px solid transparent;\n\t\t\t\tborder-right: 6px solid transparent;\n\t\t\t\tborder-bottom: 6px solid rgba(97, 97, 97, 0.95);\n\t\t\t}\n\n\t\t\t/* Left placement: tooltip sits to the right of origin, arrow points left (at left edge) */\n\t\t\t.as-placement-left .as-tooltip-arrow {\n\t\t\t\ttop: 50%;\n\t\t\t\ttransform: translateY(-50%);\n\t\t\t\tright: 100%;\n\t\t\t\tborder-top: 6px solid transparent;\n\t\t\t\tborder-bottom: 6px solid transparent;\n\t\t\t\tborder-right: 6px solid rgba(97, 97, 97, 0.95);\n\t\t\t}\n\n\t\t\t/* Right placement: tooltip sits to the left of origin, arrow points right (at right edge) */\n\t\t\t.as-placement-right .as-tooltip-arrow {\n\t\t\t\ttop: 50%;\n\t\t\t\ttransform: translateY(-50%);\n\t\t\t\tleft: 100%;\n\t\t\t\tborder-top: 6px solid transparent;\n\t\t\t\tborder-bottom: 6px solid transparent;\n\t\t\t\tborder-left: 6px solid rgba(97, 97, 97, 0.95);\n\t\t\t}\n\t\t`,\n\t],\n})\nexport class TooltipComponent {\n\treadonly id: WritableSignal<string> = signal(`as-tooltip-${Math.random().toString(36).slice(2, 9)}`);\n\n\t// Writable text so directive can update via `.set(...)`\n\treadonly text: WritableSignal<string | null> = signal<string | null>(null);\n\n\t// Placement signal — set by directive to switch arrow orientation\n\treadonly placement: WritableSignal<'top' | 'bottom' | 'left' | 'right'> = signal<'top' | 'bottom' | 'left' | 'right'>('bottom');\n}\n","import { Directive, ElementRef, HostListener, inject, input, signal, computed, OnDestroy, WritableSignal, Injector } from '@angular/core';\nimport { Overlay, OverlayRef, FlexibleConnectedPositionStrategy, ConnectedPosition } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { Subscription } from 'rxjs';\nimport { TooltipComponent } from './tooltip.component';\n\n@Directive({\n\tselector: '[asTooltip]',\n\tstandalone: true,\n})\nexport class TooltipDirective implements OnDestroy {\n\tprivate readonly overlay = inject(Overlay);\n\tprivate readonly injector = inject(Injector);\n\tprivate readonly host = inject(ElementRef<HTMLElement>);\n\n\treadonly asTooltip = input<string | null>(null);\n\treadonly asTooltipPlacement = input<'top' | 'bottom' | 'left' | 'right' | 'auto'>('auto');\n\n\tprivate overlayRef: OverlayRef | null = null;\n\tprivate strategy: FlexibleConnectedPositionStrategy | null = null;\n\tprivate posSub: Subscription | null = null;\n\n\tprivate readonly positions = computed(() => this.buildPositions(this.asTooltipPlacement()));\n\n\t@HostListener('mouseenter')\n\tshow(): void {\n\t\tconst text = this.asTooltip();\n\t\tif (!text) return;\n\n\t\tif (!this.overlayRef) {\n\t\t\tthis.createOverlay();\n\t\t}\n\n\t\tif (!this.overlayRef!.hasAttached()) {\n\t\t\tconst portal = new ComponentPortal(TooltipComponent);\n\t\t\tconst compRef = this.overlayRef!.attach(portal);\n\n\t\t\tcompRef.instance.text.set(text);\n\n\t\t\t// set aria-describedby\n\t\t\tconst id = compRef.instance.id();\n\t\t\tthis.host.nativeElement.setAttribute('aria-describedby', id);\n\n\t\t\t// subscribe to CDK's chosen position and write to tooltip placement signal\n\t\t\tif (this.strategy && !this.posSub) {\n\t\t\t\tthis.posSub = this.strategy.positionChanges.subscribe((change: any) => {\n\t\t\t\t\t// `change` may contain different property names across CDK versions;\n\t\t\t\t\t// try common locations for the resolved connected position.\n\t\t\t\t\tconst pos: ConnectedPosition | undefined =\n\t\t\t\t\t\tchange?.connectionPair ?? change?.connectedPosition ?? change?.lastConnectedPosition ?? change;\n\n\t\t\t\t\tif (pos) {\n\t\t\t\t\t\tconst placement = this.mapPositionToPlacement(pos);\n\t\t\t\t\t\tcompRef.instance.placement.set(placement);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// initial placement hint: map the first position we provided\n\t\t\tconst initial = this.positions()[0];\n\t\t\tcompRef.instance.placement.set(this.mapPositionToPlacement(initial));\n\n\t\t\tthis.overlayRef!.updatePosition();\n\t\t}\n\t}\n\n\t@HostListener('mouseleave')\n\thide(): void {\n\t\tthis.detachOverlay();\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis.detachOverlay(true);\n\t}\n\n\tprivate createOverlay(): void {\n\t\tconst strategy = this.overlay\n\t\t\t.position()\n\t\t\t.flexibleConnectedTo(this.host)\n\t\t\t.withPositions(this.positions())\n\t\t\t.withPush(true) as FlexibleConnectedPositionStrategy;\n\n\t\t// store strategy so we can watch positionChanges\n\t\tthis.strategy = strategy;\n\n\t\tstrategy.withDefaultOffsetY(8);\n\t\tstrategy.withDefaultOffsetX(8);\n\n\t\tthis.overlayRef = this.overlay.create({\n\t\t\tpositionStrategy: strategy,\n\t\t\tscrollStrategy: this.overlay.scrollStrategies.reposition(),\n\t\t\tpanelClass: 'as-tooltip-panel',\n\t\t\thasBackdrop: false,\n\t\t});\n\t}\n\n\tprivate detachOverlay(dispose = false): void {\n\t\tif (!this.overlayRef) return;\n\n\t\tif (this.overlayRef.hasAttached()) {\n\t\t\tconst hostEl = this.host.nativeElement;\n\t\t\tif (hostEl.getAttribute('aria-describedby')) {\n\t\t\t\thostEl.removeAttribute('aria-describedby');\n\t\t\t}\n\t\t}\n\n\t\tthis.overlayRef.detach();\n\n\t\tif (this.posSub) {\n\t\t\tthis.posSub.unsubscribe();\n\t\t\tthis.posSub = null;\n\t\t}\n\n\t\tif (dispose) {\n\t\t\tthis.overlayRef.dispose();\n\t\t\tthis.overlayRef = null;\n\t\t\tthis.strategy = null;\n\t\t}\n\t}\n\n\tprivate buildPositions(preferred: 'top' | 'bottom' | 'left' | 'right' | 'auto'): ConnectedPosition[] {\n\t\tconst top: ConnectedPosition = {\n\t\t\toriginX: 'center',\n\t\t\toriginY: 'top',\n\t\t\toverlayX: 'center',\n\t\t\toverlayY: 'bottom',\n\t\t\toffsetY: -8,\n\t\t};\n\t\tconst bottom: ConnectedPosition = {\n\t\t\toriginX: 'center',\n\t\t\toriginY: 'bottom',\n\t\t\toverlayX: 'center',\n\t\t\toverlayY: 'top',\n\t\t\toffsetY: 8,\n\t\t};\n\t\tconst left: ConnectedPosition = {\n\t\t\toriginX: 'start',\n\t\t\toriginY: 'center',\n\t\t\toverlayX: 'end',\n\t\t\toverlayY: 'center',\n\t\t\toffsetX: -8,\n\t\t};\n\t\tconst right: ConnectedPosition = {\n\t\t\toriginX: 'end',\n\t\t\toriginY: 'center',\n\t\t\toverlayX: 'start',\n\t\t\toverlayY: 'center',\n\t\t\toffsetX: 8,\n\t\t};\n\n\t\tif (preferred === 'auto') {\n\t\t\treturn [bottom, top, right, left];\n\t\t}\n\n\t\tswitch (preferred) {\n\t\t\tcase 'top':\n\t\t\t\treturn [top, bottom, right, left];\n\t\t\tcase 'bottom':\n\t\t\t\treturn [bottom, top, right, left];\n\t\t\tcase 'left':\n\t\t\t\treturn [left, right, bottom, top];\n\t\t\tcase 'right':\n\t\t\t\treturn [right, left, bottom, top];\n\t\t\tdefault:\n\t\t\t\treturn [bottom, top, right, left];\n\t\t}\n\t}\n\n\tprivate mapPositionToPlacement(pos: ConnectedPosition): 'top' | 'bottom' | 'left' | 'right' {\n\t\t// Determine placement by comparing origin/overlay alignment used by CDK\n\t\tif (pos.originY === 'top' && pos.overlayY === 'bottom') return 'top';\n\t\tif (pos.originY === 'bottom' && pos.overlayY === 'top') return 'bottom';\n\t\tif (pos.originX === 'start' && pos.overlayX === 'end') return 'left';\n\t\tif (pos.originX === 'end' && pos.overlayX === 'start') return 'right';\n\t\t// fallback\n\t\treturn 'bottom';\n\t}\n}\n","// typescript\nimport { Component, signal, WritableSignal, ChangeDetectionStrategy, TemplateRef } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nexport interface Option {\n\tkey: string;\n\tvalue: string;\n}\n\n@Component({\n\tselector: 'as-typeahead-panel',\n\tstandalone: true,\n\timports: [CommonModule],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\ttemplate: `\n\t\t<div\n\t\t\tclass=\"as-typeahead-panel\"\n\t\t\trole=\"listbox\"\n\t\t\t[attr.id]=\"id()\"\n\t\t\t[class.as-empty]=\"items().length === 0\"\n\t\t\t[style.max-height.px]=\"visibleCount() * itemHeight\"\n\t\t>\n\t\t\t@for (item of items(); track item.key) {\n\t\t\t\t<div\n\t\t\t\t\trole=\"option\"\n\t\t\t\t\t[attr.id]=\"optionId($index)\"\n\t\t\t\t\t[attr.aria-selected]=\"$index === activeIndex()\"\n\t\t\t\t\tclass=\"as-typeahead-option\"\n\t\t\t\t\t[class.as-active]=\"$index === activeIndex()\"\n\t\t\t\t\t(mouseenter)=\"setActive($index)\"\n\t\t\t\t\t(mousemove)=\"setActive($index)\"\n\t\t\t\t\t(click)=\"select($index)\"\n\t\t\t\t>\n\t\t\t\t\t@if (optionTemplate) {\n\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"optionTemplate; context: { $implicit: items()[$index] }\"></ng-container>\n\t\t\t\t\t} @else {\n\t\t\t\t\t\t{{ displayWith()(item) }}\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t}\n\n\t\t\t@if (items().length === 0) {\n\t\t\t\t<div class=\"as-no-results\">No results</div>\n\t\t\t}\n\t\t</div>\n\t`,\n\tstyles: [\n\t\t`\n\t\t\t:host {\n\t\t\t\tdisplay: block;\n\t\t\t}\n\t\t\t.as-typeahead-panel {\n\t\t\t\tmin-width: 160px;\n\t\t\t\toverflow: scroll;\n\t\t\t\tbackground: #fff;\n\t\t\t\tborder: 1px solid rgba(0, 0, 0, 0.12);\n\t\t\t\tbox-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);\n\t\t\t\tborder-radius: 4px;\n\t\t\t\tpadding: 4px 0;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}\n\t\t\t.as-typeahead-option {\n\t\t\t\tpadding: 8px 12px;\n\t\t\t\tcursor: pointer;\n\t\t\t\tuser-select: none;\n\t\t\t\tcolor: #222;\n\t\t\t\tdisplay: block;\n\t\t\t}\n\t\t\t.as-typeahead-option.as-active {\n\t\t\t\tbackground: #f1f1f1;\n\t\t\t}\n\t\t\t.as-no-results {\n\t\t\t\tpadding: 8px 12px;\n\t\t\t\tcolor: rgba(0, 0, 0, 0.5);\n\t\t\t}\n\t\t\t.as-empty {\n\t\t\t\tmin-width: 120px;\n\t\t\t}\n\t\t`,\n\t],\n})\nexport class TypeaheadPanelComponent {\n\treadonly id: WritableSignal<string> = signal(`as-typeahead-panel-${Math.random().toString(36).slice(2, 9)}`);\n\n\treadonly items: WritableSignal<Option[]> = signal<Option[]>([]);\n\t// default shows the `value` field\n\treadonly displayWith: WritableSignal<(item: Option) => string> = signal<(item: Option) => string>((i: Option) => String(i?.value ?? ''));\n\n\treadonly activeIndex: WritableSignal<number | null> = signal<number | null>(null);\n\n\t// visual config: how many items visible before scrollbar (set by directive)\n\treadonly visibleCount: WritableSignal<number> = signal<number>(5);\n\treadonly itemHeight = 40; // px - used to compute maxHeight\n\n\t// optional custom template & callback (set by directive)\n\toptionTemplate: TemplateRef<any> | null = null;\n\tonSelect: ((item: Option) => void) | null = null;\n\n\toptionId(i: number) {\n\t\treturn `${this.id()}-option-${i}`;\n\t}\n\n\tsetActive(i: number | null) {\n\t\tthis.activeIndex.set(i);\n\t}\n\n\tselect(i: number) {\n\t\tconst items = this.items();\n\t\tif (i == null || i < 0 || i >= items.length) return;\n\t\tconst item = items[i];\n\t\tif (this.onSelect) this.onSelect(item);\n\t}\n}\n","import {\n\tDirective,\n\tElementRef,\n\tHostListener,\n\tinject,\n\tinput,\n\tsignal,\n\tcomputed,\n\tOnDestroy,\n\tTemplateRef,\n\tViewContainerRef,\n\teffect,\n\toutput,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { Overlay, OverlayRef, FlexibleConnectedPositionStrategy, ConnectedPosition } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { TypeaheadPanelComponent, Option } from './typeahead-panel.component';\n\n@Directive({\n\tselector: '[asTypeahead]',\n\tstandalone: true,\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: TypeaheadDirective,\n\t\t\tmulti: true,\n\t\t},\n\t],\n})\nexport class TypeaheadDirective implements ControlValueAccessor, OnDestroy {\n\t/* ---------------- injections ---------------- */\n\tprivate readonly overlay = inject(Overlay);\n\tprivate readonly host = inject(ElementRef<HTMLInputElement>);\n\tprivate readonly vcr = inject(ViewContainerRef);\n\n\t/* ---------------- inputs ---------------- */\n\treadonly options = input<Option[] | null>(null);\n\treadonly displayWith = input<(item: Option) => string>((it: Option) => String(it?.value ?? ''));\n\treadonly filterBy = input<'key' | 'value'>('value');\n\treadonly visibleCount = input<number>(5);\n\treadonly restrictToList = input<boolean>(false);\n\treadonly asTypeaheadTemplate = input<TemplateRef<any> | null>(null);\n\treadonly disabled = input<boolean>(false);\n\treadonly enableLog = input<boolean>(false);\n\n\t/* ---------------- outputs ---------------- */\n\treadonly typeaheadOnSelect = output<Option | null>();\n\n\t/* ---------------- internal ---------------- */\n\tprivate readonly cvaDisabled = signal(false);\n\tprivate readonly selected = signal<Option | null>(null);\n\n\tprivate overlayRef: OverlayRef | null = null;\n\tprivate panel: TypeaheadPanelComponent | null = null;\n\tprivate destroyed = false;\n\n\tprivate onChange: (value: any) => void = () => {};\n\tprivate onTouched: () => void = () => {};\n\n\tprivate readonly positions = computed(() => this.buildPositions());\n\n\tconstructor() {\n\t\t/* sync initial value -> input text */\n\t\teffect(() => {\n\t\t\tconst sel = this.selected();\n\t\t\tif (!sel) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.log('init select value', sel.key, sel.value);\n\t\t\tthis.host.nativeElement.value = this.displayWith()(sel);\n\t\t});\n\t}\n\n\t/* ---------------- CVA ---------------- */\n\twriteValue(value: any): void {\n\t\tif (value == null) {\n\t\t\tthis.setInternalSelection(null);\n\t\t\tthis.host.nativeElement.value = '';\n\t\t\treturn;\n\t\t}\n\n\t\tconst match = this.options()?.find(o => o.key === value) ?? null;\n\t\tthis.setInternalSelection(match);\n\n\t\tif (match) {\n\t\t\tthis.host.nativeElement.value = this.displayWith()(match);\n\t\t} else {\n\t\t\tthis.host.nativeElement.value = String(value);\n\t\t}\n\t}\n\n\tregisterOnChange(fn: any): void {\n\t\tthis.onChange = fn;\n\t}\n\n\tregisterOnTouched(fn: any): void {\n\t\tthis.onTouched = fn;\n\t}\n\n\tsetDisabledState(isDisabled: boolean): void {\n\t\tthis.log('component disabled', isDisabled);\n\t\tthis.cvaDisabled.set(isDisabled);\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis.destroyed = true;\n\t\tthis.detach(true);\n\t}\n\n\t/* ---------------- host events ---------------- */\n\t@HostListener('focus')\n\t@HostListener('click')\n\tonFocus() {\n\t\tif (this.isDisabled()) return;\n\t\tthis.open();\n\t\tthis.showAll();\n\t}\n\n\t@HostListener('input', ['$event'])\n\tonInput(e: Event) {\n\t\tif (this.isDisabled()) return;\n\t\tconst value = (e.target as HTMLInputElement).value;\n\t\tvalue ? this.filter(value) : this.showAll();\n\t}\n\n\t@HostListener('keydown', ['$event'])\n\tonKeydown(e: KeyboardEvent) {\n\t\tif (this.isDisabled() || !this.panel) return;\n\n\t\tconst items = this.panel.items();\n\t\tif (!items.length) return;\n\n\t\tlet idx = this.panel.activeIndex();\n\n\t\tswitch (e.key) {\n\t\t\tcase 'ArrowDown':\n\t\t\t\te.preventDefault();\n\t\t\t\tidx = idx == null ? 0 : Math.min(items.length - 1, idx + 1);\n\t\t\t\tthis.panel.setActive(idx);\n\t\t\t\tbreak;\n\n\t\t\tcase 'ArrowUp':\n\t\t\t\te.preventDefault();\n\t\t\t\tidx = idx == null ? items.length - 1 : Math.max(0, idx - 1);\n\t\t\t\tthis.panel.setActive(idx);\n\t\t\t\tbreak;\n\n\t\t\tcase 'Enter':\n\t\t\t\te.preventDefault();\n\t\t\t\tif (idx != null) this.panel.select(idx);\n\t\t\t\tbreak;\n\n\t\t\tcase 'Escape':\n\t\t\t\tthis.close();\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\t@HostListener('blur')\n\tonBlur() {\n\t\tsetTimeout(() => {\n\t\t\tif (this.destroyed) return;\n\n\t\t\tconst text = this.host.nativeElement.value;\n\t\t\tconst match = this.findMatch(text);\n\n\t\t\tif (this.restrictToList()) {\n\t\t\t\tthis.commitSelection(match);\n\t\t\t\tthis.host.nativeElement.value = match ? this.displayWith()(match) : '';\n\t\t\t} else if (match) {\n\t\t\t\tthis.commitSelection(match);\n\t\t\t} else {\n\t\t\t\tthis.commitSelection(null);\n\t\t\t}\n\n\t\t\tthis.onTouched();\n\t\t\tthis.close();\n\t\t}, 150);\n\t}\n\n\t/* ---------------- overlay ---------------- */\n\tprivate open() {\n\t\tif (!this.overlayRef) this.createOverlay();\n\t\tif (!this.overlayRef!.hasAttached()) {\n\t\t\tconst portal = new ComponentPortal(TypeaheadPanelComponent, this.vcr);\n\t\t\tconst ref = this.overlayRef!.attach(portal);\n\t\t\tthis.panel = ref.instance;\n\n\t\t\tthis.panel.displayWith.set(this.displayWith());\n\t\t\tthis.panel.optionTemplate = this.asTypeaheadTemplate();\n\t\t\tthis.panel.visibleCount.set(this.visibleCount());\n\t\t\tthis.panel.onSelect = (it: Option) => this.select(it);\n\t\t}\n\t}\n\n\tprivate close() {\n\t\tthis.detach();\n\t}\n\n\tprivate detach(dispose = false) {\n\t\tif (!this.overlayRef) return;\n\t\tif (this.overlayRef.hasAttached()) this.overlayRef.detach();\n\t\tif (dispose) {\n\t\t\tthis.overlayRef.dispose();\n\t\t\tthis.overlayRef = null;\n\t\t\tthis.panel = null;\n\t\t}\n\t}\n\n\tprivate createOverlay() {\n\t\tconst strategy = this.overlay\n\t\t\t.position()\n\t\t\t.flexibleConnectedTo(this.host)\n\t\t\t.withPositions(this.positions())\n\t\t\t.withPush(true) as FlexibleConnectedPositionStrategy;\n\n\t\tstrategy.withDefaultOffsetY(4);\n\n\t\tthis.overlayRef = this.overlay.create({\n\t\t\tpositionStrategy: strategy,\n\t\t\tscrollStrategy: this.overlay.scrollStrategies.reposition(),\n\t\t});\n\t}\n\n\t/* ---------------- helpers ---------------- */\n\tprivate showAll() {\n\t\tthis.open();\n\t\tthis.panel?.items.set(this.options() ?? []);\n\t\tthis.panel?.setActive(null);\n\t}\n\n\tprivate filter(q: string) {\n\t\tconst key = q.toLowerCase();\n\t\tconst list = this.options() ?? [];\n\t\tconst filtered = list.filter(it => {\n\t\t\tconst target = this.filterBy() === 'key' ? String(it.key) : String(it.value);\n\t\t\treturn target.toLowerCase().includes(key);\n\t\t});\n\n\t\tthis.open();\n\t\tthis.panel?.items.set(filtered);\n\t\tthis.panel?.setActive(filtered.length ? 0 : null);\n\t}\n\n\tprivate select(item: Option) {\n\t\tthis.commitSelection(item);\n\t\tthis.host.nativeElement.value = this.displayWith()(item);\n\t\tthis.close();\n\t\tthis.host.nativeElement.focus();\n\t}\n\n\tprivate findMatch(text: string): Option | null {\n\t\tconst list = this.options() ?? [];\n\t\treturn list.find(it => this.displayWith()(it) === text) ?? list.find(it => String(it.key) === text) ?? null;\n\t}\n\n\tprivate isDisabled(): boolean {\n\t\treturn this.disabled() || this.cvaDisabled();\n\t}\n\n\tprivate buildPositions(): ConnectedPosition[] {\n\t\treturn [\n\t\t\t{\n\t\t\t\toriginX: 'start',\n\t\t\t\toriginY: 'bottom',\n\t\t\t\toverlayX: 'start',\n\t\t\t\toverlayY: 'top',\n\t\t\t\toffsetY: 4,\n\t\t\t},\n\t\t\t{\n\t\t\t\toriginX: 'start',\n\t\t\t\toriginY: 'top',\n\t\t\t\toverlayX: 'start',\n\t\t\t\toverlayY: 'bottom',\n\t\t\t\toffsetY: -4,\n\t\t\t},\n\t\t];\n\t}\n\n\tprivate commitSelection(sel: Option | null) {\n\t\tthis.selected.set(sel);\n\t\tthis.log('Set value and emit', sel);\n\n\t\t// CVA\n\t\tthis.onChange(sel?.key ?? null);\n\n\t\t// OUTPUT\n\t\tthis.typeaheadOnSelect.emit(sel);\n\t}\n\n\tprivate setInternalSelection(sel: Option | null) {\n\t\tthis.log('Set value only', sel);\n\t\tthis.selected.set(sel);\n\t}\n\n\tlog(value: any, ...rest: any[]): void {\n\t\tif (this.enableLog() || localStorage.getItem('loggerEnable')) {\n\t\t\tconsole.log('%c DEBUG ', 'background: gray; color: white; font-weight: bold;', `AS typeahead -> ${value}`, ...rest);\n\t\t}\n\t}\n}\n","import { AfterViewInit, Component, effect, ElementRef, forwardRef, input, NgZone, OnDestroy, output, ViewChild } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport flatpickr from 'flatpickr';\nimport 'flatpickr/dist/flatpickr.css';\nimport { NgClass } from '@angular/common';\n\nimport { FlatpickrDateFormat, FlatpickrMode, FlatpickrValue } from './flatpickr.types';\n\n@Component({\n\tselector: 'as-flatpickr',\n\tstandalone: true,\n\ttemplate: `<input\n\t\t#input\n\t\ttype=\"text\"\n\t\t[attr.placeholder]=\"placeholder()\"\n\t\t[ngClass]=\"elementClass()\"\n\t\t[autocomplete]=\"autocomplete()\"\n\t\t[id]=\"id()\"\n\t/>`,\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: forwardRef(() => AsFlatpickrComponent),\n\t\t\tmulti: true,\n\t\t},\n\t],\n\timports: [NgClass],\n})\nexport class AsFlatpickrComponent implements ControlValueAccessor, AfterViewInit, OnDestroy {\n\t/* ---------------- Inputs ---------------- */\n\tmode = input<FlatpickrMode>('single');\n\tenableTime = input(false);\n\ttimeOnly = input(false);\n\tplaceholder = input<string | null>(null);\n\tid = input<string | null>(null);\n\tdateFormat = input<FlatpickrDateFormat>('Y-m-d');\n\telementClass = input<string>('form-control form-icon-calendar');\n\ttime24h = input(true);\n\tautocomplete = input<'on' | 'off'>('off');\n\n\t/* External value (string-based now) */\n\tvalue = input<FlatpickrValue>(null);\n\tvalueChange = output<FlatpickrValue>();\n\n\t/* ---------------- Internals ---------------- */\n\t@ViewChild('input', { static: true }) private inputEl!: ElementRef<HTMLInputElement>;\n\tprivate fp: flatpickr.Instance | null = null;\n\n\tprivate onChange: (value: FlatpickrValue) => void = () => {};\n\tprivate onTouched: () => void = () => {};\n\tprivate disabled = false;\n\n\tconstructor(private zone: NgZone) {\n\t\t/* ---------------- Signal effect for syncing value ---------------- */\n\t\teffect(() => {\n\t\t\tconst val = this.value();\n\t\t\tif (!this.fp) return;\n\n\t\t\tthis.zone.runOutsideAngular(() => {\n\t\t\t\tconst displayFormat = this.getDisplayFormat();\n\t\t\t\tif (Array.isArray(val)) {\n\t\t\t\t\tconst dates = val.map(v => flatpickr.parseDate(v, displayFormat));\n\t\t\t\t\tthis.fp!.setDate(dates as Date[], false);\n\t\t\t\t} else if (val) {\n\t\t\t\t\tconst date = flatpickr.parseDate(val, displayFormat);\n\t\t\t\t\tthis.fp!.setDate(date ?? [], false);\n\t\t\t\t} else {\n\t\t\t\t\tthis.fp!.clear();\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\tprivate handleOpen = () => {\n\t\tif (this.disabled) {\n\t\t\tthis.fp?.close();\n\t\t}\n\t};\n\n\t/* ---------------- Initialize Flatpickr ---------------- */\n\tngAfterViewInit() {\n\t\tthis.zone.runOutsideAngular(() => {\n\t\t\tthis.fp = flatpickr(this.inputEl.nativeElement, {\n\t\t\t\tmode: this.mode(),\n\t\t\t\tenableTime: this.enableTime() || this.timeOnly(),\n\t\t\t\tnoCalendar: this.timeOnly(),\n\t\t\t\tallowInput: true,\n\t\t\t\ttime_24hr: this.time24h(),\n\t\t\t\tdateFormat: this.getDisplayFormat(),\n\t\t\t\tonOpen: this.handleOpen,\n\t\t\t\tonChange: (dates, _str, instance) => this.handleChange(dates, instance),\n\t\t\t\tonClose: () => this.zone.run(() => this.onTouched()),\n\t\t\t});\n\n\t\t\t// Manual validation for typed input\n\t\t\tthis.inputEl.nativeElement.addEventListener('blur', () => {\n\t\t\t\tconst typedValue = this.inputEl.nativeElement.value;\n\t\t\t\tconst parsed = this.parseTypedValue(typedValue);\n\n\t\t\t\tthis.zone.run(() => {\n\t\t\t\t\tif (parsed === null) {\n\t\t\t\t\t\tthis.onChange(null);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.onChange(parsed);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}\n\n\t/* ---------------- CVA Implementation ---------------- */\n\twriteValue(value: FlatpickrValue): void {\n\t\tif (!this.fp) return;\n\t\tconst displayFormat = this.getDisplayFormat();\n\t\tif (Array.isArray(value)) {\n\t\t\tconst dates = value.map(v => flatpickr.parseDate(v, displayFormat));\n\t\t\tthis.fp.setDate(dates as Date[], false);\n\t\t} else if (value) {\n\t\t\tconst date = flatpickr.parseDate(value, displayFormat);\n\t\t\tthis.fp.setDate(date ?? [], false);\n\t\t} else {\n\t\t\tthis.fp.clear();\n\t\t}\n\t}\n\n\tregisterOnChange(fn: (value: FlatpickrValue) => void): void {\n\t\tthis.onChange = fn;\n\t}\n\n\tregisterOnTouched(fn: () => void): void {\n\t\tthis.onTouched = fn;\n\t}\n\n\tsetDisabledState(disabled: boolean): void {\n\t\tthis.disabled = disabled;\n\t\tif (this.inputEl) this.inputEl.nativeElement.disabled = disabled;\n\t}\n\n\t/* ---------------- Handle Flatpickr changes ---------------- */\n\tprivate handleChange(dates: Date[], instance: flatpickr.Instance) {\n\t\tconst format = this.dateFormat() ?? this.getDefaultDateFormat();\n\t\tlet value: FlatpickrValue = null;\n\n\t\tif (this.mode() === 'range') {\n\t\t\tif (dates.length === 2) {\n\t\t\t\tvalue = dates.map(d => flatpickr.formatDate(d, format)) as [string, string];\n\t\t\t}\n\t\t} else if (dates[0]) {\n\t\t\tif (this.enableTime() || this.timeOnly()) {\n\t\t\t\tconst timeFormat = this.time24h() ? 'H:i' : 'h:i K';\n\t\t\t\tvalue = flatpickr.formatDate(dates[0], `${format} ${timeFormat}`);\n\t\t\t} else {\n\t\t\t\tvalue = flatpickr.formatDate(dates[0], format);\n\t\t\t}\n\n\t\t\t// ✅ REMOVE automatic close here\n\t\t\t// instance.close();\n\t\t}\n\n\t\tthis.zone.run(() => {\n\t\t\tthis.onChange(value);\n\t\t\tthis.valueChange.emit(value);\n\t\t});\n\t}\n\n\t/* ---------------- Typed input parsing ---------------- */\n\tprivate parseTypedValue(inputValue: string): FlatpickrValue {\n\t\ttry {\n\t\t\tconst displayFormat = this.getDisplayFormat();\n\t\t\tif (!inputValue) return null;\n\n\t\t\tif (this.mode() === 'range') {\n\t\t\t\tconst parts = inputValue.split(' to ').map(s => s.trim());\n\t\t\t\tif (parts.length !== 2) return null;\n\n\t\t\t\tconst start = flatpickr.parseDate(parts[0], displayFormat);\n\t\t\t\tconst end = flatpickr.parseDate(parts[1], displayFormat);\n\t\t\t\tif (!start || !end || start > end) return null;\n\n\t\t\t\treturn [flatpickr.formatDate(start, displayFormat), flatpickr.formatDate(end, displayFormat)];\n\t\t\t} else {\n\t\t\t\tconst parsed = flatpickr.parseDate(inputValue, displayFormat);\n\t\t\t\treturn parsed ? flatpickr.formatDate(parsed, displayFormat) : null;\n\t\t\t}\n\t\t} catch {\n\t\t\treturn null;\n\t\t}\n\t}\n\n\t/* ---------------- Format helpers ---------------- */\n\tprivate getDefaultDateFormat(): string {\n\t\tif (this.timeOnly()) return 'H:i';\n\t\tif (this.enableTime()) return 'Y-m-d';\n\t\treturn 'Y-m-d';\n\t}\n\n\t/** Combine dateFormat + optional time for display/input */\n\tprivate getDisplayFormat(): string {\n\t\tif (this.timeOnly()) {\n\t\t\treturn this.time24h() ? 'H:i' : 'h:i K'; // time only\n\t\t}\n\t\tconst baseFormat = this.dateFormat() ?? 'Y-m-d';\n\t\tif (this.enableTime()) {\n\t\t\tconst timeFormat = this.time24h() ? 'H:i' : 'h:i K';\n\t\t\treturn `${baseFormat} ${timeFormat}`; // date + time\n\t\t}\n\t\treturn baseFormat; // date only\n\t}\n\n\t/* ---------------- Cleanup ---------------- */\n\tngOnDestroy() {\n\t\tthis.fp?.destroy();\n\t\tthis.fp = null;\n\t}\n}\n","/*\n * Public API Surface of as-components\n */\n\nexport * from './lib/as-components';\nexport * from './lib/modal-container/modal-container.component';\nexport * from './lib/modal-container/base-modal.component';\nexport * from './lib/services/modal-ref';\nexport * from './lib/services/modal.service';\nexport * from './lib/tooltip/tooltip.directive';\nexport * from './lib/tooltip/tooltip.component';\nexport * from './lib/typeahead/typeahead.directive';\nexport * from './lib/typeahead/typeahead-panel.component';\nexport * from './lib/datepicker/as-flatpickr.component';\nexport * from './lib/datepicker/flatpickr.types';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;MAQa,YAAY,CAAA;uGAAZ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAZ,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAY,6EAHd,CAAA,+BAAA,CAAiC,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAG/B,YAAY,EAAA,UAAA,EAAA,CAAA;kBANxB,SAAS;+BACC,mBAAmB,EAAA,OAAA,EACpB,EAAE,EAAA,QAAA,EACD,CAAA,+BAAA,CAAiC,EAAA;;;MCqB/B,uBAAuB,CAAA;AACgC,IAAA,WAAW;;AAG7E,IAAA,KAAK,GAAG,MAAM,CAAqB,SAAS,iDAAC;AAC7C,IAAA,IAAI,GAAG,MAAM,CAAqB,IAAI,gDAAC;AACvC,IAAA,SAAS,GAAG,MAAM,CAAU,IAAI,qDAAC;AACjC,IAAA,SAAS,GAAG,MAAM,CA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AAoB,EAAA,UAAA,EAAA,CAAA;kBApBhC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,CAAA;;;;;;;AAOP,GAAA,CAAA;AACH,oBAAA,SAAS,EAAE;AACV,wBAAA;AACC,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,0BAA0B,CAAC;AACnD,4BAAA,KAAK,EAAE,IAAI;AACX,yBAAA;AACD,qBAAA;oBACD,OAAO,EAAE,CAAC,OAAO,CAAC;AAClB,iBAAA;;sBAkBC,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,OAAO,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;;AC9CrC;;AAEG;;ACFH;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentsmith.bgd/as-components",
3
- "version": "21.0.26",
3
+ "version": "21.0.30",
4
4
  "peerDependencies": {
5
5
  "@angular/cdk": "^21.1.0",
6
6
  "@angular/common": "^21.1.0",
@@ -1,5 +1,5 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { ViewContainerRef, Type, ComponentRef, Injector, ApplicationRef, EnvironmentInjector, OnDestroy, WritableSignal, TemplateRef, AfterViewInit, NgZone } from '@angular/core';
2
+ import { ComponentRef, ViewContainerRef, Type, Injector, ApplicationRef, EnvironmentInjector, OnDestroy, WritableSignal, TemplateRef, AfterViewInit, NgZone } from '@angular/core';
3
3
  import { Observable } from 'rxjs';
4
4
  import { ControlValueAccessor } from '@angular/forms';
5
5
 
@@ -8,6 +8,17 @@ declare class AsComponents {
8
8
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<AsComponents, "lib-as-components", never, {}, {}, never, never, true, never>;
9
9
  }
10
10
 
11
+ declare class ModalRef {
12
+ private componentRef;
13
+ private hostElement;
14
+ private _onClose;
15
+ onClose: Observable<ResultPayload | undefined>;
16
+ constructor(componentRef: ComponentRef<any>, hostElement: HTMLElement);
17
+ close(result?: ResultPayload | undefined): void;
18
+ dismiss(): void;
19
+ private destroy;
20
+ }
21
+
11
22
  interface ResultPayload {
12
23
  action: string;
13
24
  payload?: unknown;
@@ -17,7 +28,9 @@ declare class ModalContainerComponent {
17
28
  title: _angular_core.WritableSignal<string | undefined>;
18
29
  size: _angular_core.WritableSignal<"sm" | "md" | "lg">;
19
30
  showClose: _angular_core.WritableSignal<boolean>;
31
+ enableLog: _angular_core.WritableSignal<boolean>;
20
32
  closed: _angular_core.OutputEmitterRef<ResultPayload | undefined>;
33
+ modalRef: ModalRef;
21
34
  get sizeClass(): "sm" | "md" | "lg";
22
35
  /**
23
36
  * Create a component inside the container and set inputs.
@@ -28,34 +41,31 @@ declare class ModalContainerComponent {
28
41
  */
29
42
  loadComponent<T>(component: Type<T>, inputs?: Partial<T> | any): ComponentRef<T>;
30
43
  private setInput;
31
- backdropClick(): void;
32
- close(result?: ResultPayload): void;
44
+ dismiss(): void;
45
+ log(value: any, ...rest: any[]): void;
33
46
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ModalContainerComponent, never>;
34
47
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<ModalContainerComponent, "as-modal-container", never, {}, { "closed": "closed"; }, never, never, true, never>;
35
48
  }
36
49
 
37
50
  declare abstract class BaseModalComponent {
38
51
  readonly onClose: _angular_core.OutputEmitterRef<ResultPayload | undefined>;
39
- protected sendEvent(result?: ResultPayload | undefined): void;
52
+ private _dismiss?;
53
+ /** called by ModalService */
54
+ _registerDismiss(fn: () => void): void;
55
+ /** CONFIRM */
56
+ protected confirm(result?: ResultPayload): void;
57
+ /** CANCEL / SILENT */
58
+ protected dismiss(): void;
40
59
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<BaseModalComponent, never>;
41
60
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BaseModalComponent, never, never, {}, { "onClose": "onClose"; }, never, never, true, never>;
42
61
  }
43
62
 
44
- declare class ModalRef {
45
- private componentRef;
46
- private hostElement;
47
- private _onClose;
48
- onClose: Observable<any>;
49
- constructor(componentRef: ComponentRef<any>, hostElement: HTMLElement);
50
- close(result?: any): void;
51
- private destroy;
52
- }
53
-
54
63
  interface ModalConfig {
55
64
  id?: string;
56
65
  size?: 'sm' | 'md' | 'lg';
57
66
  title?: string;
58
67
  showClose?: boolean;
68
+ enableLog?: boolean;
59
69
  data?: any;
60
70
  }
61
71
  declare class ModalService {
@@ -65,7 +75,6 @@ declare class ModalService {
65
75
  constructor(injector: Injector, appRef: ApplicationRef, envInjector: EnvironmentInjector);
66
76
  show<T>(component: Type<T>, config?: ModalConfig): ModalRef;
67
77
  private setInput;
68
- private isWritableSignal;
69
78
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ModalService, never>;
70
79
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<ModalService>;
71
80
  }
@@ -75,7 +84,7 @@ declare class TooltipDirective implements OnDestroy {
75
84
  private readonly injector;
76
85
  private readonly host;
77
86
  readonly asTooltip: _angular_core.InputSignal<string | null>;
78
- readonly asTooltipPlacement: _angular_core.InputSignal<"bottom" | "top" | "left" | "right" | "auto">;
87
+ readonly asTooltipPlacement: _angular_core.InputSignal<"top" | "bottom" | "left" | "right" | "auto">;
79
88
  private overlayRef;
80
89
  private strategy;
81
90
  private posSub;
@@ -125,7 +134,7 @@ declare class TypeaheadDirective implements ControlValueAccessor, OnDestroy {
125
134
  private readonly vcr;
126
135
  readonly options: _angular_core.InputSignal<Option[] | null>;
127
136
  readonly displayWith: _angular_core.InputSignal<(item: Option) => string>;
128
- readonly filterBy: _angular_core.InputSignal<"key" | "value">;
137
+ readonly filterBy: _angular_core.InputSignal<"value" | "key">;
129
138
  readonly visibleCount: _angular_core.InputSignal<number>;
130
139
  readonly restrictToList: _angular_core.InputSignal<boolean>;
131
140
  readonly asTypeaheadTemplate: _angular_core.InputSignal<TemplateRef<any> | null>;