@vectoriox/iox-builder 1.4.80 → 1.4.81

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.
@@ -4387,6 +4387,21 @@ class BuilderComponent {
4387
4387
  this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);
4388
4388
  break;
4389
4389
  }
4390
+ case ToolbarAction.AddSlide: {
4391
+ if (!Array.isArray(node.children))
4392
+ break;
4393
+ const slide = this.registry.createConfig('SliderSlide');
4394
+ if (!slide)
4395
+ break;
4396
+ node.children = [...node.children, slide];
4397
+ const ref = this.overlayService.getNodeRef(node);
4398
+ if (ref?.componentRef) {
4399
+ ref.componentRef.setInput('children', node.children);
4400
+ ref.componentRef.changeDetectorRef.detectChanges();
4401
+ }
4402
+ this.panelEventService.emit(PanelEventTypes.LAYOUT_CHANGED, this.layout);
4403
+ break;
4404
+ }
4390
4405
  }
4391
4406
  }
4392
4407
  confirmSaveBlock() {
@@ -5431,7 +5446,7 @@ class SliderContainerComponent {
5431
5446
  // Swiper core config
5432
5447
  this.direction = 'horizontal';
5433
5448
  this.loop = false;
5434
- this.slidesPerView = 1;
5449
+ this.slidesPerView = 'auto';
5435
5450
  this.spaceBetween = 0;
5436
5451
  this.speed = 300;
5437
5452
  this.effect = 'slide';
@@ -5867,7 +5882,7 @@ class SliderSlideComponent {
5867
5882
  </ng-container>
5868
5883
  </div>
5869
5884
  </div>
5870
- `, isInline: true, styles: [".swiper-slide,.slide-edit-block{position:relative;box-sizing:border-box;min-height:200px}.slide-placeholder{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;border:1.5px dashed rgba(100,116,139,.35);border-radius:4px;color:#64748b80;font-size:12px;pointer-events:none;-webkit-user-select:none;user-select:none;opacity:0;transition:opacity .15s}:host:hover .slide-placeholder,:host.iox-drag-over .slide-placeholder{opacity:1}.slide-placeholder i{font-size:22px}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: RenderDirective, selector: "[ioxRender]", inputs: ["ioxRender"], outputs: ["onClick", "onMouseEnter", "onMouseLeave"] }, { kind: "directive", type: IoxDraggableDirective, selector: "[ioxDraggable]", inputs: ["ioxDragData", "ioxDragSourceId"] }, { kind: "directive", type: IoxDropzoneDirective, selector: "[ioxDropzone]", inputs: ["ioxDropzoneId", "ioxDropzoneData", "ioxDropzonePostDrop"], outputs: ["ioxDrop"] }] }); }
5885
+ `, isInline: true, styles: [".swiper-slide,.slide-edit-block{position:relative;box-sizing:border-box;display:flex;align-items:center;justify-content:center;overflow:hidden}.slide-placeholder{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;border:1.5px dashed rgba(100,116,139,.35);border-radius:4px;color:#64748b80;font-size:12px;pointer-events:none;-webkit-user-select:none;user-select:none;opacity:0;transition:opacity .15s}:host:hover .slide-placeholder,:host.iox-drag-over .slide-placeholder{opacity:1}.slide-placeholder i{font-size:22px}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: RenderDirective, selector: "[ioxRender]", inputs: ["ioxRender"], outputs: ["onClick", "onMouseEnter", "onMouseLeave"] }, { kind: "directive", type: IoxDraggableDirective, selector: "[ioxDraggable]", inputs: ["ioxDragData", "ioxDragSourceId"] }, { kind: "directive", type: IoxDropzoneDirective, selector: "[ioxDropzone]", inputs: ["ioxDropzoneId", "ioxDropzoneData", "ioxDropzonePostDrop"], outputs: ["ioxDrop"] }] }); }
5871
5886
  }
5872
5887
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: SliderSlideComponent, decorators: [{
5873
5888
  type: Component,
@@ -5929,7 +5944,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
5929
5944
  </ng-container>
5930
5945
  </div>
5931
5946
  </div>
5932
- `, standalone: false, styles: [".swiper-slide,.slide-edit-block{position:relative;box-sizing:border-box;min-height:200px}.slide-placeholder{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;border:1.5px dashed rgba(100,116,139,.35);border-radius:4px;color:#64748b80;font-size:12px;pointer-events:none;-webkit-user-select:none;user-select:none;opacity:0;transition:opacity .15s}:host:hover .slide-placeholder,:host.iox-drag-over .slide-placeholder{opacity:1}.slide-placeholder i{font-size:22px}\n"] }]
5947
+ `, standalone: false, styles: [".swiper-slide,.slide-edit-block{position:relative;box-sizing:border-box;display:flex;align-items:center;justify-content:center;overflow:hidden}.slide-placeholder{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;border:1.5px dashed rgba(100,116,139,.35);border-radius:4px;color:#64748b80;font-size:12px;pointer-events:none;-webkit-user-select:none;user-select:none;opacity:0;transition:opacity .15s}:host:hover .slide-placeholder,:host.iox-drag-over .slide-placeholder{opacity:1}.slide-placeholder i{font-size:22px}\n"] }]
5933
5948
  }], ctorParameters: () => [{ type: DragEngineService }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
5934
5949
  type: Optional
5935
5950
  }, {
@@ -6792,10 +6807,41 @@ class SectionComponentConfig extends ComponentConfig {
6792
6807
  }
6793
6808
  }
6794
6809
 
6810
+ class SliderSlideConfig extends ComponentConfig {
6811
+ constructor() {
6812
+ super('SliderSlide', 'app-slider-slide', 'ph-thin ph-rectangle', 'Media');
6813
+ this.children = [];
6814
+ // Hidden: SliderSlide is created only via the "Add Slide" toolbar button,
6815
+ // not by dragging from the Components panel.
6816
+ this.hidden = true;
6817
+ this.componentEvents = [
6818
+ { value: 'swiperSlideActive', label: 'This Slide Becomes Active', icon: 'ph-thin ph-eye' },
6819
+ { value: 'swiperSlideInactive', label: 'This Slide Becomes Inactive', icon: 'ph-thin ph-eye-slash' },
6820
+ ];
6821
+ this.traits = [];
6822
+ this.styleTraits = [
6823
+ new PositionGroupStyleConfig(),
6824
+ new SizeGroupStyleConfig(),
6825
+ new SpacingGroupStyleConfig(),
6826
+ new BorderGroupStyleConfig(),
6827
+ new BackgroundGroupStyleConfig(),
6828
+ ];
6829
+ this.applyStyleDefaults({
6830
+ width: '33%',
6831
+ aspectRatio: '1 / 1',
6832
+ });
6833
+ }
6834
+ }
6835
+
6795
6836
  class SliderContainerConfig extends ComponentConfig {
6796
6837
  constructor() {
6797
6838
  super('SliderContainer', 'app-slider-container', 'ph-thin ph-slideshow', 'Media');
6798
- this.children = [];
6839
+ this.children = [
6840
+ new SliderSlideConfig(),
6841
+ new SliderSlideConfig(),
6842
+ new SliderSlideConfig(),
6843
+ new SliderSlideConfig(),
6844
+ ];
6799
6845
  this.componentEvents = [
6800
6846
  { value: 'swiperSlideChange', label: 'Slide Changes', icon: 'ph-thin ph-arrows-left-right' },
6801
6847
  { value: 'swiperReachBeginning', label: 'Reaches First Slide', icon: 'ph-thin ph-skip-back' },
@@ -6823,7 +6869,15 @@ class SliderContainerConfig extends ComponentConfig {
6823
6869
  { label: 'Cards', value: 'cards' },
6824
6870
  { label: 'Creative', value: 'creative' },
6825
6871
  ], 'slide'),
6826
- new TraitConfig('slidesPerView', 'Slides per view', TraitInputType.Number, undefined, 1),
6872
+ new TraitConfig('slidesPerView', 'Slides per view', TraitInputType.Select, [
6873
+ { label: 'Auto (use slide width)', value: 'auto' },
6874
+ { label: '1', value: 1 },
6875
+ { label: '2', value: 2 },
6876
+ { label: '3', value: 3 },
6877
+ { label: '4', value: 4 },
6878
+ { label: '5', value: 5 },
6879
+ { label: '6', value: 6 },
6880
+ ], 'auto'),
6827
6881
  new TraitConfig('spaceBetween', 'Space between (px)', TraitInputType.Number, undefined, 0),
6828
6882
  new TraitConfig('speed', 'Transition speed (ms)', TraitInputType.Number, undefined, 300),
6829
6883
  new TraitConfig('initialSlide', 'Initial slide', TraitInputType.Number, undefined, 0),
@@ -6878,32 +6932,6 @@ class SliderContainerConfig extends ComponentConfig {
6878
6932
  }
6879
6933
  }
6880
6934
 
6881
- class SliderSlideConfig extends ComponentConfig {
6882
- constructor() {
6883
- super('SliderSlide', 'app-slider-slide', 'ph-thin ph-rectangle', 'Media');
6884
- this.children = [];
6885
- // Hidden: SliderSlide is created only via the "Add Slide" toolbar button,
6886
- // not by dragging from the Components panel.
6887
- this.hidden = true;
6888
- this.componentEvents = [
6889
- { value: 'swiperSlideActive', label: 'This Slide Becomes Active', icon: 'ph-thin ph-eye' },
6890
- { value: 'swiperSlideInactive', label: 'This Slide Becomes Inactive', icon: 'ph-thin ph-eye-slash' },
6891
- ];
6892
- this.traits = [];
6893
- this.styleTraits = [
6894
- new PositionGroupStyleConfig(),
6895
- new SizeGroupStyleConfig(),
6896
- new SpacingGroupStyleConfig(),
6897
- new BorderGroupStyleConfig(),
6898
- new BackgroundGroupStyleConfig(),
6899
- ];
6900
- this.applyStyleDefaults({
6901
- width: '100%',
6902
- height: '100%',
6903
- });
6904
- }
6905
- }
6906
-
6907
6935
  class BuilderSpacerComponentConfig extends ComponentConfig {
6908
6936
  constructor() {
6909
6937
  super('Spacer', 'app-builder-spacer', 'ph-thin ph-arrows-vertical', 'Layout');