dolfo-angular 1.199.0 → 1.201.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -508,6 +508,7 @@ class AutocompleteComponent extends BaseFormInput {
508
508
  autocompleteInput;
509
509
  config;
510
510
  minChars = 3;
511
+ resultTemplate;
511
512
  onFocus = new EventEmitter();
512
513
  onBlur = new EventEmitter();
513
514
  options = signal([], ...(ngDevMode ? [{ debugName: "options" }] : []));
@@ -594,7 +595,7 @@ class AutocompleteComponent extends BaseFormInput {
594
595
  this.onChange.emit(this.input.value);
595
596
  };
596
597
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AutocompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
597
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: AutocompleteComponent, isStandalone: false, selector: "dolfo-autocomplete", inputs: { config: "config", minChars: "minChars" }, outputs: { onFocus: "onFocus", onBlur: "onBlur" }, providers: [
598
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: AutocompleteComponent, isStandalone: false, selector: "dolfo-autocomplete", inputs: { config: "config", minChars: "minChars", resultTemplate: "resultTemplate" }, outputs: { onFocus: "onFocus", onBlur: "onBlur" }, providers: [
598
599
  { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => AutocompleteComponent), multi: true },
599
600
  { provide: NG_VALIDATORS, useExisting: forwardRef(() => AutocompleteComponent), multi: true },
600
601
  { provide: BaseFormInput, useExisting: AutocompleteComponent }
@@ -618,12 +619,16 @@ class AutocompleteComponent extends BaseFormInput {
618
619
 
619
620
  @for(opt of options(); track opt.value; let idx = $index){
620
621
  <div class="combobox-option" [class.selected]="isSelected(opt)" [class.focused]="currentFocus() === idx" (click)="$event.stopPropagation(); setOption(opt)">
621
- <span>{{ opt.label }}</span>
622
+ @if(resultTemplate){
623
+ <ng-container [ngTemplateOutlet]="resultTemplate" [ngTemplateOutletContext]="{ item: opt }"></ng-container>
624
+ }@else {
625
+ <span>{{ opt.label }}</span>
626
+ }
622
627
  </div>
623
628
  }
624
629
  </div>
625
630
  </div>
626
- </dolfo-input-container>`, isInline: true, dependencies: [{ kind: "component", type: InputContainerComponent, selector: "dolfo-input-container" }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
631
+ </dolfo-input-container>`, isInline: true, dependencies: [{ kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: InputContainerComponent, selector: "dolfo-input-container" }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
627
632
  }
628
633
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AutocompleteComponent, decorators: [{
629
634
  type: Component,
@@ -649,7 +654,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
649
654
 
650
655
  @for(opt of options(); track opt.value; let idx = $index){
651
656
  <div class="combobox-option" [class.selected]="isSelected(opt)" [class.focused]="currentFocus() === idx" (click)="$event.stopPropagation(); setOption(opt)">
652
- <span>{{ opt.label }}</span>
657
+ @if(resultTemplate){
658
+ <ng-container [ngTemplateOutlet]="resultTemplate" [ngTemplateOutletContext]="{ item: opt }"></ng-container>
659
+ }@else {
660
+ <span>{{ opt.label }}</span>
661
+ }
653
662
  </div>
654
663
  }
655
664
  </div>
@@ -674,6 +683,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
674
683
  args: [{ required: true }]
675
684
  }], minChars: [{
676
685
  type: Input
686
+ }], resultTemplate: [{
687
+ type: Input
677
688
  }], onFocus: [{
678
689
  type: Output
679
690
  }], onBlur: [{
@@ -1486,7 +1497,7 @@ class DialogComponent extends Formable {
1486
1497
  @if(footer){
1487
1498
  <dolfo-dialog-footer [buttons]="footer"></dolfo-dialog-footer>
1488
1499
  }
1489
- </dolfo-dialog-layout>`, isInline: true, dependencies: [{ kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: InputTextComponent, selector: "dolfo-input-text", inputs: ["type", "placeHolder"], outputs: ["onFocus", "onBlur"] }, { kind: "component", type: ComboboxComponent, selector: "dolfo-combobox", inputs: ["options", "placeHolder", "multiple"], outputs: ["onFocus", "onBlur"] }, { kind: "component", type: DatepickerComponent, selector: "dolfo-datepicker", inputs: ["selectTime"], outputs: ["onFocus", "onBlur"] }, { kind: "component", type: AutocompleteComponent, selector: "dolfo-autocomplete", inputs: ["config", "minChars"], outputs: ["onFocus", "onBlur"] }, { kind: "component", type: InputRadioComponent, selector: "dolfo-input-radio", inputs: ["options"] }, { kind: "component", type: DialogContentComponent, selector: "dolfo-dialog-content" }, { kind: "component", type: DialogHeaderComponent, selector: "dolfo-dialog-header", inputs: ["title", "icon", "showCloseX"] }, { kind: "component", type: DialogFooterComponent, selector: "dolfo-dialog-footer", inputs: ["buttons"] }, { kind: "component", type: DialogLayoutComponent, selector: "dolfo-dialog-layout", inputs: ["width"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1500
+ </dolfo-dialog-layout>`, isInline: true, dependencies: [{ kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: InputTextComponent, selector: "dolfo-input-text", inputs: ["type", "placeHolder"], outputs: ["onFocus", "onBlur"] }, { kind: "component", type: ComboboxComponent, selector: "dolfo-combobox", inputs: ["options", "placeHolder", "multiple"], outputs: ["onFocus", "onBlur"] }, { kind: "component", type: DatepickerComponent, selector: "dolfo-datepicker", inputs: ["selectTime"], outputs: ["onFocus", "onBlur"] }, { kind: "component", type: AutocompleteComponent, selector: "dolfo-autocomplete", inputs: ["config", "minChars", "resultTemplate"], outputs: ["onFocus", "onBlur"] }, { kind: "component", type: InputRadioComponent, selector: "dolfo-input-radio", inputs: ["options"] }, { kind: "component", type: DialogContentComponent, selector: "dolfo-dialog-content" }, { kind: "component", type: DialogHeaderComponent, selector: "dolfo-dialog-header", inputs: ["title", "icon", "showCloseX"] }, { kind: "component", type: DialogFooterComponent, selector: "dolfo-dialog-footer", inputs: ["buttons"] }, { kind: "component", type: DialogLayoutComponent, selector: "dolfo-dialog-layout", inputs: ["width"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1490
1501
  }
1491
1502
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: DialogComponent, decorators: [{
1492
1503
  type: Component,
@@ -1650,6 +1661,7 @@ class PopoverComponent extends Subscriptable {
1650
1661
  content;
1651
1662
  elementRef;
1652
1663
  direction;
1664
+ context;
1653
1665
  destroyFn = inject(POPOVER_DESTROY_TOKEN);
1654
1666
  checkCount = 0;
1655
1667
  currentDirection$ = new BehaviorSubject(null);
@@ -1714,12 +1726,12 @@ class PopoverComponent extends Subscriptable {
1714
1726
  isTemplate = () => this.content instanceof TemplateRef;
1715
1727
  getContentTemplate = () => this.content;
1716
1728
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: PopoverComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$3.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
1717
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: PopoverComponent, isStandalone: false, selector: "dolfo-popover", inputs: { content: "content", elementRef: "elementRef", direction: "direction" }, viewQueries: [{ propertyName: "tooltipRef", first: true, predicate: ["tooltipRef"], descendants: true }], usesInheritance: true, ngImport: i0, template: `<div class="tooltip popover" #tooltipRef [ngStyle]="{
1729
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: PopoverComponent, isStandalone: false, selector: "dolfo-popover", inputs: { content: "content", elementRef: "elementRef", direction: "direction", context: "context" }, viewQueries: [{ propertyName: "tooltipRef", first: true, predicate: ["tooltipRef"], descendants: true }], usesInheritance: true, ngImport: i0, template: `<div class="tooltip popover" #tooltipRef [ngStyle]="{
1718
1730
  left: (x$ | async) + 'px',
1719
1731
  top: (y$ | async) + 'px'
1720
1732
  }" [ngClass]="currentDirection$ | async" [class.show]="completed$ | async">
1721
1733
  @if(isTemplate()){
1722
- <ng-container [ngTemplateOutlet]="getContentTemplate()"></ng-container>
1734
+ <ng-container [ngTemplateOutlet]="getContentTemplate()" [ngTemplateOutletContext]="context"></ng-container>
1723
1735
  }@else{
1724
1736
  <div [innerHTML]="getContentStr()"></div>
1725
1737
  }
@@ -1735,7 +1747,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
1735
1747
  top: (y$ | async) + 'px'
1736
1748
  }" [ngClass]="currentDirection$ | async" [class.show]="completed$ | async">
1737
1749
  @if(isTemplate()){
1738
- <ng-container [ngTemplateOutlet]="getContentTemplate()"></ng-container>
1750
+ <ng-container [ngTemplateOutlet]="getContentTemplate()" [ngTemplateOutletContext]="context"></ng-container>
1739
1751
  }@else{
1740
1752
  <div [innerHTML]="getContentStr()"></div>
1741
1753
  }
@@ -1754,6 +1766,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
1754
1766
  }], direction: [{
1755
1767
  type: Input,
1756
1768
  args: [{ required: true }]
1769
+ }], context: [{
1770
+ type: Input
1757
1771
  }] } });
1758
1772
 
1759
1773
  const TOOLTIP_DESTROY_TOKEN = new InjectionToken("TOOLTIP_DESTROY_TOKEN");
@@ -1999,6 +2013,7 @@ class PopoverDirective extends Subscriptable {
1999
2013
  el;
2000
2014
  ps;
2001
2015
  content;
2016
+ context;
2002
2017
  direction = "top";
2003
2018
  constructor(el, ps) {
2004
2019
  super();
@@ -2010,11 +2025,12 @@ class PopoverDirective extends Subscriptable {
2010
2025
  this.addSubscription(fromEvent(this.el.nativeElement, "click").pipe(filter(() => !!this.content)).subscribe(() => this.ps.showPopover({
2011
2026
  content: this.content,
2012
2027
  elementRef: this.el,
2013
- direction: this.direction
2028
+ direction: this.direction,
2029
+ context: this.context
2014
2030
  })));
2015
2031
  }
2016
2032
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: PopoverDirective, deps: [{ token: i0.ElementRef }, { token: PopoverService }], target: i0.ɵɵFactoryTarget.Directive });
2017
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.3", type: PopoverDirective, isStandalone: false, selector: "[dolfoPopover]", inputs: { content: ["dolfoPopover", "content"], direction: "direction" }, usesInheritance: true, ngImport: i0 });
2033
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.3", type: PopoverDirective, isStandalone: false, selector: "[dolfoPopover]", inputs: { content: ["dolfoPopover", "content"], context: ["dolfoPopoverContext", "context"], direction: "direction" }, usesInheritance: true, ngImport: i0 });
2018
2034
  }
2019
2035
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: PopoverDirective, decorators: [{
2020
2036
  type: Directive,
@@ -2025,6 +2041,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
2025
2041
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: PopoverService }], propDecorators: { content: [{
2026
2042
  type: Input,
2027
2043
  args: [{ required: true, alias: "dolfoPopover" }]
2044
+ }], context: [{
2045
+ type: Input,
2046
+ args: [{ alias: "dolfoPopoverContext" }]
2028
2047
  }], direction: [{
2029
2048
  type: Input
2030
2049
  }] } });