@vectoriox/iox-builder 2.6.1 → 2.8.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.
@@ -151,6 +151,9 @@ var TraitInputType;
151
151
  TraitInputType["Range"] = "range";
152
152
  TraitInputType["Icon"] = "icon";
153
153
  TraitInputType["Media"] = "media";
154
+ /** Ordered list of images (URL / one-by-one / filebox; per-item binding in a later phase).
155
+ * Controller registered in the consumer (iox-cms-client) as `mediaList`. Value: GalleryImage[]. */
156
+ TraitInputType["MediaList"] = "mediaList";
154
157
  TraitInputType["FontFamily"] = "fontFamily";
155
158
  TraitInputType["GridTemplate"] = "gridTemplate";
156
159
  TraitInputType["SectionLabel"] = "sectionLabel";
@@ -6085,6 +6088,10 @@ class BuilderRepeaterComponent {
6085
6088
  this._source = '';
6086
6089
  this._sourcePath = '';
6087
6090
  this._limit = 10;
6091
+ /** Monotonic fetch token — editing a binding sets `source` and `sourcePath` as two separate inputs,
6092
+ * each firing a fetch; the transient mismatched one (old source + new path, or vice-versa) must not
6093
+ * clobber the correct result if it resolves last. Only the newest fetch's response is applied. */
6094
+ this._fetchSeq = 0;
6088
6095
  }
6089
6096
  ngOnInit() {
6090
6097
  this.bindingSub = this.panelEventService.subscribe(event => {
@@ -6110,11 +6117,14 @@ class BuilderRepeaterComponent {
6110
6117
  fetchData() {
6111
6118
  if (!this._source)
6112
6119
  return;
6120
+ const seq = ++this._fetchSeq;
6113
6121
  this.isLoading = true;
6114
6122
  this.cdr.markForCheck();
6115
6123
  // Resolve BY ALIAS so `derived` sources (e.g. galleryImages = product.gallery) follow their
6116
6124
  // parent. `sourcePath` (legacy/back-compat) still repeats over an array property inline.
6117
6125
  this.dataSourceService.fetchRepeaterItemsByAlias(this._source, (a) => this.dsRegistry.findByAlias(a), this._sourcePath).subscribe(items => {
6126
+ if (seq !== this._fetchSeq)
6127
+ return; // a newer fetch superseded this one — ignore stale items
6118
6128
  this.items = items.slice(0, this._limit);
6119
6129
  this.refreshPreviews();
6120
6130
  this.isLoading = false;
@@ -7991,6 +8001,50 @@ class BuilderDividerComponentConfig extends ComponentConfig {
7991
8001
  }
7992
8002
  }
7993
8003
 
8004
+ /**
8005
+ * Gallery — crossfade image gallery (working name; "fade" is the first effect, not the component).
8006
+ *
8007
+ * The RENDER component is the shared engine twin `ClientGalleryComponent` (`iox-gallery`) from
8008
+ * `@vectoriox/iox-ui` — reused directly in the builder (like Image reuses BuilderImageComponent), so
8009
+ * there is ONE implementation of the crossfade for both canvas and live site. This config only
8010
+ * declares the editable traits + the minimal style groups (size + spacing, per product decision).
8011
+ *
8012
+ * Population (v1): the `images` MediaList trait (URL / one-by-one / filebox / paste). Data-source
8013
+ * binding (`source`/`sourcePath`) is a later phase. See gallery-component-plan.md.
8014
+ */
8015
+ class GalleryConfig extends ComponentConfig {
8016
+ constructor() {
8017
+ super('Gallery', 'iox-gallery', 'ph-thin ph-images', 'Media');
8018
+ this.traits = [
8019
+ // ── Images ────────────────────────────────────────────────────────
8020
+ new TraitConfig('__imagesLabel', 'Images', TraitInputType.SectionLabel),
8021
+ new TraitConfig('images', 'Images', TraitInputType.MediaList, undefined, []),
8022
+ // ── Playback ──────────────────────────────────────────────────────
8023
+ new TraitConfig('__playbackLabel', 'Playback', TraitInputType.SectionLabel),
8024
+ // Effect is a Select scaffolded for future effects; v1 lists only Fade.
8025
+ new TraitConfig('effect', 'Effect', TraitInputType.Select, [{ label: 'Fade', value: 'fade' }], 'fade'),
8026
+ new TraitConfig('showDuration', 'Show duration (ms)', TraitInputType.Scrub, { min: 200, max: 20000, step: 100 }, 4000),
8027
+ new TraitConfig('fadeDuration', 'Fade duration (ms)', TraitInputType.Scrub, { min: 100, max: 10000, step: 100 }, 1000),
8028
+ new TraitConfig('autoStart', 'Auto start', TraitInputType.Checkbox, undefined, true),
8029
+ ];
8030
+ // Minimal styling: the gallery box's size + spacing + background (letterbox). No typography
8031
+ // (not text-bearing) and no border by default — "only size and spacing" per the brief.
8032
+ this.styleTraits = [
8033
+ new PositionGroupStyleConfig(),
8034
+ new SizeGroupStyleConfig(),
8035
+ new SpacingGroupStyleConfig(),
8036
+ new BackgroundGroupStyleConfig(),
8037
+ ];
8038
+ // A sensible default box so a freshly-dropped gallery has real height (the images are
8039
+ // absolutely-positioned layers with no intrinsic height — see Phase 1 height fix).
8040
+ this.applyStyleDefaults({
8041
+ width: '100%',
8042
+ aspectRatio: '16/9',
8043
+ backgroundColor: '#000000',
8044
+ });
8045
+ }
8046
+ }
8047
+
7994
8048
  class BuilderHeadingComponentConfig extends ComponentConfig {
7995
8049
  constructor() {
7996
8050
  super('Heading', 'app-builder-heading', 'ph-thin ph-text-h', 'Basic');
@@ -8392,5 +8446,5 @@ class BuilderSpacerComponentConfig extends ComponentConfig {
8392
8446
  * Generated bundle index. Do not edit.
8393
8447
  */
8394
8448
 
8395
- export { ACTION_TYPE_OPTIONS, BackgroundGroupStyleConfig, BorderGroupStyleConfig, BuilderButtonBlockComponent, BuilderButtonComponentConfig, BuilderClipboardService, BuilderComponent, BuilderContainerComponent, BuilderContainerComponentConfig, BuilderDataSourceService, BuilderDividerComponentConfig, BuilderHeadingComponentConfig, BuilderHistoryService, BuilderIconComponentConfig, BuilderImageComponentConfig, BuilderLinkComponentConfig, BuilderLinkedContainerComponent, BuilderLinkedContainerConfig, BuilderListComponentConfig, BuilderListItemComponentConfig, BuilderMode, BuilderRepeaterComponent, BuilderSpacerComponentConfig, ButtonBlockComponentConfig, CardComponentConfig, ChildLayoutGroupStyleConfig, ComponentConfig, ComponentRegistryService, DEVICE_OPTIONS, DataSourceRegistryService, DataSourceType, DeviceMode, DimensionsGroupStyleConfig, DragEngineService, EASING_OPTIONS$1 as EASING_OPTIONS, EffectsGroupStyleConfig, GroupStyleConfig, INTERACTION_STATES, INVERSE_ACTION, IOX_DATA_SOURCE_ENDPOINTS, IOX_FONT_MANAGER, InteractionEngineService, InteractionPresetRegistryService, InteractionsPanelComponent, IoxBuilderModule, IoxDraggableDirective, IoxDropzoneDirective, 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, SymbolRegistryService, TRIGGER_OPTIONS, TextBlockComponentConfig, ToolbarAction, ToolbarComponent, TraitConfig, TraitInputType, TypographyGroupStyleConfig, UNITS_ALL, UNITS_DEG, UNITS_FIXED, UNITS_NO_VW, ViewportService, ZOOM_OPTIONS, arrayItemSchemaFields, arraySchemaFields, buildFullStyleTraits, buildPresetStyleTraits, defaultPageSettings, findNodeLocation, flattenSchemaFields, generateNodeId, resolveTraitControllerType, resolveTraitOptions, wrapNode };
8449
+ export { ACTION_TYPE_OPTIONS, BackgroundGroupStyleConfig, BorderGroupStyleConfig, BuilderButtonBlockComponent, BuilderButtonComponentConfig, BuilderClipboardService, BuilderComponent, BuilderContainerComponent, BuilderContainerComponentConfig, BuilderDataSourceService, BuilderDividerComponentConfig, BuilderHeadingComponentConfig, BuilderHistoryService, BuilderIconComponentConfig, BuilderImageComponentConfig, BuilderLinkComponentConfig, BuilderLinkedContainerComponent, BuilderLinkedContainerConfig, BuilderListComponentConfig, BuilderListItemComponentConfig, BuilderMode, BuilderRepeaterComponent, BuilderSpacerComponentConfig, ButtonBlockComponentConfig, CardComponentConfig, ChildLayoutGroupStyleConfig, ComponentConfig, ComponentRegistryService, DEVICE_OPTIONS, DataSourceRegistryService, DataSourceType, DeviceMode, DimensionsGroupStyleConfig, DragEngineService, EASING_OPTIONS$1 as EASING_OPTIONS, EffectsGroupStyleConfig, GalleryConfig, GroupStyleConfig, INTERACTION_STATES, INVERSE_ACTION, IOX_DATA_SOURCE_ENDPOINTS, IOX_FONT_MANAGER, InteractionEngineService, InteractionPresetRegistryService, InteractionsPanelComponent, IoxBuilderModule, IoxDraggableDirective, IoxDropzoneDirective, 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, SymbolRegistryService, TRIGGER_OPTIONS, TextBlockComponentConfig, ToolbarAction, ToolbarComponent, TraitConfig, TraitInputType, TypographyGroupStyleConfig, UNITS_ALL, UNITS_DEG, UNITS_FIXED, UNITS_NO_VW, ViewportService, ZOOM_OPTIONS, arrayItemSchemaFields, arraySchemaFields, buildFullStyleTraits, buildPresetStyleTraits, defaultPageSettings, findNodeLocation, flattenSchemaFields, generateNodeId, resolveTraitControllerType, resolveTraitOptions, wrapNode };
8396
8450
  //# sourceMappingURL=vectoriox-iox-builder.mjs.map