@vectoriox/iox-builder 11.52.0 → 11.53.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 { Breakpoint, setOverride, nodeCssId, needsGroupName, resolveBoundValue, isBoundStyleProp, applyBoundStyle, safeSetInput, 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, nodeTraitValue, isLastEmittedStateKey, orderStatesForEmit, withSchemeInk, stripSuppressedProps, DeclarationContext, planPartRule, gateHoverRule, compileStackedChildren, BreakpointQueryKind, planResponsiveRules, resolveStyleProps, planStateRule, splitOuterProps, OUTER_STYLE_PROPS, siteColumnOf, compileTokenCssBlocks, catalogFontId, fontsForTokens, GOOGLE_FONTS_FILE_ORIGIN, googleFontHref, compileDeclarations, wrapInBreakpointQuery, 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,
|
|
20
|
+
import { Breakpoint, setOverride, motionAllowed, nodeCssId, needsGroupName, resolveBoundValue, isBoundStyleProp, applyBoundStyle, safeSetInput, 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, nodeTraitValue, isLastEmittedStateKey, orderStatesForEmit, withSchemeInk, stripSuppressedProps, DeclarationContext, planPartRule, gateHoverRule, compileStackedChildren, BreakpointQueryKind, planResponsiveRules, resolveStyleProps, planStateRule, splitOuterProps, OUTER_STYLE_PROPS, siteColumnOf, compileTokenCssBlocks, catalogFontId, fontsForTokens, GOOGLE_FONTS_FILE_ORIGIN, googleFontHref, compileDeclarations, wrapInBreakpointQuery, 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, reducedEntranceRun, settleInteraction, settleModeFor, SettleMode, playInteraction, entranceDelay, repeatedRowIndex, resolveInteractionEasing, entrancePreStateStyle, buildInteractionKeyframes, showToast, IS_PREVIEW, declaredInputNames, emptyImagePlaceholder, syncNodeDesignClasses, syncNodeA11yAttributes, nodeA11yAttributes, stampSelectorAttributes, colorSchemeOf, withStateTransitions, composeVirtualTraits, stateNamesIn, partClassName, applyBoundStyles, switchElementStyle, releaseElementStyle, countOverrides, breakpointDef, breakpointForWidth, FormRenderState, collectContextSlotKeys, withContextSlots, needsAccessibleName, resolveInputs, setInputOverride, barReserveClass, groundHeadersIn, watchHeaderHeight, compilePageStyle, nodeUsesContext, attachTooltips, showToastDesign, TOOLTIP_ATTRIBUTE, hidingHeadersIn, HeaderRuntime, inkFollowingHeadersIn, HeaderInkRuntime, isScrolled, SCROLLED_ATTRIBUTE, syncSubmitButtons, buttonBlockHref, pageLanguageOf, 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, isWordMaskRoot, WordMaskRuntime, 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, buildWordMaskRecipe, 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';
|
|
@@ -511,6 +511,30 @@ function removalRefusal(node, siblings) {
|
|
|
511
511
|
return null;
|
|
512
512
|
}
|
|
513
513
|
|
|
514
|
+
/**
|
|
515
|
+
* A node selected from OUTSIDE the canvas — the Publish gate's "Show me the first one", a panel's own list (SELECT_NODE) —
|
|
516
|
+
* is brought into the canvas's view. Before, the selection landed and the canvas stayed where it was: bench #3's footer
|
|
517
|
+
* form (a global, at the bottom of a long Home) was selected while the canvas showed the hero, so the owner saw the
|
|
518
|
+
* selection box nowhere near what the gate asked them to fill (vectoriox/iox-cms#166).
|
|
519
|
+
*/
|
|
520
|
+
/** Is any edge of `box` outside `view` (the scroller's visible box)? A box wholly in view is left alone — never a jump. */
|
|
521
|
+
function needsReveal(box, view) {
|
|
522
|
+
return box.top < view.top || box.bottom > view.bottom || box.left < view.left || box.right > view.right;
|
|
523
|
+
}
|
|
524
|
+
/**
|
|
525
|
+
* Scroll `element` to the middle of the canvas when it is not wholly in view of `scroller` (`.preview-scroll`; Lenis
|
|
526
|
+
* follows its scrollTop). Smooth only where motion is allowed — reduced motion jumps (Emil: gentler, not a glide).
|
|
527
|
+
* Returns whether it scrolled.
|
|
528
|
+
*/
|
|
529
|
+
function revealOnCanvas(element, scroller, smooth = motionAllowed()) {
|
|
530
|
+
if (!scroller || !element.isConnected)
|
|
531
|
+
return false;
|
|
532
|
+
if (!needsReveal(element.getBoundingClientRect(), scroller.getBoundingClientRect()))
|
|
533
|
+
return false;
|
|
534
|
+
element.scrollIntoView({ block: 'center', inline: 'nearest', behavior: smooth ? 'smooth' : 'auto' });
|
|
535
|
+
return true;
|
|
536
|
+
}
|
|
537
|
+
|
|
514
538
|
/**
|
|
515
539
|
* Nodes styled "WHEN AN ITEM IS ON" from outside it (composite T20; CC4b's price "when Yearly is on") — what the builder
|
|
516
540
|
* says about them: hidden at rest in the layer tree (the eye-slash, board 10), the reading-order audit finding (Q34) and
|
|
@@ -13135,6 +13159,9 @@ class BuilderComponent {
|
|
|
13135
13159
|
this.selectedItem = node;
|
|
13136
13160
|
this.overlayService.setSelect(ref.element, this.typeName(node.type), this.activeMode, node, ref.componentRef);
|
|
13137
13161
|
this._emitElementSelect(node, ref.componentRef);
|
|
13162
|
+
// vectoriox/iox-cms#166: picked from outside the canvas (the Publish gate's "Show me the first one") —
|
|
13163
|
+
// the canvas brings it into view, so the selection is seen where it is.
|
|
13164
|
+
revealOnCanvas(this.overlayService.getStyledElement(ref.element), this.overlayService.getIntersectionRoot());
|
|
13138
13165
|
});
|
|
13139
13166
|
return;
|
|
13140
13167
|
}
|