@vectoriox/iox-ui 5.84.0 → 5.86.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/actions-core/index.d.ts +47 -3
  2. package/composite-core/index.d.ts +93 -15
  3. package/design-core/index.d.ts +2013 -187
  4. package/fesm2022/vectoriox-iox-ui-actions-core.mjs +153 -70
  5. package/fesm2022/vectoriox-iox-ui-actions-core.mjs.map +1 -1
  6. package/fesm2022/vectoriox-iox-ui-composite-core.mjs +307 -39
  7. package/fesm2022/vectoriox-iox-ui-composite-core.mjs.map +1 -1
  8. package/fesm2022/vectoriox-iox-ui-design-core.mjs +2222 -85
  9. package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
  10. package/fesm2022/vectoriox-iox-ui-forms-core.mjs +27 -4
  11. package/fesm2022/vectoriox-iox-ui-forms-core.mjs.map +1 -1
  12. package/fesm2022/vectoriox-iox-ui-generation-core.mjs +250 -12
  13. package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
  14. package/fesm2022/vectoriox-iox-ui-scene-core.mjs +101 -5
  15. package/fesm2022/vectoriox-iox-ui-scene-core.mjs.map +1 -1
  16. package/fesm2022/vectoriox-iox-ui.mjs +1545 -78
  17. package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
  18. package/forms-core/index.d.ts +23 -4
  19. package/generation-core/index.d.ts +13 -0
  20. package/index.d.ts +563 -62
  21. package/package.json +1 -1
  22. package/scene-core/index.d.ts +32 -4
  23. package/src/actions-core/action.model.ts +1 -1
  24. package/src/actions-core/dialog-motion.ts +25 -0
  25. package/src/actions-core/dialog-opener.ts +9 -3
  26. package/src/actions-core/element-actions.ts +25 -1
  27. package/src/actions-core/popover-opener.ts +50 -0
  28. package/src/actions-core/public-api.ts +1 -0
  29. package/src/composite-core/header.ts +25 -0
  30. package/src/composite-core/public-api.ts +1 -0
  31. package/src/composite-core/slider-runtime.ts +82 -0
  32. package/src/composite-core/slider.ts +194 -27
  33. package/src/composite-core/structure.ts +14 -9
  34. package/src/design-core/flavor-spec.generated.ts +2145 -85
  35. package/src/design-core/header-behaviour.ts +76 -0
  36. package/src/design-core/public-api.ts +1 -0
  37. package/src/design-core/theme-color.ts +21 -5
  38. package/src/forms-core/submit-lifecycle.ts +30 -3
  39. package/src/generation-core/baseline-roles.ts +1 -0
  40. package/src/generation-core/compose-site.ts +8 -0
  41. package/src/generation-core/node-baselines.generated.ts +231 -11
  42. package/src/generation-core/patterns.ts +2 -0
  43. package/src/generation-core/site-spec.generated.ts +8 -0
  44. package/src/scene-core/scene.ts +18 -0
  45. package/src/scene-core/scroll-driver.ts +83 -6
  46. package/styles/iox-design.css +431 -1
  47. package/styles/iox-forms.css +29 -4
@@ -1174,10 +1174,33 @@ var FormRenderState;
1174
1174
  /** The attribute every renderer writes a form's state on (the canvas switcher, both live paths). */
1175
1175
  const FORM_STATE_ATTRIBUTE = 'data-iox-state';
1176
1176
  /**
1177
- * The server's answer → what the visitor sees. Only a confirmed success is Success; per-field verdicts
1178
- * land on the fields; anything else (a dropped network included) is the designed Error block.
1177
+ * What a form shows once it has sent (premium M5, N3) — the Form's "After sending" choice:
1178
+ * - `message`: the success in place (M3): the fields leave, the Success block shows, Send reads "Sent" and stays so;
1179
+ * - `toast`: the fields STAY, cleared for the next answer, and a toast says the form's Sent words — a newsletter in a
1180
+ * footer, a form someone may send again.
1179
1181
  */
1180
- function submitOutcome(response) {
1182
+ var FormAfterSend;
1183
+ (function (FormAfterSend) {
1184
+ FormAfterSend["Message"] = "message";
1185
+ FormAfterSend["Toast"] = "toast";
1186
+ })(FormAfterSend || (FormAfterSend = {}));
1187
+ /** The Form trait holding the choice. */
1188
+ const FORM_AFTER_SEND_TRAIT = 'afterSend';
1189
+ /** The attribute every renderer writes it on (only when it is `toast` — `message` is what a form always did). */
1190
+ const FORM_AFTER_SEND_ATTRIBUTE = 'data-iox-after-send';
1191
+ /** The choice a stored value names (`message` unless it says `toast`). */
1192
+ function formAfterSend(value) {
1193
+ return value === FormAfterSend.Toast ? FormAfterSend.Toast : FormAfterSend.Message;
1194
+ }
1195
+ /**
1196
+ * The server's answer → what the visitor sees. Only a confirmed success is Success (or, for a form that keeps its
1197
+ * fields, Idle again with a toast); per-field verdicts land on the fields; anything else (a dropped network included)
1198
+ * is the designed Error block.
1199
+ */
1200
+ function submitOutcome(response, afterSend = FormAfterSend.Message) {
1201
+ if (response?.ok && formAfterSend(afterSend) === FormAfterSend.Toast) {
1202
+ return { state: FormRenderState.Idle, reset: true, toast: true, ...(response.redirect ? { redirect: response.redirect } : {}) };
1203
+ }
1181
1204
  if (response?.ok)
1182
1205
  return { state: FormRenderState.Success, reset: true, ...(response.redirect ? { redirect: response.redirect } : {}) };
1183
1206
  if (response?.errors && Object.keys(response.errors).length)
@@ -1683,5 +1706,5 @@ function dateHtml(p, options, describedBy) {
1683
1706
  * Generated bundle index. Do not edit.
1684
1707
  */
1685
1708
 
1686
- export { CALENDAR_ROWS, CHANNEL_KINDS, CHOICE_MESSAGE_KEYS, CalendarKey, ChannelKind, ChoiceAppearance, ControlType, DATE_EMPTY_ATTRIBUTE, DATE_ICON_SVG, DATE_MAX_ATTRIBUTE, DATE_MESSAGE_KEYS, DATE_MIN_ATTRIBUTE, DATE_PICKER_WORDS, DEFAULT_EN_MESSAGES, FIELD_GROUP_NODE_TYPE, FIELD_NODE_TYPE, FORM_ACTIONS_ROLE, FORM_ANNOUNCER_ATTRIBUTE, FORM_CHANNEL_ROLE, FORM_CONTENT_TYPES, FORM_ERROR_KEYS, FORM_FIELDS_ATTRIBUTE, FORM_HONEYPOT_CLASS, FORM_NODE_TYPE, FORM_PRESETS, FORM_STATE_ATTRIBUTE, FeedbackTiming, FieldClass, FormPresetId, FormRenderState, HONEYPOT_FIELD, IMPLIED_PATTERN, INITIAL_FORM_STATE, INTERACTIVE_HOST_TAGS, InteractiveTag, MESSAGE_NAMESPACE, OPTION_CONTROLS, PATTERN_MESSAGE_KEYS, PATTERN_PRESETS, PATTERN_PRESET_OPTIONS, PatternPreset, RENDERED_AT_FIELD, RULE_DESCRIPTORS, RULE_MESSAGE_KEYS, RuleName, RuleParamKind, STORE_ACTION, SUBMIT_BUTTON_NODE_TYPE, SUBMIT_CHECK_SVG, SUBMIT_KEEP_ENABLED_ATTRIBUTE, SUBMIT_MESSAGE_KEYS, SubmitLabelClass, addDaysIso, addMonthsIso, addableRules, applyServerErrors, baseFieldName, calendarKeyTarget, calendarMonth, channelHref, channelOpensNewTab, choiceAppearanceOf, clampIso, clientFormSpec, collectFieldNodes, collectFormSpec, dateBoundRules, dateOfIso, datePickerWords, deriveFieldName, failureAnnouncement, fieldDateRange, fieldHtml, fieldOptionsOf, fieldSpecOf, findFormContentInHosts, firstInvalidField, formChromeHtml, formContentInHost, formFieldNameMap, formFieldNames, formPresetById, formatDateInWords, inputTypeOf, interpretSubmitResponse, isChannelFilled, isDateBoundParams, isDateField, isFormContent, isInteractiveHost, isIsoDate, isMultiValueField, isoOfDate, normaliseAnswers, onFieldBlur, onFieldChange, onSubmitAttempt, parseChannelHref, parseClientFormSpec, parseDateBound, parseFieldOptions, planFormPresetIds, resetFormState, resolveDateBound, rulesFor, sentWord, shouldShowError, submitButtonLabelsHtml, submitButtonView, submitEndpointPath, submitOutcome, todayIso, uniqueFieldName, uniqueFieldNames, validateField, validateForm, weekStartFor, withAntiSpamFields };
1709
+ export { CALENDAR_ROWS, CHANNEL_KINDS, CHOICE_MESSAGE_KEYS, CalendarKey, ChannelKind, ChoiceAppearance, ControlType, DATE_EMPTY_ATTRIBUTE, DATE_ICON_SVG, DATE_MAX_ATTRIBUTE, DATE_MESSAGE_KEYS, DATE_MIN_ATTRIBUTE, DATE_PICKER_WORDS, DEFAULT_EN_MESSAGES, FIELD_GROUP_NODE_TYPE, FIELD_NODE_TYPE, FORM_ACTIONS_ROLE, FORM_AFTER_SEND_ATTRIBUTE, FORM_AFTER_SEND_TRAIT, FORM_ANNOUNCER_ATTRIBUTE, FORM_CHANNEL_ROLE, FORM_CONTENT_TYPES, FORM_ERROR_KEYS, FORM_FIELDS_ATTRIBUTE, FORM_HONEYPOT_CLASS, FORM_NODE_TYPE, FORM_PRESETS, FORM_STATE_ATTRIBUTE, FeedbackTiming, FieldClass, FormAfterSend, FormPresetId, FormRenderState, HONEYPOT_FIELD, IMPLIED_PATTERN, INITIAL_FORM_STATE, INTERACTIVE_HOST_TAGS, InteractiveTag, MESSAGE_NAMESPACE, OPTION_CONTROLS, PATTERN_MESSAGE_KEYS, PATTERN_PRESETS, PATTERN_PRESET_OPTIONS, PatternPreset, RENDERED_AT_FIELD, RULE_DESCRIPTORS, RULE_MESSAGE_KEYS, RuleName, RuleParamKind, STORE_ACTION, SUBMIT_BUTTON_NODE_TYPE, SUBMIT_CHECK_SVG, SUBMIT_KEEP_ENABLED_ATTRIBUTE, SUBMIT_MESSAGE_KEYS, SubmitLabelClass, addDaysIso, addMonthsIso, addableRules, applyServerErrors, baseFieldName, calendarKeyTarget, calendarMonth, channelHref, channelOpensNewTab, choiceAppearanceOf, clampIso, clientFormSpec, collectFieldNodes, collectFormSpec, dateBoundRules, dateOfIso, datePickerWords, deriveFieldName, failureAnnouncement, fieldDateRange, fieldHtml, fieldOptionsOf, fieldSpecOf, findFormContentInHosts, firstInvalidField, formAfterSend, formChromeHtml, formContentInHost, formFieldNameMap, formFieldNames, formPresetById, formatDateInWords, inputTypeOf, interpretSubmitResponse, isChannelFilled, isDateBoundParams, isDateField, isFormContent, isInteractiveHost, isIsoDate, isMultiValueField, isoOfDate, normaliseAnswers, onFieldBlur, onFieldChange, onSubmitAttempt, parseChannelHref, parseClientFormSpec, parseDateBound, parseFieldOptions, planFormPresetIds, resetFormState, resolveDateBound, rulesFor, sentWord, shouldShowError, submitButtonLabelsHtml, submitButtonView, submitEndpointPath, submitOutcome, todayIso, uniqueFieldName, uniqueFieldNames, validateField, validateForm, weekStartFor, withAntiSpamFields };
1687
1710
  //# sourceMappingURL=vectoriox-iox-ui-forms-core.mjs.map