@vectoriox/iox-builder 11.39.0 → 11.40.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.
|
@@ -17,7 +17,7 @@ import { TooltipModule } from 'primeng/tooltip';
|
|
|
17
17
|
import * as i20 from 'primeng/dialog';
|
|
18
18
|
import { DialogModule } from 'primeng/dialog';
|
|
19
19
|
import * as i2$1 from '@vectoriox/iox-ui';
|
|
20
|
-
import { nodeCssId, needsGroupName, resolveBoundValue, isBoundStyleProp, STRUCTURAL_STATES as STRUCTURAL_STATES$1, VALIDATION_STATES as VALIDATION_STATES$1, VALIDATION_STATE_CLASS as VALIDATION_STATE_CLASS$1, DEFAULT_WIDTH_BY_TYPE, TEXT_DIRECTION_KEY, TEXT_ALIGN_KEY, TextAlign, COLOR_SCHEME_TRAIT, COLOR_SCHEMES, ColorScheme, LinkType, MAX_LINES_KEY, A11yTrait, BREAKPOINTS, Breakpoint, withSchemeInk, stripSuppressedProps, DeclarationContext, planPartRule, gateHoverRule, planResponsiveRules, resolveStyleProps, planStateRule, splitOuterProps, OUTER_STYLE_PROPS, siteColumnOf, compileTokenCssBlocks, catalogFontId, fontsForTokens, GOOGLE_FONTS_FILE_ORIGIN, googleFontHref, compileDeclarations, isLastEmittedStateKey, wrapInBreakpointQuery, BreakpointQueryKind, NEW_NODE_STYLE_DEFAULTS, defaultElementStyleFor, applyElementStyle, planDataSource, dataSourcePlanToRequest, normalizeCollectionResult, resolveRepeaterItems, getByPath, computeRelative, PROGRESS_ATTRIBUTE, interactionMarkerAttributes, cascadeChain, attachScrollProgress, ContextStore, ENTRANCE_ACTION_TYPES, EXIT_ACTION_TYPES, ComponentInstanceRegistryService, syncInteractionMarkers, entranceStartsHidden, isActionEnabled, restoreCountUp, SCROLL_PROGRESS_TRIGGER, armInteractionCounts, splitPressFeedback, isHoverPointer, isContextAction, contextActionEffect, resolveContextValue, effectiveActionType, INTERACTION_HIDDEN_ATTRIBUTE, COUNT_UP_ACTION, motionAllowed, reducedEntranceRun, settleInteraction, settleModeFor, SettleMode, playInteraction, entranceDelay, repeatedRowIndex, resolveInteractionEasing, entrancePreStateStyle, buildInteractionKeyframes, showToast, declaredInputNames, emptyImagePlaceholder, syncNodeDesignClasses, nodeTraitValue, syncNodeA11yAttributes, nodeA11yAttributes, safeSetInput, colorSchemeOf, withStateTransitions, composeVirtualTraits, stateNamesIn, partClassName, applyBoundStyles, applyBoundStyle, switchElementStyle, releaseElementStyle, countOverrides, setOverride, breakpointDef, breakpointForWidth, FormRenderState, collectContextSlotKeys, withContextSlots, needsAccessibleName, resolveInputs, setInputOverride, barReserveClass, compilePageStyle, nodeUsesContext, attachTooltips, showToastDesign, TOOLTIP_ATTRIBUTE, hidingHeadersIn, HeaderRuntime, inkFollowingHeadersIn, HeaderInkRuntime, isScrolled, SCROLLED_ATTRIBUTE, syncSubmitButtons,
|
|
20
|
+
import { nodeCssId, needsGroupName, resolveBoundValue, isBoundStyleProp, STRUCTURAL_STATES as STRUCTURAL_STATES$1, VALIDATION_STATES as VALIDATION_STATES$1, VALIDATION_STATE_CLASS as VALIDATION_STATE_CLASS$1, DEFAULT_WIDTH_BY_TYPE, TEXT_DIRECTION_KEY, TEXT_ALIGN_KEY, TextAlign, COLOR_SCHEME_TRAIT, COLOR_SCHEMES, ColorScheme, LinkType, MAX_LINES_KEY, A11yTrait, BREAKPOINTS, Breakpoint, withSchemeInk, stripSuppressedProps, DeclarationContext, planPartRule, gateHoverRule, planResponsiveRules, resolveStyleProps, planStateRule, splitOuterProps, OUTER_STYLE_PROPS, siteColumnOf, compileTokenCssBlocks, catalogFontId, fontsForTokens, GOOGLE_FONTS_FILE_ORIGIN, googleFontHref, compileDeclarations, isLastEmittedStateKey, wrapInBreakpointQuery, BreakpointQueryKind, NEW_NODE_STYLE_DEFAULTS, defaultElementStyleFor, applyElementStyle, planDataSource, dataSourcePlanToRequest, normalizeCollectionResult, resolveRepeaterItems, getByPath, computeRelative, PROGRESS_ATTRIBUTE, interactionMarkerAttributes, cascadeChain, attachScrollProgress, ContextStore, ENTRANCE_ACTION_TYPES, EXIT_ACTION_TYPES, ComponentInstanceRegistryService, syncInteractionMarkers, entranceStartsHidden, isActionEnabled, restoreCountUp, SCROLL_PROGRESS_TRIGGER, armInteractionCounts, splitPressFeedback, isHoverPointer, isContextAction, contextActionEffect, resolveContextValue, effectiveActionType, INTERACTION_HIDDEN_ATTRIBUTE, COUNT_UP_ACTION, motionAllowed, reducedEntranceRun, settleInteraction, settleModeFor, SettleMode, playInteraction, entranceDelay, repeatedRowIndex, resolveInteractionEasing, entrancePreStateStyle, buildInteractionKeyframes, showToast, declaredInputNames, emptyImagePlaceholder, syncNodeDesignClasses, nodeTraitValue, syncNodeA11yAttributes, nodeA11yAttributes, safeSetInput, colorSchemeOf, withStateTransitions, composeVirtualTraits, stateNamesIn, partClassName, applyBoundStyles, applyBoundStyle, IS_PREVIEW, switchElementStyle, releaseElementStyle, countOverrides, setOverride, breakpointDef, breakpointForWidth, FormRenderState, collectContextSlotKeys, withContextSlots, needsAccessibleName, resolveInputs, setInputOverride, barReserveClass, compilePageStyle, nodeUsesContext, attachTooltips, showToastDesign, TOOLTIP_ATTRIBUTE, hidingHeadersIn, HeaderRuntime, inkFollowingHeadersIn, HeaderInkRuntime, isScrolled, SCROLLED_ATTRIBUTE, syncSubmitButtons, buttonBlockHref, layerFrame, rectInLayer, placeFloating, FloatingAlign, popoverSide, bootSlider, IoxPageModule, PALETTE_PRESETS, elementStyleById, PART_CLASS_NAMES } from '@vectoriox/iox-ui';
|
|
21
21
|
export { ComponentInstanceRegistryService, VIRTUAL_TRAIT_KEYS, composeVirtualTraits } from '@vectoriox/iox-ui';
|
|
22
22
|
import { StructureEdit, isAccordionPart, isDisclosurePart, isSliderPart, isTabsPart, isSegmentedPart, structureRefusal, StructureRefusal, SegmentedRole, SEGMENTED_MAX_OPTIONS, AccordionRole, SEGMENTED_MIN_OPTIONS, isExclusiveItemPart, TabsRole, ITEM_OPEN_STATE, readStyle, isSegmentedRoot, segmentedDefaultOn, segmentedOptions, isTabsRoot, isTabsFromContent, tabsTriggers, isAccordionRoot, isAccordionFromContent, accordionItems, initialAccordionOpen, accordionBehaviour, exclusiveItemLabel, exclusiveRootOf, tabTriggerOf, tabLabel, removeTabPair, tabPanelOf, tabsListOf, tabsPanelsOf, nextTabKey, CompositeBehaviourTrait, ACCORDION_DEFAULT_ONS, TabsBehaviourTrait, TABS_ACTIVATE_ONS, TABS_ORIENTATIONS, MarqueeTrait, MarqueeSpeed, MarqueeDirection, PopupTrait, PopupKind, PopupForm, PopupArrive, PopupAgain, DIALOG_MODAL_TRAIT, DisclosureRole, isExclusiveTrigger, onCompositeItemState, isCompositeItemOn, runAccountAction, ShopActionType, runShopAction, runCompositeItemAction, shouldScrollToItem, rowIndexOf as rowIndexOf$1, slideIndexForRow, isMarqueeRoot, compositeScopeId, compositeRowKeys, isExclusiveRoot, ExclusiveRuntime, exclusiveDefaultOf, exclusiveLabelOf, exclusiveBehaviourOf, exclusiveKindOf, compositeKindOfRole, AccordionRuntime, isToggleKind, MarqueeRuntime, closestAccordionItem, isAnyCompositeRoot, SceneRole, isExclusiveList, buildCardRecipe, buildBadge, buildChip, buildAccordionRecipe, buildDisclosureRecipe, buildTabsRecipe, buildSegmentedRecipe, buildLightboxRecipe, buildMarqueeRecipe, buildCounterRecipe, buildReadingBarRecipe, SHOP_RECIPES, ShopRecipe, ACCOUNT_RECIPES, AccountRecipe, NO_ELEMENT_STYLE, CompositeKind, PopupRole, SliderRole, accordionItemLabel, segmentedOptionLabel, isExclusivePanels, isLockedPart, attachShop, ShopRole, attachAccount, AccountRole, accordionRootOf, accordionItemOf, addAccordionItem, addTabPair, segmentedAddRefusal, addSegmentedOption, isCompositeItem, accordionHeadingLevel, isCompositePanel, isCompositeTrigger, popupFormOf, splitSliderChildren, hasSliderParts, buildConsentRecipe, SLIDE_CAPTION_TRAIT, SLIDER_SCROLL_PLAYS_TRAIT, SLIDER_PLACEMENT_TRAIT, SliderPlacement, SliderFlag } from '@vectoriox/iox-ui/composite-core';
|
|
23
23
|
import { formContentInHost, isInteractiveHost, findFormContentInHosts, formPresetById, presetFormActions, busyWord, fieldKindWords, channelWords, FORM_CHANNEL_ROLE, channelHref, channelOpensNewTab, FORM_ACTIONS_ROLE, SUBMIT_BUTTON_NODE_TYPE, FORM_NODE_TYPE, FIELD_NODE_TYPE, formWordIn, DEFAULT_BUSY_WORDS, FORM_AFTER_SEND_TRAIT, FormAfterSend, baselineFormWords } from '@vectoriox/iox-ui/forms-core';
|
|
@@ -5873,6 +5873,19 @@ function syncNodeDesign(ref, node, emptyLabel) {
|
|
|
5873
5873
|
syncEmptyImagePlaceholder(ref, node, emptyLabel);
|
|
5874
5874
|
}
|
|
5875
5875
|
|
|
5876
|
+
/** The binding prop that names the data source a list (Repeater, SliderContainer) repeats. */
|
|
5877
|
+
const SOURCE_BINDING_PROP = 'source';
|
|
5878
|
+
/**
|
|
5879
|
+
* A node's `source` binding — the canonical carrier of what a list repeats (the composer writes it, the engine reads it
|
|
5880
|
+
* first: `repeaterSource`). Its value is the ALIAS itself, never data, so the render applies it the moment the node is
|
|
5881
|
+
* drawn (vectoriox/iox-ui#162): the canvas once took it from the Bindings PANEL alone, and Preview, which mounts no
|
|
5882
|
+
* panel, drew a composed list unsourced — one empty card. Null when the node has no source binding.
|
|
5883
|
+
*/
|
|
5884
|
+
function sourceBindingOf(node) {
|
|
5885
|
+
const binding = node?.bindings?.find(b => b?.prop === SOURCE_BINDING_PROP && !!b.source);
|
|
5886
|
+
return binding ? { source: binding.source, path: binding.path ?? '' } : null;
|
|
5887
|
+
}
|
|
5888
|
+
|
|
5876
5889
|
/** The Field type, whose Date control has a design-time Open state on the canvas. */
|
|
5877
5890
|
const FIELD_TYPE = 'Field';
|
|
5878
5891
|
// Module-level counter — unique drop-list ID per Section instance across the whole app session.
|
|
@@ -6150,6 +6163,16 @@ class RenderDirective {
|
|
|
6150
6163
|
// safeSetInput for every component that does not declare it.
|
|
6151
6164
|
if (node.responsive)
|
|
6152
6165
|
safeSetInput(componentRef, 'responsive', node.responsive);
|
|
6166
|
+
// A list's `source` BINDING is the node's own — the alias, never data — so it lands here, as the node is drawn,
|
|
6167
|
+
// on every surface (vectoriox/iox-ui#162). It used to land only through the Bindings PANEL: Preview mounts none,
|
|
6168
|
+
// so a composed list (the composer binds its source) drew unsourced there — one empty card where the site lists
|
|
6169
|
+
// its items. Before `children` (the Repeater's order: source → children). A preview row's own lists keep what
|
|
6170
|
+
// the panel gave them (nothing — they repeat with their row).
|
|
6171
|
+
const sourceBinding = isDisplayOnlyNode(node, this.displayOnly) ? null : sourceBindingOf(node);
|
|
6172
|
+
if (sourceBinding) {
|
|
6173
|
+
safeSetInput(componentRef, 'sourcePath', sourceBinding.path);
|
|
6174
|
+
safeSetInput(componentRef, 'source', sourceBinding.source);
|
|
6175
|
+
}
|
|
6153
6176
|
// A Date field's design-time Open state (premium N8): "Showing on canvas ▸ Open" draws its calendar under it so
|
|
6154
6177
|
// the author can style the Calendar parts — the R2 state every hidden-at-rest part reads (CC1.3 / CC2).
|
|
6155
6178
|
if (node.type === FIELD_TYPE && this.designState && node.id) {
|
|
@@ -6540,6 +6563,14 @@ class BuilderRepeaterComponent {
|
|
|
6540
6563
|
if (this.items.length)
|
|
6541
6564
|
setTimeout(() => this.refreshPreviews());
|
|
6542
6565
|
}
|
|
6566
|
+
/**
|
|
6567
|
+
* Whether the template row is drawn. The canvas always draws it — it is what the author edits. Preview draws it only
|
|
6568
|
+
* once the source answered with rows, as the engine draws a list (`repeaterItems`: no source or no rows → no row): a
|
|
6569
|
+
* list with nothing to show drew ONE empty card there — an empty picture under the scrim, no words (iox-ui#162).
|
|
6570
|
+
*/
|
|
6571
|
+
get drawsTemplate() {
|
|
6572
|
+
return !this.isPreview || this.items.length > 0;
|
|
6573
|
+
}
|
|
6543
6574
|
/** A composite whose source answered with no rows: the placeholder takes the template's place. */
|
|
6544
6575
|
get showsEmptySource() {
|
|
6545
6576
|
// An Accordion's — or a Tabs' list (CC4a; its panels holder says nothing twice) — source that came back empty.
|
|
@@ -6590,7 +6621,7 @@ class BuilderRepeaterComponent {
|
|
|
6590
6621
|
this.fetchData();
|
|
6591
6622
|
}
|
|
6592
6623
|
}
|
|
6593
|
-
constructor(dragEngine, overlayService, dataSourceService, dsRegistry, panelEventService, cdr, interactionEngine, labels, typeLabels) {
|
|
6624
|
+
constructor(dragEngine, overlayService, dataSourceService, dsRegistry, panelEventService, cdr, interactionEngine, labels, typeLabels, preview) {
|
|
6594
6625
|
this.dragEngine = dragEngine;
|
|
6595
6626
|
this.overlayService = overlayService;
|
|
6596
6627
|
this.dataSourceService = dataSourceService;
|
|
@@ -6614,6 +6645,8 @@ class BuilderRepeaterComponent {
|
|
|
6614
6645
|
this.node = null;
|
|
6615
6646
|
/** Set once a fetch has answered — an empty source is a FINDING only after it said so. */
|
|
6616
6647
|
this.fetched = false;
|
|
6648
|
+
this.viewReady = false;
|
|
6649
|
+
this.destroyed = false;
|
|
6617
6650
|
/** Bound reference passed to [ioxDropzonePostDrop] so the directive can call it. */
|
|
6618
6651
|
this.refreshPreviewsBound = () => { setTimeout(() => this.refreshPreviews()); };
|
|
6619
6652
|
this._source = '';
|
|
@@ -6625,6 +6658,7 @@ class BuilderRepeaterComponent {
|
|
|
6625
6658
|
* each firing a fetch; the transient mismatched one (old source + new path, or vice-versa) must not
|
|
6626
6659
|
* clobber the correct result if it resolves last. Only the newest fetch's response is applied. */
|
|
6627
6660
|
this._fetchSeq = 0;
|
|
6661
|
+
this.isPreview = !!preview;
|
|
6628
6662
|
}
|
|
6629
6663
|
ngOnInit() {
|
|
6630
6664
|
this.bindingSub = this.panelEventService.subscribe(event => {
|
|
@@ -6652,7 +6686,11 @@ class BuilderRepeaterComponent {
|
|
|
6652
6686
|
sourceDefinition() {
|
|
6653
6687
|
return JSON.stringify(this.dsRegistry.findByAlias(this._source) ?? null);
|
|
6654
6688
|
}
|
|
6689
|
+
ngAfterViewInit() {
|
|
6690
|
+
this.viewReady = true;
|
|
6691
|
+
}
|
|
6655
6692
|
ngOnDestroy() {
|
|
6693
|
+
this.destroyed = true;
|
|
6656
6694
|
this.bindingSub?.unsubscribe();
|
|
6657
6695
|
this.sourceSub?.unsubscribe();
|
|
6658
6696
|
}
|
|
@@ -6679,6 +6717,10 @@ class BuilderRepeaterComponent {
|
|
|
6679
6717
|
// Row markers store a REFERENCE (source + index); the engine needs the array to resolve
|
|
6680
6718
|
// it back to an item, exactly as the SSR runtime uses resolvedData.
|
|
6681
6719
|
this.interactionEngine.setContextData({ [this._source]: this.items });
|
|
6720
|
+
// Preview drew no template row while there were no rows (drawsTemplate): draw it NOW, so row 1 takes item[0]'s
|
|
6721
|
+
// values in this same turn — never an empty card first.
|
|
6722
|
+
if (this.isPreview && this.viewReady && !this.destroyed)
|
|
6723
|
+
this.cdr.detectChanges();
|
|
6682
6724
|
this.refreshPreviews();
|
|
6683
6725
|
this.isLoading = false;
|
|
6684
6726
|
this.cdr.markForCheck();
|
|
@@ -6744,7 +6786,7 @@ class BuilderRepeaterComponent {
|
|
|
6744
6786
|
if (this.items.length)
|
|
6745
6787
|
setTimeout(() => this.refreshPreviews());
|
|
6746
6788
|
}
|
|
6747
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.31", ngImport: i0, type: BuilderRepeaterComponent, deps: [{ token: DragEngineService }, { token: OverlayService }, { token: BuilderDataSourceService }, { token: DataSourceRegistryService }, { token: PanelEventService }, { token: i0.ChangeDetectorRef }, { token: InteractionEngineService }, { token: IOX_BUILDER_LABELS, optional: true }, { token: IOX_CONTENT_TYPE_LABELS, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6789
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.31", ngImport: i0, type: BuilderRepeaterComponent, deps: [{ token: DragEngineService }, { token: OverlayService }, { token: BuilderDataSourceService }, { token: DataSourceRegistryService }, { token: PanelEventService }, { token: i0.ChangeDetectorRef }, { token: InteractionEngineService }, { token: IOX_BUILDER_LABELS, optional: true }, { token: IOX_CONTENT_TYPE_LABELS, optional: true }, { token: IS_PREVIEW, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6748
6790
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.31", type: BuilderRepeaterComponent, isStandalone: false, selector: "app-builder-repeater", inputs: { children: "children", style: "style", nodeId: "nodeId", dropListId: "dropListId", source: "source", sourcePath: "sourcePath", limit: "limit" }, outputs: { childClick: "childClick", childMouseEnter: "childMouseEnter", childMouseLeave: "childMouseLeave" }, ngImport: i0, template: `
|
|
6749
6791
|
<ng-template #badgeContent>
|
|
6750
6792
|
<i class="ph-thin ph-repeat"></i>
|
|
@@ -6763,7 +6805,7 @@ class BuilderRepeaterComponent {
|
|
|
6763
6805
|
In empty state, .repeater-badge lives inside .repeater-root (no items
|
|
6764
6806
|
to count, so :nth-child is irrelevant there).
|
|
6765
6807
|
-->
|
|
6766
|
-
<div class="repeater-wrapper" [class.has-children]="children.length > 0">
|
|
6808
|
+
<div class="repeater-wrapper" [class.has-children]="children.length > 0" [class.is-preview]="isPreview">
|
|
6767
6809
|
|
|
6768
6810
|
<!-- HAS-CHILDREN: badge outside root, absolute over wrapper -->
|
|
6769
6811
|
<div *ngIf="children.length > 0" class="repeater-badge" data-iox-chrome>
|
|
@@ -6797,7 +6839,7 @@ class BuilderRepeaterComponent {
|
|
|
6797
6839
|
<strong>{{ emptySourceTitle }}</strong>
|
|
6798
6840
|
<span>{{ emptySourceHint }}</span>
|
|
6799
6841
|
</div>
|
|
6800
|
-
} @else {
|
|
6842
|
+
} @else if (drawsTemplate) {
|
|
6801
6843
|
<!-- Template items — DIRECT children of repeater-root.
|
|
6802
6844
|
:first-child / :nth-child(odd) etc. now correctly target these
|
|
6803
6845
|
as siblings of the preview items below. -->
|
|
@@ -6835,7 +6877,7 @@ class BuilderRepeaterComponent {
|
|
|
6835
6877
|
</ng-container>
|
|
6836
6878
|
</div>
|
|
6837
6879
|
</div>
|
|
6838
|
-
`, isInline: true, styles: [".repeater-wrapper{position:relative;box-sizing:border-box}.repeater-badge{display:flex;align-items:center;gap:.4rem;padding:4px 8px;font-size:11px;color:#cb9090;background:#cb909014;border:1px dashed rgba(203,144,144,.4);border-bottom:none;border-radius:4px 4px 0 0;-webkit-user-select:none;user-select:none}.repeater-wrapper.has-children>.repeater-badge{position:absolute;top:0;inset-inline-start:0;z-index:10;border-radius:0 0 4px;border:1px solid rgba(203,144,144,.5);opacity:0;pointer-events:none;transition:opacity .15s}.repeater-wrapper.has-children:hover>.repeater-badge{opacity:1}.repeater-badge i{font-size:13px}.repeater-badge-empty{opacity:.55}.repeater-badge-count{margin-left:auto;font-weight:600}.repeater-badge-loading i{animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.repeater-root{box-sizing:border-box}.repeater-wrapper:not(.has-children) .repeater-root{outline:1px dashed rgba(203,144,144,.4);outline-offset:-1px;min-height:40px}.repeater-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;padding:1.5rem 1rem;color:#64748b80;font-size:12px;pointer-events:none;-webkit-user-select:none;user-select:none}.repeater-placeholder i{font-size:20px}.repeater-placeholder--source{border:1px dashed rgba(203,144,144,.5);border-radius:4px;text-align:center;color:#475569d9;font-size:13px;line-height:1.5}.repeater-placeholder--source strong{font-weight:600;color:#1e293be6}.repeater-item-template{min-width:0}.repeater-preview-child{opacity:.55;pointer-events:none;min-width:0}:host(.iox-role-accordion) .repeater-preview-child,:host(.iox-role-tabs-list) .repeater-preview-child,:host(.iox-role-tabs-panels) .repeater-preview-child{pointer-events:auto}\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.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RenderDirective, selector: "[ioxRender]", inputs: ["ioxRender", "ioxDragSourceId", "ioxPhrasing"], outputs: ["onClick", "onMouseEnter", "onMouseLeave"] }, { kind: "directive", type: IoxDraggableDirective, selector: "[ioxDraggable]", inputs: ["ioxDragData", "ioxDragSourceId", "ioxDragDisabled"] }, { kind: "directive", type: IoxDropzoneDirective, selector: "[ioxDropzone]", inputs: ["ioxDropzoneId", "ioxDropzoneData", "ioxDropzonePostDrop"], outputs: ["ioxDrop"] }] }); }
|
|
6880
|
+
`, isInline: true, styles: [".repeater-wrapper{position:relative;box-sizing:border-box}.repeater-badge{display:flex;align-items:center;gap:.4rem;padding:4px 8px;font-size:11px;color:#cb9090;background:#cb909014;border:1px dashed rgba(203,144,144,.4);border-bottom:none;border-radius:4px 4px 0 0;-webkit-user-select:none;user-select:none}.repeater-wrapper.has-children>.repeater-badge{position:absolute;top:0;inset-inline-start:0;z-index:10;border-radius:0 0 4px;border:1px solid rgba(203,144,144,.5);opacity:0;pointer-events:none;transition:opacity .15s}.repeater-wrapper.has-children:hover>.repeater-badge{opacity:1}.repeater-badge i{font-size:13px}.repeater-badge-empty{opacity:.55}.repeater-badge-count{margin-left:auto;font-weight:600}.repeater-badge-loading i{animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.repeater-root{box-sizing:border-box}.repeater-wrapper:not(.has-children) .repeater-root{outline:1px dashed rgba(203,144,144,.4);outline-offset:-1px;min-height:40px}.repeater-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;padding:1.5rem 1rem;color:#64748b80;font-size:12px;pointer-events:none;-webkit-user-select:none;user-select:none}.repeater-placeholder i{font-size:20px}.repeater-placeholder--source{border:1px dashed rgba(203,144,144,.5);border-radius:4px;text-align:center;color:#475569d9;font-size:13px;line-height:1.5}.repeater-placeholder--source strong{font-weight:600;color:#1e293be6}.repeater-item-template{min-width:0}.repeater-preview-child{opacity:.55;pointer-events:none;min-width:0}.repeater-wrapper.is-preview .repeater-preview-child{opacity:1;pointer-events:auto}:host(.iox-role-accordion) .repeater-preview-child,:host(.iox-role-tabs-list) .repeater-preview-child,:host(.iox-role-tabs-panels) .repeater-preview-child{pointer-events:auto}\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.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RenderDirective, selector: "[ioxRender]", inputs: ["ioxRender", "ioxDragSourceId", "ioxPhrasing"], outputs: ["onClick", "onMouseEnter", "onMouseLeave"] }, { kind: "directive", type: IoxDraggableDirective, selector: "[ioxDraggable]", inputs: ["ioxDragData", "ioxDragSourceId", "ioxDragDisabled"] }, { kind: "directive", type: IoxDropzoneDirective, selector: "[ioxDropzone]", inputs: ["ioxDropzoneId", "ioxDropzoneData", "ioxDropzonePostDrop"], outputs: ["ioxDrop"] }] }); }
|
|
6839
6881
|
}
|
|
6840
6882
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.31", ngImport: i0, type: BuilderRepeaterComponent, decorators: [{
|
|
6841
6883
|
type: Component,
|
|
@@ -6857,7 +6899,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.31", ngImpo
|
|
|
6857
6899
|
In empty state, .repeater-badge lives inside .repeater-root (no items
|
|
6858
6900
|
to count, so :nth-child is irrelevant there).
|
|
6859
6901
|
-->
|
|
6860
|
-
<div class="repeater-wrapper" [class.has-children]="children.length > 0">
|
|
6902
|
+
<div class="repeater-wrapper" [class.has-children]="children.length > 0" [class.is-preview]="isPreview">
|
|
6861
6903
|
|
|
6862
6904
|
<!-- HAS-CHILDREN: badge outside root, absolute over wrapper -->
|
|
6863
6905
|
<div *ngIf="children.length > 0" class="repeater-badge" data-iox-chrome>
|
|
@@ -6891,7 +6933,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.31", ngImpo
|
|
|
6891
6933
|
<strong>{{ emptySourceTitle }}</strong>
|
|
6892
6934
|
<span>{{ emptySourceHint }}</span>
|
|
6893
6935
|
</div>
|
|
6894
|
-
} @else {
|
|
6936
|
+
} @else if (drawsTemplate) {
|
|
6895
6937
|
<!-- Template items — DIRECT children of repeater-root.
|
|
6896
6938
|
:first-child / :nth-child(odd) etc. now correctly target these
|
|
6897
6939
|
as siblings of the preview items below. -->
|
|
@@ -6929,7 +6971,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.31", ngImpo
|
|
|
6929
6971
|
</ng-container>
|
|
6930
6972
|
</div>
|
|
6931
6973
|
</div>
|
|
6932
|
-
`, standalone: false, styles: [".repeater-wrapper{position:relative;box-sizing:border-box}.repeater-badge{display:flex;align-items:center;gap:.4rem;padding:4px 8px;font-size:11px;color:#cb9090;background:#cb909014;border:1px dashed rgba(203,144,144,.4);border-bottom:none;border-radius:4px 4px 0 0;-webkit-user-select:none;user-select:none}.repeater-wrapper.has-children>.repeater-badge{position:absolute;top:0;inset-inline-start:0;z-index:10;border-radius:0 0 4px;border:1px solid rgba(203,144,144,.5);opacity:0;pointer-events:none;transition:opacity .15s}.repeater-wrapper.has-children:hover>.repeater-badge{opacity:1}.repeater-badge i{font-size:13px}.repeater-badge-empty{opacity:.55}.repeater-badge-count{margin-left:auto;font-weight:600}.repeater-badge-loading i{animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.repeater-root{box-sizing:border-box}.repeater-wrapper:not(.has-children) .repeater-root{outline:1px dashed rgba(203,144,144,.4);outline-offset:-1px;min-height:40px}.repeater-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;padding:1.5rem 1rem;color:#64748b80;font-size:12px;pointer-events:none;-webkit-user-select:none;user-select:none}.repeater-placeholder i{font-size:20px}.repeater-placeholder--source{border:1px dashed rgba(203,144,144,.5);border-radius:4px;text-align:center;color:#475569d9;font-size:13px;line-height:1.5}.repeater-placeholder--source strong{font-weight:600;color:#1e293be6}.repeater-item-template{min-width:0}.repeater-preview-child{opacity:.55;pointer-events:none;min-width:0}:host(.iox-role-accordion) .repeater-preview-child,:host(.iox-role-tabs-list) .repeater-preview-child,:host(.iox-role-tabs-panels) .repeater-preview-child{pointer-events:auto}\n"] }]
|
|
6974
|
+
`, standalone: false, styles: [".repeater-wrapper{position:relative;box-sizing:border-box}.repeater-badge{display:flex;align-items:center;gap:.4rem;padding:4px 8px;font-size:11px;color:#cb9090;background:#cb909014;border:1px dashed rgba(203,144,144,.4);border-bottom:none;border-radius:4px 4px 0 0;-webkit-user-select:none;user-select:none}.repeater-wrapper.has-children>.repeater-badge{position:absolute;top:0;inset-inline-start:0;z-index:10;border-radius:0 0 4px;border:1px solid rgba(203,144,144,.5);opacity:0;pointer-events:none;transition:opacity .15s}.repeater-wrapper.has-children:hover>.repeater-badge{opacity:1}.repeater-badge i{font-size:13px}.repeater-badge-empty{opacity:.55}.repeater-badge-count{margin-left:auto;font-weight:600}.repeater-badge-loading i{animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.repeater-root{box-sizing:border-box}.repeater-wrapper:not(.has-children) .repeater-root{outline:1px dashed rgba(203,144,144,.4);outline-offset:-1px;min-height:40px}.repeater-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;padding:1.5rem 1rem;color:#64748b80;font-size:12px;pointer-events:none;-webkit-user-select:none;user-select:none}.repeater-placeholder i{font-size:20px}.repeater-placeholder--source{border:1px dashed rgba(203,144,144,.5);border-radius:4px;text-align:center;color:#475569d9;font-size:13px;line-height:1.5}.repeater-placeholder--source strong{font-weight:600;color:#1e293be6}.repeater-item-template{min-width:0}.repeater-preview-child{opacity:.55;pointer-events:none;min-width:0}.repeater-wrapper.is-preview .repeater-preview-child{opacity:1;pointer-events:auto}:host(.iox-role-accordion) .repeater-preview-child,:host(.iox-role-tabs-list) .repeater-preview-child,:host(.iox-role-tabs-panels) .repeater-preview-child{pointer-events:auto}\n"] }]
|
|
6933
6975
|
}], ctorParameters: () => [{ type: DragEngineService }, { type: OverlayService }, { type: BuilderDataSourceService }, { type: DataSourceRegistryService }, { type: PanelEventService }, { type: i0.ChangeDetectorRef }, { type: InteractionEngineService }, { type: undefined, decorators: [{
|
|
6934
6976
|
type: Optional
|
|
6935
6977
|
}, {
|
|
@@ -6940,6 +6982,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.31", ngImpo
|
|
|
6940
6982
|
}, {
|
|
6941
6983
|
type: Inject,
|
|
6942
6984
|
args: [IOX_CONTENT_TYPE_LABELS]
|
|
6985
|
+
}] }, { type: undefined, decorators: [{
|
|
6986
|
+
type: Optional
|
|
6987
|
+
}, {
|
|
6988
|
+
type: Inject,
|
|
6989
|
+
args: [IS_PREVIEW]
|
|
6943
6990
|
}] }], propDecorators: { children: [{
|
|
6944
6991
|
type: Input
|
|
6945
6992
|
}], style: [{
|
|
@@ -9537,7 +9584,7 @@ const DEFAULT_ICON = 'ph-thin ph-cube';
|
|
|
9537
9584
|
const BOUND_ICON = 'ph-thin ph-plug';
|
|
9538
9585
|
/** The alias a Repeater repeats — its `source` binding (canonical), else its `source` trait. */
|
|
9539
9586
|
function repeaterSourceAlias(node) {
|
|
9540
|
-
const bound = node
|
|
9587
|
+
const bound = sourceBindingOf(node)?.source;
|
|
9541
9588
|
if (bound)
|
|
9542
9589
|
return bound;
|
|
9543
9590
|
const trait = node.traits?.find(t => t.name === REPEATER_SOURCE_PROP)?.default;
|
|
@@ -13625,6 +13672,8 @@ class SliderContainerComponent {
|
|
|
13625
13672
|
this.items = [];
|
|
13626
13673
|
this.previewSlides = [];
|
|
13627
13674
|
this.isLoading = false;
|
|
13675
|
+
this.viewReady = false;
|
|
13676
|
+
this.destroyed = false;
|
|
13628
13677
|
this.childClick = new EventEmitter();
|
|
13629
13678
|
this.childMouseEnter = new EventEmitter();
|
|
13630
13679
|
this.childMouseLeave = new EventEmitter();
|
|
@@ -13653,6 +13702,7 @@ class SliderContainerComponent {
|
|
|
13653
13702
|
}
|
|
13654
13703
|
}
|
|
13655
13704
|
ngAfterViewInit() {
|
|
13705
|
+
this.viewReady = true;
|
|
13656
13706
|
// Run outside Angular's zone so Swiper's internal ResizeObserver, MutationObserver,
|
|
13657
13707
|
// and RAF-based animation loops don't trigger unnecessary CD ticks.
|
|
13658
13708
|
this.ngZone.runOutsideAngular(() => {
|
|
@@ -13691,6 +13741,7 @@ class SliderContainerComponent {
|
|
|
13691
13741
|
}
|
|
13692
13742
|
}
|
|
13693
13743
|
ngOnDestroy() {
|
|
13744
|
+
this.destroyed = true;
|
|
13694
13745
|
cancelAnimationFrame(this._initRafId);
|
|
13695
13746
|
this._destroySwiper();
|
|
13696
13747
|
this.syncSceneDriver(false);
|
|
@@ -13731,6 +13782,10 @@ class SliderContainerComponent {
|
|
|
13731
13782
|
this.cdr.markForCheck();
|
|
13732
13783
|
this.dataSourceService.fetchItems(this.dsRegistry.findByAlias(this._source)).subscribe(items => {
|
|
13733
13784
|
this.items = items.slice(0, this._limit);
|
|
13785
|
+
// Preview draws its template slide only once there are rows: draw it NOW, so slide 1 takes item[0]'s values
|
|
13786
|
+
// in this same turn — never an empty slide first (iox-ui#162).
|
|
13787
|
+
if (this.isPreview && this.viewReady && !this.destroyed)
|
|
13788
|
+
this.cdr.detectChanges();
|
|
13734
13789
|
this.refreshPreviews();
|
|
13735
13790
|
this.isLoading = false;
|
|
13736
13791
|
this.cdr.markForCheck();
|
|
@@ -13986,9 +14041,11 @@ class SliderContainerComponent {
|
|
|
13986
14041
|
</ng-container>
|
|
13987
14042
|
</div>
|
|
13988
14043
|
</ng-container>
|
|
13989
|
-
<!-- REPEAT: template slide + preview slides; each is a row (a lightbox opens at the clicked one)
|
|
14044
|
+
<!-- REPEAT: template slide + preview slides; each is a row (a lightbox opens at the clicked one). Preview is the
|
|
14045
|
+
visitor's page: the template slide is drawn once the source answered with rows, never as an empty
|
|
14046
|
+
slide (iox-ui#162 — the engine draws a bound slider's rows and nothing else). -->
|
|
13990
14047
|
<ng-container *ngIf="source">
|
|
13991
|
-
<div *ngIf="slides.length"
|
|
14048
|
+
<div *ngIf="slides.length && items.length"
|
|
13992
14049
|
class="swiper-slide"
|
|
13993
14050
|
[attr.data-iox-row-idx]="0"
|
|
13994
14051
|
[ngClass]="['iox-outer-' + (slides[0].styleId ?? slides[0].id)]">
|
|
@@ -14165,9 +14222,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.31", ngImpo
|
|
|
14165
14222
|
</ng-container>
|
|
14166
14223
|
</div>
|
|
14167
14224
|
</ng-container>
|
|
14168
|
-
<!-- REPEAT: template slide + preview slides; each is a row (a lightbox opens at the clicked one)
|
|
14225
|
+
<!-- REPEAT: template slide + preview slides; each is a row (a lightbox opens at the clicked one). Preview is the
|
|
14226
|
+
visitor's page: the template slide is drawn once the source answered with rows, never as an empty
|
|
14227
|
+
slide (iox-ui#162 — the engine draws a bound slider's rows and nothing else). -->
|
|
14169
14228
|
<ng-container *ngIf="source">
|
|
14170
|
-
<div *ngIf="slides.length"
|
|
14229
|
+
<div *ngIf="slides.length && items.length"
|
|
14171
14230
|
class="swiper-slide"
|
|
14172
14231
|
[attr.data-iox-row-idx]="0"
|
|
14173
14232
|
[ngClass]="['iox-outer-' + (slides[0].styleId ?? slides[0].id)]">
|