ui-core-abv 0.11.2 → 0.11.4
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.
- package/fesm2022/ui-core-abv.mjs +632 -96
- package/fesm2022/ui-core-abv.mjs.map +1 -1
- package/lib/components/dynamic-form/form/dynamic-form.component.d.ts +9 -0
- package/lib/components/dynamic-form/form-engine.service.d.ts +6 -0
- package/lib/components/dynamic-form/form-validators.d.ts +12 -0
- package/lib/components/dynamic-form/form.models.d.ts +25 -1
- package/lib/components/dynamic-form/other-option.d.ts +34 -0
- package/lib/components/inputs/ui-distribution/ui-distribution.component.d.ts +55 -0
- package/lib/components/survey/survey.component.d.ts +1 -0
- package/lib/components/user-formbuilder/block-editor/block-editor.component.d.ts +14 -1
- package/lib/components/user-formbuilder/block-editor/field-editor/field-editor.component.d.ts +25 -2
- package/lib/components/user-formbuilder/block-editor/field-type-selector/field-type-selector.component.d.ts +6 -1
- package/lib/components/user-formbuilder/formbuilder.config.d.ts +111 -0
- package/lib/components/user-formbuilder/user-formbuilder.component.d.ts +28 -4
- package/lib/theme/colors.d.ts +10 -0
- package/lib/translate/dictionary.en.d.ts +30 -0
- package/lib/translate/dictionary.es.d.ts +30 -0
- package/package.json +1 -1
- package/public-api.d.ts +3 -0
- package/src/lib/styles/_default_colors.scss +228 -204
|
@@ -2,6 +2,7 @@ import { NgZone, OnDestroy } from '@angular/core';
|
|
|
2
2
|
import { AbstractControl, FormArray, FormGroup } from '@angular/forms';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { ButtonColor } from '../../button/button.component';
|
|
5
|
+
import { AppSelectOption } from '../../inputs/select/select.component';
|
|
5
6
|
import { FormField, FormIconMode, SelectOptionsResolver } from '../form.models';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
interface DynamicFieldState {
|
|
@@ -50,6 +51,14 @@ export declare class UicDynamicFormComponent implements OnDestroy {
|
|
|
50
51
|
listeningField: string | null;
|
|
51
52
|
readonly fieldStates: import("@angular/core").Signal<DynamicFieldState[]>;
|
|
52
53
|
readonly visibleFieldStates: import("@angular/core").Signal<DynamicFieldState[]>;
|
|
54
|
+
readonly otherTextMaxLength = 500;
|
|
55
|
+
private readonly otherOptionsCache;
|
|
56
|
+
/** Texto "especifica" visible de cada pregunta (por nombre de la pregunta). */
|
|
57
|
+
private readonly visibleOtherStates;
|
|
58
|
+
/** Opciones de la pregunta, con "Otros" al final si la tiene. Cacheado para no recrear el array en cada ciclo. */
|
|
59
|
+
optionsFor(field: FormField): AppSelectOption[];
|
|
60
|
+
/** Estado del texto "especifica" de una pregunta, si está visible (eligió "Otros"). */
|
|
61
|
+
otherStateFor(field: FormField): DynamicFieldState | null;
|
|
53
62
|
private readonly formSyncEffect;
|
|
54
63
|
private readonly fieldStateSyncEffect;
|
|
55
64
|
readonly colorToIcon: Record<string, string>;
|
|
@@ -24,6 +24,7 @@ export interface UicOptionsSourceError {
|
|
|
24
24
|
export declare class UicFormEngine implements OnDestroy {
|
|
25
25
|
private readonly fb;
|
|
26
26
|
private readonly formState;
|
|
27
|
+
private readonly i18n;
|
|
27
28
|
schema?: FormSchema;
|
|
28
29
|
fields: FormField[];
|
|
29
30
|
cols: number;
|
|
@@ -161,6 +162,11 @@ export declare class UicFormEngine implements OnDestroy {
|
|
|
161
162
|
private toNestedValues;
|
|
162
163
|
private setNestedValue;
|
|
163
164
|
syncEffectiveSchema(): void;
|
|
165
|
+
/**
|
|
166
|
+
* Agrega el campo de texto de cada pregunta con "Otros" (ver other-option.ts).
|
|
167
|
+
* Sin preguntas con "Otros" devuelve el mismo esquema, sin copiarlo.
|
|
168
|
+
*/
|
|
169
|
+
private expandOtherOptionFields;
|
|
164
170
|
static ɵfac: i0.ɵɵFactoryDeclaration<UicFormEngine, never>;
|
|
165
171
|
static ɵprov: i0.ɵɵInjectableDeclaration<UicFormEngine>;
|
|
166
172
|
}
|
|
@@ -8,3 +8,15 @@ import { FormField } from './form.models';
|
|
|
8
8
|
export declare function uicSelectionCountValidator(min?: number | null, max?: number | null): ValidatorFn;
|
|
9
9
|
/** Validadores de selección que corresponden al campo (vacío si no aplica). */
|
|
10
10
|
export declare function uicSelectionValidatorsFor(field: FormField): ValidatorFn[];
|
|
11
|
+
/** Total que debe sumar una pregunta de distribución porcentual. */
|
|
12
|
+
export declare const UIC_DISTRIBUTION_TOTAL = 100;
|
|
13
|
+
/** Suma de los porcentajes de un valor de distribución (ignora ítems inválidos). */
|
|
14
|
+
export declare function uicDistributionSum(value: unknown): number;
|
|
15
|
+
/**
|
|
16
|
+
* Distribución porcentual: si hay respuesta, debe sumar exactamente 100.
|
|
17
|
+
* Un valor vacío (null o todo en 0) no falla: para exigir respuesta se usa `required`.
|
|
18
|
+
* Error: { distributionTotal: { total, expected } }.
|
|
19
|
+
*/
|
|
20
|
+
export declare function uicDistributionTotalValidator(expected?: number): ValidatorFn;
|
|
21
|
+
/** Validadores de distribución que corresponden al campo (vacío si no aplica). */
|
|
22
|
+
export declare function uicDistributionValidatorsFor(field: FormField): ValidatorFn[];
|
|
@@ -132,6 +132,13 @@ export interface FormField {
|
|
|
132
132
|
searchIsEnabledFn?: (item: any) => boolean;
|
|
133
133
|
pattern?: RegExp;
|
|
134
134
|
visibilityRules?: FieldVisibilityRule[] | null;
|
|
135
|
+
/**
|
|
136
|
+
* Opción "Otros (especifica)" (radio, select, multyselect): agrega la opción "Otros" y un texto que se
|
|
137
|
+
* guarda en `<name>__other`. El valor de la pregunta no cambia (sigue siendo el id o la lista de ids).
|
|
138
|
+
*/
|
|
139
|
+
otherOption?: UicOtherOptionConfig | null;
|
|
140
|
+
/** Interno: este campo es el texto "especifica" de la opción Otros de la pregunta `otherFor`. */
|
|
141
|
+
otherFor?: string;
|
|
135
142
|
/**
|
|
136
143
|
* Opción A (declarativa/serializable): define la clave y dependencias del campo calculado.
|
|
137
144
|
* El wrapper llama a `computedFieldResolver` cuando algún campo de `dependsOn` cambia.
|
|
@@ -152,6 +159,15 @@ export interface FormField {
|
|
|
152
159
|
repeaterRemoveLabel?: string;
|
|
153
160
|
repeaterItemTitle?: string;
|
|
154
161
|
}
|
|
162
|
+
/** Configuración de la opción "Otros". */
|
|
163
|
+
export interface UicOtherOptionConfig {
|
|
164
|
+
/** Texto de la opción. Por defecto: "Otros". */
|
|
165
|
+
label?: string;
|
|
166
|
+
/** Placeholder del texto. Por defecto: "Especifica...". */
|
|
167
|
+
placeholder?: string;
|
|
168
|
+
/** Si al elegir "Otros" el texto es obligatorio. Por defecto: true. */
|
|
169
|
+
required?: boolean;
|
|
170
|
+
}
|
|
155
171
|
export interface FieldVisibilityRule {
|
|
156
172
|
fieldName: string;
|
|
157
173
|
fieldLabel?: string;
|
|
@@ -176,7 +192,15 @@ export declare const VISIBILITY_OPERATOR_OPTIONS: {
|
|
|
176
192
|
text: string;
|
|
177
193
|
}[];
|
|
178
194
|
export declare const FIELDS_CONFIG: FieldConfig[];
|
|
179
|
-
export type FieldType = 'text' | 'number' | 'phone' | 'date' | 'time' | 'select' | 'radio' | 'checkbox' | 'switch' | 'textarea' | 'pool' | 'file' | 'multyselect' | 'searcher' | 'multisearcher' | 'slider' | 'repeater' | 'computed' | 'scale';
|
|
195
|
+
export type FieldType = 'text' | 'number' | 'phone' | 'date' | 'time' | 'select' | 'radio' | 'checkbox' | 'switch' | 'textarea' | 'pool' | 'file' | 'multyselect' | 'searcher' | 'multisearcher' | 'slider' | 'repeater' | 'computed' | 'scale' | 'distribution';
|
|
196
|
+
/**
|
|
197
|
+
* Valor de una pregunta de distribución porcentual: un ítem por opción, en el orden de las opciones,
|
|
198
|
+
* con el porcentaje asignado (enteros 0–100 que suman 100). Sin respuesta, el valor es null.
|
|
199
|
+
*/
|
|
200
|
+
export type UicDistributionValue = {
|
|
201
|
+
id: string | number;
|
|
202
|
+
value: number;
|
|
203
|
+
}[];
|
|
180
204
|
export interface FormResult {
|
|
181
205
|
result: boolean;
|
|
182
206
|
form: uicFormValuesRecord | null;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { AppSelectOption } from '../inputs/select/select.component';
|
|
2
|
+
import { FieldType, FormField } from './form.models';
|
|
3
|
+
/**
|
|
4
|
+
* Opción "Otros (especifica)".
|
|
5
|
+
*
|
|
6
|
+
* Una pregunta con `otherOption` suma la opción "Otros" (id UIC_OTHER_OPTION_ID) y un texto
|
|
7
|
+
* acompañante que se guarda en `<name>__other`. El valor de la pregunta no cambia (sigue siendo
|
|
8
|
+
* el id elegido, o la lista de ids), así que reglas, reportes y consumidores existentes no se afectan.
|
|
9
|
+
*
|
|
10
|
+
* El texto es un campo más del formulario, generado a partir del esquema: se muestra solo cuando
|
|
11
|
+
* se elige "Otros" (regla de visibilidad automática), se limpia al dejar de elegirlo y se valida,
|
|
12
|
+
* guarda y reanuda como cualquier otro campo.
|
|
13
|
+
*/
|
|
14
|
+
export declare const UIC_OTHER_OPTION_ID = "__other__";
|
|
15
|
+
export declare const UIC_OTHER_FIELD_SUFFIX = "__other";
|
|
16
|
+
/** Tipos que admiten "Otros": su valor es un id o una lista de ids. */
|
|
17
|
+
export declare const UIC_OTHER_OPTION_TYPES: readonly FieldType[];
|
|
18
|
+
export declare const UIC_OTHER_TEXT_MAX_LENGTH = 500;
|
|
19
|
+
/** Nombre del campo que guarda el texto de "Otros" de una pregunta. */
|
|
20
|
+
export declare function uicOtherFieldName(name: string): string;
|
|
21
|
+
export declare function uicSupportsOtherOption(field: Pick<FormField, 'type'>): boolean;
|
|
22
|
+
/** true si la pregunta muestra la opción "Otros". */
|
|
23
|
+
export declare function uicHasOtherOption(field: FormField): boolean;
|
|
24
|
+
/** Opciones de la pregunta con "Otros" al final (si corresponde y no está ya). */
|
|
25
|
+
export declare function uicOptionsWithOther(options: AppSelectOption[] | undefined, field: FormField, label: string): AppSelectOption[];
|
|
26
|
+
/** Campo de texto acompañante de una pregunta con "Otros". */
|
|
27
|
+
export declare function uicBuildOtherField(field: FormField, otherLabel: string, placeholder: string): FormField;
|
|
28
|
+
/** true si algún campo (o sub-campo de repetidor) usa "Otros". */
|
|
29
|
+
export declare function uicContainsOtherOption(fields: FormField[] | undefined): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Inserta, después de cada pregunta con "Otros", su campo de texto acompañante.
|
|
32
|
+
* Si ningún campo usa "Otros" devuelve el mismo array (no copia el esquema).
|
|
33
|
+
*/
|
|
34
|
+
export declare function uicExpandOtherFields(fields: FormField[], otherLabel: string, placeholder: string): FormField[];
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { ButtonColor } from '../../button/button.component';
|
|
2
|
+
import { AppSelectOption } from '../select/select.component';
|
|
3
|
+
import { UicDistributionValue } from '../../dynamic-form/form.models';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
declare const base: abstract new () => {
|
|
6
|
+
value: UicDistributionValue | null;
|
|
7
|
+
valueChange: import("@angular/core").EventEmitter<UicDistributionValue | null>;
|
|
8
|
+
onChange: (value: UicDistributionValue | null) => void;
|
|
9
|
+
onTouched: () => void;
|
|
10
|
+
writeValue(obj: UicDistributionValue | null): void;
|
|
11
|
+
registerOnChange(fn: any): void;
|
|
12
|
+
registerOnTouched(fn: any): void;
|
|
13
|
+
setDisabledState?(isDisabled: boolean): void;
|
|
14
|
+
notifyChange(value: UicDistributionValue | null): void;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Distribución porcentual: el usuario reparte el 100% entre las opciones.
|
|
18
|
+
* Valor: [{ id, value }] con un ítem por opción (en su orden), o null si no asignó nada.
|
|
19
|
+
* Los porcentajes son enteros entre 0 y 100; la validación de que sumen 100 está en el formulario
|
|
20
|
+
* (uicDistributionTotalValidator), este componente solo muestra el total y cuánto falta o sobra.
|
|
21
|
+
*/
|
|
22
|
+
export declare class UicDistributionComponent extends base {
|
|
23
|
+
private readonly host;
|
|
24
|
+
readonly uid: string;
|
|
25
|
+
readonly expected = 100;
|
|
26
|
+
icon: string;
|
|
27
|
+
iconColor: ButtonColor;
|
|
28
|
+
label: string;
|
|
29
|
+
error: string;
|
|
30
|
+
tip: string;
|
|
31
|
+
disabled: boolean;
|
|
32
|
+
options: AppSelectOption[];
|
|
33
|
+
/** Opciones con id utilizable (una opción sin id no se puede guardar en el valor). */
|
|
34
|
+
get validOptions(): (AppSelectOption & {
|
|
35
|
+
id: string | number;
|
|
36
|
+
})[];
|
|
37
|
+
get total(): number;
|
|
38
|
+
/** Lo que falta para llegar a 100 (negativo si se pasó). */
|
|
39
|
+
get remaining(): number;
|
|
40
|
+
amountOf(option: AppSelectOption): number;
|
|
41
|
+
onInput(option: AppSelectOption, event: Event): void;
|
|
42
|
+
/** Asigna a esta opción todo lo que falta para llegar a 100. */
|
|
43
|
+
fillRemaining(option: AppSelectOption): void;
|
|
44
|
+
clear(): void;
|
|
45
|
+
/** Foco dentro del grupo: mientras se reparte, el total ya indica cuánto falta y no se muestra el error. */
|
|
46
|
+
hasFocus: boolean;
|
|
47
|
+
get displayedError(): string;
|
|
48
|
+
onFocusIn(): void;
|
|
49
|
+
onFocusOut(event: FocusEvent): void;
|
|
50
|
+
inputId(index: number): string;
|
|
51
|
+
private setAmount;
|
|
52
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UicDistributionComponent, never>;
|
|
53
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UicDistributionComponent, "ui-distribution", 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; }; "options": { "alias": "options"; "required": false; }; }, {}, never, never, true, never>;
|
|
54
|
+
}
|
|
55
|
+
export {};
|
|
@@ -145,6 +145,7 @@ export declare class UicSurveyComponent implements OnInit, OnChanges, OnDestroy
|
|
|
145
145
|
private validatePage;
|
|
146
146
|
private findFirstInvalidPage;
|
|
147
147
|
private focusActivePage;
|
|
148
|
+
/** Campos de una página de una sola pregunta: la pregunta y, si tiene "Otros", su texto acompañante. */
|
|
148
149
|
private fieldsForSingleFieldPage;
|
|
149
150
|
private onFormBuilt;
|
|
150
151
|
private scheduleImmediateSaves;
|
|
@@ -45,6 +45,17 @@ export declare class BlockEditorComponent {
|
|
|
45
45
|
connectedFieldListIds: import("@angular/core").InputSignal<string[]>;
|
|
46
46
|
/** Solo lectura: se puede navegar y seleccionar, pero no editar, mover, agregar ni eliminar. */
|
|
47
47
|
readOnly: import("@angular/core").InputSignal<boolean>;
|
|
48
|
+
/** Tipos de campo habilitados por la configuración del builder (null = todos). */
|
|
49
|
+
availableFieldTypes: import("@angular/core").InputSignal<FieldType[] | null>;
|
|
50
|
+
/** Falso cuando la configuración no permite crear bloques y este es el último. */
|
|
51
|
+
canDelete: import("@angular/core").InputSignal<boolean>;
|
|
52
|
+
/** Máximos de la configuración (null = sin límite). */
|
|
53
|
+
fieldLimitReached: import("@angular/core").InputSignal<boolean>;
|
|
54
|
+
maxFields: import("@angular/core").InputSignal<number | null>;
|
|
55
|
+
maxRepeaterFields: import("@angular/core").InputSignal<number | null>;
|
|
56
|
+
fieldLimitMessage: import("@angular/core").Signal<string>;
|
|
57
|
+
repeaterLimitMessage: import("@angular/core").Signal<string>;
|
|
58
|
+
isRepeaterFull(field: EditableField): boolean;
|
|
48
59
|
fieldListId: import("@angular/core").Signal<string>;
|
|
49
60
|
/** Estado solo visual: plegar el bloque no altera el formulario. */
|
|
50
61
|
collapsed: import("@angular/core").WritableSignal<boolean>;
|
|
@@ -77,10 +88,12 @@ export declare class BlockEditorComponent {
|
|
|
77
88
|
visibilitySummary(field: EditableField, siblings?: EditableField[]): VisibilityRuleSummary | null;
|
|
78
89
|
private formatRuleValue;
|
|
79
90
|
private lowerFirst;
|
|
91
|
+
/** Duplicar crea un campo nuevo, así que solo se ofrece para tipos habilitados por la configuración. */
|
|
92
|
+
isTypeAvailable(type: string): boolean;
|
|
80
93
|
toggleCollapsed(): void;
|
|
81
94
|
requestDuplicateField(fieldCode: string, e: Event): void;
|
|
82
95
|
/** cdkDropListData es el code del bloque: así se identifica el origen al soltar desde otro bloque. */
|
|
83
96
|
reorderFields(event: CdkDragDrop<string>): void;
|
|
84
97
|
static ɵfac: i0.ɵɵFactoryDeclaration<BlockEditorComponent, 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>;
|
|
98
|
+
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; }; "availableFieldTypes": { "alias": "availableFieldTypes"; "required": false; "isSignal": true; }; "canDelete": { "alias": "canDelete"; "required": false; "isSignal": true; }; "fieldLimitReached": { "alias": "fieldLimitReached"; "required": false; "isSignal": true; }; "maxFields": { "alias": "maxFields"; "required": false; "isSignal": true; }; "maxRepeaterFields": { "alias": "maxRepeaterFields"; "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>;
|
|
86
99
|
}
|
package/lib/components/user-formbuilder/block-editor/field-editor/field-editor.component.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FieldVisibilityRule, FormField, uicFormValuesRecord } from '../../../dynamic-form/form.models';
|
|
1
|
+
import { FieldVisibilityRule, FormField, UicOtherOptionConfig, 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";
|
|
@@ -19,6 +19,25 @@ export declare class FieldEditorComponent {
|
|
|
19
19
|
enableNameModify: import("@angular/core").InputSignal<boolean>;
|
|
20
20
|
/** Solo lectura: muestra las propiedades deshabilitadas y oculta las acciones sobre reglas. */
|
|
21
21
|
readOnly: import("@angular/core").InputSignal<boolean>;
|
|
22
|
+
/** Fuentes externas habilitadas por la configuración del builder. */
|
|
23
|
+
externalSources: import("@angular/core").InputSignal<{
|
|
24
|
+
options: boolean;
|
|
25
|
+
computed: boolean;
|
|
26
|
+
validation: boolean;
|
|
27
|
+
}>;
|
|
28
|
+
/**
|
|
29
|
+
* Una fuente deshabilitada se oculta, salvo que el campo ya la tenga configurada:
|
|
30
|
+
* así un formulario existente se puede ver y limpiar sin perder datos.
|
|
31
|
+
*/
|
|
32
|
+
/** Sección "Dependencia". Deshabilitada se oculta, salvo que el campo ya tenga reglas (para verlas y quitarlas). */
|
|
33
|
+
visibilityRulesEnabled: import("@angular/core").InputSignal<boolean>;
|
|
34
|
+
/** Sección "Estilo". */
|
|
35
|
+
styleEnabled: import("@angular/core").InputSignal<boolean>;
|
|
36
|
+
showDependencySection: import("@angular/core").Signal<boolean>;
|
|
37
|
+
/** Tipos con opciones que no admiten origen externo (el motor solo lo resuelve para selectores, pool y radio). */
|
|
38
|
+
private readonly manualOptionsOnly;
|
|
39
|
+
showOptionsSourceConfig: import("@angular/core").Signal<boolean>;
|
|
40
|
+
showExternalValidation: import("@angular/core").Signal<boolean>;
|
|
22
41
|
options: import("@angular/core").InputSignal<Record<string, AppSelectOption[]>>;
|
|
23
42
|
hiddenSections: import("@angular/core").WritableSignal<string[]>;
|
|
24
43
|
editingRuleIndex: import("@angular/core").WritableSignal<number>;
|
|
@@ -48,6 +67,10 @@ export declare class FieldEditorComponent {
|
|
|
48
67
|
updateFieldValues(fr: uicFormValuesRecord): void;
|
|
49
68
|
/** Leyendas de la escala: el código es el valor numérico. */
|
|
50
69
|
updateScaleLabels(labels: AppSelectOption[]): void;
|
|
70
|
+
supportsOtherOption: import("@angular/core").Signal<boolean>;
|
|
71
|
+
toggleOtherOption(enabled: boolean): void;
|
|
72
|
+
updateOtherOption(patch: Partial<UicOtherOptionConfig>): void;
|
|
73
|
+
private patchField;
|
|
51
74
|
updateOptions(options: AppSelectOption[]): void;
|
|
52
75
|
private getDependencyFieldLabel;
|
|
53
76
|
isSectionHidden(section: string): boolean;
|
|
@@ -73,5 +96,5 @@ export declare class FieldEditorComponent {
|
|
|
73
96
|
private buildComputedSourceFields;
|
|
74
97
|
private buildExternalValidationFields;
|
|
75
98
|
static ɵfac: i0.ɵɵFactoryDeclaration<FieldEditorComponent, 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>;
|
|
99
|
+
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; }; "externalSources": { "alias": "externalSources"; "required": false; "isSignal": true; }; "visibilityRulesEnabled": { "alias": "visibilityRulesEnabled"; "required": false; "isSignal": true; }; "styleEnabled": { "alias": "styleEnabled"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, { "fieldChange": "fieldChange"; }, never, never, true, never>;
|
|
77
100
|
}
|
|
@@ -9,10 +9,15 @@ interface FieldTypeGroup {
|
|
|
9
9
|
}
|
|
10
10
|
export declare class FieldTypeSelectorComponent {
|
|
11
11
|
private readonly translateService;
|
|
12
|
+
/** Tipos permitidos por la configuración del builder. null = todos. */
|
|
13
|
+
allowedTypes: import("@angular/core").InputSignal<FieldType[] | null>;
|
|
12
14
|
excludeTypes: import("@angular/core").InputSignal<FieldType[]>;
|
|
13
15
|
/** Texto del botón disparador (clave de traducción o texto literal). */
|
|
14
16
|
label: import("@angular/core").InputSignal<string>;
|
|
15
17
|
size: import("@angular/core").InputSignal<ButtonSize>;
|
|
18
|
+
/** Deshabilita el botón (p. ej., al alcanzar un máximo); `disabledReason` se muestra como tooltip. */
|
|
19
|
+
disabled: import("@angular/core").InputSignal<boolean>;
|
|
20
|
+
disabledReason: import("@angular/core").InputSignal<string>;
|
|
16
21
|
selectType: import("@angular/core").OutputEmitterRef<FieldConfig>;
|
|
17
22
|
private searchInput?;
|
|
18
23
|
search: import("@angular/core").WritableSignal<string>;
|
|
@@ -26,6 +31,6 @@ export declare class FieldTypeSelectorComponent {
|
|
|
26
31
|
pickFirst(dropdown: UicDropdownContainerComponent): void;
|
|
27
32
|
private normalize;
|
|
28
33
|
static ɵfac: i0.ɵɵFactoryDeclaration<FieldTypeSelectorComponent, never>;
|
|
29
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FieldTypeSelectorComponent, "lib-field-type-selector", never, { "excludeTypes": { "alias": "excludeTypes"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, { "selectType": "selectType"; }, never, never, true, never>;
|
|
34
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FieldTypeSelectorComponent, "lib-field-type-selector", never, { "allowedTypes": { "alias": "allowedTypes"; "required": false; "isSignal": true; }; "excludeTypes": { "alias": "excludeTypes"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "disabledReason": { "alias": "disabledReason"; "required": false; "isSignal": true; }; }, { "selectType": "selectType"; }, never, never, true, never>;
|
|
30
35
|
}
|
|
31
36
|
export {};
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { InjectionToken, Provider } from '@angular/core';
|
|
2
|
+
import { FieldType } from '../dynamic-form/form.models';
|
|
3
|
+
import type { FormBuilderPreviewMode, FormBuilderSurveyPreviewOptions } from './form-preview/form-preview.component';
|
|
4
|
+
/**
|
|
5
|
+
* Configuración inicial del form builder (serializable a JSON).
|
|
6
|
+
*
|
|
7
|
+
* Solo oculta funcionalidades que un cliente no va a usar: no altera el modelo ni el comportamiento.
|
|
8
|
+
* Los formularios existentes se respetan: un campo de un tipo deshabilitado, o con una fuente externa
|
|
9
|
+
* ya configurada, se sigue mostrando y editando; lo que se oculta es la opción de crear nuevos.
|
|
10
|
+
*
|
|
11
|
+
* Se lee una sola vez al iniciar el componente (cambios posteriores se ignoran).
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* {
|
|
15
|
+
* "excludeFieldTypes": ["repeater", "pool"],
|
|
16
|
+
* "allowBlockCreation": false,
|
|
17
|
+
* "externalSources": { "options": true, "computed": false, "validation": false },
|
|
18
|
+
* "allowNameEdit": true,
|
|
19
|
+
* "visibilityRules": false,
|
|
20
|
+
* "styleSection": false,
|
|
21
|
+
* "limits": { "maxBlocks": 3, "maxFields": 20, "maxRepeaterFields": 5 },
|
|
22
|
+
* "preview": { "mode": "survey", "survey": { "pageMode": "field" } }
|
|
23
|
+
* }
|
|
24
|
+
*/
|
|
25
|
+
export interface UicFormBuilderConfig {
|
|
26
|
+
/** Lista blanca de tipos disponibles en "Agregar campo". Omitido = todos. */
|
|
27
|
+
fieldTypes?: FieldType[];
|
|
28
|
+
/** Tipos a ocultar (se aplica después de `fieldTypes`). */
|
|
29
|
+
excludeFieldTypes?: FieldType[];
|
|
30
|
+
/**
|
|
31
|
+
* Permite crear bloques nuevos. Con `false` se trabaja sobre los bloques existentes; si el
|
|
32
|
+
* formulario no tiene ninguno se crea uno vacío al editar, y no se puede eliminar el último.
|
|
33
|
+
* Por defecto: true.
|
|
34
|
+
*/
|
|
35
|
+
allowBlockCreation?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Fuentes externas (resolvers del consumidor). `false` las oculta todas; un objeto las controla por separado.
|
|
38
|
+
* - options: origen externo de opciones (selectores) y los tipos "Buscador" / "Buscador múltiple".
|
|
39
|
+
* - computed: tipo "Campo calculado".
|
|
40
|
+
* - validation: sección "Validación externa".
|
|
41
|
+
* Por defecto: todas habilitadas.
|
|
42
|
+
*/
|
|
43
|
+
externalSources?: boolean | {
|
|
44
|
+
options?: boolean;
|
|
45
|
+
computed?: boolean;
|
|
46
|
+
validation?: boolean;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Permite editar el identificador (`name`) de cada campo. Reemplaza a la entrada `enableNameModify`
|
|
50
|
+
* (que sigue funcionando si esto se omite). Por defecto: false.
|
|
51
|
+
*/
|
|
52
|
+
allowNameEdit?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Sección "Dependencia" (reglas de visibilidad). Con `false` se oculta, salvo en campos que ya
|
|
55
|
+
* tengan reglas (para poder verlas y quitarlas). Por defecto: true.
|
|
56
|
+
*/
|
|
57
|
+
visibilityRules?: boolean;
|
|
58
|
+
/** Sección "Estilo" (íconos, colores, sugerencia, ancho, salto de línea). Por defecto: true. */
|
|
59
|
+
styleSection?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Máximos (enteros positivos; omitido = sin límite). Al alcanzarlos se deshabilita "Agregar"/"Duplicar"
|
|
62
|
+
* y no se puede cargar un JSON que los supere. Un formulario existente que ya los supere se respeta.
|
|
63
|
+
*/
|
|
64
|
+
limits?: {
|
|
65
|
+
/** Bloques por formulario. */
|
|
66
|
+
maxBlocks?: number;
|
|
67
|
+
/** Campos por formulario (todos los bloques; no cuenta sub-campos). */
|
|
68
|
+
maxFields?: number;
|
|
69
|
+
/** Sub-campos por repetidor. */
|
|
70
|
+
maxRepeaterFields?: number;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Vista previa. Tiene prioridad sobre las entradas `previewMode` y `surveyPreviewOptions`
|
|
74
|
+
* (útiles si el modo debe cambiar en tiempo de ejecución, porque la config se lee una sola vez).
|
|
75
|
+
*/
|
|
76
|
+
preview?: {
|
|
77
|
+
mode?: FormBuilderPreviewMode;
|
|
78
|
+
survey?: FormBuilderSurveyPreviewOptions;
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
export interface FormBuilderLimits {
|
|
82
|
+
maxBlocks: number | null;
|
|
83
|
+
maxFields: number | null;
|
|
84
|
+
maxRepeaterFields: number | null;
|
|
85
|
+
}
|
|
86
|
+
export interface ResolvedFormBuilderConfig {
|
|
87
|
+
/** Tipos que se pueden agregar como campo (ya filtrados por fuentes externas). */
|
|
88
|
+
fieldTypes: FieldType[];
|
|
89
|
+
allowBlockCreation: boolean;
|
|
90
|
+
externalSources: {
|
|
91
|
+
options: boolean;
|
|
92
|
+
computed: boolean;
|
|
93
|
+
validation: boolean;
|
|
94
|
+
};
|
|
95
|
+
/** null = no definido en la config (se usa la entrada `enableNameModify`). */
|
|
96
|
+
allowNameEdit: boolean | null;
|
|
97
|
+
visibilityRules: boolean;
|
|
98
|
+
styleSection: boolean;
|
|
99
|
+
limits: FormBuilderLimits;
|
|
100
|
+
/** null = no definido en la config (se usan las entradas `previewMode` / `surveyPreviewOptions`). */
|
|
101
|
+
preview: {
|
|
102
|
+
mode: FormBuilderPreviewMode | null;
|
|
103
|
+
survey: FormBuilderSurveyPreviewOptions | null;
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
/** Configuración global (p. ej. por cliente). La entrada `config` del componente la sobrescribe por clave. */
|
|
107
|
+
export declare const UIC_FORM_BUILDER_CONFIG: InjectionToken<UicFormBuilderConfig>;
|
|
108
|
+
export declare function provideUicFormBuilderConfig(config: UicFormBuilderConfig): Provider;
|
|
109
|
+
export declare function resolveFormBuilderConfig(...configs: (UicFormBuilderConfig | null | undefined)[]): ResolvedFormBuilderConfig;
|
|
110
|
+
/** true si `count` ya alcanzó el máximo (sin máximo nunca se alcanza). */
|
|
111
|
+
export declare function isLimitReached(count: number, max: number | null): boolean;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
1
2
|
import { FieldConfig, FormField, SelectOptionsResolver, ComputedFieldResolver, ExternalValidatorResolver } from '../dynamic-form/form.models';
|
|
2
3
|
import { FormBuilderPreviewMode, FormBuilderSurveyPreviewOptions } from './form-preview/form-preview.component';
|
|
3
4
|
import { FieldMoveRequest } from './block-editor/block-editor.component';
|
|
4
5
|
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
6
|
+
import { ResolvedFormBuilderConfig, UicFormBuilderConfig } from './formbuilder.config';
|
|
5
7
|
import { AppSelectOption } from '../inputs/select/select.component';
|
|
6
8
|
import { ConnectedPosition } from '@angular/cdk/overlay';
|
|
7
9
|
import * as i0 from "@angular/core";
|
|
@@ -54,12 +56,17 @@ export type BuilderSchemaFile = {
|
|
|
54
56
|
schemaVersion: 1;
|
|
55
57
|
form: EditableForm;
|
|
56
58
|
};
|
|
57
|
-
export declare class UicUserFormbuilderComponent {
|
|
59
|
+
export declare class UicUserFormbuilderComponent implements OnInit {
|
|
58
60
|
private readonly modalService;
|
|
59
61
|
private readonly host;
|
|
60
62
|
private readonly tinyAlertService;
|
|
61
63
|
private readonly translateService;
|
|
62
64
|
disabled: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Configuración inicial (tipos disponibles, creación de bloques, fuentes externas).
|
|
67
|
+
* Se combina con la global de `provideUicFormBuilderConfig` y se lee una sola vez en ngOnInit.
|
|
68
|
+
*/
|
|
69
|
+
config: UicFormBuilderConfig | null;
|
|
63
70
|
formTitle: string;
|
|
64
71
|
optionSources: AppSelectOption[];
|
|
65
72
|
computedSources: AppSelectOption[];
|
|
@@ -68,10 +75,14 @@ export declare class UicUserFormbuilderComponent {
|
|
|
68
75
|
computedFieldResolver?: ComputedFieldResolver;
|
|
69
76
|
externalValidatorResolver?: ExternalValidatorResolver;
|
|
70
77
|
readOnly: import("@angular/core").InputSignal<boolean>;
|
|
78
|
+
/** @deprecated Usar `config.allowNameEdit`. Se usa solo si la config no lo define. */
|
|
71
79
|
enableNameModify: import("@angular/core").InputSignal<boolean>;
|
|
72
|
-
/**
|
|
80
|
+
/**
|
|
81
|
+
* Vista previa como formulario (por defecto) o como encuesta (ui-survey). `config.preview.mode` tiene prioridad;
|
|
82
|
+
* esta entrada sirve cuando el modo debe cambiar en tiempo de ejecución (la config se lee una sola vez).
|
|
83
|
+
*/
|
|
73
84
|
previewMode: import("@angular/core").InputSignal<FormBuilderPreviewMode>;
|
|
74
|
-
/** Ajustes de la vista previa en modo encuesta
|
|
85
|
+
/** Ajustes de la vista previa en modo encuesta. `config.preview.survey` tiene prioridad (ver previewMode). */
|
|
75
86
|
surveyPreviewOptions: import("@angular/core").InputSignal<FormBuilderSurveyPreviewOptions | null>;
|
|
76
87
|
editableFormInput: import("@angular/core").InputSignal<EditableForm>;
|
|
77
88
|
submitFormRequest: import("@angular/core").OutputEmitterRef<EditableForm>;
|
|
@@ -120,6 +131,17 @@ export declare class UicUserFormbuilderComponent {
|
|
|
120
131
|
private resizeStartWidth;
|
|
121
132
|
dependencyOptions: import("@angular/core").Signal<Record<string, AppSelectOption[]>>;
|
|
122
133
|
subFieldDependencyOptions: import("@angular/core").Signal<Record<string, AppSelectOption[]>>;
|
|
134
|
+
private readonly globalConfig;
|
|
135
|
+
/** Config efectiva. Arranca con la global y se completa con la entrada `config` en ngOnInit (una sola vez). */
|
|
136
|
+
readonly settings: import("@angular/core").WritableSignal<ResolvedFormBuilderConfig>;
|
|
137
|
+
/** Sin creación de bloques no se puede eliminar el último (no habría dónde agregar campos). */
|
|
138
|
+
readonly canDeleteBlocks: import("@angular/core").Signal<boolean>;
|
|
139
|
+
/** Edición del identificador: la config manda; si no la define, se usa la entrada (obsoleta) enableNameModify. */
|
|
140
|
+
readonly nameEditable: import("@angular/core").Signal<boolean>;
|
|
141
|
+
readonly totalFields: import("@angular/core").Signal<number>;
|
|
142
|
+
readonly fieldLimitReached: import("@angular/core").Signal<boolean>;
|
|
143
|
+
readonly blockLimitReached: import("@angular/core").Signal<boolean>;
|
|
144
|
+
ngOnInit(): void;
|
|
123
145
|
constructor();
|
|
124
146
|
addBlock(): void;
|
|
125
147
|
deleteBlock(code: string): Promise<void>;
|
|
@@ -170,6 +192,8 @@ export declare class UicUserFormbuilderComponent {
|
|
|
170
192
|
printForm(): void;
|
|
171
193
|
copySchemaToClipboard(): void;
|
|
172
194
|
importSchemaFromFile(event: Event): Promise<void>;
|
|
195
|
+
/** Texto con los máximos que supera un formulario importado, o null si los respeta. */
|
|
196
|
+
private describeExceededLimits;
|
|
173
197
|
private buildExportableForm;
|
|
174
198
|
private applyImportedForm;
|
|
175
199
|
private parseImportedSchema;
|
|
@@ -192,7 +216,7 @@ export declare class UicUserFormbuilderComponent {
|
|
|
192
216
|
private areSelectOptionArraysEqual;
|
|
193
217
|
private deepClone;
|
|
194
218
|
static ɵfac: i0.ɵɵFactoryDeclaration<UicUserFormbuilderComponent, never>;
|
|
195
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<UicUserFormbuilderComponent, "ui-user-formbuilder", never, { "disabled": { "alias": "disabled"; "required": false; }; "formTitle": { "alias": "formTitle"; "required": false; }; "optionSources": { "alias": "optionSources"; "required": false; }; "computedSources": { "alias": "computedSources"; "required": false; }; "validationSources": { "alias": "validationSources"; "required": false; }; "selectOptionsResolver": { "alias": "selectOptionsResolver"; "required": false; }; "computedFieldResolver": { "alias": "computedFieldResolver"; "required": false; }; "externalValidatorResolver": { "alias": "externalValidatorResolver"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; "isSignal": true; }; "enableNameModify": { "alias": "enableNameModify"; "required": false; "isSignal": true; }; "previewMode": { "alias": "previewMode"; "required": false; "isSignal": true; }; "surveyPreviewOptions": { "alias": "surveyPreviewOptions"; "required": false; "isSignal": true; }; "editableFormInput": { "alias": "editableForm"; "required": false; "isSignal": true; }; }, { "submitFormRequest": "submitFormRequest"; }, never, never, true, never>;
|
|
219
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UicUserFormbuilderComponent, "ui-user-formbuilder", never, { "disabled": { "alias": "disabled"; "required": false; }; "config": { "alias": "config"; "required": false; }; "formTitle": { "alias": "formTitle"; "required": false; }; "optionSources": { "alias": "optionSources"; "required": false; }; "computedSources": { "alias": "computedSources"; "required": false; }; "validationSources": { "alias": "validationSources"; "required": false; }; "selectOptionsResolver": { "alias": "selectOptionsResolver"; "required": false; }; "computedFieldResolver": { "alias": "computedFieldResolver"; "required": false; }; "externalValidatorResolver": { "alias": "externalValidatorResolver"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; "isSignal": true; }; "enableNameModify": { "alias": "enableNameModify"; "required": false; "isSignal": true; }; "previewMode": { "alias": "previewMode"; "required": false; "isSignal": true; }; "surveyPreviewOptions": { "alias": "surveyPreviewOptions"; "required": false; "isSignal": true; }; "editableFormInput": { "alias": "editableForm"; "required": false; "isSignal": true; }; }, { "submitFormRequest": "submitFormRequest"; }, never, never, true, never>;
|
|
196
220
|
}
|
|
197
221
|
export interface ComputedSourceOption {
|
|
198
222
|
id: string | number;
|
package/lib/theme/colors.d.ts
CHANGED
|
@@ -22,3 +22,13 @@ export declare function uicColorOptions(colors?: readonly UicColor[]): {
|
|
|
22
22
|
id: UicColor;
|
|
23
23
|
text: string;
|
|
24
24
|
}[];
|
|
25
|
+
/**
|
|
26
|
+
* Opciones de color con una muestra (círculo del tono) delante del nombre, para selects de color.
|
|
27
|
+
* El blanco se muestra como círculo con borde gris para que se vea sobre fondos claros.
|
|
28
|
+
*/
|
|
29
|
+
export declare function uicColorSwatchOptions(colors?: readonly UicColor[]): {
|
|
30
|
+
id: UicColor;
|
|
31
|
+
text: string;
|
|
32
|
+
icon: string;
|
|
33
|
+
iconColor: string;
|
|
34
|
+
}[];
|
|
@@ -235,6 +235,22 @@ export declare const DICTIONARY_EN: {
|
|
|
235
235
|
readonly visibility_summary: "Visible if {{field}} {{operator}} {{value}}";
|
|
236
236
|
readonly yes: "Yes";
|
|
237
237
|
readonly no: "No";
|
|
238
|
+
readonly other_option: {
|
|
239
|
+
readonly enable: "Include an \"Other\" (please specify) option";
|
|
240
|
+
readonly enable_tip: "Adds an Other option with a text to specify. The text is saved as <identifier>__other.";
|
|
241
|
+
readonly label: "Option text";
|
|
242
|
+
readonly placeholder: "Field placeholder";
|
|
243
|
+
readonly required: "Specifying is required when Other is chosen";
|
|
244
|
+
};
|
|
245
|
+
readonly limits: {
|
|
246
|
+
readonly fields_reached: "The form already has the maximum of {{max}} fields";
|
|
247
|
+
readonly blocks_reached: "The maximum of {{max}} blocks has been reached";
|
|
248
|
+
readonly repeater_fields_reached: "The maximum of {{max}} sub-fields per repeater has been reached";
|
|
249
|
+
readonly import_exceeds: "The file exceeds the limits of this form: {{detail}}.";
|
|
250
|
+
readonly detail_blocks: "{{count}} blocks (maximum {{max}})";
|
|
251
|
+
readonly detail_fields: "{{count}} fields (maximum {{max}})";
|
|
252
|
+
readonly detail_repeater_fields: "a repeater with {{count}} sub-fields (maximum {{max}})";
|
|
253
|
+
};
|
|
238
254
|
readonly undo: {
|
|
239
255
|
readonly field_removed: "Field \"{{label}}\" deleted";
|
|
240
256
|
readonly subfield_removed: "Sub-field \"{{label}}\" deleted";
|
|
@@ -467,6 +483,19 @@ export declare const DICTIONARY_EN: {
|
|
|
467
483
|
readonly subtitle_margin: "Subtitle margin";
|
|
468
484
|
};
|
|
469
485
|
};
|
|
486
|
+
readonly other_option: {
|
|
487
|
+
readonly label: "Other";
|
|
488
|
+
readonly placeholder: "Please specify...";
|
|
489
|
+
};
|
|
490
|
+
readonly distribution: {
|
|
491
|
+
readonly total: "Total";
|
|
492
|
+
readonly complete: "Complete";
|
|
493
|
+
readonly missing: "{{amount}}% left";
|
|
494
|
+
readonly over: "{{amount}}% over";
|
|
495
|
+
readonly clear: "Clear";
|
|
496
|
+
readonly fill_remaining: "Assign the remaining {{remaining}}% to {{option}}";
|
|
497
|
+
readonly no_options: "This question has no options yet.";
|
|
498
|
+
};
|
|
470
499
|
readonly validation: {
|
|
471
500
|
readonly invalid: "{{field}} is invalid.";
|
|
472
501
|
readonly required: "{{field}} is required.";
|
|
@@ -478,6 +507,7 @@ export declare const DICTIONARY_EN: {
|
|
|
478
507
|
readonly external_invalid: "{{field}} is not valid.";
|
|
479
508
|
readonly min_selections: "{{field}}: choose at least {{min}} options.";
|
|
480
509
|
readonly max_selections: "{{field}}: choose at most {{max}} options.";
|
|
510
|
+
readonly distribution_total: "{{field}} must add up to {{expected}}% (currently {{total}}%).";
|
|
481
511
|
};
|
|
482
512
|
readonly clipboard: {
|
|
483
513
|
readonly copy_error: "Could not copy:";
|