@vectoriox/iox-builder 1.4.63 → 1.4.65

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.
@@ -4820,6 +4820,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
4820
4820
 
4821
4821
  /** Optional CMS content fetcher. Provide from the host app to enable Repeater data preview. */
4822
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');
4823
4825
  /** Optional font manager. Provide from the host app to populate the fontFamily dropdown. */
4824
4826
  const IOX_FONT_MANAGER = new InjectionToken('IOX_FONT_MANAGER');
4825
4827
 
@@ -4898,10 +4900,11 @@ class BuilderRepeaterComponent {
4898
4900
  this.fetchData();
4899
4901
  }
4900
4902
  }
4901
- constructor(dragEngine, overlayService, contentService, dsRegistry, panelEventService, activatedRoute, cdr) {
4903
+ constructor(dragEngine, overlayService, contentService, shopContentService, dsRegistry, panelEventService, activatedRoute, cdr) {
4902
4904
  this.dragEngine = dragEngine;
4903
4905
  this.overlayService = overlayService;
4904
4906
  this.contentService = contentService;
4907
+ this.shopContentService = shopContentService;
4905
4908
  this.dsRegistry = dsRegistry;
4906
4909
  this.panelEventService = panelEventService;
4907
4910
  this.activatedRoute = activatedRoute;
@@ -4946,12 +4949,14 @@ class BuilderRepeaterComponent {
4946
4949
  if (!this._source)
4947
4950
  return;
4948
4951
  const ds = this.dsRegistry.findByAlias(this._source);
4949
- const contentType = ds?.request?.cms?.contentType;
4950
- if (!contentType || !this.contentService)
4952
+ const isShop = ds?.type === DataSourceType.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)
4951
4956
  return;
4952
4957
  this.isLoading = true;
4953
4958
  this.cdr.markForCheck();
4954
- this.contentService.getContent(contentType, this.orgId).subscribe({
4959
+ service.getContent(contentType, this.orgId).subscribe({
4955
4960
  next: (data) => {
4956
4961
  const all = Array.isArray(data) ? data : (data?.items || data?.data || []);
4957
4962
  this.items = all.slice(0, this._limit);
@@ -4999,7 +5004,7 @@ class BuilderRepeaterComponent {
4999
5004
  ref.componentRef.changeDetectorRef.detectChanges();
5000
5005
  }
5001
5006
  }
5002
- 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 }); }
5003
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: `
5004
5009
  <ng-template #badgeContent>
5005
5010
  <i class="ph-thin ph-repeat"></i>
@@ -5158,6 +5163,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
5158
5163
  }, {
5159
5164
  type: Inject,
5160
5165
  args: [IOX_CONTENT_SERVICE]
5166
+ }] }, { type: undefined, decorators: [{
5167
+ type: Optional
5168
+ }, {
5169
+ type: Inject,
5170
+ args: [IOX_SHOP_SERVICE]
5161
5171
  }] }, { type: DataSourceRegistryService }, { type: PanelEventService }, { type: i5.ActivatedRoute }, { type: i0.ChangeDetectorRef }], propDecorators: { children: [{
5162
5172
  type: Input
5163
5173
  }], style: [{
@@ -6083,5 +6093,5 @@ class BuilderSpacerComponentConfig extends ComponentConfig {
6083
6093
  * Generated bundle index. Do not edit.
6084
6094
  */
6085
6095
 
6086
- 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, 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 };
6087
6097
  //# sourceMappingURL=vectoriox-iox-builder.mjs.map