@vectoriox/iox-builder 11.42.1 → 11.42.2

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,13 +17,13 @@ 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, 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, 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, applyBoundStyle, safeSetInput, IS_PREVIEW, declaredInputNames, emptyImagePlaceholder, syncNodeDesignClasses, nodeTraitValue, syncNodeA11yAttributes, nodeA11yAttributes, colorSchemeOf, withStateTransitions, composeVirtualTraits, stateNamesIn, partClassName, applyBoundStyles, switchElementStyle, releaseElementStyle, countOverrides, 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';
20
+ import { Breakpoint, setOverride, 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, 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, applyBoundStyle, safeSetInput, IS_PREVIEW, declaredInputNames, emptyImagePlaceholder, syncNodeDesignClasses, nodeTraitValue, syncNodeA11yAttributes, nodeA11yAttributes, colorSchemeOf, withStateTransitions, composeVirtualTraits, stateNamesIn, partClassName, applyBoundStyles, switchElementStyle, releaseElementStyle, countOverrides, breakpointDef, breakpointForWidth, FormRenderState, collectContextSlotKeys, withContextSlots, needsAccessibleName, resolveInputs, setInputOverride, barReserveClass, 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, 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';
24
24
  import { Subject, BehaviorSubject, of, forkJoin, combineLatest } from 'rxjs';
25
25
  import interact from 'interactjs';
26
- import { HeaderTrait, HeaderBehaviour, HeaderEdge, HeaderInk, SECTION_EDGE_TRAIT, SECTION_EDGES, SECTION_SHAPE_TRAIT, SectionShape, MenuTrait, MenuForm, MenuReveal, MenuHover, MenuPhoneForm, MenuButtonKind, localeDirection, pageColumn, pageOpeningScheme, menuDialogAttributes, MenuAttribute } from '@vectoriox/iox-ui/design-core';
26
+ import { HeaderTrait, HeaderBehaviour, HeaderEdge, HeaderInk, SECTION_EDGE_TRAIT, SECTION_EDGES, SECTION_SHAPE_TRAIT, SectionShape, MenuTrait, MenuForm, MenuReveal, MenuHover, MenuPhoneForm, MenuButtonKind, localeDirection, pageColumn, pageOpeningScheme, menuDialogAttributes, MenuAttribute, closeWord } from '@vectoriox/iox-ui/design-core';
27
27
  import { map, catchError, skip } from 'rxjs/operators';
28
28
  import * as i1 from '@angular/common/http';
29
29
  import { SAMPLE_PRODUCT, productInScope, simulatedCartTransport, storefrontCatalog, SAMPLE_STUDIO, SAMPLE_CART_LINE, SAMPLE_SWATCHES } from '@vectoriox/iox-ui/commerce-core';
@@ -7486,7 +7486,7 @@ const COMPOSITE_PRESETS = Object.freeze([
7486
7486
  {
7487
7487
  id: CompositePresetId.Lightbox, group: CompositePaletteGroup.Interactive, name: 'Lightbox', icon: 'ph-thin ph-frame-corners',
7488
7488
  description: 'A full-screen dialog with a slider — bind its slider to your gallery\'s source, and each thumbnail opens it at its own image.',
7489
- build: create => buildLightboxRecipe(create),
7489
+ build: (create, lang) => buildLightboxRecipe(create, { lang }),
7490
7490
  },
7491
7491
  {
7492
7492
  id: CompositePresetId.Scene, group: CompositePaletteGroup.Interactive, name: 'Scene', icon: 'ph-thin ph-film-strip',
@@ -13218,7 +13218,7 @@ class BuilderDialogComponent {
13218
13218
  const allowed = ['center', 'top', 'bottom', 'start', 'end'];
13219
13219
  return allowed.indexOf(String(this.placement)) >= 0 ? String(this.placement) : 'center';
13220
13220
  }
13221
- constructor(dragEngine, instanceRegistry, overlayService, cdr, designState, panelEvents, zone) {
13221
+ constructor(dragEngine, instanceRegistry, overlayService, cdr, designState, panelEvents, zone, host) {
13222
13222
  this.dragEngine = dragEngine;
13223
13223
  this.instanceRegistry = instanceRegistry;
13224
13224
  this.overlayService = overlayService;
@@ -13226,6 +13226,7 @@ class BuilderDialogComponent {
13226
13226
  this.designState = designState;
13227
13227
  this.panelEvents = panelEvents;
13228
13228
  this.zone = zone;
13229
+ this.host = host;
13229
13230
  this.children = [];
13230
13231
  this.nodeId = '';
13231
13232
  this.dropListId = '';
@@ -13249,6 +13250,9 @@ class BuilderDialogComponent {
13249
13250
  /** Closed by its X / backdrop while the selection or the switcher still shows it: hidden until either changes. */
13250
13251
  this.dismissed = false;
13251
13252
  }
13253
+ /** The ×'s accessible name in the PAGE's language — the canvas scope's `lang` (`canvasLocale`), the ONE close word
13254
+ * the live Dialog says too (design-core `closeWord` · iox-ui `pageLanguageOf`, iox-ui#169). */
13255
+ get closeName() { return closeWord(pageLanguageOf(this.host?.nativeElement)); }
13252
13256
  /** The canvas runs interactions OUTSIDE Angular's zone; an open / close they cause still has to reach the panels
13253
13257
  * and the toolbar that read the design state (CC1.3: the Phone menu preview, the Menu chip). */
13254
13258
  inZone(fn) {
@@ -13435,7 +13439,7 @@ class BuilderDialogComponent {
13435
13439
  onDrop(event) {
13436
13440
  this.dragEngine.handleDrop(this.children, event, this.dropListId, this.cdr);
13437
13441
  }
13438
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.31", ngImport: i0, type: BuilderDialogComponent, deps: [{ token: DragEngineService }, { token: i2$1.ComponentInstanceRegistryService }, { token: OverlayService }, { token: i0.ChangeDetectorRef }, { token: CanvasDesignStateService, optional: true }, { token: PanelEventService, optional: true }, { token: i0.NgZone, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
13442
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.31", ngImport: i0, type: BuilderDialogComponent, deps: [{ token: DragEngineService }, { token: i2$1.ComponentInstanceRegistryService }, { token: OverlayService }, { token: i0.ChangeDetectorRef }, { token: CanvasDesignStateService, optional: true }, { token: PanelEventService, optional: true }, { token: i0.NgZone, optional: true }, { token: i0.ElementRef, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
13439
13443
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.31", type: BuilderDialogComponent, isStandalone: false, selector: "app-builder-dialog", inputs: { children: "children", nodeId: "nodeId", dropListId: "dropListId", closeOnBackdrop: "closeOnBackdrop", showCloseButton: "showCloseButton", placement: "placement", menuForm: "menuForm", menuReveal: "menuReveal", menuHover: "menuHover", menuPhone: "menuPhone", popupKind: "popupKind", popupForm: "popupForm" }, outputs: { childClick: "childClick", childMouseEnter: "childMouseEnter", childMouseLeave: "childMouseLeave" }, viewQueries: [{ propertyName: "stageRef", first: true, predicate: ["stage"], descendants: true }, { propertyName: "surfaceRef", first: true, predicate: ["surface"], descendants: true }], ngImport: i0, template: `
13440
13444
  <div *ngIf="designOpen" #stage class="dialog-stage" [attr.data-placement]="placementValue"
13441
13445
  [attr.data-popup-form]="popupFormValue"
@@ -13453,7 +13457,7 @@ class BuilderDialogComponent {
13453
13457
  <button *ngIf="showCloseButton"
13454
13458
  type="button"
13455
13459
  class="dialog-close"
13456
- aria-label="Close dialog"
13460
+ [attr.aria-label]="closeName"
13457
13461
  (mousedown)="$event.stopPropagation()"
13458
13462
  (click)="onCloseClick($event)">
13459
13463
  <i class="ph-thin ph-x"></i>
@@ -13494,7 +13498,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.31", ngImpo
13494
13498
  <button *ngIf="showCloseButton"
13495
13499
  type="button"
13496
13500
  class="dialog-close"
13497
- aria-label="Close dialog"
13501
+ [attr.aria-label]="closeName"
13498
13502
  (mousedown)="$event.stopPropagation()"
13499
13503
  (click)="onCloseClick($event)">
13500
13504
  <i class="ph-thin ph-x"></i>
@@ -13521,6 +13525,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.31", ngImpo
13521
13525
  type: Optional
13522
13526
  }] }, { type: i0.NgZone, decorators: [{
13523
13527
  type: Optional
13528
+ }] }, { type: i0.ElementRef, decorators: [{
13529
+ type: Optional
13524
13530
  }] }], propDecorators: { children: [{
13525
13531
  type: Input
13526
13532
  }], nodeId: [{