@vectoriox/iox-ui 4.28.0 → 4.29.1
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/vectoriox-iox-ui-forms-core.mjs +82 -1
- package/fesm2022/vectoriox-iox-ui-forms-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui.mjs +393 -94
- package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
- package/forms-core/index.d.ts +42 -2
- package/index.d.ts +233 -38
- package/package.json +1 -1
package/forms-core/index.d.ts
CHANGED
|
@@ -202,5 +202,45 @@ declare function collectFormSpec(node: FormNodeLike | null | undefined): FormSpe
|
|
|
202
202
|
/** Every Field in this subtree, in document order, not descending into a nested Form. */
|
|
203
203
|
declare function collectFieldNodes(nodes: readonly FormNodeLike[]): FormNodeLike[];
|
|
204
204
|
|
|
205
|
-
|
|
206
|
-
|
|
205
|
+
/** Everything the runtime needs to remember. Immutable — each transition returns a new state. */
|
|
206
|
+
interface FormRuntimeState {
|
|
207
|
+
/** Field names the visitor has left (blurred) at least once. */
|
|
208
|
+
touched: ReadonlySet<string>;
|
|
209
|
+
/** True once a submit has been attempted — after that, every error is fair game. */
|
|
210
|
+
submitted: boolean;
|
|
211
|
+
/** The current errors, whether or not they are being shown. */
|
|
212
|
+
errors: Readonly<Record<string, FieldError>>;
|
|
213
|
+
/** In flight — the submit button shows its loading label and the form is aria-busy. */
|
|
214
|
+
submitting: boolean;
|
|
215
|
+
}
|
|
216
|
+
declare const INITIAL_FORM_STATE: FormRuntimeState;
|
|
217
|
+
/**
|
|
218
|
+
* Should this field's error be on screen right now?
|
|
219
|
+
*
|
|
220
|
+
* - `Submit` — only after a submit attempt. Quietest; nothing moves while typing.
|
|
221
|
+
* - `Live` — as soon as it is invalid. Loudest; shouts at a half-typed email address.
|
|
222
|
+
* - `Smart` — the default, and the reason the author gets one dropdown instead of a decision per
|
|
223
|
+
* field: stay quiet until the visitor has either left the field or tried to submit.
|
|
224
|
+
* After that, correct live, so fixing an error clears it as they type.
|
|
225
|
+
*/
|
|
226
|
+
declare function shouldShowError(fieldName: string, state: FormRuntimeState, timing?: FeedbackTiming | string): boolean;
|
|
227
|
+
/**
|
|
228
|
+
* Re-validate one field after a change. Only that field is re-checked, EXCEPT that a `matches` rule
|
|
229
|
+
* makes another field's validity depend on this one — so a confirm-email field stops being wrong
|
|
230
|
+
* the moment you fix the address it points at, rather than waiting for its own blur.
|
|
231
|
+
*/
|
|
232
|
+
declare function onFieldChange(state: FormRuntimeState, fieldName: string, values: Record<string, unknown>, spec: FormSpec): FormRuntimeState;
|
|
233
|
+
/** Mark a field touched (on blur) and re-check it, so Smart timing can start showing its error. */
|
|
234
|
+
declare function onFieldBlur(state: FormRuntimeState, fieldName: string, values: Record<string, unknown>, spec: FormSpec): FormRuntimeState;
|
|
235
|
+
/**
|
|
236
|
+
* A submit attempt. Validates everything and flips `submitted`, so from here on every error shows
|
|
237
|
+
* whatever the timing setting is — a visitor who pressed the button is owed the full picture.
|
|
238
|
+
*/
|
|
239
|
+
declare function onSubmitAttempt(state: FormRuntimeState, values: Record<string, unknown>, spec: FormSpec): FormRuntimeState;
|
|
240
|
+
/** Server-side rejection: adopt the server's errors verbatim. It is the authority, not the client. */
|
|
241
|
+
declare function applyServerErrors(state: FormRuntimeState, errors: Record<string, FieldError>): FormRuntimeState;
|
|
242
|
+
/** A clean slate after a successful submit, for a form configured to clear itself. */
|
|
243
|
+
declare function resetFormState(): FormRuntimeState;
|
|
244
|
+
|
|
245
|
+
export { ControlType, DEFAULT_EN_MESSAGES, FIELD_NODE_TYPE, FORM_ERROR_KEYS, FORM_NODE_TYPE, FeedbackTiming, IMPLIED_PATTERN, INITIAL_FORM_STATE, MESSAGE_NAMESPACE, MULTI_VALUE_CONTROLS, PATTERN_MESSAGE_KEYS, PATTERN_PRESETS, PatternPreset, RULE_MESSAGE_KEYS, RuleName, STORE_ACTION, applyServerErrors, collectFieldNodes, collectFormSpec, deriveFieldName, firstInvalidField, onFieldBlur, onFieldChange, onSubmitAttempt, resetFormState, shouldShowError, uniqueFieldName, validateField, validateForm };
|
|
246
|
+
export type { FieldError, FieldOption, FieldOptionSource, FieldResult, FieldSpec, FormNodeLike, FormResult, FormRuntimeState, FormSpec, SubmitAction, ValidationRule };
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { AfterViewInit, EventEmitter, ElementRef, SimpleChanges, OnDestroy, OnInit, Renderer2, ModuleWithProviders, InjectionToken, ChangeDetectorRef, ViewContainerRef, Type, ComponentRef } from '@angular/core';
|
|
2
|
+
import { AfterViewInit, EventEmitter, ElementRef, SimpleChanges, OnDestroy, OnInit, Renderer2, ModuleWithProviders, InjectionToken, ChangeDetectorRef, ViewContainerRef, OnChanges, Type, ComponentRef } from '@angular/core';
|
|
3
3
|
import { AnimationPlayer, AnimationBuilder } from '@angular/animations';
|
|
4
4
|
import { Observable, Subject } from 'rxjs';
|
|
5
5
|
import * as i3 from '@angular/platform-browser/animations';
|
|
@@ -875,6 +875,180 @@ declare class ClientGalleryComponent implements AfterViewInit, OnDestroy {
|
|
|
875
875
|
static ɵcmp: i0.ɵɵComponentDeclaration<ClientGalleryComponent, "iox-gallery", never, { "nodeId": { "alias": "nodeId"; "required": false; }; "effect": { "alias": "effect"; "required": false; }; "autoStart": { "alias": "autoStart"; "required": false; }; "layout": { "alias": "layout"; "required": false; }; "images": { "alias": "images"; "required": false; }; "showDuration": { "alias": "showDuration"; "required": false; }; "fadeDuration": { "alias": "fadeDuration"; "required": false; }; }, {}, never, never, false, never>;
|
|
876
876
|
}
|
|
877
877
|
|
|
878
|
+
/** What the visitor actually types into. Chosen by a trait; it also implies a validation rule. */
|
|
879
|
+
declare enum ControlType {
|
|
880
|
+
Text = "text",
|
|
881
|
+
Email = "email",
|
|
882
|
+
Tel = "tel",
|
|
883
|
+
Url = "url",
|
|
884
|
+
Number = "number",
|
|
885
|
+
Password = "password",
|
|
886
|
+
Textarea = "textarea",
|
|
887
|
+
Select = "select",
|
|
888
|
+
Checkbox = "checkbox",
|
|
889
|
+
Radio = "radio",
|
|
890
|
+
Date = "date",
|
|
891
|
+
Time = "time",
|
|
892
|
+
File = "file",
|
|
893
|
+
/** Not shown; carries a constant or a bound value (campaign, source page, …). */
|
|
894
|
+
Hidden = "hidden"
|
|
895
|
+
}
|
|
896
|
+
/** The v1 rule grammar. Phase 3's conditional logic reuses these same names for its conditions. */
|
|
897
|
+
declare enum RuleName {
|
|
898
|
+
Required = "required",
|
|
899
|
+
MinLength = "minLength",
|
|
900
|
+
MaxLength = "maxLength",
|
|
901
|
+
Min = "min",
|
|
902
|
+
Max = "max",
|
|
903
|
+
Pattern = "pattern",
|
|
904
|
+
/** Cross-field: this value must equal another field's (confirm email / password). */
|
|
905
|
+
Matches = "matches",
|
|
906
|
+
/** A checkbox that must be ticked — terms, consent. */
|
|
907
|
+
Accepted = "accepted",
|
|
908
|
+
FileType = "fileType",
|
|
909
|
+
FileSize = "fileSize"
|
|
910
|
+
}
|
|
911
|
+
interface ValidationRule {
|
|
912
|
+
name: RuleName;
|
|
913
|
+
/** `{ n }` for lengths/bounds · `{ preset } | { regex }` for pattern · `{ field }` for matches. */
|
|
914
|
+
params?: Record<string, any>;
|
|
915
|
+
/** Author's override. Absent → the shared message catalog supplies a translated key. */
|
|
916
|
+
message?: string;
|
|
917
|
+
}
|
|
918
|
+
interface FieldOption {
|
|
919
|
+
label: string;
|
|
920
|
+
value: string;
|
|
921
|
+
}
|
|
922
|
+
/** Options pulled from a data source instead of typed by hand (a Select of CMS categories). */
|
|
923
|
+
interface FieldOptionSource {
|
|
924
|
+
source: string;
|
|
925
|
+
sourcePath?: string;
|
|
926
|
+
valuePath: string;
|
|
927
|
+
labelPath: string;
|
|
928
|
+
}
|
|
929
|
+
interface FieldSpec {
|
|
930
|
+
/** The submitted key. Derived from the label, unique within the form, editable. */
|
|
931
|
+
name: string;
|
|
932
|
+
control: ControlType;
|
|
933
|
+
label: string;
|
|
934
|
+
/** Surfaced as its own switch in the panel rather than buried in the rule list. */
|
|
935
|
+
required?: boolean;
|
|
936
|
+
rules?: ValidationRule[];
|
|
937
|
+
options?: FieldOption[];
|
|
938
|
+
optionsSource?: FieldOptionSource;
|
|
939
|
+
defaultValue?: any;
|
|
940
|
+
}
|
|
941
|
+
/** When a field is validated, once the author has stopped deciding it per field. */
|
|
942
|
+
declare enum FeedbackTiming {
|
|
943
|
+
/** Validate on submit, then live per-field once that field has been touched or has failed. */
|
|
944
|
+
Smart = "smart",
|
|
945
|
+
Submit = "submit",
|
|
946
|
+
Live = "live"
|
|
947
|
+
}
|
|
948
|
+
/** What happens to a submission, in order. Card #1 (`store`) is always present. */
|
|
949
|
+
interface SubmitAction {
|
|
950
|
+
type: string;
|
|
951
|
+
config?: Record<string, any>;
|
|
952
|
+
/** `retry` (default) · `fail` · `ignore`. */
|
|
953
|
+
onFailure?: 'retry' | 'fail' | 'ignore';
|
|
954
|
+
}
|
|
955
|
+
interface FormSpec {
|
|
956
|
+
formId: string;
|
|
957
|
+
/** Author-facing name — the submissions inbox groups by it. */
|
|
958
|
+
name: string;
|
|
959
|
+
feedback: FeedbackTiming;
|
|
960
|
+
fields: FieldSpec[];
|
|
961
|
+
actions: SubmitAction[];
|
|
962
|
+
antiSpam: {
|
|
963
|
+
honeypot: boolean;
|
|
964
|
+
minFillMs: number;
|
|
965
|
+
turnstile?: boolean;
|
|
966
|
+
};
|
|
967
|
+
retention?: {
|
|
968
|
+
days: number;
|
|
969
|
+
};
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
interface FieldError {
|
|
973
|
+
/** i18n key, or the author's own override string when they set one. */
|
|
974
|
+
messageKey: string;
|
|
975
|
+
/** Interpolation values (`{ n: 8 }`, `{ field: 'Email' }`). */
|
|
976
|
+
params?: Record<string, any>;
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
/** Everything the runtime needs to remember. Immutable — each transition returns a new state. */
|
|
980
|
+
interface FormRuntimeState {
|
|
981
|
+
/** Field names the visitor has left (blurred) at least once. */
|
|
982
|
+
touched: ReadonlySet<string>;
|
|
983
|
+
/** True once a submit has been attempted — after that, every error is fair game. */
|
|
984
|
+
submitted: boolean;
|
|
985
|
+
/** The current errors, whether or not they are being shown. */
|
|
986
|
+
errors: Readonly<Record<string, FieldError>>;
|
|
987
|
+
/** In flight — the submit button shows its loading label and the form is aria-busy. */
|
|
988
|
+
submitting: boolean;
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
/**
|
|
992
|
+
* How a message KEY becomes text a visitor reads.
|
|
993
|
+
*
|
|
994
|
+
* Translation belongs to the consumer, not the library: the CMS client has ngx-translate, the SSR
|
|
995
|
+
* engine has the page's locale bundle. Providing this token is how each one plugs its own in. The
|
|
996
|
+
* default below interpolates the built-in English strings, so a consumer that provides nothing
|
|
997
|
+
* still shows real sentences rather than raw keys.
|
|
998
|
+
*/
|
|
999
|
+
type FormMessageResolver = (key: string, params?: Record<string, any>) => string;
|
|
1000
|
+
declare const IOX_FORM_MESSAGES: InjectionToken<FormMessageResolver>;
|
|
1001
|
+
/** `{{n}}` / `{{field}}` interpolation over the built-in English catalog. */
|
|
1002
|
+
declare const defaultMessageResolver: FormMessageResolver;
|
|
1003
|
+
/**
|
|
1004
|
+
* Per-form runtime. **Provided by `IoxFormComponent`**, so every Field created into that form's
|
|
1005
|
+
* `childrenHost` resolves THIS instance through its element injector — which is exactly how a field
|
|
1006
|
+
* finds its form without a form-id, matching the ancestry rule (decision D1). A Field outside any
|
|
1007
|
+
* form injects nothing and simply renders.
|
|
1008
|
+
*
|
|
1009
|
+
* All the decisions live in the pure `forms-core` runtime; this class only holds the mutable state,
|
|
1010
|
+
* the registered fields and the Angular-shaped API. Nothing here decides *when* an error shows.
|
|
1011
|
+
*/
|
|
1012
|
+
declare class FormRuntimeService {
|
|
1013
|
+
/** Registered fields, in DOM order — the order the spec and focus-first-invalid depend on. */
|
|
1014
|
+
private readonly fields;
|
|
1015
|
+
private _state;
|
|
1016
|
+
private _spec;
|
|
1017
|
+
private _timing;
|
|
1018
|
+
get state(): FormRuntimeState;
|
|
1019
|
+
get submitting(): boolean;
|
|
1020
|
+
/** Set by the Form from its own traits. */
|
|
1021
|
+
configure(spec: FormSpec, timing: FeedbackTiming | string): void;
|
|
1022
|
+
/**
|
|
1023
|
+
* A Field announces itself here on init. It passes FUNCTIONS rather than values so the runtime
|
|
1024
|
+
* always reads the field's current spec and value — a trait edited on the canvas takes effect
|
|
1025
|
+
* without re-registering anything.
|
|
1026
|
+
*/
|
|
1027
|
+
register(field: {
|
|
1028
|
+
spec: () => FieldSpec;
|
|
1029
|
+
getValue: () => any;
|
|
1030
|
+
}): () => void;
|
|
1031
|
+
/** The live spec, derived from what is registered right now. */
|
|
1032
|
+
specNow(): FormSpec;
|
|
1033
|
+
/** Current values, keyed by submitted field name. */
|
|
1034
|
+
values(): Record<string, any>;
|
|
1035
|
+
onChange(name: string): void;
|
|
1036
|
+
onBlur(name: string): void;
|
|
1037
|
+
/** Validate everything. Returns whether the submission may proceed. */
|
|
1038
|
+
validateAll(): boolean;
|
|
1039
|
+
setSubmitting(submitting: boolean): void;
|
|
1040
|
+
/** The server rejected it — its verdict replaces ours. */
|
|
1041
|
+
applyErrors(errors: Record<string, FieldError>): void;
|
|
1042
|
+
reset(): void;
|
|
1043
|
+
/** Whether this field's error is allowed on screen right now. */
|
|
1044
|
+
showsError(name: string): boolean;
|
|
1045
|
+
errorFor(name: string): FieldError | undefined;
|
|
1046
|
+
/** The first invalid field in registration (DOM) order — what submit should focus. */
|
|
1047
|
+
firstInvalidName(): string | null;
|
|
1048
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormRuntimeService, never>;
|
|
1049
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<FormRuntimeService>;
|
|
1050
|
+
}
|
|
1051
|
+
|
|
878
1052
|
/** Which of the form's four states the canvas / runtime is showing. */
|
|
879
1053
|
declare enum FormRenderState {
|
|
880
1054
|
Idle = "idle",
|
|
@@ -898,45 +1072,39 @@ declare enum FormRenderState {
|
|
|
898
1072
|
* ⚠️ `novalidate` is deliberate: the browser's native bubbles would pre-empt our own messages,
|
|
899
1073
|
* which are styleable, translated and announced. Validation still runs — ours does it.
|
|
900
1074
|
*/
|
|
901
|
-
declare class IoxFormComponent {
|
|
1075
|
+
declare class IoxFormComponent implements OnChanges {
|
|
1076
|
+
private readonly runtime;
|
|
1077
|
+
private readonly host;
|
|
902
1078
|
nodeId: string;
|
|
903
1079
|
/** Stable id the submit endpoint resolves the saved spec by. */
|
|
904
1080
|
formId: string;
|
|
905
1081
|
/** Author-facing name — what the submissions inbox groups by. */
|
|
906
1082
|
name: string;
|
|
907
1083
|
renderState: FormRenderState | string;
|
|
1084
|
+
feedback: FeedbackTiming | string;
|
|
908
1085
|
/**
|
|
909
|
-
* Emitted
|
|
910
|
-
*
|
|
1086
|
+
* Emitted ONLY when client-side validation passes, carrying the collected values. The host
|
|
1087
|
+
* (builder canvas or engine runtime) owns the transport — posting, retries and the server's
|
|
1088
|
+
* verdict — so the same component serves both renderers.
|
|
911
1089
|
*/
|
|
912
|
-
formSubmit: EventEmitter<
|
|
1090
|
+
formSubmit: EventEmitter<{
|
|
1091
|
+
values: Record<string, any>;
|
|
1092
|
+
event: Event;
|
|
1093
|
+
}>;
|
|
1094
|
+
/** Emitted when a submit attempt was refused locally, so a host can react (analytics, focus). */
|
|
1095
|
+
validationFailed: EventEmitter<Record<string, any>>;
|
|
913
1096
|
childrenHost: ViewContainerRef;
|
|
1097
|
+
/**
|
|
1098
|
+
* Constructor injection rather than `inject()`, for the same reason as Field: this library's
|
|
1099
|
+
* specs construct components directly. `runtime` is provided by THIS component (see
|
|
1100
|
+
* `providers`), so every Field created into `childrenHost` resolves this instance by ancestry.
|
|
1101
|
+
*/
|
|
1102
|
+
constructor(runtime: FormRuntimeService, host: ElementRef<HTMLElement>);
|
|
1103
|
+
ngOnChanges(): void;
|
|
914
1104
|
onSubmit(event: Event): void;
|
|
1105
|
+
private focusFirstInvalid;
|
|
915
1106
|
static ɵfac: i0.ɵɵFactoryDeclaration<IoxFormComponent, never>;
|
|
916
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<IoxFormComponent, "form[iox-form]", never, { "nodeId": { "alias": "nodeId"; "required": false; }; "formId": { "alias": "formId"; "required": false; }; "name": { "alias": "name"; "required": false; }; "renderState": { "alias": "renderState"; "required": false; }; }, { "formSubmit": "formSubmit"; }, never, never, false, never>;
|
|
917
|
-
}
|
|
918
|
-
|
|
919
|
-
/** What the visitor actually types into. Chosen by a trait; it also implies a validation rule. */
|
|
920
|
-
declare enum ControlType {
|
|
921
|
-
Text = "text",
|
|
922
|
-
Email = "email",
|
|
923
|
-
Tel = "tel",
|
|
924
|
-
Url = "url",
|
|
925
|
-
Number = "number",
|
|
926
|
-
Password = "password",
|
|
927
|
-
Textarea = "textarea",
|
|
928
|
-
Select = "select",
|
|
929
|
-
Checkbox = "checkbox",
|
|
930
|
-
Radio = "radio",
|
|
931
|
-
Date = "date",
|
|
932
|
-
Time = "time",
|
|
933
|
-
File = "file",
|
|
934
|
-
/** Not shown; carries a constant or a bound value (campaign, source page, …). */
|
|
935
|
-
Hidden = "hidden"
|
|
936
|
-
}
|
|
937
|
-
interface FieldOption {
|
|
938
|
-
label: string;
|
|
939
|
-
value: string;
|
|
1107
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IoxFormComponent, "form[iox-form]", never, { "nodeId": { "alias": "nodeId"; "required": false; }; "formId": { "alias": "formId"; "required": false; }; "name": { "alias": "name"; "required": false; }; "renderState": { "alias": "renderState"; "required": false; }; "feedback": { "alias": "feedback"; "required": false; }; }, { "formSubmit": "formSubmit"; "validationFailed": "validationFailed"; }, never, never, false, never>;
|
|
940
1108
|
}
|
|
941
1109
|
|
|
942
1110
|
/**
|
|
@@ -954,8 +1122,11 @@ interface FieldOption {
|
|
|
954
1122
|
* ⚠️ Control type is a TRAIT, not a component per type (decision D4) — one component, one config,
|
|
955
1123
|
* and choosing `email` also chooses email validation.
|
|
956
1124
|
*/
|
|
957
|
-
declare class IoxFieldComponent {
|
|
1125
|
+
declare class IoxFieldComponent implements OnInit, OnDestroy {
|
|
1126
|
+
private readonly runtime;
|
|
1127
|
+
private readonly resolveMessage;
|
|
958
1128
|
nodeId: string;
|
|
1129
|
+
/** The submitted key. Blank means "derive it from the label" — authors never invent keys. */
|
|
959
1130
|
name: string;
|
|
960
1131
|
label: string;
|
|
961
1132
|
control: ControlType | string;
|
|
@@ -969,24 +1140,48 @@ declare class IoxFieldComponent {
|
|
|
969
1140
|
accept: string;
|
|
970
1141
|
options: FieldOption[];
|
|
971
1142
|
value: any;
|
|
972
|
-
/**
|
|
973
|
-
|
|
974
|
-
/**
|
|
975
|
-
|
|
1143
|
+
/** Rules beyond `required` — carried on the node, interpreted by forms-core. */
|
|
1144
|
+
rules: ValidationRule[];
|
|
1145
|
+
/**
|
|
1146
|
+
* Forces the error appearance without a real failure — how the builder lets an author DESIGN
|
|
1147
|
+
* the error state (decision D5). At runtime the state comes from the runtime service instead.
|
|
1148
|
+
*/
|
|
1149
|
+
forceInvalid: boolean;
|
|
1150
|
+
/** Placeholder shown while designing the error state, so the block has something to style. */
|
|
1151
|
+
designErrorText: string;
|
|
976
1152
|
/** Only after a successful check — never on an untouched field. */
|
|
977
1153
|
showValid: boolean;
|
|
978
1154
|
valueChange: EventEmitter<any>;
|
|
979
1155
|
touched: EventEmitter<void>;
|
|
980
1156
|
/** Stable per instance so `for`/`id` and `aria-describedby` always pair up. */
|
|
981
1157
|
readonly controlId: string;
|
|
1158
|
+
private unregister?;
|
|
1159
|
+
/**
|
|
1160
|
+
* Classic constructor injection, not `inject()`: this library's specs construct components
|
|
1161
|
+
* directly (its vitest setup cannot run `TestBed.createComponent`), and a field initializer
|
|
1162
|
+
* calling `inject()` throws NG0203 outside an injection context.
|
|
1163
|
+
*
|
|
1164
|
+
* `runtime` is optional because a Field dropped OUTSIDE any Form must still render — it simply
|
|
1165
|
+
* has nothing to submit to. That is the same ancestry rule from the other side.
|
|
1166
|
+
*/
|
|
1167
|
+
constructor(runtime: FormRuntimeService | null, resolveMessage: FormMessageResolver);
|
|
1168
|
+
ngOnInit(): void;
|
|
1169
|
+
ngOnDestroy(): void;
|
|
1170
|
+
/** The submitted key: the author's override, else derived from the label. */
|
|
1171
|
+
get fieldName(): string;
|
|
1172
|
+
/** Failing AND allowed to say so — or forced, while an author designs the state. */
|
|
1173
|
+
get invalid(): boolean;
|
|
1174
|
+
/** The message a visitor reads. Translation is the consumer's, via IOX_FORM_MESSAGES. */
|
|
1175
|
+
get errorText(): string;
|
|
1176
|
+
private toSpec;
|
|
982
1177
|
/** `file`, `date`, `number`… map straight through; everything else is a text input. */
|
|
983
1178
|
get inputType(): string;
|
|
984
1179
|
/** Help and error are BOTH announced, in that order, when both are present. */
|
|
985
1180
|
get describedBy(): string | null;
|
|
986
1181
|
emit(value: any): void;
|
|
987
1182
|
touch(): void;
|
|
988
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<IoxFieldComponent,
|
|
989
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<IoxFieldComponent, "div[iox-field]", never, { "nodeId": { "alias": "nodeId"; "required": false; }; "name": { "alias": "name"; "required": false; }; "label": { "alias": "label"; "required": false; }; "control": { "alias": "control"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "help": { "alias": "help"; "required": false; }; "required": { "alias": "required"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "labelHidden": { "alias": "labelHidden"; "required": false; }; "requiredMark": { "alias": "requiredMark"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; "options": { "alias": "options"; "required": false; }; "value": { "alias": "value"; "required": false; }; "
|
|
1183
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IoxFieldComponent, [{ optional: true; }, null]>;
|
|
1184
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IoxFieldComponent, "div[iox-field]", never, { "nodeId": { "alias": "nodeId"; "required": false; }; "name": { "alias": "name"; "required": false; }; "label": { "alias": "label"; "required": false; }; "control": { "alias": "control"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "help": { "alias": "help"; "required": false; }; "required": { "alias": "required"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "labelHidden": { "alias": "labelHidden"; "required": false; }; "requiredMark": { "alias": "requiredMark"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; "options": { "alias": "options"; "required": false; }; "value": { "alias": "value"; "required": false; }; "rules": { "alias": "rules"; "required": false; }; "forceInvalid": { "alias": "forceInvalid"; "required": false; }; "designErrorText": { "alias": "designErrorText"; "required": false; }; "showValid": { "alias": "showValid"; "required": false; }; }, { "valueChange": "valueChange"; "touched": "touched"; }, never, never, false, never>;
|
|
990
1185
|
}
|
|
991
1186
|
|
|
992
1187
|
/**
|
|
@@ -2178,5 +2373,5 @@ declare class GalleryLoop {
|
|
|
2178
2373
|
private emit;
|
|
2179
2374
|
}
|
|
2180
2375
|
|
|
2181
|
-
export { AOSService, AnalyticsService, BREAKPOINTS, Breakpoint, BreakpointQueryKind, BuilderButtonComponent, BuilderDividerComponent, BuilderHeadingComponent, BuilderIconComponent, BuilderImageComponent, BuilderLinkComponent, BuilderSpacerComponent, ButtonBlockComponent, CMSClientInfraModule, CONTEXT_ACTION_TYPES, CardComponent, ClientGalleryComponent, ClientListComponent, ClientListItemComponent, ClientRepeaterComponent, ClientSliderContainerComponent, ClientSliderSlideComponent, ComponentInstanceRegistryService, ConsentService, ContainerComponent, ContentService, ContextStore, DEFAULT_GALLERY_SCHEDULER, DEFAULT_PAGE_TRANSITION, DEFAULT_PAGE_TRANSITION_DURATION, DEFAULT_PAGE_TRANSITION_EASING, DEFAULT_PAGE_TRANSITION_PERSPECTIVE, DEFAULT_WIDTH_BY_TYPE, DeclarationContext, ENVIRONMENT, FormRenderState, GALLERY_EFFECTS, GALLERY_EFFECT_DESCRIPTORS, GalleryLoop, IOX_BUILDER_EVENTS, IS_PREVIEW, IoxAnimateContainer, IoxAosDirective, IoxAosModule, IoxBuilderComponentsModule, IoxComponentRegistryService, IoxFieldComponent, IoxFormComponent, IoxFormErrorComponent, IoxFormSuccessComponent, IoxPageComponent, IoxPageModule, IoxSubmitButtonComponent, IoxUiModule, LinkedContainerComponent, PAGE_TRANSITION_CATEGORIES, PAGE_TRANSITION_PRESETS, PIPE_DESCRIPTORS, PIPE_REGISTRY, PageScrollProvider, PrivacyModalComponent, PrivacyModalService, PrivacyModelEvent, RESERVED_ALIAS_PREFIX, SUPPRESSED_STYLE_PROPS_BY_TYPE, SWIPER_RESPONSIVE_TRAITS, SectionComponent, TRANSITION_FEELS, TextBlockComponent, VIRTUAL_TRAIT_GROUPS, VIRTUAL_TRAIT_KEYS, ViewPositionDirective, ViewPositionModule, WebSettingsService, activeActions, applyBindingPipes, applyFeel, breakpointDef, breakpointForWidth, breakpointQueryFor, buildDataSourceFilter, buildRelatedFilter, buildSwiperBreakpoints, buildTargetedStateSelector, buildTransitionTimeline, cascadeChain, clearInputOverride, clearOverride, collectContextSlotKeys, collectReferencedAliases, compileDeclarations, composeVirtualTraits, computeRelative, contextActionEffect, contextSlotKeys, countOverrides, dataSourcePlanToRequest, declaredInputNames, effectiveTransitionId, excludeSelf, feelFor, getByPath, initialSlotValues, isActionEnabled, isContextAction, isInputOverriddenAt, isOverriddenAt, isReservedAlias, isValidSlotKey, legacyEnterToTransition, matchRouteParams, mediaQueryFor, mergeSwiperBreakpoints, nearestCommonAncestorId, nodeCssId, nodeUsesContext, normalizeCollectionResult, normalizeGalleryImage, parentBreakpoint, parseUrlList, planDataSource, planResponsiveRules, referencedDataSources, referencedDataSourcesDeep, renderDefaultDeclarations, resolveContextValue, resolveDerivedInto, resolveGalleryEffect, resolveGalleryUrls, resolveInputChain, resolveInputs, resolvePageTransition, resolvePath, resolveRelativeInto, resolveRepeaterItems, resolveSiblings, resolveSingleItemId, resolveStateStyles, resolveStyleProps, resolveValueChain, rewriteViewportUnits, safeSetInput, setInputOverride, setOverride, stateNamesIn, stripSuppressedProps, styleKeyToKebab, variableAliases, variableItemsFrom, withContextSlots, wrapInBreakpointQuery, wrapInMediaQuery };
|
|
2182
|
-
export type { BreakpointDef, BuildRelatedFilterOptions, ContextActionEffect, ContextActionLike, ContextItemRef, ContextSlotDefault, ContextValueSpec, ContextWriteScope, DataSourceDomain, DataSourceEndpoints, DataSourceMode, DataSourcePlan, DataSourceQueryFilter, DataSourceRequest, DataSourceRequestSpec, DataSourceRouteFilter, DataSourceSpec, GalleryBoundSource, GalleryDurations, GalleryEffect, GalleryEffectDescriptor, GalleryImage, GalleryLoopOptions, GalleryLoopScheduler, GalleryLoopState, GallerySlideState, IBuilderEventEmitter, InputMap, IoxContextSlot, IoxPipe, OverrideBreakpoint, PageTransitionCategory, PageTransitionCategoryMeta, PageTransitionOptions, PageTransitionPreset, PipeArgSpec, PipeContext, PipeDescriptor, RelativeInputs, RelativeSourceKind, RelativeSourceSpec, ResolveSiblingsOptions, ResolvedPageTransition, ResponsiveLayer, ResponsiveOverrides, ResponsiveRuleSet, RouteContext, SetContextParams, SiblingsResult, StateStyleMap, StyleMap, StyleTreeNode, SwiperBreakpointMap, ToggleableAction, TransitionFeel, TransitionPhase, TransitionTimelineInput, ValueSource, VirtualTraitGroup };
|
|
2376
|
+
export { AOSService, AnalyticsService, BREAKPOINTS, Breakpoint, BreakpointQueryKind, BuilderButtonComponent, BuilderDividerComponent, BuilderHeadingComponent, BuilderIconComponent, BuilderImageComponent, BuilderLinkComponent, BuilderSpacerComponent, ButtonBlockComponent, CMSClientInfraModule, CONTEXT_ACTION_TYPES, CardComponent, ClientGalleryComponent, ClientListComponent, ClientListItemComponent, ClientRepeaterComponent, ClientSliderContainerComponent, ClientSliderSlideComponent, ComponentInstanceRegistryService, ConsentService, ContainerComponent, ContentService, ContextStore, DEFAULT_GALLERY_SCHEDULER, DEFAULT_PAGE_TRANSITION, DEFAULT_PAGE_TRANSITION_DURATION, DEFAULT_PAGE_TRANSITION_EASING, DEFAULT_PAGE_TRANSITION_PERSPECTIVE, DEFAULT_WIDTH_BY_TYPE, DeclarationContext, ENVIRONMENT, FormRenderState, FormRuntimeService, GALLERY_EFFECTS, GALLERY_EFFECT_DESCRIPTORS, GalleryLoop, IOX_BUILDER_EVENTS, IOX_FORM_MESSAGES, IS_PREVIEW, IoxAnimateContainer, IoxAosDirective, IoxAosModule, IoxBuilderComponentsModule, IoxComponentRegistryService, IoxFieldComponent, IoxFormComponent, IoxFormErrorComponent, IoxFormSuccessComponent, IoxPageComponent, IoxPageModule, IoxSubmitButtonComponent, IoxUiModule, LinkedContainerComponent, PAGE_TRANSITION_CATEGORIES, PAGE_TRANSITION_PRESETS, PIPE_DESCRIPTORS, PIPE_REGISTRY, PageScrollProvider, PrivacyModalComponent, PrivacyModalService, PrivacyModelEvent, RESERVED_ALIAS_PREFIX, SUPPRESSED_STYLE_PROPS_BY_TYPE, SWIPER_RESPONSIVE_TRAITS, SectionComponent, TRANSITION_FEELS, TextBlockComponent, VIRTUAL_TRAIT_GROUPS, VIRTUAL_TRAIT_KEYS, ViewPositionDirective, ViewPositionModule, WebSettingsService, activeActions, applyBindingPipes, applyFeel, breakpointDef, breakpointForWidth, breakpointQueryFor, buildDataSourceFilter, buildRelatedFilter, buildSwiperBreakpoints, buildTargetedStateSelector, buildTransitionTimeline, cascadeChain, clearInputOverride, clearOverride, collectContextSlotKeys, collectReferencedAliases, compileDeclarations, composeVirtualTraits, computeRelative, contextActionEffect, contextSlotKeys, countOverrides, dataSourcePlanToRequest, declaredInputNames, defaultMessageResolver, effectiveTransitionId, excludeSelf, feelFor, getByPath, initialSlotValues, isActionEnabled, isContextAction, isInputOverriddenAt, isOverriddenAt, isReservedAlias, isValidSlotKey, legacyEnterToTransition, matchRouteParams, mediaQueryFor, mergeSwiperBreakpoints, nearestCommonAncestorId, nodeCssId, nodeUsesContext, normalizeCollectionResult, normalizeGalleryImage, parentBreakpoint, parseUrlList, planDataSource, planResponsiveRules, referencedDataSources, referencedDataSourcesDeep, renderDefaultDeclarations, resolveContextValue, resolveDerivedInto, resolveGalleryEffect, resolveGalleryUrls, resolveInputChain, resolveInputs, resolvePageTransition, resolvePath, resolveRelativeInto, resolveRepeaterItems, resolveSiblings, resolveSingleItemId, resolveStateStyles, resolveStyleProps, resolveValueChain, rewriteViewportUnits, safeSetInput, setInputOverride, setOverride, stateNamesIn, stripSuppressedProps, styleKeyToKebab, variableAliases, variableItemsFrom, withContextSlots, wrapInBreakpointQuery, wrapInMediaQuery };
|
|
2377
|
+
export type { BreakpointDef, BuildRelatedFilterOptions, ContextActionEffect, ContextActionLike, ContextItemRef, ContextSlotDefault, ContextValueSpec, ContextWriteScope, DataSourceDomain, DataSourceEndpoints, DataSourceMode, DataSourcePlan, DataSourceQueryFilter, DataSourceRequest, DataSourceRequestSpec, DataSourceRouteFilter, DataSourceSpec, FormMessageResolver, GalleryBoundSource, GalleryDurations, GalleryEffect, GalleryEffectDescriptor, GalleryImage, GalleryLoopOptions, GalleryLoopScheduler, GalleryLoopState, GallerySlideState, IBuilderEventEmitter, InputMap, IoxContextSlot, IoxPipe, OverrideBreakpoint, PageTransitionCategory, PageTransitionCategoryMeta, PageTransitionOptions, PageTransitionPreset, PipeArgSpec, PipeContext, PipeDescriptor, RelativeInputs, RelativeSourceKind, RelativeSourceSpec, ResolveSiblingsOptions, ResolvedPageTransition, ResponsiveLayer, ResponsiveOverrides, ResponsiveRuleSet, RouteContext, SetContextParams, SiblingsResult, StateStyleMap, StyleMap, StyleTreeNode, SwiperBreakpointMap, ToggleableAction, TransitionFeel, TransitionPhase, TransitionTimelineInput, ValueSource, VirtualTraitGroup };
|