@vectoriox/iox-builder 4.32.3 → 4.34.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.
@@ -21,7 +21,7 @@ export { ComponentInstanceRegistryService, VIRTUAL_TRAIT_KEYS, composeVirtualTra
21
21
  import Lenis from 'lenis';
22
22
  import { Subject, BehaviorSubject, of, forkJoin } from 'rxjs';
23
23
  import interact from 'interactjs';
24
- import { BEHAVIOUR_ACTION_TYPES, CONSENT_ACTION_TYPES } from '@vectoriox/iox-ui/actions-core';
24
+ import { BEHAVIOUR_ACTION_TYPES, SERVER_ELEMENT_ACTION_TYPES, CONSENT_ACTION_TYPES } from '@vectoriox/iox-ui/actions-core';
25
25
  import Moveable from 'moveable';
26
26
  import Selecto from 'selecto';
27
27
  import { map, catchError } from 'rxjs/operators';
@@ -3288,6 +3288,14 @@ class InteractionEngineService {
3288
3288
  this.executeBehaviourAction(node, action, selfEl);
3289
3289
  continue;
3290
3290
  }
3291
+ // Tier-B server actions (A2). ALWAYS a simulation here: the canvas is the ADMIN's
3292
+ // browser and a server action is a public-site write (an email, a webhook, a content
3293
+ // row) — the toast says what the LIVE site would do.
3294
+ if (SERVER_ELEMENT_ACTION_TYPES.has(action.type)) {
3295
+ const detail = { type: action.type, params: action.params ?? {}, target: action.target };
3296
+ window.dispatchEvent(new CustomEvent('iox-action-simulated', { detail }));
3297
+ continue;
3298
+ }
3291
3299
  // Consent actions (C3). Recording ones SIMULATE — the canvas is the ADMIN's browser,
3292
3300
  // and an admin's cookie is not a visitor's decision; the toast says what would be
3293
3301
  // recorded. Opening the preferences dialog is dialog-opening and honestly RUNS.
@@ -10000,6 +10008,56 @@ function buildFormPreset(def, createConfig) {
10000
10008
  form.children = children;
10001
10009
  return form;
10002
10010
  }
10011
+ const FIELD_KIND_PRESETS = Object.freeze([
10012
+ {
10013
+ control: 'checkbox', name: 'Checkbox', icon: 'ph-thin ph-check-square',
10014
+ description: 'One tick. Making it required turns it into a must-accept.',
10015
+ label: 'I agree',
10016
+ },
10017
+ {
10018
+ control: 'switch', name: 'Switch', icon: 'ph-thin ph-toggle-left',
10019
+ description: 'An on/off toggle — records true or false.',
10020
+ label: 'Enable',
10021
+ },
10022
+ {
10023
+ control: 'radio', name: 'Radio group', icon: 'ph-thin ph-radio-button',
10024
+ description: 'Pick exactly one of a few visible choices.',
10025
+ label: 'Pick one',
10026
+ optionsText: 'First choice\nSecond choice\nThird choice',
10027
+ },
10028
+ {
10029
+ control: 'select', name: 'Dropdown', icon: 'ph-thin ph-caret-circle-down',
10030
+ description: 'Pick one from a list that folds away.',
10031
+ label: 'Choose',
10032
+ optionsText: 'First choice\nSecond choice\nThird choice',
10033
+ },
10034
+ {
10035
+ control: 'range', name: 'Slider', icon: 'ph-thin ph-sliders-horizontal',
10036
+ description: 'A number by sliding between a min and a max.',
10037
+ label: 'How much',
10038
+ },
10039
+ {
10040
+ control: 'date', name: 'Date', icon: 'ph-thin ph-calendar-blank',
10041
+ description: 'A calendar date.',
10042
+ label: 'Date',
10043
+ },
10044
+ {
10045
+ control: 'time', name: 'Time', icon: 'ph-thin ph-clock',
10046
+ description: 'A time of day.',
10047
+ label: 'Time',
10048
+ },
10049
+ ]);
10050
+ /** One pre-set Field. Null when the registry lacks the type — never a half-built node. */
10051
+ function buildFieldKindPreset(def, createConfig) {
10052
+ const field = createConfig('Field');
10053
+ if (!field)
10054
+ return null;
10055
+ setTrait(field, 'label', def.label);
10056
+ setTrait(field, 'control', def.control);
10057
+ if (def.optionsText)
10058
+ setTrait(field, 'optionsText', def.optionsText);
10059
+ return field;
10060
+ }
10003
10061
  function textNode(content, createConfig) {
10004
10062
  const text = createConfig('Text');
10005
10063
  if (!text)
@@ -11179,5 +11237,5 @@ class BuilderSpacerComponentConfig extends ComponentConfig {
11179
11237
  * Generated bundle index. Do not edit.
11180
11238
  */
11181
11239
 
11182
- export { ACTION_TYPE_OPTIONS, AuditCode, AuditPanelComponent, AuditSeverity, BODY_CRUMB_LABEL, BREAKPOINT_PRESENTATION, BUILDER_CANVAS_CONTAINER, BUILDER_CHROME_EN, BackgroundGroupStyleConfig, BorderGroupStyleConfig, BreadcrumbBarComponent, BuilderButtonBlockComponent, BuilderButtonComponentConfig, BuilderClipboardService, BuilderComponent, BuilderContainerComponent, BuilderContainerComponentConfig, BuilderDataSourceService, BuilderDialogComponent, BuilderDividerComponentConfig, BuilderHeadingComponentConfig, BuilderHistoryService, BuilderIconComponentConfig, BuilderImageComponentConfig, BuilderLinkComponentConfig, BuilderLinkedContainerComponent, BuilderLinkedContainerConfig, BuilderListComponentConfig, BuilderListItemComponentConfig, BuilderMode, BuilderRepeaterComponent, BuilderSpacerComponentConfig, ButtonBlockComponentConfig, CardComponentConfig, ChildLayoutGroupStyleConfig, ComponentConfig, ComponentRegistryService, DEFAULT_ESSENTIAL_TRAITS, DRAG_HANDLE_ATTR, DataSourceRegistryService, DataSourceType, DialogComponentConfig, DimensionsGroupStyleConfig, DragEngineService, EASING_OPTIONS$1 as EASING_OPTIONS, ESSENTIAL_TRAITS_BY_TYPE, EffectsGroupStyleConfig, FIELD_PARTS, FORM_PRESETS, FORM_TYPE, FieldComponentConfig, FieldGroupComponentConfig, FormComponentConfig, FormErrorComponentConfig, FormStateService, FormSuccessComponentConfig, GalleryConfig, GroupStyleConfig, INTERACTION_STATES, INVERSE_ACTION, IOX_BUILDER_LABELS, IOX_DATA_SOURCE_ENDPOINTS, IOX_FONT_MANAGER, InteractionEngineService, InteractionPresetRegistryService, IoxBuilderModule, IoxDraggableDirective, IoxDropzoneDirective, LAYOUT_PRESETS, LayerTreeComponent, LayoutGroupStyleConfig, ListGroupStyleConfig, NodeAction, OverlayComponent, OverlayService, PanelChildComponent, PanelComponent, PanelEventService, PanelEventTypes, PanelTypes, PositionGroupStyleConfig, PresetRegistryService, RELATIONAL_STATES, RELATIONAL_STATE_BASE, ROUTE_ANIMATION_OPTIONS, RenderDirective, RepeaterComponentConfig, SCREEN_WIDTH_OPTIONS, STRUCTURAL_STATES, SUPPORTED_STATES, SectionComponent, SectionComponentConfig, SizeGroupStyleConfig, SliderContainerComponent, SliderContainerConfig, SliderSlideComponent, SliderSlideConfig, SpacingGroupStyleConfig, StyleCategory, StyleRegistryService, TraitConfig as StyleTraitConfig, SubmitButtonComponentConfig, SymbolRegistryService, TARGETED_STATES, TARGETED_STATE_BASE, TRIGGER_OPTIONS, TextBlockComponentConfig, ToolbarAction, ToolbarComponent, TraitConfig, TraitInputType, TypographyGroupStyleConfig, UNITS_ALL, UNITS_DEG, UNITS_FIXED, UNITS_NO_VW, VALIDATION_STATES, VALIDATION_STATE_CLASS, ViewportService, ZOOM_OPTIONS, arrayItemSchemaFields, arraySchemaFields, auditNodes, buildConsentPreset, buildFlavorSampler, buildFormPreset, buildFullStyleTraits, buildLayoutPreset, buildPresetStyleTraits, canFluidise, collapseColumnsProps, columnCountOf, defaultBuilderLabels, defaultPageSettings, dropTargetLabel, essentialTraitsFor, findNodeLocation, findParentOf, flattenSchemaFields, fluidiseProps, generateNodeId, isHiddenAt, matchesControlSearch, nearestFormNode, nodeAncestorPath, nodeAncestorPathInEither, reorderProps, resolveInsertTarget, resolveTraitControllerType, resolveTraitOptions, setStyleTrait, setTrait, stackChildrenProps, summarise, textNode, visibilityProps, wrapNode };
11240
+ export { ACTION_TYPE_OPTIONS, AuditCode, AuditPanelComponent, AuditSeverity, BODY_CRUMB_LABEL, BREAKPOINT_PRESENTATION, BUILDER_CANVAS_CONTAINER, BUILDER_CHROME_EN, BackgroundGroupStyleConfig, BorderGroupStyleConfig, BreadcrumbBarComponent, BuilderButtonBlockComponent, BuilderButtonComponentConfig, BuilderClipboardService, BuilderComponent, BuilderContainerComponent, BuilderContainerComponentConfig, BuilderDataSourceService, BuilderDialogComponent, BuilderDividerComponentConfig, BuilderHeadingComponentConfig, BuilderHistoryService, BuilderIconComponentConfig, BuilderImageComponentConfig, BuilderLinkComponentConfig, BuilderLinkedContainerComponent, BuilderLinkedContainerConfig, BuilderListComponentConfig, BuilderListItemComponentConfig, BuilderMode, BuilderRepeaterComponent, BuilderSpacerComponentConfig, ButtonBlockComponentConfig, CardComponentConfig, ChildLayoutGroupStyleConfig, ComponentConfig, ComponentRegistryService, DEFAULT_ESSENTIAL_TRAITS, DRAG_HANDLE_ATTR, DataSourceRegistryService, DataSourceType, DialogComponentConfig, DimensionsGroupStyleConfig, DragEngineService, EASING_OPTIONS$1 as EASING_OPTIONS, ESSENTIAL_TRAITS_BY_TYPE, EffectsGroupStyleConfig, FIELD_KIND_PRESETS, FIELD_PARTS, FORM_PRESETS, FORM_TYPE, FieldComponentConfig, FieldGroupComponentConfig, FormComponentConfig, FormErrorComponentConfig, FormStateService, FormSuccessComponentConfig, GalleryConfig, GroupStyleConfig, INTERACTION_STATES, INVERSE_ACTION, IOX_BUILDER_LABELS, IOX_DATA_SOURCE_ENDPOINTS, IOX_FONT_MANAGER, InteractionEngineService, InteractionPresetRegistryService, IoxBuilderModule, IoxDraggableDirective, IoxDropzoneDirective, LAYOUT_PRESETS, LayerTreeComponent, LayoutGroupStyleConfig, ListGroupStyleConfig, NodeAction, OverlayComponent, OverlayService, PanelChildComponent, PanelComponent, PanelEventService, PanelEventTypes, PanelTypes, PositionGroupStyleConfig, PresetRegistryService, RELATIONAL_STATES, RELATIONAL_STATE_BASE, ROUTE_ANIMATION_OPTIONS, RenderDirective, RepeaterComponentConfig, SCREEN_WIDTH_OPTIONS, STRUCTURAL_STATES, SUPPORTED_STATES, SectionComponent, SectionComponentConfig, SizeGroupStyleConfig, SliderContainerComponent, SliderContainerConfig, SliderSlideComponent, SliderSlideConfig, SpacingGroupStyleConfig, StyleCategory, StyleRegistryService, TraitConfig as StyleTraitConfig, SubmitButtonComponentConfig, SymbolRegistryService, TARGETED_STATES, TARGETED_STATE_BASE, TRIGGER_OPTIONS, TextBlockComponentConfig, ToolbarAction, ToolbarComponent, TraitConfig, TraitInputType, TypographyGroupStyleConfig, UNITS_ALL, UNITS_DEG, UNITS_FIXED, UNITS_NO_VW, VALIDATION_STATES, VALIDATION_STATE_CLASS, ViewportService, ZOOM_OPTIONS, arrayItemSchemaFields, arraySchemaFields, auditNodes, buildConsentPreset, buildFieldKindPreset, buildFlavorSampler, buildFormPreset, buildFullStyleTraits, buildLayoutPreset, buildPresetStyleTraits, canFluidise, collapseColumnsProps, columnCountOf, defaultBuilderLabels, defaultPageSettings, dropTargetLabel, essentialTraitsFor, findNodeLocation, findParentOf, flattenSchemaFields, fluidiseProps, generateNodeId, isHiddenAt, matchesControlSearch, nearestFormNode, nodeAncestorPath, nodeAncestorPathInEither, reorderProps, resolveInsertTarget, resolveTraitControllerType, resolveTraitOptions, setStyleTrait, setTrait, stackChildrenProps, summarise, textNode, visibilityProps, wrapNode };
11183
11241
  //# sourceMappingURL=vectoriox-iox-builder.mjs.map