ui-core-abv 0.11.0 → 0.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/fesm2022/ui-core-abv.mjs +4117 -2716
  2. package/fesm2022/ui-core-abv.mjs.map +1 -1
  3. package/lib/components/button/button.component.d.ts +3 -1
  4. package/lib/components/dynamic-form/form-validators.d.ts +10 -0
  5. package/lib/components/dynamic-form/form.models.d.ts +12 -1
  6. package/lib/components/inputs/multy-select/multy-select.component.d.ts +7 -1
  7. package/lib/components/inputs/ui-scale/ui-scale.component.d.ts +53 -0
  8. package/lib/components/modal/side-modal/side-modal.component.d.ts +2 -3
  9. package/lib/components/pool-options/pool-options.component.d.ts +12 -1
  10. package/lib/components/survey/survey-templates.directive.d.ts +1 -11
  11. package/lib/components/survey/survey.component.d.ts +33 -16
  12. package/lib/components/survey/survey.models.d.ts +2 -3
  13. package/lib/components/table/table.models.d.ts +3 -2
  14. package/lib/components/tree-admin/tree-admin.component.d.ts +2 -1
  15. package/lib/components/user-formbuilder/block-editor/block-editor.component.d.ts +41 -3
  16. package/lib/components/user-formbuilder/block-editor/field-editor/field-editor.component.d.ts +15 -2
  17. package/lib/components/user-formbuilder/block-editor/field-editor/field-options-editor/field-options-editor.component.d.ts +27 -1
  18. package/lib/components/user-formbuilder/block-editor/field-editor/field-options-editor/option-style-editor/option-style-editor.component.d.ts +36 -0
  19. package/lib/components/user-formbuilder/block-editor/field-type-selector/field-type-selector.component.d.ts +24 -3
  20. package/lib/components/user-formbuilder/form-preview/form-preview.component.d.ts +31 -13
  21. package/lib/components/user-formbuilder/formbuilder.utils.d.ts +10 -0
  22. package/lib/components/user-formbuilder/user-formbuilder.component.d.ts +83 -7
  23. package/lib/components/wizard/wizard.component.d.ts +1 -2
  24. package/lib/directives/tool-tip.directive.d.ts +5 -0
  25. package/lib/theme/colors.d.ts +24 -0
  26. package/lib/theme/theme-scope.d.ts +8 -0
  27. package/lib/translate/dictionary.en.d.ts +108 -2
  28. package/lib/translate/dictionary.es.d.ts +108 -2
  29. package/package.json +6 -5
  30. package/public-api.d.ts +3 -0
  31. package/src/lib/styles/_dark.scss +113 -0
  32. package/src/lib/styles/_default_colors.scss +103 -0
  33. package/src/lib/styles/_tokens.scss +6 -0
  34. package/src/lib/styles/_variables.scss +140 -101
@@ -1,3 +1,4 @@
1
+ import { UicColor } from '../../theme/colors';
1
2
  import { SimpleChanges } from '@angular/core';
2
3
  import * as i0 from "@angular/core";
3
4
  export declare class UicButtonComponent {
@@ -16,6 +17,7 @@ export declare class UicButtonComponent {
16
17
  static ɵfac: i0.ɵɵFactoryDeclaration<UicButtonComponent, never>;
17
18
  static ɵcmp: i0.ɵɵComponentDeclaration<UicButtonComponent, "ui-button", never, { "text": { "alias": "text"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "rightIcon": { "alias": "rightIcon"; "required": false; }; "iconOnly": { "alias": "iconOnly"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "size": { "alias": "size"; "required": false; }; "type": { "alias": "type"; "required": false; }; "color": { "alias": "color"; "required": false; }; }, {}, never, ["*"], true, never>;
18
19
  }
19
- export type ButtonColor = 'primary' | 'secondary' | 'red' | 'green' | 'blue' | 'yellow' | 'black' | 'grey' | 'white';
20
+ /** Colores de la librería (ver theme/colors.ts). */
21
+ export type ButtonColor = UicColor;
20
22
  export type ButtonSize = 't' | 's' | 'm' | 'l' | 'g';
21
23
  export type ButtonType = 'filled' | 'bordered' | 'ghost';
@@ -0,0 +1,10 @@
1
+ import { ValidatorFn } from '@angular/forms';
2
+ import { FormField } from './form.models';
3
+ /**
4
+ * Valida la cantidad de opciones elegidas (multyselect y pool múltiple).
5
+ * Un valor vacío no falla por mínimo: para exigir al menos una respuesta se usa `required`.
6
+ * Errores: { minSelections: { min, actual } } y { maxSelections: { max, actual } }.
7
+ */
8
+ export declare function uicSelectionCountValidator(min?: number | null, max?: number | null): ValidatorFn;
9
+ /** Validadores de selección que corresponden al campo (vacío si no aplica). */
10
+ export declare function uicSelectionValidatorsFor(field: FormField): ValidatorFn[];
@@ -2,6 +2,8 @@ import { Observable } from "rxjs";
2
2
  import { AppSelectOption } from "../inputs/select/select.component";
3
3
  import { ButtonColor } from "../button/button.component";
4
4
  export type FormIconMode = 'checklist';
5
+ export type PoolDisplayMode = 'flex' | 'grid';
6
+ export type ScaleMode = 'number' | 'icon';
5
7
  export interface FormStep {
6
8
  title: string;
7
9
  form: FormSchema;
@@ -99,6 +101,13 @@ export interface FormField {
99
101
  min?: number;
100
102
  max?: number;
101
103
  step?: number;
104
+ minSelections?: number;
105
+ maxSelections?: number;
106
+ scaleMin?: number;
107
+ scaleMax?: number;
108
+ scaleMode?: ScaleMode;
109
+ scaleIcon?: string;
110
+ scaleLabels?: AppSelectOption[];
102
111
  sliderInterval?: number;
103
112
  sliderMarks?: number;
104
113
  monthMode?: boolean;
@@ -112,6 +121,8 @@ export interface FormField {
112
121
  templateLinkLabel?: string;
113
122
  poolEnabledListView?: boolean;
114
123
  poolTitle?: string;
124
+ poolDisplayMode?: PoolDisplayMode;
125
+ poolGridColumns?: number;
115
126
  options?: AppSelectOption[];
116
127
  optionsSource?: SelectOptionsSource;
117
128
  multyEnabled?: boolean;
@@ -165,7 +176,7 @@ export declare const VISIBILITY_OPERATOR_OPTIONS: {
165
176
  text: string;
166
177
  }[];
167
178
  export declare const FIELDS_CONFIG: FieldConfig[];
168
- export type FieldType = 'text' | 'number' | 'phone' | 'date' | 'time' | 'select' | 'radio' | 'checkbox' | 'switch' | 'textarea' | 'pool' | 'file' | 'multyselect' | 'searcher' | 'multisearcher' | 'slider' | 'repeater' | 'computed';
179
+ export type FieldType = 'text' | 'number' | 'phone' | 'date' | 'time' | 'select' | 'radio' | 'checkbox' | 'switch' | 'textarea' | 'pool' | 'file' | 'multyselect' | 'searcher' | 'multisearcher' | 'slider' | 'repeater' | 'computed' | 'scale';
169
180
  export interface FormResult {
170
181
  result: boolean;
171
182
  form: uicFormValuesRecord | null;
@@ -30,6 +30,12 @@ export declare class UicMultySelectComponent extends base {
30
30
  emptyText: string;
31
31
  loading: boolean;
32
32
  options: AppSelectOption[];
33
+ /** Máximo de opciones elegibles (sin límite si no se define). Oculta 'Todos' si es menor que el total. */
34
+ maxSelections: number | null;
35
+ get hasMax(): boolean;
36
+ get maxReached(): boolean;
37
+ get canSelectAll(): boolean;
38
+ isOptionBlocked(id: number | string): boolean;
33
39
  allSelected: boolean;
34
40
  selectedSet: Set<string | number>;
35
41
  toggleAll(checked: boolean): void;
@@ -56,6 +62,6 @@ export declare class UicMultySelectComponent extends base {
56
62
  private emitSelection;
57
63
  private syncSelectionFromValue;
58
64
  static ɵfac: i0.ɵɵFactoryDeclaration<UicMultySelectComponent, never>;
59
- static ɵcmp: i0.ɵɵComponentDeclaration<UicMultySelectComponent, "ui-multy-select", 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; }; "showSubtitle": { "alias": "showSubtitle"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "nonSelectedText": { "alias": "nonSelectedText"; "required": false; }; "allSelectedText": { "alias": "allSelectedText"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "options": { "alias": "options"; "required": false; }; }, {}, never, never, true, never>;
65
+ static ɵcmp: i0.ɵɵComponentDeclaration<UicMultySelectComponent, "ui-multy-select", 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; }; "showSubtitle": { "alias": "showSubtitle"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "nonSelectedText": { "alias": "nonSelectedText"; "required": false; }; "allSelectedText": { "alias": "allSelectedText"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "options": { "alias": "options"; "required": false; }; "maxSelections": { "alias": "maxSelections"; "required": false; }; }, {}, never, never, true, never>;
60
66
  }
61
67
  export {};
@@ -0,0 +1,53 @@
1
+ import { ButtonColor } from '../../button/button.component';
2
+ import { AppSelectOption } from '../select/select.component';
3
+ import { ScaleMode } from '../../dynamic-form/form.models';
4
+ import * as i0 from "@angular/core";
5
+ declare const base: abstract new () => {
6
+ value: number | null;
7
+ valueChange: import("@angular/core").EventEmitter<number | null>;
8
+ onChange: (value: number | null) => void;
9
+ onTouched: () => void;
10
+ writeValue(obj: number | null): void;
11
+ registerOnChange(fn: any): void;
12
+ registerOnTouched(fn: any): void;
13
+ setDisabledState?(isDisabled: boolean): void;
14
+ notifyChange(value: number | null): void;
15
+ };
16
+ /**
17
+ * Pregunta de escala: numérica (NPS, Likert) o de íconos acumulativos (estrellas).
18
+ * Valor: el número elegido, o null. Se maneja con teclado como un grupo de radios
19
+ * (flechas, Inicio, Fin) y anuncia cada punto con su leyenda.
20
+ */
21
+ export declare class UicScaleComponent extends base {
22
+ private readonly host;
23
+ icon: string;
24
+ iconColor: ButtonColor;
25
+ label: string;
26
+ error: string;
27
+ tip: string;
28
+ disabled: boolean;
29
+ min: number;
30
+ max: number;
31
+ /** 'number': botones con el número. 'icon': íconos que se rellenan hasta el valor elegido. */
32
+ mode: ScaleMode;
33
+ scaleIcon: string;
34
+ /** Leyendas por valor: { id: valor, text: leyenda }. */
35
+ labels: AppSelectOption[];
36
+ /** Valor bajo el puntero (vista previa del relleno en modo íconos). */
37
+ hovered: number | null;
38
+ get points(): number[];
39
+ get hasLegends(): boolean;
40
+ legendFor(value: number): string;
41
+ isSelected(value: number): boolean;
42
+ /** En modo íconos se rellenan todos hasta el valor elegido (o el que está bajo el puntero). */
43
+ isFilled(value: number): boolean;
44
+ /** Un solo punto entra en el orden de tabulación: el elegido, o el primero. */
45
+ tabIndexFor(value: number): number;
46
+ select(value: number): void;
47
+ onKeydown(event: KeyboardEvent): void;
48
+ onFocusOut(event: FocusEvent): void;
49
+ private focusPoint;
50
+ static ɵfac: i0.ɵɵFactoryDeclaration<UicScaleComponent, never>;
51
+ static ɵcmp: i0.ɵɵComponentDeclaration<UicScaleComponent, "ui-scale", never, { "icon": { "alias": "icon"; "required": false; }; "iconColor": { "alias": "iconColor"; "required": false; }; "label": { "alias": "label"; "required": false; }; "error": { "alias": "error"; "required": false; }; "tip": { "alias": "tip"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "scaleIcon": { "alias": "scaleIcon"; "required": false; }; "labels": { "alias": "labels"; "required": false; }; }, {}, never, never, true, never>;
52
+ }
53
+ export {};
@@ -3,21 +3,20 @@ import { Injector, Type } from '@angular/core';
3
3
  import { OverlayRef } from '@angular/cdk/overlay';
4
4
  import { SideModalConfig } from './sideModalConfig.model';
5
5
  import { UiModalRef } from '../../../services/modaRef';
6
- import { UicModalService } from '../../../services/modal.service';
7
6
  import * as i0 from "@angular/core";
8
7
  export declare class UicSideModalComponent {
9
8
  private readonly modalRef;
10
9
  private readonly component;
11
10
  private readonly congif;
12
11
  private readonly injector;
13
- private readonly modal;
14
12
  overlayRef: OverlayRef;
15
13
  state: 'visible' | 'hidden';
16
14
  show: boolean;
17
15
  myConfig: SideModalConfig;
18
16
  ready: boolean;
19
17
  portalOutlet: CdkPortalOutlet;
20
- constructor(modalRef: UiModalRef, component: Type<any>, congif: SideModalConfig, injector: Injector, modal: UicModalService);
18
+ private readonly modal;
19
+ constructor(modalRef: UiModalRef, component: Type<any>, congif: SideModalConfig, injector: Injector);
21
20
  ngOnInit(): void;
22
21
  ngAfterViewInit(): void;
23
22
  closeOuside(): void;
@@ -1,6 +1,7 @@
1
1
  import { SimpleChanges } from '@angular/core';
2
2
  import { AppSelectOption } from '../inputs/select/select.component';
3
3
  import { ButtonColor } from '../button/button.component';
4
+ import { PoolDisplayMode } from '../dynamic-form/form.models';
4
5
  import * as i0 from "@angular/core";
5
6
  type selectId = number | string;
6
7
  type selectedDetailed = {
@@ -31,6 +32,15 @@ export declare class UicPoolOptionsComponent extends base {
31
32
  enabledListView: boolean;
32
33
  listViewTitle: string;
33
34
  options: AppSelectOption[];
35
+ /** 'flex': una opción tras otra con salto de línea; 'grid': columnas de igual ancho. */
36
+ displayMode: PoolDisplayMode;
37
+ /** Columnas en modo grid (1 a 6). */
38
+ gridColumns: number;
39
+ /** Máximo de opciones elegibles en modo múltiple (sin límite si no se define). */
40
+ maxSelections: number | null;
41
+ /** true cuando ya no se pueden elegir más opciones. */
42
+ get maxReached(): boolean;
43
+ get normalizedGridColumns(): number;
34
44
  private selectedItems;
35
45
  get selectedValues(): selectedDetailed[];
36
46
  updateOptions(id: selectId): void;
@@ -39,9 +49,10 @@ export declare class UicPoolOptionsComponent extends base {
39
49
  ngOnChanges(changes: SimpleChanges): void;
40
50
  isSelected(id: selectId): boolean;
41
51
  getItemName(id: selectId): selectId;
52
+ getOption(id: selectId): AppSelectOption | undefined;
42
53
  private emitSelectionChange;
43
54
  private normalizeIncomingValue;
44
55
  static ɵfac: i0.ɵɵFactoryDeclaration<UicPoolOptionsComponent, never>;
45
- static ɵcmp: i0.ɵɵComponentDeclaration<UicPoolOptionsComponent, "ui-pool-options", never, { "icon": { "alias": "icon"; "required": false; }; "iconColor": { "alias": "iconColor"; "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; }; "multy": { "alias": "multy"; "required": false; }; "enabledListView": { "alias": "enabledListView"; "required": false; }; "listViewTitle": { "alias": "listViewTitle"; "required": false; }; "options": { "alias": "options"; "required": false; }; }, {}, never, never, true, never>;
56
+ static ɵcmp: i0.ɵɵComponentDeclaration<UicPoolOptionsComponent, "ui-pool-options", never, { "icon": { "alias": "icon"; "required": false; }; "iconColor": { "alias": "iconColor"; "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; }; "multy": { "alias": "multy"; "required": false; }; "enabledListView": { "alias": "enabledListView"; "required": false; }; "listViewTitle": { "alias": "listViewTitle"; "required": false; }; "options": { "alias": "options"; "required": false; }; "displayMode": { "alias": "displayMode"; "required": false; }; "gridColumns": { "alias": "gridColumns"; "required": false; }; "maxSelections": { "alias": "maxSelections"; "required": false; }; }, {}, never, never, true, never>;
46
57
  }
47
58
  export {};
@@ -1,5 +1,5 @@
1
1
  import { TemplateRef } from '@angular/core';
2
- import { SurveyCompleteContext, SurveyFooterContext, SurveyHeaderContext } from './survey.models';
2
+ import { SurveyFooterContext, SurveyHeaderContext } from './survey.models';
3
3
  import * as i0 from "@angular/core";
4
4
  /**
5
5
  * Reemplaza el encabezado de cada página (progreso, título del bloque).
@@ -21,13 +21,3 @@ export declare class UicSurveyFooterDirective {
21
21
  static ɵfac: i0.ɵɵFactoryDeclaration<UicSurveyFooterDirective, never>;
22
22
  static ɵdir: i0.ɵɵDirectiveDeclaration<UicSurveyFooterDirective, "ng-template[uicSurveyFooter]", never, {}, {}, never, never, true, never>;
23
23
  }
24
- /**
25
- * Pantalla final, tras un envío válido (requiere showCompletion).
26
- * <ng-template uicSurveyComplete let-values>...</ng-template>
27
- */
28
- export declare class UicSurveyCompleteDirective {
29
- readonly template: TemplateRef<SurveyCompleteContext>;
30
- static ngTemplateContextGuard(_dir: UicSurveyCompleteDirective, ctx: unknown): ctx is SurveyCompleteContext;
31
- static ɵfac: i0.ɵɵFactoryDeclaration<UicSurveyCompleteDirective, never>;
32
- static ɵdir: i0.ɵɵDirectiveDeclaration<UicSurveyCompleteDirective, "ng-template[uicSurveyComplete]", never, {}, {}, never, never, true, never>;
33
- }
@@ -3,8 +3,8 @@ import { FormGroup } from '@angular/forms';
3
3
  import { AppSelectOption } from '../inputs/select/select.component';
4
4
  import { UicOptionsSourceError } from '../dynamic-form/form-engine.service';
5
5
  import { ComputedFieldResolver, ExternalValidatorResolver, FormField, FormResult, FormSchema, SelectOptionsResolver, uicFormValuesRecord } from '../dynamic-form/form.models';
6
- import { UicSurveyCompleteDirective, UicSurveyFooterDirective, UicSurveyHeaderDirective } from './survey-templates.directive';
7
- import { SurveyAnimation, SurveyFieldSaveEvent, SurveyNavigationDirection, SurveyPage, SurveyPageChangeEvent, SurveyPageMode, SurveySaveFn, SurveySaveState, SurveyTheme } from './survey.models';
6
+ import { UicSurveyFooterDirective, UicSurveyHeaderDirective } from './survey-templates.directive';
7
+ import { SurveyAnimation, SurveyStartAt, SurveyFieldSaveEvent, SurveyNavigationDirection, SurveyPage, SurveyPageChangeEvent, SurveyPageMode, SurveySaveFn, SurveySaveState, SurveyTheme } from './survey.models';
8
8
  import * as i0 from "@angular/core";
9
9
  /**
10
10
  * Encuesta paginada sobre un FormSchema: una pregunta o un bloque por pantalla, con progreso,
@@ -34,12 +34,26 @@ export declare class UicSurveyComponent implements OnInit, OnChanges, OnDestroy
34
34
  get disabled(): boolean;
35
35
  /** 'field': una pregunta por pantalla (por defecto). 'block': un bloque por pantalla. */
36
36
  readonly pageMode: import("@angular/core").InputSignal<SurveyPageMode>;
37
+ /**
38
+ * Transición al entrar a cada página. Por defecto 'none': las animaciones están desactivadas
39
+ * hasta revisarlas; 'slide' y 'fade' siguen disponibles de forma experimental (solo entrada).
40
+ */
37
41
  readonly animation: import("@angular/core").InputSignal<SurveyAnimation>;
38
42
  readonly showProgress: import("@angular/core").InputSignal<boolean>;
39
43
  readonly showBack: import("@angular/core").InputSignal<boolean>;
40
- /** Tras un envío válido, muestra la pantalla final (slot uicSurveyComplete o el texto por defecto). */
41
- readonly showCompletion: import("@angular/core").InputSignal<boolean>;
42
- /** En modo 'field', avanza solo al responder una pregunta de selección única (radio/select). */
44
+ /**
45
+ * Página en la que empieza (o se reanuda) la encuesta:
46
+ * - 'first-unanswered': la primera página visible con alguna pregunta sin responder.
47
+ * - número: posición entre las páginas visibles (0 = primera).
48
+ * - texto: clave de página ('b0', 'f:edad') o nombre de un campo.
49
+ * Se aplica al montar y cada vez que cambia el valor. Úsalo junto con initialValues.
50
+ */
51
+ readonly startAt: import("@angular/core").InputSignal<SurveyStartAt | null>;
52
+ /**
53
+ * @deprecated Sin efecto. El avance automático se retiró porque solo aplicaba a algunos tipos
54
+ * de campo y resultaba inconsistente: ahora siempre se avanza con "Siguiente".
55
+ * Se mantiene la entrada para no romper plantillas existentes.
56
+ */
43
57
  readonly autoAdvance: import("@angular/core").InputSignal<boolean>;
44
58
  /** Enfoca el primer campo de cada página al navegar. */
45
59
  readonly autoFocus: import("@angular/core").InputSignal<boolean>;
@@ -67,13 +81,17 @@ export declare class UicSurveyComponent implements OnInit, OnChanges, OnDestroy
67
81
  optionsSourceError: EventEmitter<UicOptionsSourceError>;
68
82
  readonly headerTpl: import("@angular/core").Signal<UicSurveyHeaderDirective | undefined>;
69
83
  readonly footerTpl: import("@angular/core").Signal<UicSurveyFooterDirective | undefined>;
70
- readonly completeTpl: import("@angular/core").Signal<UicSurveyCompleteDirective | undefined>;
71
84
  private readonly pageForms;
85
+ private readonly i18n;
72
86
  readonly saveState: import("@angular/core").WritableSignal<SurveySaveState>;
73
- readonly completed: import("@angular/core").WritableSignal<boolean>;
87
+ /** true tras un envío válido (el progreso queda en 100%). La pantalla final es del consumidor. */
88
+ readonly submitted: import("@angular/core").WritableSignal<boolean>;
74
89
  readonly direction: import("@angular/core").WritableSignal<SurveyNavigationDirection>;
75
90
  private readonly currentKey;
76
- readonly completedValues: import("@angular/core").WritableSignal<uicFormValuesRecord>;
91
+ /** Texto para lectores de pantalla (región aria-live). */
92
+ readonly announcement: import("@angular/core").WritableSignal<string>;
93
+ private appliedStartAt;
94
+ private announceTimer;
77
95
  readonly engineState: import("@angular/core").Signal<{
78
96
  schema: FormSchema;
79
97
  externalValidationStates: Record<string, import("ui-core-abv").UicExternalValidationState>;
@@ -98,8 +116,6 @@ export declare class UicSurveyComponent implements OnInit, OnChanges, OnDestroy
98
116
  private pendingSaves;
99
117
  private formValueSub;
100
118
  private readonly subscriptions;
101
- private readonly autoAdvanceSnapshot;
102
- private autoAdvanceTimer;
103
119
  private appliedThemeKeys;
104
120
  constructor();
105
121
  ngOnInit(): void;
@@ -112,16 +128,19 @@ export declare class UicSurveyComponent implements OnInit, OnChanges, OnDestroy
112
128
  goToPage(index: number): void;
113
129
  /**
114
130
  * Valida todo el formulario y emite surveySubmit. Si algo es inválido, vuelve a la primera
115
- * página con errores.
131
+ * página con errores. La pantalla final la muestra el consumidor al recibir un envío válido.
116
132
  */
117
133
  submit(): FormResult;
118
- /** Vuelve a la primera página y sale de la pantalla final (no limpia respuestas). */
119
- restart(): void;
120
134
  getCurrentValues(): uicFormValuesRecord;
121
135
  onFieldBlur(fieldName: string): void;
122
136
  onKeydown(event: KeyboardEvent): void;
123
137
  pageCols(): number;
124
138
  private goTo;
139
+ private announcePage;
140
+ /** Vacía y vuelve a escribir la región aria-live para que se lea aunque el texto se repita. */
141
+ private announce;
142
+ private applyStartAt;
143
+ private resolveStartPage;
125
144
  private findAdjacentPage;
126
145
  private validatePage;
127
146
  private findFirstInvalidPage;
@@ -136,12 +155,10 @@ export declare class UicSurveyComponent implements OnInit, OnChanges, OnDestroy
136
155
  private saveField;
137
156
  private onSaveSucceeded;
138
157
  private onSaveFailed;
139
- private maybeAutoAdvance;
140
- private cancelAutoAdvance;
141
158
  private applyTheme;
142
159
  private toObservable;
143
160
  private isEmptyValue;
144
161
  private stringify;
145
162
  static ɵfac: i0.ɵɵFactoryDeclaration<UicSurveyComponent, never>;
146
- static ɵcmp: i0.ɵɵComponentDeclaration<UicSurveyComponent, "ui-survey", never, { "schema": { "alias": "schema"; "required": true; }; "initialValues": { "alias": "initialValues"; "required": false; }; "externalData": { "alias": "externalData"; "required": false; }; "selectOptionsResolver": { "alias": "selectOptionsResolver"; "required": false; }; "computedFieldResolver": { "alias": "computedFieldResolver"; "required": false; }; "externalValidatorResolver": { "alias": "externalValidatorResolver"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "pageMode": { "alias": "pageMode"; "required": false; "isSignal": true; }; "animation": { "alias": "animation"; "required": false; "isSignal": true; }; "showProgress": { "alias": "showProgress"; "required": false; "isSignal": true; }; "showBack": { "alias": "showBack"; "required": false; "isSignal": true; }; "showCompletion": { "alias": "showCompletion"; "required": false; "isSignal": true; }; "autoAdvance": { "alias": "autoAdvance"; "required": false; "isSignal": true; }; "autoFocus": { "alias": "autoFocus"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "theme": { "alias": "theme"; "required": false; "isSignal": true; }; "iconMode": { "alias": "iconMode"; "required": false; "isSignal": true; }; "fileUidResolverFn": { "alias": "fileUidResolverFn"; "required": false; "isSignal": true; }; "nextText": { "alias": "nextText"; "required": false; "isSignal": true; }; "backText": { "alias": "backText"; "required": false; "isSignal": true; }; "submitText": { "alias": "submitText"; "required": false; "isSignal": true; }; "autoSave": { "alias": "autoSave"; "required": false; "isSignal": true; }; "saveFn": { "alias": "saveFn"; "required": false; "isSignal": true; }; "autoSaveDebounceMs": { "alias": "autoSaveDebounceMs"; "required": false; "isSignal": true; }; }, { "surveySubmit": "surveySubmit"; "pageChange": "pageChange"; "fieldSave": "fieldSave"; "formChange": "formChange"; "optionsSourceError": "optionsSourceError"; }, ["headerTpl", "footerTpl", "completeTpl"], never, true, never>;
163
+ static ɵcmp: i0.ɵɵComponentDeclaration<UicSurveyComponent, "ui-survey", never, { "schema": { "alias": "schema"; "required": true; }; "initialValues": { "alias": "initialValues"; "required": false; }; "externalData": { "alias": "externalData"; "required": false; }; "selectOptionsResolver": { "alias": "selectOptionsResolver"; "required": false; }; "computedFieldResolver": { "alias": "computedFieldResolver"; "required": false; }; "externalValidatorResolver": { "alias": "externalValidatorResolver"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "pageMode": { "alias": "pageMode"; "required": false; "isSignal": true; }; "animation": { "alias": "animation"; "required": false; "isSignal": true; }; "showProgress": { "alias": "showProgress"; "required": false; "isSignal": true; }; "showBack": { "alias": "showBack"; "required": false; "isSignal": true; }; "startAt": { "alias": "startAt"; "required": false; "isSignal": true; }; "autoAdvance": { "alias": "autoAdvance"; "required": false; "isSignal": true; }; "autoFocus": { "alias": "autoFocus"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "theme": { "alias": "theme"; "required": false; "isSignal": true; }; "iconMode": { "alias": "iconMode"; "required": false; "isSignal": true; }; "fileUidResolverFn": { "alias": "fileUidResolverFn"; "required": false; "isSignal": true; }; "nextText": { "alias": "nextText"; "required": false; "isSignal": true; }; "backText": { "alias": "backText"; "required": false; "isSignal": true; }; "submitText": { "alias": "submitText"; "required": false; "isSignal": true; }; "autoSave": { "alias": "autoSave"; "required": false; "isSignal": true; }; "saveFn": { "alias": "saveFn"; "required": false; "isSignal": true; }; "autoSaveDebounceMs": { "alias": "autoSaveDebounceMs"; "required": false; "isSignal": true; }; }, { "surveySubmit": "surveySubmit"; "pageChange": "pageChange"; "fieldSave": "fieldSave"; "formChange": "formChange"; "optionsSourceError": "optionsSourceError"; }, ["headerTpl", "footerTpl"], never, true, never>;
147
164
  }
@@ -2,6 +2,8 @@ import { Observable } from 'rxjs';
2
2
  import { FormBlock, FormField, uicFormValuesRecord } from '../dynamic-form/form.models';
3
3
  /** 'field': una pregunta por pantalla. 'block': un bloque del FormSchema por pantalla. */
4
4
  export type SurveyPageMode = 'field' | 'block';
5
+ /** Dónde empezar: 'first-unanswered', posición entre páginas visibles, clave de página o nombre de campo. */
6
+ export type SurveyStartAt = 'first-unanswered' | number | string;
5
7
  export type SurveyAnimation = 'slide' | 'fade' | 'none';
6
8
  export type SurveyNavigationDirection = 'forward' | 'back';
7
9
  export interface SurveyPage {
@@ -52,6 +54,3 @@ export interface SurveyFooterContext {
52
54
  isLast: boolean;
53
55
  saveState: SurveySaveState;
54
56
  }
55
- export interface SurveyCompleteContext {
56
- $implicit: uicFormValuesRecord;
57
- }
@@ -1,3 +1,4 @@
1
+ import { UicExtraColor } from '../../theme/colors';
1
2
  import { ButtonColor, ButtonType } from "../button/button.component";
2
3
  import { AppSelectOption } from "../inputs/select/select.component";
3
4
  import { UicPortletData } from "../uic-portlet-card/uic-portlet-card.component";
@@ -59,8 +60,8 @@ export interface TableCellChange {
59
60
  previousValue: string | number | null;
60
61
  }
61
62
  export type ColumnTypes = 'actions' | 'text' | 'bold' | 'list' | 'money' | 'copy' | 'user' | 'checkbox' | 'icon-list' | 'status' | 'switch' | 'bigtext' | 'date' | 'tag';
62
- export type TableTextColors = 'primary' | 'red' | 'green' | 'blue' | 'yellow' | 'black' | 'grey';
63
- export type BackgroundColors = 'primary' | 'secondary' | 'red' | 'green' | 'blue' | 'yellow' | 'black' | 'grey' | 'transparent' | 'white';
63
+ export type TableTextColors = 'primary' | 'red' | 'green' | 'blue' | 'yellow' | 'black' | 'grey' | UicExtraColor;
64
+ export type BackgroundColors = 'primary' | 'secondary' | 'red' | 'green' | 'blue' | 'yellow' | 'black' | 'grey' | 'transparent' | 'white' | UicExtraColor;
64
65
  export interface TableFilters {
65
66
  sortBy: string;
66
67
  isSortAscending: boolean;
@@ -1,3 +1,4 @@
1
+ import { UicExtraColor } from '../../theme/colors';
1
2
  import { AfterViewChecked, ElementRef, EventEmitter, QueryList } from '@angular/core';
2
3
  import * as i0 from "@angular/core";
3
4
  export declare class UicTreeAdminComponent implements AfterViewChecked {
@@ -64,7 +65,7 @@ export interface TreeData {
64
65
  name: string;
65
66
  enabled: boolean;
66
67
  tag?: string;
67
- tagColor?: 'yellow' | 'red' | 'green' | 'blue';
68
+ tagColor?: 'yellow' | 'red' | 'green' | 'blue' | UicExtraColor;
68
69
  children?: TreeData[];
69
70
  }
70
71
  export interface TreeActionEvent {
@@ -1,8 +1,22 @@
1
1
  import { CdkDragDrop } from '@angular/cdk/drag-drop';
2
- import { EditableBlock, EditableField } from '../user-formbuilder.component';
2
+ import { EditableBlock, EditableField, FormBuilderRemovedItem } from '../user-formbuilder.component';
3
3
  import { FieldConfig, FieldType } from '../../dynamic-form/form.models';
4
4
  import * as i0 from "@angular/core";
5
+ export interface VisibilityRuleSummary {
6
+ text: string;
7
+ extraRules: number;
8
+ }
9
+ /** Movimiento de un campo raíz entre bloques (drag & drop entre listas conectadas). */
10
+ export interface FieldMoveRequest {
11
+ fromBlockCode: string;
12
+ toBlockCode: string;
13
+ previousIndex: number;
14
+ currentIndex: number;
15
+ }
16
+ export declare const blockFieldListId: (blockCode: string) => string;
5
17
  export declare class BlockEditorComponent {
18
+ private readonly translateService;
19
+ private readonly host;
6
20
  block: import("@angular/core").InputSignal<EditableBlock>;
7
21
  blockChange: import("@angular/core").OutputEmitterRef<EditableBlock>;
8
22
  addFieldRequest: import("@angular/core").OutputEmitterRef<FieldConfig>;
@@ -20,6 +34,20 @@ export declare class BlockEditorComponent {
20
34
  selectedSubFieldCode: import("@angular/core").InputSignal<string | null>;
21
35
  selectedSubFieldParentCode: import("@angular/core").InputSignal<string | null>;
22
36
  visibilityParentFieldCodes: Set<string>;
37
+ /** Campos raíz de todo el formulario (por code), para describir reglas que apuntan a otros bloques. */
38
+ fieldLookup: Map<string, EditableField>;
39
+ /** Muestra el identificador (name) en la tarjeta; útil solo cuando el usuario puede editarlo. */
40
+ showIdentifier: import("@angular/core").InputSignal<boolean>;
41
+ itemRemoved: import("@angular/core").OutputEmitterRef<FormBuilderRemovedItem>;
42
+ duplicateFieldRequest: import("@angular/core").OutputEmitterRef<string>;
43
+ moveFieldRequest: import("@angular/core").OutputEmitterRef<FieldMoveRequest>;
44
+ /** Ids de las listas de campos de todos los bloques, para poder arrastrar campos entre ellos. */
45
+ connectedFieldListIds: import("@angular/core").InputSignal<string[]>;
46
+ /** Solo lectura: se puede navegar y seleccionar, pero no editar, mover, agregar ni eliminar. */
47
+ readOnly: import("@angular/core").InputSignal<boolean>;
48
+ fieldListId: import("@angular/core").Signal<string>;
49
+ /** Estado solo visual: plegar el bloque no altera el formulario. */
50
+ collapsed: import("@angular/core").WritableSignal<boolean>;
23
51
  excludeSubFieldTypes: FieldType[];
24
52
  private expandedRepeaters;
25
53
  constructor();
@@ -30,6 +58,9 @@ export declare class BlockEditorComponent {
30
58
  onSelectSubField(parentCode: string, subField: EditableField, event: Event): void;
31
59
  addSubField(parentCode: string, type: FieldConfig): void;
32
60
  deleteSubField(parentCode: string, sfCode: string, event: Event): void;
61
+ /** Copia el subcampo justo debajo del original, con un code nuevo dentro del mismo repetidor. */
62
+ duplicateSubField(parentCode: string, sfCode: string, event: Event): void;
63
+ private copyLabel;
33
64
  reorderSubFields(parentCode: string, event: CdkDragDrop<EditableField[]>): void;
34
65
  private updateSubFields;
35
66
  private generateSubFieldCode;
@@ -42,7 +73,14 @@ export declare class BlockEditorComponent {
42
73
  isVisibilityParent(fieldCode: string): boolean;
43
74
  isSubFieldVisibilityParent(parentField: EditableField, sfCode: string): boolean;
44
75
  isBlockVisibilityParent(): boolean;
45
- reorderFields(event: CdkDragDrop<EditableField[]>): void;
76
+ /** Resumen legible de las reglas de visibilidad: "Visible si País es igual a Perú" (+N reglas). */
77
+ visibilitySummary(field: EditableField, siblings?: EditableField[]): VisibilityRuleSummary | null;
78
+ private formatRuleValue;
79
+ private lowerFirst;
80
+ toggleCollapsed(): void;
81
+ requestDuplicateField(fieldCode: string, e: Event): void;
82
+ /** cdkDropListData es el code del bloque: así se identifica el origen al soltar desde otro bloque. */
83
+ reorderFields(event: CdkDragDrop<string>): void;
46
84
  static ɵfac: i0.ɵɵFactoryDeclaration<BlockEditorComponent, never>;
47
- static ɵcmp: i0.ɵɵComponentDeclaration<BlockEditorComponent, "lib-block-editor", never, { "block": { "alias": "block"; "required": false; "isSignal": true; }; "selectedFieldId": { "alias": "selectedFieldId"; "required": false; "isSignal": true; }; "selectedSubFieldCode": { "alias": "selectedSubFieldCode"; "required": false; "isSignal": true; }; "selectedSubFieldParentCode": { "alias": "selectedSubFieldParentCode"; "required": false; "isSignal": true; }; "visibilityParentFieldCodes": { "alias": "visibilityParentFieldCodes"; "required": false; }; }, { "blockChange": "blockChange"; "addFieldRequest": "addFieldRequest"; "deleteBlock": "deleteBlock"; "notifySelectedField": "notifySelectedField"; "notifySelectedSubField": "notifySelectedSubField"; "notifyNewSubField": "notifyNewSubField"; }, never, never, true, never>;
85
+ static ɵcmp: i0.ɵɵComponentDeclaration<BlockEditorComponent, "lib-block-editor", never, { "block": { "alias": "block"; "required": false; "isSignal": true; }; "selectedFieldId": { "alias": "selectedFieldId"; "required": false; "isSignal": true; }; "selectedSubFieldCode": { "alias": "selectedSubFieldCode"; "required": false; "isSignal": true; }; "selectedSubFieldParentCode": { "alias": "selectedSubFieldParentCode"; "required": false; "isSignal": true; }; "visibilityParentFieldCodes": { "alias": "visibilityParentFieldCodes"; "required": false; }; "fieldLookup": { "alias": "fieldLookup"; "required": false; }; "showIdentifier": { "alias": "showIdentifier"; "required": false; "isSignal": true; }; "connectedFieldListIds": { "alias": "connectedFieldListIds"; "required": false; "isSignal": true; }; "readOnly": { "alias": "readOnly"; "required": false; "isSignal": true; }; }, { "blockChange": "blockChange"; "addFieldRequest": "addFieldRequest"; "deleteBlock": "deleteBlock"; "notifySelectedField": "notifySelectedField"; "notifySelectedSubField": "notifySelectedSubField"; "notifyNewSubField": "notifyNewSubField"; "itemRemoved": "itemRemoved"; "duplicateFieldRequest": "duplicateFieldRequest"; "moveFieldRequest": "moveFieldRequest"; }, never, never, true, never>;
48
86
  }
@@ -1,4 +1,4 @@
1
- import { FormField, uicFormValuesRecord } from '../../../dynamic-form/form.models';
1
+ import { FieldVisibilityRule, FormField, uicFormValuesRecord } from '../../../dynamic-form/form.models';
2
2
  import { AppSelectOption } from '../../../inputs/select/select.component';
3
3
  import { EditableField } from '../../user-formbuilder.component';
4
4
  import * as i0 from "@angular/core";
@@ -11,11 +11,14 @@ export declare class FieldEditorComponent {
11
11
  hasExternalOptionsSource: import("@angular/core").Signal<boolean>;
12
12
  isRepeater: import("@angular/core").Signal<boolean>;
13
13
  isComputed: import("@angular/core").Signal<boolean>;
14
+ isScale: import("@angular/core").Signal<boolean>;
14
15
  hasExternalValidation: import("@angular/core").Signal<boolean>;
15
16
  config: import("@angular/core").InputSignal<EditableField>;
16
17
  focusRequiredField: import("@angular/core").InputSignal<boolean>;
17
18
  isSubField: import("@angular/core").InputSignal<boolean>;
18
19
  enableNameModify: import("@angular/core").InputSignal<boolean>;
20
+ /** Solo lectura: muestra las propiedades deshabilitadas y oculta las acciones sobre reglas. */
21
+ readOnly: import("@angular/core").InputSignal<boolean>;
19
22
  options: import("@angular/core").InputSignal<Record<string, AppSelectOption[]>>;
20
23
  hiddenSections: import("@angular/core").WritableSignal<string[]>;
21
24
  editingRuleIndex: import("@angular/core").WritableSignal<number>;
@@ -43,8 +46,18 @@ export declare class FieldEditorComponent {
43
46
  removeRule(index: number): void;
44
47
  private clearDraftRule;
45
48
  updateFieldValues(fr: uicFormValuesRecord): void;
49
+ /** Leyendas de la escala: el código es el valor numérico. */
50
+ updateScaleLabels(labels: AppSelectOption[]): void;
46
51
  updateOptions(options: AppSelectOption[]): void;
47
52
  private getDependencyFieldLabel;
53
+ isSectionHidden(section: string): boolean;
54
+ /** Cantidad de propiedades con valor en una sección (se muestra en su cabecera). */
55
+ sectionCounts: import("@angular/core").Signal<Record<string, number>>;
56
+ /** Texto legible del valor de una regla: texto de la opción, Sí/No, o el valor tal cual. */
57
+ ruleValueText(rule: FieldVisibilityRule): string;
58
+ private getDependencyValueOptions;
59
+ private readPath;
60
+ private hasConfiguredValue;
48
61
  toggleSection(section: string): void;
49
62
  private buildDesignBlocks;
50
63
  private buildAdvancedBlocks;
@@ -60,5 +73,5 @@ export declare class FieldEditorComponent {
60
73
  private buildComputedSourceFields;
61
74
  private buildExternalValidationFields;
62
75
  static ɵfac: i0.ɵɵFactoryDeclaration<FieldEditorComponent, never>;
63
- static ɵcmp: i0.ɵɵComponentDeclaration<FieldEditorComponent, "lib-field-editor", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; "focusRequiredField": { "alias": "focusRequiredField"; "required": false; "isSignal": true; }; "isSubField": { "alias": "isSubField"; "required": false; "isSignal": true; }; "enableNameModify": { "alias": "enableNameModify"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, { "fieldChange": "fieldChange"; }, never, never, true, never>;
76
+ static ɵcmp: i0.ɵɵComponentDeclaration<FieldEditorComponent, "lib-field-editor", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; "focusRequiredField": { "alias": "focusRequiredField"; "required": false; "isSignal": true; }; "isSubField": { "alias": "isSubField"; "required": false; "isSignal": true; }; "enableNameModify": { "alias": "enableNameModify"; "required": false; "isSignal": true; }; "readOnly": { "alias": "readOnly"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, { "fieldChange": "fieldChange"; }, never, never, true, never>;
64
77
  }
@@ -1,12 +1,38 @@
1
1
  import { EventEmitter } from '@angular/core';
2
+ import { CdkDragDrop } from '@angular/cdk/drag-drop';
2
3
  import { AppSelectOption } from '../../../../inputs/select/select.component';
3
4
  import * as i0 from "@angular/core";
4
5
  export declare class UicFieldOptionsEditorComponent {
6
+ private readonly modal;
7
+ private readonly i18n;
5
8
  optionsChange: EventEmitter<AppSelectOption[]>;
9
+ title: string;
10
+ codeLabel: string;
11
+ nameLabel: string;
12
+ codePlaceholder: string;
13
+ namePlaceholder: string;
14
+ /** Muestra el botón 'Avanzado' (ícono y color por opción). */
15
+ showAdvanced: boolean;
16
+ /** Si el código está vacío, lo completa con la etiqueta al salir del campo. */
17
+ autoCode: boolean;
18
+ /** Solo lectura: muestra las opciones sin permitir editarlas, reordenarlas, agregarlas ni eliminarlas. */
19
+ disabled: boolean;
6
20
  options: AppSelectOption[];
21
+ private nameInputs?;
7
22
  addOption(): void;
23
+ /** Emite en cada tecla (no solo al salir del input) para no perder lo escrito si se cambia de campo. */
24
+ emitChange(): void;
25
+ /** Enter en la etiqueta: pasa a la siguiente opción, o crea una nueva si es la última. */
26
+ onEnter(event: Event, index: number): void;
27
+ /** Pegar varias líneas crea una opción por línea (la primera ocupa la fila actual si está vacía). */
28
+ onPaste(event: ClipboardEvent, index: number): void;
29
+ reorder(event: CdkDragDrop<unknown>): void;
30
+ private focusName;
8
31
  dropOption(index: number): void;
9
32
  updateCode(name: string, idx: number): void;
33
+ get hasStyledOptions(): boolean;
34
+ /** Abre el modal de ícono y color de las opciones. Cancelar no cambia nada. */
35
+ openAdvanced(): void;
10
36
  static ɵfac: i0.ɵɵFactoryDeclaration<UicFieldOptionsEditorComponent, never>;
11
- static ɵcmp: i0.ɵɵComponentDeclaration<UicFieldOptionsEditorComponent, "ui-field-options-editor", never, { "options": { "alias": "options"; "required": false; }; }, { "optionsChange": "optionsChange"; }, never, never, true, never>;
37
+ static ɵcmp: i0.ɵɵComponentDeclaration<UicFieldOptionsEditorComponent, "ui-field-options-editor", never, { "title": { "alias": "title"; "required": false; }; "codeLabel": { "alias": "codeLabel"; "required": false; }; "nameLabel": { "alias": "nameLabel"; "required": false; }; "codePlaceholder": { "alias": "codePlaceholder"; "required": false; }; "namePlaceholder": { "alias": "namePlaceholder"; "required": false; }; "showAdvanced": { "alias": "showAdvanced"; "required": false; }; "autoCode": { "alias": "autoCode"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "options": { "alias": "options"; "required": false; }; }, { "optionsChange": "optionsChange"; }, never, never, true, never>;
12
38
  }
@@ -0,0 +1,36 @@
1
+ import { AppSelectOption } from '../../../../../inputs/select/select.component';
2
+ import { ButtonColor } from '../../../../../button/button.component';
3
+ import * as i0 from "@angular/core";
4
+ export interface OptionStyleEditorData {
5
+ options: AppSelectOption[];
6
+ }
7
+ /** Colores disponibles para el ícono de una opción (mismas clases f-* que usan los inputs). */
8
+ export declare const OPTION_ICON_COLORS: ButtonColor[];
9
+ /** Íconos de Remix Icon frecuentes en opciones (escalas, sí/no, estados). */
10
+ export declare const OPTION_ICON_SUGGESTIONS: string[];
11
+ /**
12
+ * Modal "Avanzado" del editor de opciones: ícono y color de cada opción.
13
+ * Trabaja sobre una copia y devuelve las opciones al cerrar con "Aplicar"; "Cancelar" no cambia nada.
14
+ */
15
+ export declare class UicOptionStyleEditorComponent {
16
+ private readonly modalRef;
17
+ /** Colores para el select: cada uno con un círculo de su tono. */
18
+ readonly colorOptions: AppSelectOption[];
19
+ readonly suggestions: string[];
20
+ options: AppSelectOption[];
21
+ /** Fila cuyo panel de sugerencias está abierto. */
22
+ suggestionsFor: number | null;
23
+ constructor(data: OptionStyleEditorData | null);
24
+ setIcon(index: number, icon: string): void;
25
+ setColor(index: number, color: ButtonColor | undefined): void;
26
+ pickSuggestion(index: number, icon: string): void;
27
+ toggleSuggestions(index: number): void;
28
+ clear(index: number): void;
29
+ cancel(): void;
30
+ apply(): void;
31
+ private patch;
32
+ /** Quita icon/iconColor vacíos para no ensuciar el esquema guardado. */
33
+ private clean;
34
+ static ɵfac: i0.ɵɵFactoryDeclaration<UicOptionStyleEditorComponent, never>;
35
+ static ɵcmp: i0.ɵɵComponentDeclaration<UicOptionStyleEditorComponent, "ui-option-style-editor", never, {}, {}, never, never, true, never>;
36
+ }