@vectoriox/iox-builder 1.4.62 → 1.4.64

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.
@@ -1824,6 +1824,14 @@ var StyleCategory;
1824
1824
  // Legacy — kept for backward compat; prefer Size
1825
1825
  StyleCategory["Dimensions"] = "Dimensions";
1826
1826
  })(StyleCategory || (StyleCategory = {}));
1827
+ var DataSourceType;
1828
+ (function (DataSourceType) {
1829
+ DataSourceType["Cms"] = "cms";
1830
+ DataSourceType["Shop"] = "shop";
1831
+ DataSourceType["ExternalApi"] = "external-api";
1832
+ DataSourceType["InternalApi"] = "internal-api";
1833
+ DataSourceType["Static"] = "static";
1834
+ })(DataSourceType || (DataSourceType = {}));
1827
1835
  /**
1828
1836
  * Maps each action type to its logical inverse for auto-populating toggle
1829
1837
  * reverse actions. Types without a natural inverse are omitted.
@@ -4812,6 +4820,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
4812
4820
 
4813
4821
  /** Optional CMS content fetcher. Provide from the host app to enable Repeater data preview. */
4814
4822
  const IOX_CONTENT_SERVICE = new InjectionToken('IOX_CONTENT_SERVICE');
4823
+ /** Optional shop content fetcher. Provide from the host app to enable Repeater shop data preview. */
4824
+ const IOX_SHOP_SERVICE = new InjectionToken('IOX_SHOP_SERVICE');
4815
4825
  /** Optional font manager. Provide from the host app to populate the fontFamily dropdown. */
4816
4826
  const IOX_FONT_MANAGER = new InjectionToken('IOX_FONT_MANAGER');
4817
4827
 
@@ -4890,10 +4900,11 @@ class BuilderRepeaterComponent {
4890
4900
  this.fetchData();
4891
4901
  }
4892
4902
  }
4893
- constructor(dragEngine, overlayService, contentService, dsRegistry, panelEventService, activatedRoute, cdr) {
4903
+ constructor(dragEngine, overlayService, contentService, shopContentService, dsRegistry, panelEventService, activatedRoute, cdr) {
4894
4904
  this.dragEngine = dragEngine;
4895
4905
  this.overlayService = overlayService;
4896
4906
  this.contentService = contentService;
4907
+ this.shopContentService = shopContentService;
4897
4908
  this.dsRegistry = dsRegistry;
4898
4909
  this.panelEventService = panelEventService;
4899
4910
  this.activatedRoute = activatedRoute;
@@ -4938,12 +4949,14 @@ class BuilderRepeaterComponent {
4938
4949
  if (!this._source)
4939
4950
  return;
4940
4951
  const ds = this.dsRegistry.findByAlias(this._source);
4941
- const contentType = ds?.request?.cms?.contentType;
4942
- if (!contentType || !this.contentService)
4952
+ const isShop = ds?.type === 'shop';
4953
+ const contentType = isShop ? ds?.request?.shop?.contentType : ds?.request?.cms?.contentType;
4954
+ const service = isShop ? this.shopContentService : this.contentService;
4955
+ if (!contentType || !service)
4943
4956
  return;
4944
4957
  this.isLoading = true;
4945
4958
  this.cdr.markForCheck();
4946
- this.contentService.getContent(contentType, this.orgId).subscribe({
4959
+ service.getContent(contentType, this.orgId).subscribe({
4947
4960
  next: (data) => {
4948
4961
  const all = Array.isArray(data) ? data : (data?.items || data?.data || []);
4949
4962
  this.items = all.slice(0, this._limit);
@@ -4991,7 +5004,7 @@ class BuilderRepeaterComponent {
4991
5004
  ref.componentRef.changeDetectorRef.detectChanges();
4992
5005
  }
4993
5006
  }
4994
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BuilderRepeaterComponent, deps: [{ token: DragEngineService }, { token: OverlayService }, { token: IOX_CONTENT_SERVICE, optional: true }, { token: DataSourceRegistryService }, { token: PanelEventService }, { token: i5.ActivatedRoute }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
5007
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BuilderRepeaterComponent, deps: [{ token: DragEngineService }, { token: OverlayService }, { token: IOX_CONTENT_SERVICE, optional: true }, { token: IOX_SHOP_SERVICE, optional: true }, { token: DataSourceRegistryService }, { token: PanelEventService }, { token: i5.ActivatedRoute }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
4995
5008
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.11", type: BuilderRepeaterComponent, isStandalone: false, selector: "app-builder-repeater", inputs: { children: "children", style: "style", nodeId: "nodeId", dropListId: "dropListId", source: "source", limit: "limit" }, outputs: { childClick: "childClick", childMouseEnter: "childMouseEnter", childMouseLeave: "childMouseLeave" }, ngImport: i0, template: `
4996
5009
  <ng-template #badgeContent>
4997
5010
  <i class="ph-thin ph-repeat"></i>
@@ -5150,6 +5163,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
5150
5163
  }, {
5151
5164
  type: Inject,
5152
5165
  args: [IOX_CONTENT_SERVICE]
5166
+ }] }, { type: undefined, decorators: [{
5167
+ type: Optional
5168
+ }, {
5169
+ type: Inject,
5170
+ args: [IOX_SHOP_SERVICE]
5153
5171
  }] }, { type: DataSourceRegistryService }, { type: PanelEventService }, { type: i5.ActivatedRoute }, { type: i0.ChangeDetectorRef }], propDecorators: { children: [{
5154
5172
  type: Input
5155
5173
  }], style: [{
@@ -6075,5 +6093,5 @@ class BuilderSpacerComponentConfig extends ComponentConfig {
6075
6093
  * Generated bundle index. Do not edit.
6076
6094
  */
6077
6095
 
6078
- export { ACTION_TYPE_OPTIONS, BuilderButtonBlockComponent, BuilderButtonComponentConfig, BuilderClipboardService, BuilderComponent, BuilderContainerComponent, BuilderContainerComponentConfig, BuilderDividerComponentConfig, BuilderHeadingComponentConfig, BuilderHistoryService, BuilderIconComponentConfig, BuilderImageComponentConfig, BuilderLinkComponentConfig, BuilderLinkedContainerComponent, BuilderLinkedContainerConfig, BuilderListComponentConfig, BuilderListItemComponentConfig, BuilderMode, BuilderRepeaterComponent, BuilderSpacerComponentConfig, ButtonBlockComponentConfig, CardComponentConfig, ComponentConfig, ComponentRegistryService, DEVICE_OPTIONS, DataSourceRegistryService, DeviceMode, DragEngineService, EASING_OPTIONS$1 as EASING_OPTIONS, GroupStyleConfig, INTERACTION_STATES, INVERSE_ACTION, IOX_CONTENT_SERVICE, IOX_FONT_MANAGER, InteractionEngineService, InteractionPresetRegistryService, InteractionsPanelComponent, IoxBuilderModule, IoxDraggableDirective, IoxDropzoneDirective, LayerTreeComponent, ListGroupStyleConfig, NodeAction, OverlayComponent, OverlayService, PanelChildComponent, PanelComponent, PanelEventService, PanelEventTypes, PanelTypes, PresetRegistryService, ROUTE_ANIMATION_OPTIONS, RenderDirective, RepeaterComponentConfig, SCREEN_WIDTH_OPTIONS, STRUCTURAL_STATES, SUPPORTED_STATES, SectionComponent, SectionComponentConfig, StyleCategory, StyleRegistryService, TraitConfig as StyleTraitConfig, SymbolRegistryService, TRIGGER_OPTIONS, TextBlockComponentConfig, ToolbarAction, ToolbarComponent, TraitConfig, TraitInputType, UNITS_ALL, UNITS_DEG, UNITS_FIXED, UNITS_NO_VW, VIRTUAL_TRAIT_KEYS, ViewportService, ZOOM_OPTIONS, buildFullStyleTraits, buildPresetStyleTraits, composeVirtualTraits, defaultPageSettings, generateNodeId, resolveTraitControllerType, resolveTraitOptions };
6096
+ export { ACTION_TYPE_OPTIONS, BuilderButtonBlockComponent, BuilderButtonComponentConfig, BuilderClipboardService, BuilderComponent, BuilderContainerComponent, BuilderContainerComponentConfig, BuilderDividerComponentConfig, BuilderHeadingComponentConfig, BuilderHistoryService, BuilderIconComponentConfig, BuilderImageComponentConfig, BuilderLinkComponentConfig, BuilderLinkedContainerComponent, BuilderLinkedContainerConfig, BuilderListComponentConfig, BuilderListItemComponentConfig, BuilderMode, BuilderRepeaterComponent, BuilderSpacerComponentConfig, ButtonBlockComponentConfig, CardComponentConfig, ComponentConfig, ComponentRegistryService, DEVICE_OPTIONS, DataSourceRegistryService, DataSourceType, DeviceMode, DragEngineService, EASING_OPTIONS$1 as EASING_OPTIONS, GroupStyleConfig, INTERACTION_STATES, INVERSE_ACTION, IOX_CONTENT_SERVICE, IOX_FONT_MANAGER, IOX_SHOP_SERVICE, InteractionEngineService, InteractionPresetRegistryService, InteractionsPanelComponent, IoxBuilderModule, IoxDraggableDirective, IoxDropzoneDirective, LayerTreeComponent, ListGroupStyleConfig, NodeAction, OverlayComponent, OverlayService, PanelChildComponent, PanelComponent, PanelEventService, PanelEventTypes, PanelTypes, PresetRegistryService, ROUTE_ANIMATION_OPTIONS, RenderDirective, RepeaterComponentConfig, SCREEN_WIDTH_OPTIONS, STRUCTURAL_STATES, SUPPORTED_STATES, SectionComponent, SectionComponentConfig, StyleCategory, StyleRegistryService, TraitConfig as StyleTraitConfig, SymbolRegistryService, TRIGGER_OPTIONS, TextBlockComponentConfig, ToolbarAction, ToolbarComponent, TraitConfig, TraitInputType, UNITS_ALL, UNITS_DEG, UNITS_FIXED, UNITS_NO_VW, VIRTUAL_TRAIT_KEYS, ViewportService, ZOOM_OPTIONS, buildFullStyleTraits, buildPresetStyleTraits, composeVirtualTraits, defaultPageSettings, generateNodeId, resolveTraitControllerType, resolveTraitOptions };
6079
6097
  //# sourceMappingURL=vectoriox-iox-builder.mjs.map