@vectoriox/iox-ui 5.128.0 → 5.129.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.
- package/composite-core/index.d.ts +130 -2
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs +328 -141
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-forms-core.mjs +21 -1
- package/fesm2022/vectoriox-iox-ui-forms-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs +557 -59
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui.mjs +20 -0
- package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
- package/forms-core/index.d.ts +16 -1
- package/generation-core/index.d.ts +173 -13
- package/package.json +1 -1
- package/src/composite-core/consent.ts +235 -0
- package/src/composite-core/public-api.ts +1 -0
- package/src/forms-core/form-presets.ts +28 -0
- package/src/generation-core/audit-site.ts +167 -17
- package/src/generation-core/compose-site.ts +190 -8
- package/src/generation-core/legal.ts +213 -0
- package/src/generation-core/public-api.ts +1 -0
- package/src/generation-core/site-spec.generated.ts +41 -8
- package/src/generation-core/site-tree.ts +5 -1
- package/styles/iox-design.css +2 -0
|
@@ -1325,6 +1325,7 @@ const FORM_PRESETS = /* @__PURE__ */ Object.freeze([
|
|
|
1325
1325
|
{ label: 'Email', control: 'email', required: true },
|
|
1326
1326
|
{ label: 'Message', control: 'textarea', required: true, rows: 5 },
|
|
1327
1327
|
],
|
|
1328
|
+
actions: [{ type: 'email', config: { toOwner: true } }],
|
|
1328
1329
|
submitLabel: 'Send message',
|
|
1329
1330
|
successText: 'Thanks — we’ll be in touch shortly.',
|
|
1330
1331
|
errorText: 'We couldn’t send your message. Please try again — your answers are still here.',
|
|
@@ -1371,6 +1372,7 @@ const FORM_PRESETS = /* @__PURE__ */ Object.freeze([
|
|
|
1371
1372
|
{ label: 'People', control: 'number', required: true },
|
|
1372
1373
|
{ label: 'Notes', control: 'textarea', rows: 3, help: 'Allergies, access needs, anything useful' },
|
|
1373
1374
|
],
|
|
1375
|
+
actions: [{ type: 'email', config: { toOwner: true } }],
|
|
1374
1376
|
submitLabel: 'Request a booking',
|
|
1375
1377
|
successText: 'Request received — we’ll confirm by email.',
|
|
1376
1378
|
errorText: 'We couldn’t send your request. Please try again.',
|
|
@@ -1401,6 +1403,24 @@ const FORM_PRESETS = /* @__PURE__ */ Object.freeze([
|
|
|
1401
1403
|
function formPresetById(id) {
|
|
1402
1404
|
return FORM_PRESETS.find(p => p.id === id);
|
|
1403
1405
|
}
|
|
1406
|
+
/** The config key of an email step that goes to the studio owner's account address (iox-cms#84). */
|
|
1407
|
+
const EMAIL_TO_OWNER = 'toOwner';
|
|
1408
|
+
/** True for an email step that goes to the studio owner — ONE reading for the server's delivery and the builder's panel. */
|
|
1409
|
+
function emailsOwner(action) {
|
|
1410
|
+
return action?.type === 'email' && action.config?.[EMAIL_TO_OWNER] === true;
|
|
1411
|
+
}
|
|
1412
|
+
/**
|
|
1413
|
+
* A preset's `actions` trait, as a Form stamped from it holds it: `store` first, then the preset's own steps — fresh
|
|
1414
|
+
* objects every call (a stamped node is edited in place). Null when the preset has no step of its own, so the Form keeps
|
|
1415
|
+
* its type's default (`[store]`). The builder's tray (`buildFormPreset`) and the composer (`stampPresetForm`) both
|
|
1416
|
+
* write this — ONE recipe (R-H9).
|
|
1417
|
+
*/
|
|
1418
|
+
function presetFormActions(def) {
|
|
1419
|
+
if (!def?.actions?.length)
|
|
1420
|
+
return null;
|
|
1421
|
+
const copy = (a) => ({ ...a, ...(a.config ? { config: { ...a.config } } : {}) });
|
|
1422
|
+
return [{ ...STORE_ACTION }, ...def.actions.filter(a => a.type !== STORE_ACTION.type).map(copy)];
|
|
1423
|
+
}
|
|
1404
1424
|
|
|
1405
1425
|
// Where form content may NOT render (Doron, 2026-10-20): inside a link or a button.
|
|
1406
1426
|
//
|
|
@@ -1686,5 +1706,5 @@ function dateHtml(p, options, describedBy) {
|
|
|
1686
1706
|
* Generated bundle index. Do not edit.
|
|
1687
1707
|
*/
|
|
1688
1708
|
|
|
1689
|
-
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, 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 };
|
|
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, EMAIL_TO_OWNER, 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, 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, emailsOwner, 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, presetFormActions, resetFormState, resolveDateBound, rulesFor, sentWord, shouldShowError, submitButtonLabelsHtml, submitButtonView, submitEndpointPath, submitOutcome, todayIso, uniqueFieldName, uniqueFieldNames, validateField, validateForm, weekStartFor, withAntiSpamFields };
|
|
1690
1710
|
//# sourceMappingURL=vectoriox-iox-ui-forms-core.mjs.map
|