@vectoriox/iox-builder 11.49.0 → 11.50.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.
|
@@ -19,7 +19,7 @@ import { DialogModule } from 'primeng/dialog';
|
|
|
19
19
|
import * as i2$1 from '@vectoriox/iox-ui';
|
|
20
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, 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, motionAllowed, effectiveActionType, INTERACTION_HIDDEN_ATTRIBUTE, COUNT_UP_ACTION, reducedEntranceRun, settleInteraction, settleModeFor, SettleMode, playInteraction, entranceDelay, repeatedRowIndex, resolveInteractionEasing, entrancePreStateStyle, buildInteractionKeyframes, showToast, IS_PREVIEW, declaredInputNames, emptyImagePlaceholder, syncNodeDesignClasses, nodeTraitValue, 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
|
-
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';
|
|
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';
|
|
24
24
|
import { Subject, BehaviorSubject, of, forkJoin, combineLatest } from 'rxjs';
|
|
25
25
|
import { isPlaceholderRow, variableAliases, listPlaceholderFields } from '@vectoriox/iox-ui/data-core';
|
|
@@ -1714,6 +1714,8 @@ const ACTION_TYPE_OPTIONS = [
|
|
|
1714
1714
|
{ value: 'countUp', label: 'Count up' },
|
|
1715
1715
|
{ value: 'parallax', label: 'Depth (parallax)' },
|
|
1716
1716
|
{ value: 'progressBar', label: 'Fill as read' },
|
|
1717
|
+
{ value: 'maskZoomOut', label: 'Word zoom out' },
|
|
1718
|
+
{ value: 'maskZoomIn', label: 'Word zoom in' },
|
|
1717
1719
|
{ value: 'show', label: 'Show' },
|
|
1718
1720
|
{ value: 'hide', label: 'Hide' },
|
|
1719
1721
|
{ value: 'toggleVisibility', label: 'Toggle visibility' },
|
|
@@ -6303,11 +6305,14 @@ class CompositeCanvasService {
|
|
|
6303
6305
|
this.attached = new Map();
|
|
6304
6306
|
this.exclusive = new Map();
|
|
6305
6307
|
this.marquees = new Map();
|
|
6308
|
+
/** Word masks on the canvas (WM): the live site's runtime draws the cut-out and measures the zoom — always (the canvas
|
|
6309
|
+
* is a live runtime; the zoom itself is the ground's scrollProgress interaction, played by the interaction engine). */
|
|
6310
|
+
this.wordMasks = new Map();
|
|
6306
6311
|
this.sub = designState?.state$.subscribe(() => this.applyDesignState()) ?? null;
|
|
6307
6312
|
}
|
|
6308
6313
|
ngOnDestroy() {
|
|
6309
6314
|
this.sub?.unsubscribe();
|
|
6310
|
-
for (const id of [...this.attached.keys(), ...this.exclusive.keys(), ...this.marquees.keys()])
|
|
6315
|
+
for (const id of [...this.attached.keys(), ...this.exclusive.keys(), ...this.marquees.keys(), ...this.wordMasks.keys()])
|
|
6311
6316
|
this.detach(id);
|
|
6312
6317
|
}
|
|
6313
6318
|
/** A composite root rendered on the canvas (the template, or a preview row's copy): run it. `element` is the
|
|
@@ -6316,6 +6321,10 @@ class CompositeCanvasService {
|
|
|
6316
6321
|
if (!node.id)
|
|
6317
6322
|
return;
|
|
6318
6323
|
this.detach(node.id);
|
|
6324
|
+
if (isWordMaskRoot(node)) {
|
|
6325
|
+
this.wordMasks.set(node.id, this.zone.runOutsideAngular(() => new WordMaskRuntime(element)));
|
|
6326
|
+
return;
|
|
6327
|
+
}
|
|
6319
6328
|
if (isMarqueeRoot(node)) {
|
|
6320
6329
|
this.marquees.set(node.id, { node, element, runtime: null });
|
|
6321
6330
|
this.applyMarquee(this.marquees.get(node.id));
|
|
@@ -6368,6 +6377,13 @@ class CompositeCanvasService {
|
|
|
6368
6377
|
this.exclusive.delete(nodeId);
|
|
6369
6378
|
this.marquees.get(nodeId)?.runtime?.destroy();
|
|
6370
6379
|
this.marquees.delete(nodeId);
|
|
6380
|
+
this.wordMasks.get(nodeId)?.destroy();
|
|
6381
|
+
this.wordMasks.delete(nodeId);
|
|
6382
|
+
}
|
|
6383
|
+
/** The runtime of a word mask on the canvas (WM): the e2e harness reads its cut-out; a panel edit it cannot observe
|
|
6384
|
+
* (the ground's colour is CSS — `currentColor` follows by itself) may refresh it. */
|
|
6385
|
+
wordMaskRuntimeOf(nodeId) {
|
|
6386
|
+
return (nodeId && this.wordMasks.get(nodeId)) || null;
|
|
6371
6387
|
}
|
|
6372
6388
|
/** The runtime of a Marquee moving on the canvas, or null while it stands still. */
|
|
6373
6389
|
marqueeRuntimeOf(nodeId) {
|
|
@@ -7041,7 +7057,7 @@ class RenderDirective {
|
|
|
7041
7057
|
// A composite root runs its behaviour on the canvas — the live site's runtime (CC2; the Disclosure, CC2.1).
|
|
7042
7058
|
// A preview row's copy runs too, scoped by its row (vectoriox/iox-ui#20): its ids are its own and it shows
|
|
7043
7059
|
// the saved default, as every row does on the live site.
|
|
7044
|
-
if (nativeEl && node.id && (isAnyCompositeRoot(node) || isMarqueeRoot(node)) && this.compositeCanvas) {
|
|
7060
|
+
if (nativeEl && node.id && (isAnyCompositeRoot(node) || isMarqueeRoot(node) || isWordMaskRoot(node)) && this.compositeCanvas) {
|
|
7045
7061
|
this.compositeCanvas.attach(node, nativeEl);
|
|
7046
7062
|
this.compositeRootId = node.id;
|
|
7047
7063
|
}
|
|
@@ -7789,6 +7805,7 @@ var CompositePresetId;
|
|
|
7789
7805
|
CompositePresetId["Marquee"] = "marquee";
|
|
7790
7806
|
CompositePresetId["Counter"] = "counter";
|
|
7791
7807
|
CompositePresetId["ReadingBar"] = "reading-bar";
|
|
7808
|
+
CompositePresetId["WordMask"] = "word-mask";
|
|
7792
7809
|
CompositePresetId["Price"] = "shop-price";
|
|
7793
7810
|
CompositePresetId["Variants"] = "shop-variants";
|
|
7794
7811
|
CompositePresetId["Quantity"] = "shop-quantity";
|
|
@@ -7871,6 +7888,12 @@ const COMPOSITE_PRESETS = Object.freeze([
|
|
|
7871
7888
|
description: 'A thin bar that fills as the page is read — or its section: change it in Interactions.',
|
|
7872
7889
|
build: create => buildReadingBarRecipe(create),
|
|
7873
7890
|
},
|
|
7891
|
+
// Word mask (WM, complex-components plan): the name with its letters cut out of a solid ground onto a picture.
|
|
7892
|
+
{
|
|
7893
|
+
id: CompositePresetId.WordMask, group: CompositePaletteGroup.Interactive, name: 'Word mask', icon: 'ph-thin ph-text-aa',
|
|
7894
|
+
description: 'A giant word whose letters show your picture or film through a solid ground; the scroll zooms out of a letter to the whole word.',
|
|
7895
|
+
build: create => buildWordMaskRecipe(create),
|
|
7896
|
+
},
|
|
7874
7897
|
// Commerce E1c — the shop parts (commerce board 10). Each fills from the product in scope and the bag at runtime.
|
|
7875
7898
|
{
|
|
7876
7899
|
id: CompositePresetId.Price, group: CompositePaletteGroup.Shop, name: 'Price', icon: 'ph-thin ph-coins',
|