@elite.framework/ng.core 1.0.46 → 1.0.47

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.
@@ -4167,6 +4167,12 @@ class GenericSelectorTypeComponent extends FieldType {
4167
4167
  });
4168
4168
  }
4169
4169
  // New method to handle loading the default value from the API
4170
+ onSelect(val) {
4171
+ if (this.props.onSelect) {
4172
+ this.props.onSelect(this.field, { item: val });
4173
+ this.cdr.detectChanges();
4174
+ }
4175
+ }
4170
4176
  onSelectionChange(val) {
4171
4177
  this.selectedItem = val;
4172
4178
  const vf = this.to['valueField'] || 'id';
@@ -4331,6 +4337,7 @@ class GenericSelectorTypeComponent extends FieldType {
4331
4337
  }
4332
4338
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: GenericSelectorTypeComponent, deps: [{ token: BaseService }, { token: i0.Injector }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
4333
4339
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: GenericSelectorTypeComponent, isStandalone: true, selector: "formly-generic-selector", providers: [DialogService, BaseService], viewQueries: [{ propertyName: "autoComp", first: true, predicate: ["autoComp"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
4340
+ <!-- (ngModelChange)="onSelectionChange($event)" -->
4334
4341
  <p-autoComplete
4335
4342
  #autoComp
4336
4343
  (ngModelChange)="onSelectionChange($event)"
@@ -4360,6 +4367,9 @@ class GenericSelectorTypeComponent extends FieldType {
4360
4367
  <span>{{ item[to['labelField'] || 'name'] }}</span>
4361
4368
  </div>
4362
4369
  </ng-template> -->
4370
+ <ng-template let-option #item>
4371
+ <a (click)="onSelect(option)"> {{option[to['labelField'] || 'name'] }} </a>
4372
+ </ng-template>
4363
4373
  </p-autoComplete>
4364
4374
  `, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: AutoCompleteModule }, { kind: "component", type: i3.AutoComplete, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: ["minLength", "minQueryLength", "delay", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "typeahead", "appendTo"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: InputGroupModule }, { kind: "ngmodule", type: InputGroupAddonModule }, { kind: "directive", type: FormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: CheckboxModule }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }] });
4365
4375
  }
@@ -4368,6 +4378,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImpor
4368
4378
  args: [{
4369
4379
  selector: 'formly-generic-selector',
4370
4380
  template: `
4381
+ <!-- (ngModelChange)="onSelectionChange($event)" -->
4371
4382
  <p-autoComplete
4372
4383
  #autoComp
4373
4384
  (ngModelChange)="onSelectionChange($event)"
@@ -4397,6 +4408,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImpor
4397
4408
  <span>{{ item[to['labelField'] || 'name'] }}</span>
4398
4409
  </div>
4399
4410
  </ng-template> -->
4411
+ <ng-template let-option #item>
4412
+ <a (click)="onSelect(option)"> {{option[to['labelField'] || 'name'] }} </a>
4413
+ </ng-template>
4400
4414
  </p-autoComplete>
4401
4415
  `,
4402
4416
  providers: [DialogService, BaseService],