ui-core-abv 0.8.9 → 0.9.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.
@@ -160,7 +160,7 @@ export declare const VISIBILITY_OPERATOR_OPTIONS: {
160
160
  text: string;
161
161
  }[];
162
162
  export declare const FIELDS_CONFIG: FieldConfig[];
163
- export type FieldType = 'text' | 'number' | 'phone' | 'date' | 'time' | 'select' | 'radio' | 'checkbox' | 'switch' | 'textarea' | 'pool' | 'file' | 'multyselect' | 'searcher' | 'slider' | 'repeater' | 'computed';
163
+ export type FieldType = 'text' | 'number' | 'phone' | 'date' | 'time' | 'select' | 'radio' | 'checkbox' | 'switch' | 'textarea' | 'pool' | 'file' | 'multyselect' | 'searcher' | 'multisearcher' | 'slider' | 'repeater' | 'computed';
164
164
  export interface FormResult {
165
165
  result: boolean;
166
166
  form: uicFormValuesRecord | null;
@@ -0,0 +1,36 @@
1
+ import { TemplateRef, ViewContainerRef } from '@angular/core';
2
+ import { ConnectedPosition, OverlayRef } from '@angular/cdk/overlay';
3
+ import * as i0 from "@angular/core";
4
+ export interface UicOverlayOpenConfig {
5
+ origin: HTMLElement;
6
+ template: TemplateRef<any>;
7
+ viewContainerRef: ViewContainerRef;
8
+ width?: number | 'auto';
9
+ positions?: ConnectedPosition[];
10
+ flexibleDimensions?: boolean;
11
+ autoReposition?: boolean;
12
+ onClose?: () => void;
13
+ onKeydown?: (event: KeyboardEvent) => void;
14
+ /**
15
+ * Cuando se define, el click en el backdrop deja de auto-cerrar el overlay:
16
+ * el consumidor decide si/cuándo llamar a `close()` (ej. para commitear un
17
+ * valor pendiente antes de cerrar, como hace time-picker).
18
+ */
19
+ onBackdropClick?: () => void;
20
+ }
21
+ export declare class UicOverlayHandle {
22
+ private readonly overlayRef;
23
+ constructor(overlayRef: OverlayRef);
24
+ get isOpen(): boolean;
25
+ get overlayElement(): HTMLElement;
26
+ updatePosition(): void;
27
+ close(): void;
28
+ }
29
+ export declare class UicOverlayDropdownService {
30
+ private readonly overlay;
31
+ open(config: UicOverlayOpenConfig): UicOverlayHandle;
32
+ private observeSizeChanges;
33
+ private getPreferredPositions;
34
+ static ɵfac: i0.ɵɵFactoryDeclaration<UicOverlayDropdownService, never>;
35
+ static ɵprov: i0.ɵɵInjectableDeclaration<UicOverlayDropdownService>;
36
+ }
@@ -0,0 +1,20 @@
1
+ import { Observable } from 'rxjs';
2
+ import * as i0 from "@angular/core";
3
+ export interface UicSearchResolverConfig {
4
+ debounceMs?: number;
5
+ getMinimumLength: () => number;
6
+ getSearchFn: () => ((query: string) => Observable<any[]>) | undefined;
7
+ onLoadingChange?: (loading: boolean) => void;
8
+ }
9
+ export declare class UicSearchResolverHandle {
10
+ private readonly config;
11
+ private readonly searchSubject;
12
+ readonly results$: Observable<any[]>;
13
+ constructor(config: UicSearchResolverConfig);
14
+ search(query: string): void;
15
+ }
16
+ export declare class UicSearchResolverService {
17
+ create(config: UicSearchResolverConfig): UicSearchResolverHandle;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<UicSearchResolverService, never>;
19
+ static ɵprov: i0.ɵɵInjectableDeclaration<UicSearchResolverService>;
20
+ }
@@ -1,5 +1,4 @@
1
1
  import { OnChanges, SimpleChanges, TemplateRef } from '@angular/core';
2
- import { ConnectedPosition } from '@angular/cdk/overlay';
3
2
  import { ButtonColor } from '../../button/button.component';
4
3
  import * as i0 from "@angular/core";
5
4
  type CalendarView = 'days' | 'months' | 'years';
@@ -28,7 +27,7 @@ export declare class UicDatePickerComponent extends base implements OnChanges {
28
27
  justMonth: boolean;
29
28
  monthDay: 'last' | 'first';
30
29
  calendarTemplate: TemplateRef<any>;
31
- private overlayRef;
30
+ private overlayHandle?;
32
31
  months: string[];
33
32
  today: Date;
34
33
  currentYear: number;
@@ -43,12 +42,11 @@ export declare class UicDatePickerComponent extends base implements OnChanges {
43
42
  decadeRange: number[];
44
43
  displayValue: string;
45
44
  get inputPlaceholder(): string;
46
- private readonly overlay;
45
+ private readonly overlayS;
47
46
  private readonly vcr;
48
47
  private readonly host;
49
48
  ngOnInit(): void;
50
49
  ngOnChanges(changes: SimpleChanges): void;
51
- overlayPositions: ConnectedPosition[];
52
50
  openCalendar(): void;
53
51
  closeCalendar(): void;
54
52
  get monthName(): string;
@@ -1,4 +1,3 @@
1
- import { EventEmitter } from '@angular/core';
2
1
  import { ButtonColor } from '../../button/button.component';
3
2
  import * as i0 from "@angular/core";
4
3
  export declare class UicInputComponent {
@@ -12,9 +11,6 @@ export declare class UicInputComponent {
12
11
  tip: string;
13
12
  disabled: boolean;
14
13
  loading: boolean;
15
- clickButton: EventEmitter<boolean>;
16
- disableBtn: boolean;
17
- disableButton(): void;
18
14
  static ɵfac: i0.ɵɵFactoryDeclaration<UicInputComponent, never>;
19
- static ɵcmp: i0.ɵɵComponentDeclaration<UicInputComponent, "ui-input", never, { "icon": { "alias": "icon"; "required": false; }; "iconColor": { "alias": "iconColor"; "required": false; }; "internalIcon": { "alias": "internalIcon"; "required": false; }; "internalIconColor": { "alias": "internalIconColor"; "required": false; }; "size": { "alias": "size"; "required": false; }; "label": { "alias": "label"; "required": false; }; "error": { "alias": "error"; "required": false; }; "tip": { "alias": "tip"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; }, { "clickButton": "clickButton"; }, never, ["*", "[counter]"], true, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<UicInputComponent, "ui-input", never, { "icon": { "alias": "icon"; "required": false; }; "iconColor": { "alias": "iconColor"; "required": false; }; "internalIcon": { "alias": "internalIcon"; "required": false; }; "internalIconColor": { "alias": "internalIconColor"; "required": false; }; "size": { "alias": "size"; "required": false; }; "label": { "alias": "label"; "required": false; }; "error": { "alias": "error"; "required": false; }; "tip": { "alias": "tip"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; }, {}, never, ["*", "[counter]"], true, never>;
20
16
  }
@@ -1,11 +1,54 @@
1
- import { EventEmitter } from '@angular/core';
1
+ import { TemplateRef } from '@angular/core';
2
+ import { Observable } from 'rxjs';
2
3
  import * as i0 from "@angular/core";
3
- export declare class UicMultySearcherComponent {
4
- itemDisplayFn?: (item: any) => string;
4
+ type MultySearcherValue = Record<string, any>[];
5
+ declare const base: abstract new () => {
6
+ value: MultySearcherValue;
7
+ valueChange: import("@angular/core").EventEmitter<MultySearcherValue>;
8
+ onChange: (value: MultySearcherValue) => void;
9
+ onTouched: () => void;
10
+ writeValue(obj: MultySearcherValue): void;
11
+ registerOnChange(fn: any): void;
12
+ registerOnTouched(fn: any): void;
13
+ setDisabledState?(isDisabled: boolean): void;
14
+ notifyChange(value: MultySearcherValue): void;
15
+ };
16
+ export declare class UicMultySearcherComponent extends base {
17
+ icon: string;
18
+ iconColor: 'primary' | 'secondary';
19
+ internalIcon: string;
20
+ label: string;
21
+ error: string;
22
+ tip: string;
5
23
  disabled: boolean;
6
- values: any[];
7
- valuesChange: EventEmitter<any[]>;
8
- removeItem(idx: number): void;
24
+ loading: boolean;
25
+ minimumSearchLength: number;
26
+ placeholder: string;
27
+ searchFn?: (query: string) => Observable<any[]>;
28
+ itemDisplayFn?: (item: any) => string;
29
+ itemIsEnabledFn?: (item: any) => boolean;
30
+ manualSearch: boolean;
31
+ private readonly push;
32
+ private readonly i18n;
33
+ private readonly searchResolver;
34
+ results$: Observable<any[]>;
35
+ selectedItems: MultySearcherValue;
36
+ searchText: string;
37
+ watingApi: boolean;
38
+ private readonly overlayS;
39
+ private readonly vcr;
40
+ private readonly host;
41
+ onSearchChange(value: string): void;
42
+ triggerSearch(): void;
43
+ selectItem(item: Record<string, any>): void;
44
+ removeItem(index: number): void;
45
+ clearSearch(): void;
46
+ dropdownTemplate: TemplateRef<any>;
47
+ private overlayHandle?;
48
+ openList(): void;
49
+ closeList(): void;
50
+ writeValue(value: MultySearcherValue | null): void;
9
51
  static ɵfac: i0.ɵɵFactoryDeclaration<UicMultySearcherComponent, never>;
10
- static ɵcmp: i0.ɵɵComponentDeclaration<UicMultySearcherComponent, "ui-multy-searcher", never, { "itemDisplayFn": { "alias": "itemDisplayFn"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "values": { "alias": "values"; "required": false; }; }, { "valuesChange": "valuesChange"; }, never, never, true, never>;
52
+ static ɵcmp: i0.ɵɵComponentDeclaration<UicMultySearcherComponent, "ui-multy-searcher", never, { "icon": { "alias": "icon"; "required": false; }; "iconColor": { "alias": "iconColor"; "required": false; }; "internalIcon": { "alias": "internalIcon"; "required": false; }; "label": { "alias": "label"; "required": false; }; "error": { "alias": "error"; "required": false; }; "tip": { "alias": "tip"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "minimumSearchLength": { "alias": "minimumSearchLength"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "searchFn": { "alias": "searchFn"; "required": false; }; "itemDisplayFn": { "alias": "itemDisplayFn"; "required": false; }; "itemIsEnabledFn": { "alias": "itemIsEnabledFn"; "required": false; }; "manualSearch": { "alias": "manualSearch"; "required": false; }; }, {}, never, never, true, never>;
11
53
  }
54
+ export {};
@@ -1,5 +1,4 @@
1
1
  import { SimpleChanges, TemplateRef } from '@angular/core';
2
- import { ConnectedPosition } from '@angular/cdk/overlay';
3
2
  import { AppSelectOption } from '../select/select.component';
4
3
  import { ButtonColor } from '../../button/button.component';
5
4
  import * as i0 from "@angular/core";
@@ -46,9 +45,8 @@ export declare class UicMultySelectComponent extends base {
46
45
  options: AppSelectOption[];
47
46
  }[];
48
47
  dropdownTemplate: TemplateRef<any>;
49
- private overlayRef;
50
- overlayPositions: ConnectedPosition[];
51
- private readonly overlay;
48
+ private overlayHandle?;
49
+ private readonly overlayS;
52
50
  private readonly vcr;
53
51
  private readonly host;
54
52
  ngOnChanges(changes: SimpleChanges): void;
@@ -48,10 +48,9 @@ export declare class UicPhoneInputComponent extends base implements OnChanges, O
48
48
  private changeRegistered;
49
49
  private _countries;
50
50
  private readonly host;
51
- private readonly overlay;
51
+ private readonly overlayS;
52
52
  private readonly vcr;
53
- private overlayRef?;
54
- private readonly overlayPositions;
53
+ private overlayHandle?;
55
54
  constructor();
56
55
  ngOnChanges(changes: SimpleChanges): void;
57
56
  ngOnDestroy(): void;
@@ -1,5 +1,4 @@
1
1
  import { SimpleChanges, TemplateRef } from '@angular/core';
2
- import { ConnectedPosition } from '@angular/cdk/overlay';
3
2
  import { ButtonColor } from '../../button/button.component';
4
3
  import * as i0 from "@angular/core";
5
4
  type selectId = number | string | null;
@@ -33,12 +32,11 @@ export declare class UicSelectComponent extends base {
33
32
  nullable: boolean;
34
33
  options: AppSelectOption[];
35
34
  dropdownTemplate: TemplateRef<any>;
36
- private overlayRef;
35
+ private overlayHandle?;
37
36
  searchTerm: string;
38
37
  activeOptionIndex: number;
39
- overlayPositions: ConnectedPosition[];
40
38
  selectedOption: AppSelectOption | null;
41
- private readonly overlay;
39
+ private readonly overlayS;
42
40
  private readonly vcr;
43
41
  private readonly host;
44
42
  ngOnChanges(changes: SimpleChanges): void;
@@ -56,6 +54,7 @@ export declare class UicSelectComponent extends base {
56
54
  openList(): void;
57
55
  selectOption(option: AppSelectOption | null): void;
58
56
  closeList(): void;
57
+ private handleOverlayClosed;
59
58
  writeValue(value: string | number | null): void;
60
59
  updateSearchTerm(value: string): void;
61
60
  clearSearch(event?: Event): void;
@@ -1,5 +1,4 @@
1
1
  import { ElementRef, QueryList, SimpleChanges, TemplateRef } from '@angular/core';
2
- import { ConnectedPosition } from '@angular/cdk/overlay';
3
2
  import { ButtonColor } from '../../button/button.component';
4
3
  import * as i0 from "@angular/core";
5
4
  declare const base: abstract new () => {
@@ -28,11 +27,10 @@ export declare class UicTimePickerComponent extends base {
28
27
  hourOptions: QueryList<ElementRef<HTMLElement>>;
29
28
  minuteOptions: QueryList<ElementRef<HTMLElement>>;
30
29
  meridiemOptions: QueryList<ElementRef<HTMLElement>>;
31
- private overlayRef;
32
- private readonly overlay;
30
+ private overlayHandle?;
31
+ private readonly overlayS;
33
32
  private readonly vcr;
34
33
  private readonly host;
35
- overlayPositions: ConnectedPosition[];
36
34
  hours12: number[];
37
35
  minutes: number[];
38
36
  meridiems: Array<'am' | 'pm'>;
@@ -1,6 +1,5 @@
1
1
  import { EventEmitter, TemplateRef } from '@angular/core';
2
2
  import { Observable } from 'rxjs';
3
- import { ConnectedPosition } from '@angular/cdk/overlay';
4
3
  import * as i0 from "@angular/core";
5
4
  declare const base: abstract new () => {
6
5
  value: Record<string, any> | null;
@@ -33,27 +32,23 @@ export declare class UicSearcherComponent extends base {
33
32
  manualSearch: boolean;
34
33
  stateless: boolean;
35
34
  pickedItem: EventEmitter<Record<string, any>>;
36
- private readonly searchSubject;
35
+ private readonly searchResolver;
37
36
  results$: Observable<any[]>;
38
37
  selectedOption: Record<string, any> | null;
39
38
  searchText: string;
40
39
  watingApi: boolean;
41
- private readonly overlay;
40
+ private readonly overlayS;
42
41
  private readonly vcr;
43
42
  private readonly host;
44
- private resizeObserver?;
45
43
  onSearchChange(value: string): void;
46
44
  triggerSearch(): void;
47
45
  selectItem(item: Record<string, any>): void;
48
46
  clearSearch(): void;
49
47
  unselect(): void;
50
48
  dropdownTemplate: TemplateRef<any>;
51
- private overlayRef;
52
- overlayPositions: ConnectedPosition[];
49
+ private overlayHandle?;
53
50
  openList(): void;
54
51
  closeList(): void;
55
- private observeOverlaySizeChanges;
56
- private getPreferredPositions;
57
52
  writeValue(value: Record<string, any>): void;
58
53
  static ɵfac: i0.ɵɵFactoryDeclaration<UicSearcherComponent, never>;
59
54
  static ɵcmp: i0.ɵɵComponentDeclaration<UicSearcherComponent, "ui-searcher", never, { "icon": { "alias": "icon"; "required": false; }; "iconColor": { "alias": "iconColor"; "required": false; }; "internalIcon": { "alias": "internalIcon"; "required": false; }; "size": { "alias": "size"; "required": false; }; "label": { "alias": "label"; "required": false; }; "error": { "alias": "error"; "required": false; }; "tip": { "alias": "tip"; "required": false; }; "showSubtitle": { "alias": "showSubtitle"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "minimumSearchLength": { "alias": "minimumSearchLength"; "required": false; }; "showSelected": { "alias": "showSelected"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "searchFn": { "alias": "searchFn"; "required": false; }; "itemDisplayFn": { "alias": "itemDisplayFn"; "required": false; }; "itemIsEnabledFn": { "alias": "itemIsEnabledFn"; "required": false; }; "manualSearch": { "alias": "manualSearch"; "required": false; }; "stateless": { "alias": "stateless"; "required": false; }; }, { "pickedItem": "pickedItem"; }, never, never, true, never>;
@@ -146,6 +146,7 @@ export declare const DICTIONARY_EN: {
146
146
  readonly clear_tip: "Clear";
147
147
  readonly empty: "No items to show";
148
148
  readonly without_selected: "No selected items";
149
+ readonly already_selected: "This item is already selected";
149
150
  };
150
151
  readonly alerts: {
151
152
  readonly success_title: "Operation successful";
@@ -146,6 +146,7 @@ export declare const DICTIONARY_ES: {
146
146
  readonly clear_tip: "Limpiar";
147
147
  readonly empty: "No hay elementos para mostrar";
148
148
  readonly without_selected: "Sin elementos seleccionados";
149
+ readonly already_selected: "Este elemento ya fue seleccionado";
149
150
  };
150
151
  readonly alerts: {
151
152
  readonly success_title: "Operacion exitosa";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ui-core-abv",
3
- "version": "0.8.9",
3
+ "version": "0.9.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=19.2.0 <21.0.0",
6
6
  "@angular/core": ">=19.2.0 <21.0.0",