@vectoriox/iox-builder 9.9.0 → 9.10.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.
- package/fesm2022/vectoriox-iox-builder.mjs +296 -177
- package/fesm2022/vectoriox-iox-builder.mjs.map +1 -1
- package/index.d.ts +46 -5
- package/package.json +2 -2
|
@@ -16,18 +16,20 @@ import { SelectModule } from 'primeng/select';
|
|
|
16
16
|
import { TooltipModule } from 'primeng/tooltip';
|
|
17
17
|
import { DialogModule } from 'primeng/dialog';
|
|
18
18
|
import * as i1$1 from '@vectoriox/iox-ui';
|
|
19
|
-
import { resolveBoundValue, 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, buildPartSelector, planResponsiveRules, resolveStyleProps, targetedStateSelector, stateSelectorSuffix, compileTokenCssBlocks, catalogFontId, fontsForTokens, GOOGLE_FONTS_FILE_ORIGIN, googleFontHref, compileDeclarations, wrapInBreakpointQuery, BreakpointQueryKind, NEW_NODE_STYLE_DEFAULTS, defaultElementStyleFor, applyElementStyle, planDataSource, dataSourcePlanToRequest, normalizeCollectionResult, resolveRepeaterItems, getByPath, computeRelative, ContextStore, ENTRANCE_ACTION_TYPES, EXIT_ACTION_TYPES, ComponentInstanceRegistryService, isActionEnabled, isContextAction, contextActionEffect, resolveContextValue, effectiveActionType, INTERACTION_HIDDEN_ATTRIBUTE, motionAllowed, finalKeyframe, keyframeStyleEntries, buildInteractionKeyframes, declaredInputNames, emptyImagePlaceholder, syncNodeDesignClasses, nodeTraitValue, syncNodeA11yAttributes, nodeA11yAttributes, safeSetInput, colorSchemeOf, composeVirtualTraits, withDefaultHoverTransition, stateNamesIn, partClassName, switchElementStyle, countOverrides, setOverride, breakpointDef, breakpointForWidth, FormRenderState, needsAccessibleName, resolveInputs, setInputOverride, barReserveClass, collectContextSlotKeys, withContextSlots, compilePageStyle, nodeUsesContext, IS_PREVIEW, buttonBlockHref, IoxPageModule, PALETTE_PRESETS, elementStyleById, PART_CLASS_NAMES } from '@vectoriox/iox-ui';
|
|
19
|
+
import { resolveBoundValue, 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, buildPartSelector, planResponsiveRules, resolveStyleProps, targetedStateSelector, stateSelectorSuffix, compileTokenCssBlocks, catalogFontId, fontsForTokens, GOOGLE_FONTS_FILE_ORIGIN, googleFontHref, compileDeclarations, wrapInBreakpointQuery, BreakpointQueryKind, NEW_NODE_STYLE_DEFAULTS, defaultElementStyleFor, applyElementStyle, planDataSource, dataSourcePlanToRequest, normalizeCollectionResult, resolveRepeaterItems, getByPath, computeRelative, ContextStore, ENTRANCE_ACTION_TYPES, EXIT_ACTION_TYPES, ComponentInstanceRegistryService, isActionEnabled, isContextAction, contextActionEffect, resolveContextValue, effectiveActionType, INTERACTION_HIDDEN_ATTRIBUTE, motionAllowed, finalKeyframe, keyframeStyleEntries, buildInteractionKeyframes, declaredInputNames, emptyImagePlaceholder, syncNodeDesignClasses, nodeTraitValue, syncNodeA11yAttributes, nodeA11yAttributes, safeSetInput, colorSchemeOf, composeVirtualTraits, withDefaultHoverTransition, stateNamesIn, partClassName, switchElementStyle, releaseElementStyle, countOverrides, setOverride, breakpointDef, breakpointForWidth, FormRenderState, needsAccessibleName, resolveInputs, setInputOverride, barReserveClass, collectContextSlotKeys, withContextSlots, compilePageStyle, nodeUsesContext, IS_PREVIEW, buttonBlockHref, bootSlider, IoxPageModule, PALETTE_PRESETS, elementStyleById, PART_CLASS_NAMES } from '@vectoriox/iox-ui';
|
|
20
20
|
export { ComponentInstanceRegistryService, VIRTUAL_TRAIT_KEYS, composeVirtualTraits } from '@vectoriox/iox-ui';
|
|
21
|
-
import { StructureEdit, isAccordionPart, isDisclosurePart, structureRefusal, AccordionRole, CompositeBehaviourTrait, ACCORDION_DEFAULT_ONS, onAccordionItemState, isAccordionItemOn, runCompositeItemAction, shouldScrollToItem, DisclosureRole, AccordionRuntime, accordionBehaviour, compositeScopeId, compositeRowKeys, compositeKindOfRole, closestAccordionItem, isCompositeRoot, isAccordionRoot, buildCardRecipe, buildBadge, buildChip, buildAccordionRecipe, buildDisclosureRecipe, CompositeKind, accordionItemLabel, isLockedPart, accordionRootOf, isAccordionFromContent, accordionItemOf, addAccordionItem, isCompositeItem, accordionHeadingLevel, isCompositePanel, isCompositeTrigger } from '@vectoriox/iox-ui/composite-core';
|
|
21
|
+
import { StructureEdit, isAccordionPart, isDisclosurePart, isSliderPart, structureRefusal, AccordionRole, CompositeBehaviourTrait, ACCORDION_DEFAULT_ONS, onAccordionItemState, isAccordionItemOn, runCompositeItemAction, shouldScrollToItem, rowIndexOf as rowIndexOf$1, slideIndexForRow, DisclosureRole, AccordionRuntime, accordionBehaviour, compositeScopeId, compositeRowKeys, compositeKindOfRole, closestAccordionItem, isCompositeRoot, isAccordionRoot, buildCardRecipe, buildBadge, buildChip, buildAccordionRecipe, buildDisclosureRecipe, buildLightboxRecipe, NO_ELEMENT_STYLE, CompositeKind, SliderRole, accordionItemLabel, isLockedPart, accordionRootOf, isAccordionFromContent, accordionItemOf, addAccordionItem, isCompositeItem, accordionHeadingLevel, isCompositePanel, isCompositeTrigger, splitSliderChildren, hasSliderParts } from '@vectoriox/iox-ui/composite-core';
|
|
22
22
|
import { Subject, BehaviorSubject, of, forkJoin } from 'rxjs';
|
|
23
23
|
import interact from 'interactjs';
|
|
24
24
|
import { formContentInHost, isInteractiveHost, findFormContentInHosts } from '@vectoriox/iox-ui/forms-core';
|
|
25
25
|
import { map, catchError } from 'rxjs/operators';
|
|
26
26
|
import * as i1 from '@angular/common/http';
|
|
27
|
-
import { itemActionOf, BEHAVIOUR_ACTION_TYPES, SERVER_ELEMENT_ACTION_TYPES, CONSENT_ACTION_TYPES } from '@vectoriox/iox-ui/actions-core';
|
|
27
|
+
import { itemActionOf, BEHAVIOUR_ACTION_TYPES, SERVER_ELEMENT_ACTION_TYPES, CONSENT_ACTION_TYPES, opensAtClickedItem } from '@vectoriox/iox-ui/actions-core';
|
|
28
28
|
import Lenis from 'lenis';
|
|
29
29
|
import Moveable from 'moveable';
|
|
30
30
|
import Selecto from 'selecto';
|
|
31
|
+
import { planVideo, VideoSource, VIDEO_PROVIDER_LABEL, VideoTrait, VideoMode } from '@vectoriox/iox-ui/media-core';
|
|
32
|
+
import { ConsentCategory } from '@vectoriox/iox-ui/consent-core';
|
|
31
33
|
|
|
32
34
|
var PanelEventTypes;
|
|
33
35
|
(function (PanelEventTypes) {
|
|
@@ -212,6 +214,12 @@ const BUILDER_CHROME_EN = Object.freeze({
|
|
|
212
214
|
'builder.chrome.kindCard': 'Card',
|
|
213
215
|
'builder.chrome.kindAccordion': 'Accordion',
|
|
214
216
|
'builder.chrome.kindDisclosure': 'Disclosure',
|
|
217
|
+
'builder.chrome.kindSlider': 'Slider',
|
|
218
|
+
'builder.chrome.kindVideo': 'Video',
|
|
219
|
+
'builder.chrome.videoPosterOnly': 'poster only',
|
|
220
|
+
'builder.chrome.videoFile': 'Uploaded file',
|
|
221
|
+
'builder.chrome.refuseLockedSliderPartMove': 'This control belongs to its slider — it can’t be moved out.',
|
|
222
|
+
'builder.chrome.refuseLockedSliderPause': 'The pause button stays while Autoplay is on — moving content must be pausable. Turn Autoplay off in the slider’s Bindings to remove it.',
|
|
215
223
|
'builder.chrome.refuseLockedDisclosurePart': 'A disclosure keeps its toggle and its panel. Delete the whole disclosure instead.',
|
|
216
224
|
'builder.chrome.refuseLockedDisclosurePartMove': 'This part belongs to its disclosure — it can’t be moved out.',
|
|
217
225
|
'builder.chrome.refuseLockedItemPart': 'An item keeps its header and its panel. Delete the whole item, or the accordion.',
|
|
@@ -470,6 +478,10 @@ var InsertRefusal;
|
|
|
470
478
|
InsertRefusal["LockedDisclosurePartMove"] = "lockedDisclosurePartMove";
|
|
471
479
|
/** A disclosure's toggle or panel (CC2.1) deleted on its own. */
|
|
472
480
|
InsertRefusal["LockedDisclosurePart"] = "lockedDisclosurePart";
|
|
481
|
+
/** A Slider's control (CC3) works only as its own direct child. */
|
|
482
|
+
InsertRefusal["LockedSliderPartMove"] = "lockedSliderPartMove";
|
|
483
|
+
/** The pause control stays while Autoplay is on (WCAG 2.2.2) — the Autoplay switch removes it. */
|
|
484
|
+
InsertRefusal["LockedSliderPause"] = "lockedSliderPause";
|
|
473
485
|
})(InsertRefusal || (InsertRefusal = {}));
|
|
474
486
|
const FORM_STATE_BLOCK_TYPES = new Set(['FormSuccess', 'FormError']);
|
|
475
487
|
/** The builder-chrome label that says each refusal on screen (English in `BUILDER_CHROME_EN`). */
|
|
@@ -484,6 +496,8 @@ const INSERT_REFUSAL_LABEL_KEYS = Object.freeze({
|
|
|
484
496
|
[InsertRefusal.LastItem]: 'builder.chrome.refuseLastItem',
|
|
485
497
|
[InsertRefusal.LockedDisclosurePartMove]: 'builder.chrome.refuseLockedDisclosurePartMove',
|
|
486
498
|
[InsertRefusal.LockedDisclosurePart]: 'builder.chrome.refuseLockedDisclosurePart',
|
|
499
|
+
[InsertRefusal.LockedSliderPartMove]: 'builder.chrome.refuseLockedSliderPartMove',
|
|
500
|
+
[InsertRefusal.LockedSliderPause]: 'builder.chrome.refuseLockedSliderPause',
|
|
487
501
|
});
|
|
488
502
|
/** Which refusal says a locked part's move / delete, by the composite it belongs to (a card's is the default). */
|
|
489
503
|
function lockedRefusal(node, edit) {
|
|
@@ -492,6 +506,8 @@ function lockedRefusal(node, edit) {
|
|
|
492
506
|
return move ? InsertRefusal.LockedItemPartMove : InsertRefusal.LockedItemPart;
|
|
493
507
|
if (isDisclosurePart(node))
|
|
494
508
|
return move ? InsertRefusal.LockedDisclosurePartMove : InsertRefusal.LockedDisclosurePart;
|
|
509
|
+
if (isSliderPart(node))
|
|
510
|
+
return move ? InsertRefusal.LockedSliderPartMove : InsertRefusal.LockedSliderPause;
|
|
495
511
|
return move ? InsertRefusal.LockedPartMove : InsertRefusal.LockedPart;
|
|
496
512
|
}
|
|
497
513
|
/** The refusal in the host's language (the library's English when no host resolver is provided). */
|
|
@@ -3762,7 +3778,7 @@ class InteractionEngineService {
|
|
|
3762
3778
|
// impossible. The canvas twin registered open/close/toggle under its nodeId, exactly
|
|
3763
3779
|
// the Swiper-method pattern; a missing/mistargeted id is a silent no-op, never a throw.
|
|
3764
3780
|
if (DIALOG_ACTION_TYPES.has(action.type)) {
|
|
3765
|
-
this.executeDialogAction(action);
|
|
3781
|
+
this.executeDialogAction(action, selfEl);
|
|
3766
3782
|
continue;
|
|
3767
3783
|
}
|
|
3768
3784
|
// Item actions (CC2.1 — composite T14): the canvas RUNS them on the target item's own runtime — the
|
|
@@ -3884,13 +3900,17 @@ class InteractionEngineService {
|
|
|
3884
3900
|
const detail = { type: action.type, params: action.params ?? {}, target: action.target };
|
|
3885
3901
|
window.dispatchEvent(new CustomEvent('iox-action-simulated', { detail }));
|
|
3886
3902
|
}
|
|
3887
|
-
executeDialogAction(action) {
|
|
3903
|
+
executeDialogAction(action, selfEl) {
|
|
3888
3904
|
const dialog = action.target && action.target !== 'self' ? this.instanceRegistry.get(action.target) : null;
|
|
3889
3905
|
if (!dialog)
|
|
3890
3906
|
return;
|
|
3891
3907
|
switch (action.type) {
|
|
3892
3908
|
case 'openDialog':
|
|
3893
3909
|
dialog.open?.();
|
|
3910
|
+
// CC3 "Open at the clicked item": the lightbox's slider goes to the clicked row's slide — the same
|
|
3911
|
+
// rule the live site runs (composite-core `slideIndexForRow`), once the canvas twin has rendered it.
|
|
3912
|
+
if (opensAtClickedItem(action))
|
|
3913
|
+
this.slideDialogToRow(action.target, rowIndexOf$1(selfEl));
|
|
3894
3914
|
break;
|
|
3895
3915
|
case 'closeDialog':
|
|
3896
3916
|
dialog.close?.();
|
|
@@ -3900,6 +3920,22 @@ class InteractionEngineService {
|
|
|
3900
3920
|
break;
|
|
3901
3921
|
}
|
|
3902
3922
|
}
|
|
3923
|
+
/** The slider inside the opened dialog (its canvas twin renders on the next passes) → the row's slide. */
|
|
3924
|
+
slideDialogToRow(dialogId, row) {
|
|
3925
|
+
let tries = 0;
|
|
3926
|
+
const attempt = () => {
|
|
3927
|
+
const host = document.querySelector(`.iox-node-${CSS.escape(dialogId)}`);
|
|
3928
|
+
const swiper = host?.querySelector('.swiper')?.swiper;
|
|
3929
|
+
if (swiper?.slides?.length) {
|
|
3930
|
+
swiper.update?.();
|
|
3931
|
+
swiper.slideTo(slideIndexForRow(row, swiper.slides.length), 0);
|
|
3932
|
+
return;
|
|
3933
|
+
}
|
|
3934
|
+
if (++tries < 40)
|
|
3935
|
+
requestAnimationFrame(attempt);
|
|
3936
|
+
};
|
|
3937
|
+
requestAnimationFrame(attempt);
|
|
3938
|
+
}
|
|
3903
3939
|
executeSwiperAction(action) {
|
|
3904
3940
|
// Target is the nodeId of the SliderContainer to control.
|
|
3905
3941
|
const swiper = this.instanceRegistry.get(action.target);
|
|
@@ -4082,8 +4118,14 @@ var SelectionReveal;
|
|
|
4082
4118
|
SelectionReveal["WhileSelected"] = "while-selected";
|
|
4083
4119
|
SelectionReveal["UntilClosed"] = "until-closed";
|
|
4084
4120
|
})(SelectionReveal || (SelectionReveal = {}));
|
|
4121
|
+
/**
|
|
4122
|
+
* Parts hidden at rest that live in a composite's TOGGLE, not in its panel (CC2.1 follow-up, approved 2026-10-21): a
|
|
4123
|
+
* click on one on the canvas toggles the composite live — selecting it never forces the reveal, so "Read less"
|
|
4124
|
+
* closes the disclosure it was clicked in. Only a part inside a PANEL is revealed by the selection.
|
|
4125
|
+
*/
|
|
4126
|
+
const TOGGLE_PART_ROLES = [DisclosureRole.Less];
|
|
4085
4127
|
function selectionRevealOf(node) {
|
|
4086
|
-
if (!isHiddenAtRest(node))
|
|
4128
|
+
if (!isHiddenAtRest(node) || (!!node?.role && TOGGLE_PART_ROLES.includes(node.role)))
|
|
4087
4129
|
return null;
|
|
4088
4130
|
return node?.role ? SelectionReveal.WhileSelected : SelectionReveal.UntilClosed;
|
|
4089
4131
|
}
|
|
@@ -5373,6 +5415,7 @@ var CompositePresetId;
|
|
|
5373
5415
|
CompositePresetId["Chip"] = "chip";
|
|
5374
5416
|
CompositePresetId["Accordion"] = "accordion";
|
|
5375
5417
|
CompositePresetId["Disclosure"] = "disclosure";
|
|
5418
|
+
CompositePresetId["Lightbox"] = "lightbox";
|
|
5376
5419
|
})(CompositePresetId || (CompositePresetId = {}));
|
|
5377
5420
|
/** Where a composite sits in the Components panel (composite plan §6d): content blocks, or the interactive
|
|
5378
5421
|
* composites (the Accordion — CC2, the Disclosure — CC2.1; Tabs and the floating family later). */
|
|
@@ -5407,6 +5450,11 @@ const COMPOSITE_PRESETS = Object.freeze([
|
|
|
5407
5450
|
description: '"Read more" — a button that reveals the text below it and reads "Read less" while it is open.',
|
|
5408
5451
|
build: create => buildDisclosureRecipe(create),
|
|
5409
5452
|
},
|
|
5453
|
+
{
|
|
5454
|
+
id: CompositePresetId.Lightbox, group: CompositePaletteGroup.Interactive, name: 'Lightbox', icon: 'ph-thin ph-frame-corners',
|
|
5455
|
+
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.',
|
|
5456
|
+
build: create => buildLightboxRecipe(create),
|
|
5457
|
+
},
|
|
5410
5458
|
]);
|
|
5411
5459
|
/**
|
|
5412
5460
|
* The builder's node factory for composite-core recipes: a NEW node as the palette creates one
|
|
@@ -5426,6 +5474,11 @@ function builderCompositeFactory(createConfig, baselineStyles) {
|
|
|
5426
5474
|
if (spec.elementStyle && spec.elementStyle !== node.elementStyle) {
|
|
5427
5475
|
switchElementStyle(node, node.elementStyle, spec.elementStyle, baselineStyles(spec.type));
|
|
5428
5476
|
}
|
|
5477
|
+
else if (spec.elementStyle === NO_ELEMENT_STYLE && node.elementStyle) {
|
|
5478
|
+
// NO_ELEMENT_STYLE asks for no style (undefined / null keep the type's default): a migrated slider's bare
|
|
5479
|
+
// chevrons, a lightbox's slide (CC3).
|
|
5480
|
+
releaseElementStyle(node, node.elementStyle, baselineStyles(spec.type));
|
|
5481
|
+
}
|
|
5429
5482
|
if (node.children)
|
|
5430
5483
|
node.children = [];
|
|
5431
5484
|
return node;
|
|
@@ -6858,7 +6911,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.31", ngImpo
|
|
|
6858
6911
|
const SHORT_ROLE_KINDS = new Set([CompositeKind.Accordion, CompositeKind.Disclosure]);
|
|
6859
6912
|
/** A composite kind's glyph (Phosphor, weight-less): the badge, the root's crumb and its tree row carry it
|
|
6860
6913
|
* (board 3: "the composite root carrying its kind icon"). A card keeps the generic stack glyph. */
|
|
6861
|
-
const KIND_GLYPHS = { [CompositeKind.Accordion]: 'ph-rows', [CompositeKind.Disclosure]: 'ph-caret-circle-down' };
|
|
6914
|
+
const KIND_GLYPHS = { [CompositeKind.Accordion]: 'ph-rows', [CompositeKind.Disclosure]: 'ph-caret-circle-down', slider: 'ph-slideshow' };
|
|
6862
6915
|
const DEFAULT_KIND_GLYPH = 'ph-stack';
|
|
6863
6916
|
/** The tree icon of an accordion's structural parts (board 3): rows on the root, a stack on an item and a
|
|
6864
6917
|
* panel, a cursor on the header, a sparkle on the icon. Other parts keep their type's icon. */
|
|
@@ -6874,6 +6927,11 @@ const PART_ICONS = {
|
|
|
6874
6927
|
[DisclosureRole.Trigger]: 'ph-thin ph-cursor',
|
|
6875
6928
|
[DisclosureRole.Panel]: 'ph-thin ph-stack',
|
|
6876
6929
|
[DisclosureRole.Icon]: 'ph-thin ph-sparkle',
|
|
6930
|
+
// CC3 — a Slider's controls (board 6): a cursor on the buttons, six dots on the pagination.
|
|
6931
|
+
[SliderRole.Pause]: 'ph-thin ph-cursor',
|
|
6932
|
+
[SliderRole.Prev]: 'ph-thin ph-cursor',
|
|
6933
|
+
[SliderRole.Next]: 'ph-thin ph-cursor',
|
|
6934
|
+
[SliderRole.Pagination]: 'ph-thin ph-dots-six',
|
|
6877
6935
|
};
|
|
6878
6936
|
/** The glyph of a role's composite kind (`ph-rows` for an accordion and its parts). */
|
|
6879
6937
|
function compositeKindGlyph(role) {
|
|
@@ -6958,7 +7016,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.31", ngImpo
|
|
|
6958
7016
|
const FROM_ROW_KEY = 'builder.chrome.fromRow';
|
|
6959
7017
|
const ADD_ITEM_KEY = 'builder.chrome.addItem';
|
|
6960
7018
|
/** The kind label a composite part's selection badge shows (Card v2: "Card · card.title"). */
|
|
6961
|
-
const COMPOSITE_KIND_KEYS = { card: 'builder.chrome.kindCard', accordion: 'builder.chrome.kindAccordion', disclosure: 'builder.chrome.kindDisclosure' };
|
|
7019
|
+
const COMPOSITE_KIND_KEYS = { card: 'builder.chrome.kindCard', accordion: 'builder.chrome.kindAccordion', disclosure: 'builder.chrome.kindDisclosure', slider: 'builder.chrome.kindSlider' };
|
|
7020
|
+
const VIDEO_TYPE = 'Video';
|
|
7021
|
+
const VIDEO_KIND_KEY = 'builder.chrome.kindVideo';
|
|
7022
|
+
const VIDEO_POSTER_ONLY_KEY = 'builder.chrome.videoPosterOnly';
|
|
7023
|
+
const VIDEO_FILE_KEY = 'builder.chrome.videoFile';
|
|
6962
7024
|
/** The parts that offer "Add item" on the selection toolbar (board 3: the "Add slide" pattern). */
|
|
6963
7025
|
const ADD_ITEM_ROLES = new Set([AccordionRole.Accordion, AccordionRole.Item, AccordionRole.Trigger, AccordionRole.Panel]);
|
|
6964
7026
|
class OverlayComponent {
|
|
@@ -7175,11 +7237,17 @@ class OverlayComponent {
|
|
|
7175
7237
|
}
|
|
7176
7238
|
/** The kind badge's glyph: the composite's kind icon (board 9: "kind icon + 'Accordion · trigger'"). */
|
|
7177
7239
|
get selectedRoleIcon() {
|
|
7240
|
+
if (this.selectEntry?.node?.type === VIDEO_TYPE && !this.selectEntry.node.role)
|
|
7241
|
+
return 'ph-fill ph-film-strip';
|
|
7178
7242
|
return `ph-fill ${compositeKindGlyph(this.selectEntry?.node?.role ?? '')}`;
|
|
7179
7243
|
}
|
|
7180
|
-
/** A composite part's kind + role under the selection (board 3/8 "Selection kind badge"), or null.
|
|
7244
|
+
/** A composite part's kind + role under the selection (board 3/8 "Selection kind badge"), or null. A Video says
|
|
7245
|
+
* where it plays from and that the canvas shows its poster only (board 5: "Video · YouTube · poster only"). */
|
|
7181
7246
|
get selectedRoleBadge() {
|
|
7182
|
-
const
|
|
7247
|
+
const node = this.selectEntry?.node;
|
|
7248
|
+
if (node?.type === VIDEO_TYPE && !node.role)
|
|
7249
|
+
return this.videoBadge(node);
|
|
7250
|
+
const role = node?.role;
|
|
7183
7251
|
if (!role)
|
|
7184
7252
|
return null;
|
|
7185
7253
|
const prefix = role.split('.')[0];
|
|
@@ -7189,6 +7257,13 @@ class OverlayComponent {
|
|
|
7189
7257
|
const row = this.overlayService.selectedRow;
|
|
7190
7258
|
return row ? `${badge} · ${this.builderLabels(FROM_ROW_KEY, BUILDER_CHROME_EN[FROM_ROW_KEY]).replace('{row}', String(row))}` : badge;
|
|
7191
7259
|
}
|
|
7260
|
+
videoBadge(node) {
|
|
7261
|
+
const plan = planVideo(node, null);
|
|
7262
|
+
const where = plan.source === VideoSource.File
|
|
7263
|
+
? this.builderLabels(VIDEO_FILE_KEY, BUILDER_CHROME_EN[VIDEO_FILE_KEY])
|
|
7264
|
+
: VIDEO_PROVIDER_LABEL[plan.source];
|
|
7265
|
+
return `${this.builderLabels(VIDEO_KIND_KEY, BUILDER_CHROME_EN[VIDEO_KIND_KEY])} · ${where} · ${this.builderLabels(VIDEO_POSTER_ONLY_KEY, BUILDER_CHROME_EN[VIDEO_POSTER_ONLY_KEY])}`;
|
|
7266
|
+
}
|
|
7192
7267
|
/** The selection toolbar's name: the part's LAYER name (board 3 — "Header", "Accordion"), else its type. */
|
|
7193
7268
|
get toolbarName() {
|
|
7194
7269
|
return this.selectEntry?.node?.label || this.selectEntry?.componentName || '';
|
|
@@ -10654,7 +10729,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.31", ngImpo
|
|
|
10654
10729
|
type: Output
|
|
10655
10730
|
}] } });
|
|
10656
10731
|
|
|
10732
|
+
/** Swiper's event → the interaction trigger it replays (componentEvents). */
|
|
10733
|
+
const SWIPER_TRIGGER = {
|
|
10734
|
+
slideChange: 'swiperSlideChange', reachBeginning: 'swiperReachBeginning', reachEnd: 'swiperReachEnd',
|
|
10735
|
+
autoplayStart: 'swiperAutoplayStart', autoplayStop: 'swiperAutoplayStop',
|
|
10736
|
+
};
|
|
10657
10737
|
class SliderContainerComponent {
|
|
10738
|
+
/** Every child — the slides AND the control parts (CC3). Split once per change, never in a getter. */
|
|
10739
|
+
set children(value) {
|
|
10740
|
+
this._children = value ?? [];
|
|
10741
|
+
const { lead, slides, trail } = splitSliderChildren(this._children);
|
|
10742
|
+
this.leadParts = lead;
|
|
10743
|
+
this.slides = slides;
|
|
10744
|
+
this.trailParts = trail;
|
|
10745
|
+
this.controlParts = hasSliderParts({ children: this._children });
|
|
10746
|
+
}
|
|
10747
|
+
get children() { return this._children; }
|
|
10748
|
+
/** A saved slider whose controls are not parts yet keeps Swiper-drawn ones. */
|
|
10749
|
+
get legacyControls() { return !this.controlParts; }
|
|
10658
10750
|
set style(v) {
|
|
10659
10751
|
if (v === this._style)
|
|
10660
10752
|
return;
|
|
@@ -10701,7 +10793,14 @@ class SliderContainerComponent {
|
|
|
10701
10793
|
this.dataSourceService = dataSourceService;
|
|
10702
10794
|
this.dsRegistry = dsRegistry;
|
|
10703
10795
|
this.panelEventService = panelEventService;
|
|
10704
|
-
this.
|
|
10796
|
+
this._children = [];
|
|
10797
|
+
/** The slides (into `.swiper-wrapper`); the template slide of a bound slider is `slides[0]`. */
|
|
10798
|
+
this.slides = [];
|
|
10799
|
+
/** Control parts before the first slide / after it — rendered beside the wrapper, inside `.swiper`. */
|
|
10800
|
+
this.leadParts = [];
|
|
10801
|
+
this.trailParts = [];
|
|
10802
|
+
/** The controls are parts: Swiper draws none of its own. */
|
|
10803
|
+
this.controlParts = false;
|
|
10705
10804
|
this._style = {};
|
|
10706
10805
|
this._previewStyle = {};
|
|
10707
10806
|
this._editShellStyle = { position: 'relative' };
|
|
@@ -10852,7 +10951,7 @@ class SliderContainerComponent {
|
|
|
10852
10951
|
});
|
|
10853
10952
|
}
|
|
10854
10953
|
refreshPreviews() {
|
|
10855
|
-
if (!this.items.length || !this.
|
|
10954
|
+
if (!this.items.length || !this.slides.length) {
|
|
10856
10955
|
this.previewSlides = [];
|
|
10857
10956
|
this.cdr.markForCheck();
|
|
10858
10957
|
this._scheduleReinit();
|
|
@@ -10860,16 +10959,16 @@ class SliderContainerComponent {
|
|
|
10860
10959
|
}
|
|
10861
10960
|
this.applyFirstItemToTemplate();
|
|
10862
10961
|
// Each preview slide = one cloned SliderSlide node with item data resolved
|
|
10863
|
-
this.previewSlides = this.items.slice(1).map(item => cloneNodesForItem([this.
|
|
10962
|
+
this.previewSlides = this.items.slice(1).map(item => cloneNodesForItem([this.slides[0]], item)[0]);
|
|
10864
10963
|
this.cdr.markForCheck();
|
|
10865
10964
|
this._scheduleReinit();
|
|
10866
10965
|
}
|
|
10867
10966
|
applyFirstItemToTemplate() {
|
|
10868
10967
|
const item = this.items[0];
|
|
10869
|
-
if (!item || !this.
|
|
10968
|
+
if (!item || !this.slides.length || !this.overlayService)
|
|
10870
10969
|
return;
|
|
10871
10970
|
// Bindings live on leaf nodes inside the template slide, so recurse into the tree
|
|
10872
|
-
this.applyItemToNodes([this.
|
|
10971
|
+
this.applyItemToNodes([this.slides[0]], item);
|
|
10873
10972
|
}
|
|
10874
10973
|
applyItemToNodes(nodes, item) {
|
|
10875
10974
|
for (const node of nodes) {
|
|
@@ -10895,7 +10994,7 @@ class SliderContainerComponent {
|
|
|
10895
10994
|
_isInTemplate(target) {
|
|
10896
10995
|
const search = (nodes) => nodes.some(c => c === target || c.id === target.id ||
|
|
10897
10996
|
(c.children?.length ? search(c.children) : false));
|
|
10898
|
-
return this.
|
|
10997
|
+
return this.slides.length > 0 && search([this.slides[0]]);
|
|
10899
10998
|
}
|
|
10900
10999
|
_scheduleReinit() {
|
|
10901
11000
|
this._destroySwiper();
|
|
@@ -10908,123 +11007,31 @@ class SliderContainerComponent {
|
|
|
10908
11007
|
const el = this.isPreview ? this.swiperEl?.nativeElement : this.editSwiperEl?.nativeElement;
|
|
10909
11008
|
if (!el)
|
|
10910
11009
|
return;
|
|
10911
|
-
|
|
10912
|
-
|
|
10913
|
-
|
|
10914
|
-
|
|
10915
|
-
|
|
10916
|
-
|
|
10917
|
-
|
|
10918
|
-
|
|
10919
|
-
|
|
10920
|
-
|
|
10921
|
-
if (this.enableScrollbar)
|
|
10922
|
-
modules.push(Scrollbar);
|
|
10923
|
-
const config = {
|
|
10924
|
-
modules,
|
|
10925
|
-
direction: this.direction,
|
|
10926
|
-
slidesPerView: this.slidesPerView,
|
|
10927
|
-
slidesPerGroup: this.slidesPerGroup > 1 ? this.slidesPerGroup : 1,
|
|
10928
|
-
spaceBetween: this.spaceBetween,
|
|
10929
|
-
speed: this.isPreview ? this.speed : 300,
|
|
10930
|
-
// Always slide effect in edit mode — fade/cube etc. hide all but active slide
|
|
10931
|
-
effect: this.isPreview ? this.effect : 'slide',
|
|
10932
|
-
centeredSlides: this.centeredSlides,
|
|
10933
|
-
initialSlide: this.initialSlide,
|
|
10934
|
-
autoHeight: this.autoHeight,
|
|
10935
|
-
};
|
|
10936
|
-
if (this.isPreview) {
|
|
10937
|
-
// Full interactive config for preview
|
|
10938
|
-
config['grabCursor'] = this.grabCursor;
|
|
10939
|
-
config['slideToClickedSlide'] = this.slideToClickedSlide;
|
|
10940
|
-
config['loop'] = this.loop === 'loop';
|
|
10941
|
-
config['rewind'] = this.loop === 'rewind';
|
|
10942
|
-
if (this.freeMode) {
|
|
10943
|
-
modules.push(FreeMode);
|
|
10944
|
-
config['freeMode'] = true;
|
|
10945
|
-
}
|
|
10946
|
-
if (this.enableAutoplay) {
|
|
10947
|
-
modules.push(Autoplay);
|
|
10948
|
-
}
|
|
10949
|
-
if (this.enableKeyboard) {
|
|
10950
|
-
modules.push(Keyboard);
|
|
10951
|
-
}
|
|
10952
|
-
if (this.enableMousewheel) {
|
|
10953
|
-
modules.push(Mousewheel);
|
|
10954
|
-
}
|
|
10955
|
-
if (this.enableZoom) {
|
|
10956
|
-
modules.push(Zoom);
|
|
10957
|
-
}
|
|
10958
|
-
if (this.enableGrid) {
|
|
10959
|
-
modules.push(Grid);
|
|
10960
|
-
}
|
|
10961
|
-
if (this.enableParallax) {
|
|
10962
|
-
modules.push(Parallax);
|
|
10963
|
-
}
|
|
10964
|
-
const effectMap = {
|
|
10965
|
-
fade: EffectFade, cube: EffectCube, flip: EffectFlip,
|
|
10966
|
-
coverflow: EffectCoverflow, cards: EffectCards, creative: EffectCreative,
|
|
10967
|
-
};
|
|
10968
|
-
if (this.effect !== 'slide' && effectMap[this.effect]) {
|
|
10969
|
-
modules.push(effectMap[this.effect]);
|
|
10970
|
-
}
|
|
10971
|
-
if (this.enableNavigation) {
|
|
10972
|
-
config['navigation'] = { prevEl: '.swiper-button-prev', nextEl: '.swiper-button-next' };
|
|
10973
|
-
}
|
|
10974
|
-
if (this.enablePagination) {
|
|
10975
|
-
config['pagination'] = {
|
|
10976
|
-
el: '.swiper-pagination',
|
|
10977
|
-
type: this.paginationType,
|
|
10978
|
-
clickable: this.paginationClickable,
|
|
10979
|
-
dynamicBullets: this.paginationDynamicBullets,
|
|
10980
|
-
};
|
|
10981
|
-
}
|
|
10982
|
-
if (this.enableScrollbar)
|
|
10983
|
-
config['scrollbar'] = { el: '.swiper-scrollbar', draggable: true };
|
|
10984
|
-
if (this.enableAutoplay) {
|
|
10985
|
-
config['autoplay'] = {
|
|
10986
|
-
delay: this.autoplayDelay,
|
|
10987
|
-
pauseOnMouseEnter: this.autoplayPauseOnMouseEnter,
|
|
10988
|
-
disableOnInteraction: this.autoplayDisableOnInteraction,
|
|
10989
|
-
};
|
|
10990
|
-
}
|
|
10991
|
-
if (this.enableGrid && this.gridRows > 1)
|
|
10992
|
-
config['grid'] = { rows: this.gridRows };
|
|
10993
|
-
if (this.breakpoints) {
|
|
10994
|
-
try {
|
|
10995
|
-
config['breakpoints'] = JSON.parse(this.breakpoints);
|
|
10996
|
-
}
|
|
10997
|
-
catch { /* ignore */ }
|
|
10998
|
-
}
|
|
10999
|
-
config['on'] = {
|
|
11000
|
-
slideChange: (swiper) => this._onSwiperEvent('swiperSlideChange', swiper),
|
|
11001
|
-
reachBeginning: (swiper) => this._onSwiperEvent('swiperReachBeginning', swiper),
|
|
11002
|
-
reachEnd: (swiper) => this._onSwiperEvent('swiperReachEnd', swiper),
|
|
11003
|
-
autoplayStart: (swiper) => this._onSwiperEvent('swiperAutoplayStart', swiper),
|
|
11004
|
-
autoplayStop: (swiper) => this._onSwiperEvent('swiperAutoplayStop', swiper),
|
|
11005
|
-
};
|
|
11006
|
-
}
|
|
11007
|
-
else {
|
|
11008
|
-
// Edit mode: disable touch/swipe so builder click handlers work normally
|
|
11009
|
-
config['allowTouchMove'] = false;
|
|
11010
|
-
config['simulateTouch'] = false;
|
|
11011
|
-
if (this.enableNavigation) {
|
|
11012
|
-
config['navigation'] = { prevEl: '.swiper-button-prev', nextEl: '.swiper-button-next' };
|
|
11013
|
-
}
|
|
11014
|
-
if (this.enablePagination) {
|
|
11015
|
-
config['pagination'] = {
|
|
11016
|
-
el: '.swiper-pagination',
|
|
11017
|
-
type: this.paginationType,
|
|
11018
|
-
clickable: this.paginationClickable,
|
|
11019
|
-
dynamicBullets: this.paginationDynamicBullets,
|
|
11020
|
-
};
|
|
11021
|
-
}
|
|
11022
|
-
if (this.enableScrollbar)
|
|
11023
|
-
config['scrollbar'] = { el: '.swiper-scrollbar', draggable: false };
|
|
11024
|
-
}
|
|
11025
|
-
this._swiper = new Swiper(el, config);
|
|
11010
|
+
// The ONE Swiper decision (iox-ui `bootSlider` → `planSwiperOptions`): the EDIT canvas is tamed (no touch,
|
|
11011
|
+
// loop or autoplay; the parts still navigate); Preview is the live site's — the A11y module, the pause
|
|
11012
|
+
// control, the live region (CC3; Preview used to build its own config and skipped A11y).
|
|
11013
|
+
const swiper = await bootSlider(el, this.swiperInputs(), {
|
|
11014
|
+
edit: !this.isPreview,
|
|
11015
|
+
onEvent: this.isPreview ? (event, sw) => this._onSwiperEvent(SWIPER_TRIGGER[event] ?? event, sw) : undefined,
|
|
11016
|
+
});
|
|
11017
|
+
if (!swiper)
|
|
11018
|
+
return;
|
|
11019
|
+
this._swiper = swiper;
|
|
11026
11020
|
this.instanceRegistry.register(this.nodeId, this._swiper);
|
|
11027
11021
|
}
|
|
11022
|
+
swiperInputs() {
|
|
11023
|
+
return {
|
|
11024
|
+
dir: this.dir, direction: this.direction, loop: this.loop, slidesPerView: this.slidesPerView, slidesPerGroup: this.slidesPerGroup,
|
|
11025
|
+
spaceBetween: this.spaceBetween, speed: this.speed, effect: this.effect, grabCursor: this.grabCursor, centeredSlides: this.centeredSlides,
|
|
11026
|
+
initialSlide: this.initialSlide, autoHeight: this.autoHeight, slideToClickedSlide: this.slideToClickedSlide, freeMode: this.freeMode,
|
|
11027
|
+
enableNavigation: this.enableNavigation, enablePagination: this.enablePagination, enableScrollbar: this.enableScrollbar,
|
|
11028
|
+
enableAutoplay: this.enableAutoplay, enableKeyboard: this.enableKeyboard, enableMousewheel: this.enableMousewheel,
|
|
11029
|
+
enableZoom: this.enableZoom, enableGrid: this.enableGrid, enableParallax: this.enableParallax, autoplayDelay: this.autoplayDelay,
|
|
11030
|
+
autoplayPauseOnMouseEnter: this.autoplayPauseOnMouseEnter, autoplayDisableOnInteraction: this.autoplayDisableOnInteraction,
|
|
11031
|
+
paginationType: this.paginationType, paginationClickable: this.paginationClickable, paginationDynamicBullets: this.paginationDynamicBullets,
|
|
11032
|
+
gridRows: this.gridRows, breakpoints: this.breakpoints,
|
|
11033
|
+
};
|
|
11034
|
+
}
|
|
11028
11035
|
_destroySwiper() {
|
|
11029
11036
|
if (this._swiper) {
|
|
11030
11037
|
this._swiper.destroy(true, true);
|
|
@@ -11037,7 +11044,7 @@ class SliderContainerComponent {
|
|
|
11037
11044
|
if (eventName === 'swiperSlideChange') {
|
|
11038
11045
|
const prevIdx = swiper.previousIndex;
|
|
11039
11046
|
const activeIdx = swiper.activeIndex;
|
|
11040
|
-
const allSlides = this._source ? [this.
|
|
11047
|
+
const allSlides = this._source ? [this.slides[0], ...this.previewSlides] : this.slides;
|
|
11041
11048
|
if (prevIdx !== undefined && allSlides[prevIdx]) {
|
|
11042
11049
|
this.interactionEngine.replayTrigger(allSlides[prevIdx].id, 'swiperSlideInactive');
|
|
11043
11050
|
}
|
|
@@ -11067,11 +11074,17 @@ class SliderContainerComponent {
|
|
|
11067
11074
|
</div>
|
|
11068
11075
|
|
|
11069
11076
|
<div #editSwiperEl class="swiper swiper-edit" [attr.dir]="dir" [style.direction]="dir">
|
|
11077
|
+
<!-- CC3: the control PARTS (Pause, Previous, Next, Pagination) render inside .swiper, beside the
|
|
11078
|
+
wrapper (never in it — slider.md); selectable and styled on their own (R2). -->
|
|
11079
|
+
<ng-container *ngFor="let part of leadParts; trackBy: trackByNodeId">
|
|
11080
|
+
<ng-container [ioxRender]="part" (onClick)="childClick.emit($event)"
|
|
11081
|
+
(onMouseEnter)="childMouseEnter.emit($event)" (onMouseLeave)="childMouseLeave.emit()"></ng-container>
|
|
11082
|
+
</ng-container>
|
|
11070
11083
|
<div class="swiper-wrapper">
|
|
11071
11084
|
|
|
11072
|
-
<!-- NORMAL MODE: all
|
|
11085
|
+
<!-- NORMAL MODE: all slides draggable -->
|
|
11073
11086
|
<ng-container *ngIf="!source">
|
|
11074
|
-
<div *ngFor="let child of
|
|
11087
|
+
<div *ngFor="let child of slides; trackBy: trackByNodeId"
|
|
11075
11088
|
class="swiper-slide"
|
|
11076
11089
|
[ngClass]="['iox-outer-' + (child.styleId ?? child.id)]"
|
|
11077
11090
|
ioxDraggable
|
|
@@ -11089,22 +11102,24 @@ class SliderContainerComponent {
|
|
|
11089
11102
|
<!-- REPEAT MODE: template slide (item 0) + dimmed preview slides (items 1..N) -->
|
|
11090
11103
|
<ng-container *ngIf="source">
|
|
11091
11104
|
<!-- Template slide — draggable/editable, receives item[0] data -->
|
|
11092
|
-
<div *ngIf="
|
|
11105
|
+
<div *ngIf="slides.length"
|
|
11093
11106
|
class="swiper-slide"
|
|
11094
|
-
[ngClass]="['iox-outer-' + (
|
|
11107
|
+
[ngClass]="['iox-outer-' + (slides[0].styleId ?? slides[0].id)]"
|
|
11108
|
+
[attr.data-iox-row-idx]="0"
|
|
11095
11109
|
ioxDraggable
|
|
11096
|
-
[ioxDragData]="
|
|
11110
|
+
[ioxDragData]="slides[0]"
|
|
11097
11111
|
[ioxDragSourceId]="dropListId">
|
|
11098
11112
|
<ng-container
|
|
11099
|
-
[ioxRender]="
|
|
11113
|
+
[ioxRender]="slides[0]"
|
|
11100
11114
|
(onClick)="childClick.emit($event)"
|
|
11101
11115
|
(onMouseEnter)="childMouseEnter.emit($event)"
|
|
11102
11116
|
(onMouseLeave)="childMouseLeave.emit()">
|
|
11103
11117
|
</ng-container>
|
|
11104
11118
|
</div>
|
|
11105
11119
|
<!-- Preview slides — dimmed, non-interactive, data resolved from items 1..N -->
|
|
11106
|
-
<div *ngFor="let slide of previewSlides; trackBy: trackByNodeId"
|
|
11120
|
+
<div *ngFor="let slide of previewSlides; let i = index; trackBy: trackByNodeId"
|
|
11107
11121
|
class="swiper-slide slider-preview-slide"
|
|
11122
|
+
[attr.data-iox-row-idx]="i + 1"
|
|
11108
11123
|
[ngClass]="['iox-outer-' + (slide.styleId ?? slide.id)]">
|
|
11109
11124
|
<ng-container
|
|
11110
11125
|
[ioxRender]="slide"
|
|
@@ -11116,23 +11131,28 @@ class SliderContainerComponent {
|
|
|
11116
11131
|
</ng-container>
|
|
11117
11132
|
|
|
11118
11133
|
</div>
|
|
11134
|
+
<ng-container *ngFor="let part of trailParts; trackBy: trackByNodeId">
|
|
11135
|
+
<ng-container [ioxRender]="part" (onClick)="childClick.emit($event)"
|
|
11136
|
+
(onMouseEnter)="childMouseEnter.emit($event)" (onMouseLeave)="childMouseLeave.emit()"></ng-container>
|
|
11137
|
+
</ng-container>
|
|
11119
11138
|
|
|
11120
|
-
<div *ngIf="!source && !
|
|
11139
|
+
<div *ngIf="!source && !slides.length" class="slider-edit-placeholder" data-iox-chrome>
|
|
11121
11140
|
<i class="ph-thin ph-sliders-horizontal"></i>
|
|
11122
11141
|
<span>Click + in toolbar to add a slide</span>
|
|
11123
11142
|
</div>
|
|
11124
11143
|
|
|
11125
|
-
<div *ngIf="enablePagination" class="swiper-pagination"></div>
|
|
11144
|
+
<div *ngIf="legacyControls && enablePagination" class="swiper-pagination"></div>
|
|
11126
11145
|
<div *ngIf="enableScrollbar" class="swiper-scrollbar"></div>
|
|
11127
11146
|
</div>
|
|
11128
11147
|
|
|
11129
|
-
<!--
|
|
11130
|
-
and top:50%+transform always centers on the real slide height
|
|
11131
|
-
|
|
11148
|
+
<!-- Legacy (Swiper-drawn) nav buttons live on the shell, not inside .swiper, so overflow:hidden never
|
|
11149
|
+
clips them and top:50%+transform always centers on the real slide height. A slider whose controls
|
|
11150
|
+
are PARTS (CC3) draws none: the parts are the controls. -->
|
|
11151
|
+
<button *ngIf="legacyControls && enableNavigation" class="slider-edit-nav slider-edit-nav--prev" data-iox-chrome
|
|
11132
11152
|
(click)="_swiper?.slidePrev()" type="button" title="Previous slide">
|
|
11133
11153
|
<i class="ph-thin ph-caret-left"></i>
|
|
11134
11154
|
</button>
|
|
11135
|
-
<button *ngIf="enableNavigation" class="slider-edit-nav slider-edit-nav--next" data-iox-chrome
|
|
11155
|
+
<button *ngIf="legacyControls && enableNavigation" class="slider-edit-nav slider-edit-nav--next" data-iox-chrome
|
|
11136
11156
|
(click)="_swiper?.slideNext()" type="button" title="Next slide">
|
|
11137
11157
|
<i class="ph-thin ph-caret-right"></i>
|
|
11138
11158
|
</button>
|
|
@@ -11149,12 +11169,16 @@ class SliderContainerComponent {
|
|
|
11149
11169
|
[style.--swiper-navigation-color]="navigationColor || null"
|
|
11150
11170
|
[style.--swiper-navigation-size.px]="navigationSize || null"
|
|
11151
11171
|
[style.--swiper-pagination-color]="paginationColor || null">
|
|
11172
|
+
<ng-container *ngFor="let part of leadParts; trackBy: trackByNodeId">
|
|
11173
|
+
<ng-container [ioxRender]="part" (onClick)="childClick.emit($event)"
|
|
11174
|
+
(onMouseEnter)="childMouseEnter.emit($event)" (onMouseLeave)="childMouseLeave.emit()"></ng-container>
|
|
11175
|
+
</ng-container>
|
|
11152
11176
|
<div class="swiper-wrapper">
|
|
11153
11177
|
<!-- Swiper requires .swiper-slide as a DIRECT child of .swiper-wrapper.
|
|
11154
11178
|
Wrap each rendered slide in one (same structure as edit mode) so the
|
|
11155
11179
|
app-slider-slide host sits INSIDE the slide, not between it and the wrapper. -->
|
|
11156
11180
|
<ng-container *ngIf="!source">
|
|
11157
|
-
<div *ngFor="let child of
|
|
11181
|
+
<div *ngFor="let child of slides; trackBy: trackByNodeId"
|
|
11158
11182
|
class="swiper-slide"
|
|
11159
11183
|
[ngClass]="['iox-outer-' + (child.styleId ?? child.id)]">
|
|
11160
11184
|
<ng-container
|
|
@@ -11165,20 +11189,22 @@ class SliderContainerComponent {
|
|
|
11165
11189
|
</ng-container>
|
|
11166
11190
|
</div>
|
|
11167
11191
|
</ng-container>
|
|
11168
|
-
<!-- REPEAT: template slide + preview slides -->
|
|
11192
|
+
<!-- REPEAT: template slide + preview slides; each is a row (a lightbox opens at the clicked one) -->
|
|
11169
11193
|
<ng-container *ngIf="source">
|
|
11170
|
-
<div *ngIf="
|
|
11194
|
+
<div *ngIf="slides.length"
|
|
11171
11195
|
class="swiper-slide"
|
|
11172
|
-
[
|
|
11196
|
+
[attr.data-iox-row-idx]="0"
|
|
11197
|
+
[ngClass]="['iox-outer-' + (slides[0].styleId ?? slides[0].id)]">
|
|
11173
11198
|
<ng-container
|
|
11174
|
-
[ioxRender]="
|
|
11199
|
+
[ioxRender]="slides[0]"
|
|
11175
11200
|
(onClick)="childClick.emit($event)"
|
|
11176
11201
|
(onMouseEnter)="childMouseEnter.emit($event)"
|
|
11177
11202
|
(onMouseLeave)="childMouseLeave.emit()">
|
|
11178
11203
|
</ng-container>
|
|
11179
11204
|
</div>
|
|
11180
|
-
<div *ngFor="let slide of previewSlides; trackBy: trackByNodeId"
|
|
11205
|
+
<div *ngFor="let slide of previewSlides; let i = index; trackBy: trackByNodeId"
|
|
11181
11206
|
class="swiper-slide"
|
|
11207
|
+
[attr.data-iox-row-idx]="i + 1"
|
|
11182
11208
|
[ngClass]="['iox-outer-' + (slide.styleId ?? slide.id)]">
|
|
11183
11209
|
<ng-container
|
|
11184
11210
|
[ioxRender]="slide"
|
|
@@ -11189,9 +11215,13 @@ class SliderContainerComponent {
|
|
|
11189
11215
|
</div>
|
|
11190
11216
|
</ng-container>
|
|
11191
11217
|
</div>
|
|
11192
|
-
<
|
|
11193
|
-
|
|
11194
|
-
|
|
11218
|
+
<ng-container *ngFor="let part of trailParts; trackBy: trackByNodeId">
|
|
11219
|
+
<ng-container [ioxRender]="part" (onClick)="childClick.emit($event)"
|
|
11220
|
+
(onMouseEnter)="childMouseEnter.emit($event)" (onMouseLeave)="childMouseLeave.emit()"></ng-container>
|
|
11221
|
+
</ng-container>
|
|
11222
|
+
<div *ngIf="legacyControls && enableNavigation" class="swiper-button-prev"></div>
|
|
11223
|
+
<div *ngIf="legacyControls && enableNavigation" class="swiper-button-next"></div>
|
|
11224
|
+
<div *ngIf="legacyControls && enablePagination" class="swiper-pagination"></div>
|
|
11195
11225
|
<div *ngIf="enableScrollbar" class="swiper-scrollbar"></div>
|
|
11196
11226
|
</div>
|
|
11197
11227
|
`, isInline: true, styles: [":host{display:block}.swiper-wrapper{height:auto}.slider-edit-shell{position:relative;display:block}.swiper-edit{width:100%}.swiper-edit .swiper-slide{position:relative}.slider-edit-nav{position:absolute;top:50%;transform:translateY(-50%);width:32px;height:32px;border-radius:50%;border:1px solid rgba(255,255,255,.5);background:#00000038;color:#fff;font-size:16px;display:flex;align-items:center;justify-content:center;cursor:pointer;z-index:10;transition:background .15s}.slider-edit-nav:hover{background:#00000073}.slider-edit-nav--prev{left:8px}.slider-edit-nav--next{right:8px}.slider-edit-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}.slider-edit-placeholder i{font-size:22px}.slider-repeat-badge{position:absolute;top:0;left:0;z-index:10;display:flex;align-items:center;gap:.4rem;padding:4px 8px;font-size:11px;color:#cb9090;background:#cb909014;border:1px solid rgba(203,144,144,.5);border-radius:0 0 4px;opacity:0;transition:opacity .15s;-webkit-user-select:none;user-select:none;pointer-events:none}.slider-edit-shell:hover .slider-repeat-badge{opacity:1}.slider-repeat-badge-count{font-weight:600}.slider-badge-spin{animation:slider-badge-spin 1s linear infinite}@keyframes slider-badge-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.slider-preview-slide{opacity:.55;pointer-events:none}\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", "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"] }] }); }
|
|
@@ -11218,11 +11248,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.31", ngImpo
|
|
|
11218
11248
|
</div>
|
|
11219
11249
|
|
|
11220
11250
|
<div #editSwiperEl class="swiper swiper-edit" [attr.dir]="dir" [style.direction]="dir">
|
|
11251
|
+
<!-- CC3: the control PARTS (Pause, Previous, Next, Pagination) render inside .swiper, beside the
|
|
11252
|
+
wrapper (never in it — slider.md); selectable and styled on their own (R2). -->
|
|
11253
|
+
<ng-container *ngFor="let part of leadParts; trackBy: trackByNodeId">
|
|
11254
|
+
<ng-container [ioxRender]="part" (onClick)="childClick.emit($event)"
|
|
11255
|
+
(onMouseEnter)="childMouseEnter.emit($event)" (onMouseLeave)="childMouseLeave.emit()"></ng-container>
|
|
11256
|
+
</ng-container>
|
|
11221
11257
|
<div class="swiper-wrapper">
|
|
11222
11258
|
|
|
11223
|
-
<!-- NORMAL MODE: all
|
|
11259
|
+
<!-- NORMAL MODE: all slides draggable -->
|
|
11224
11260
|
<ng-container *ngIf="!source">
|
|
11225
|
-
<div *ngFor="let child of
|
|
11261
|
+
<div *ngFor="let child of slides; trackBy: trackByNodeId"
|
|
11226
11262
|
class="swiper-slide"
|
|
11227
11263
|
[ngClass]="['iox-outer-' + (child.styleId ?? child.id)]"
|
|
11228
11264
|
ioxDraggable
|
|
@@ -11240,22 +11276,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.31", ngImpo
|
|
|
11240
11276
|
<!-- REPEAT MODE: template slide (item 0) + dimmed preview slides (items 1..N) -->
|
|
11241
11277
|
<ng-container *ngIf="source">
|
|
11242
11278
|
<!-- Template slide — draggable/editable, receives item[0] data -->
|
|
11243
|
-
<div *ngIf="
|
|
11279
|
+
<div *ngIf="slides.length"
|
|
11244
11280
|
class="swiper-slide"
|
|
11245
|
-
[ngClass]="['iox-outer-' + (
|
|
11281
|
+
[ngClass]="['iox-outer-' + (slides[0].styleId ?? slides[0].id)]"
|
|
11282
|
+
[attr.data-iox-row-idx]="0"
|
|
11246
11283
|
ioxDraggable
|
|
11247
|
-
[ioxDragData]="
|
|
11284
|
+
[ioxDragData]="slides[0]"
|
|
11248
11285
|
[ioxDragSourceId]="dropListId">
|
|
11249
11286
|
<ng-container
|
|
11250
|
-
[ioxRender]="
|
|
11287
|
+
[ioxRender]="slides[0]"
|
|
11251
11288
|
(onClick)="childClick.emit($event)"
|
|
11252
11289
|
(onMouseEnter)="childMouseEnter.emit($event)"
|
|
11253
11290
|
(onMouseLeave)="childMouseLeave.emit()">
|
|
11254
11291
|
</ng-container>
|
|
11255
11292
|
</div>
|
|
11256
11293
|
<!-- Preview slides — dimmed, non-interactive, data resolved from items 1..N -->
|
|
11257
|
-
<div *ngFor="let slide of previewSlides; trackBy: trackByNodeId"
|
|
11294
|
+
<div *ngFor="let slide of previewSlides; let i = index; trackBy: trackByNodeId"
|
|
11258
11295
|
class="swiper-slide slider-preview-slide"
|
|
11296
|
+
[attr.data-iox-row-idx]="i + 1"
|
|
11259
11297
|
[ngClass]="['iox-outer-' + (slide.styleId ?? slide.id)]">
|
|
11260
11298
|
<ng-container
|
|
11261
11299
|
[ioxRender]="slide"
|
|
@@ -11267,23 +11305,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.31", ngImpo
|
|
|
11267
11305
|
</ng-container>
|
|
11268
11306
|
|
|
11269
11307
|
</div>
|
|
11308
|
+
<ng-container *ngFor="let part of trailParts; trackBy: trackByNodeId">
|
|
11309
|
+
<ng-container [ioxRender]="part" (onClick)="childClick.emit($event)"
|
|
11310
|
+
(onMouseEnter)="childMouseEnter.emit($event)" (onMouseLeave)="childMouseLeave.emit()"></ng-container>
|
|
11311
|
+
</ng-container>
|
|
11270
11312
|
|
|
11271
|
-
<div *ngIf="!source && !
|
|
11313
|
+
<div *ngIf="!source && !slides.length" class="slider-edit-placeholder" data-iox-chrome>
|
|
11272
11314
|
<i class="ph-thin ph-sliders-horizontal"></i>
|
|
11273
11315
|
<span>Click + in toolbar to add a slide</span>
|
|
11274
11316
|
</div>
|
|
11275
11317
|
|
|
11276
|
-
<div *ngIf="enablePagination" class="swiper-pagination"></div>
|
|
11318
|
+
<div *ngIf="legacyControls && enablePagination" class="swiper-pagination"></div>
|
|
11277
11319
|
<div *ngIf="enableScrollbar" class="swiper-scrollbar"></div>
|
|
11278
11320
|
</div>
|
|
11279
11321
|
|
|
11280
|
-
<!--
|
|
11281
|
-
and top:50%+transform always centers on the real slide height
|
|
11282
|
-
|
|
11322
|
+
<!-- Legacy (Swiper-drawn) nav buttons live on the shell, not inside .swiper, so overflow:hidden never
|
|
11323
|
+
clips them and top:50%+transform always centers on the real slide height. A slider whose controls
|
|
11324
|
+
are PARTS (CC3) draws none: the parts are the controls. -->
|
|
11325
|
+
<button *ngIf="legacyControls && enableNavigation" class="slider-edit-nav slider-edit-nav--prev" data-iox-chrome
|
|
11283
11326
|
(click)="_swiper?.slidePrev()" type="button" title="Previous slide">
|
|
11284
11327
|
<i class="ph-thin ph-caret-left"></i>
|
|
11285
11328
|
</button>
|
|
11286
|
-
<button *ngIf="enableNavigation" class="slider-edit-nav slider-edit-nav--next" data-iox-chrome
|
|
11329
|
+
<button *ngIf="legacyControls && enableNavigation" class="slider-edit-nav slider-edit-nav--next" data-iox-chrome
|
|
11287
11330
|
(click)="_swiper?.slideNext()" type="button" title="Next slide">
|
|
11288
11331
|
<i class="ph-thin ph-caret-right"></i>
|
|
11289
11332
|
</button>
|
|
@@ -11300,12 +11343,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.31", ngImpo
|
|
|
11300
11343
|
[style.--swiper-navigation-color]="navigationColor || null"
|
|
11301
11344
|
[style.--swiper-navigation-size.px]="navigationSize || null"
|
|
11302
11345
|
[style.--swiper-pagination-color]="paginationColor || null">
|
|
11346
|
+
<ng-container *ngFor="let part of leadParts; trackBy: trackByNodeId">
|
|
11347
|
+
<ng-container [ioxRender]="part" (onClick)="childClick.emit($event)"
|
|
11348
|
+
(onMouseEnter)="childMouseEnter.emit($event)" (onMouseLeave)="childMouseLeave.emit()"></ng-container>
|
|
11349
|
+
</ng-container>
|
|
11303
11350
|
<div class="swiper-wrapper">
|
|
11304
11351
|
<!-- Swiper requires .swiper-slide as a DIRECT child of .swiper-wrapper.
|
|
11305
11352
|
Wrap each rendered slide in one (same structure as edit mode) so the
|
|
11306
11353
|
app-slider-slide host sits INSIDE the slide, not between it and the wrapper. -->
|
|
11307
11354
|
<ng-container *ngIf="!source">
|
|
11308
|
-
<div *ngFor="let child of
|
|
11355
|
+
<div *ngFor="let child of slides; trackBy: trackByNodeId"
|
|
11309
11356
|
class="swiper-slide"
|
|
11310
11357
|
[ngClass]="['iox-outer-' + (child.styleId ?? child.id)]">
|
|
11311
11358
|
<ng-container
|
|
@@ -11316,20 +11363,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.31", ngImpo
|
|
|
11316
11363
|
</ng-container>
|
|
11317
11364
|
</div>
|
|
11318
11365
|
</ng-container>
|
|
11319
|
-
<!-- REPEAT: template slide + preview slides -->
|
|
11366
|
+
<!-- REPEAT: template slide + preview slides; each is a row (a lightbox opens at the clicked one) -->
|
|
11320
11367
|
<ng-container *ngIf="source">
|
|
11321
|
-
<div *ngIf="
|
|
11368
|
+
<div *ngIf="slides.length"
|
|
11322
11369
|
class="swiper-slide"
|
|
11323
|
-
[
|
|
11370
|
+
[attr.data-iox-row-idx]="0"
|
|
11371
|
+
[ngClass]="['iox-outer-' + (slides[0].styleId ?? slides[0].id)]">
|
|
11324
11372
|
<ng-container
|
|
11325
|
-
[ioxRender]="
|
|
11373
|
+
[ioxRender]="slides[0]"
|
|
11326
11374
|
(onClick)="childClick.emit($event)"
|
|
11327
11375
|
(onMouseEnter)="childMouseEnter.emit($event)"
|
|
11328
11376
|
(onMouseLeave)="childMouseLeave.emit()">
|
|
11329
11377
|
</ng-container>
|
|
11330
11378
|
</div>
|
|
11331
|
-
<div *ngFor="let slide of previewSlides; trackBy: trackByNodeId"
|
|
11379
|
+
<div *ngFor="let slide of previewSlides; let i = index; trackBy: trackByNodeId"
|
|
11332
11380
|
class="swiper-slide"
|
|
11381
|
+
[attr.data-iox-row-idx]="i + 1"
|
|
11333
11382
|
[ngClass]="['iox-outer-' + (slide.styleId ?? slide.id)]">
|
|
11334
11383
|
<ng-container
|
|
11335
11384
|
[ioxRender]="slide"
|
|
@@ -11340,9 +11389,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.31", ngImpo
|
|
|
11340
11389
|
</div>
|
|
11341
11390
|
</ng-container>
|
|
11342
11391
|
</div>
|
|
11343
|
-
<
|
|
11344
|
-
|
|
11345
|
-
|
|
11392
|
+
<ng-container *ngFor="let part of trailParts; trackBy: trackByNodeId">
|
|
11393
|
+
<ng-container [ioxRender]="part" (onClick)="childClick.emit($event)"
|
|
11394
|
+
(onMouseEnter)="childMouseEnter.emit($event)" (onMouseLeave)="childMouseLeave.emit()"></ng-container>
|
|
11395
|
+
</ng-container>
|
|
11396
|
+
<div *ngIf="legacyControls && enableNavigation" class="swiper-button-prev"></div>
|
|
11397
|
+
<div *ngIf="legacyControls && enableNavigation" class="swiper-button-next"></div>
|
|
11398
|
+
<div *ngIf="legacyControls && enablePagination" class="swiper-pagination"></div>
|
|
11346
11399
|
<div *ngIf="enableScrollbar" class="swiper-scrollbar"></div>
|
|
11347
11400
|
</div>
|
|
11348
11401
|
`, standalone: false, styles: [":host{display:block}.swiper-wrapper{height:auto}.slider-edit-shell{position:relative;display:block}.swiper-edit{width:100%}.swiper-edit .swiper-slide{position:relative}.slider-edit-nav{position:absolute;top:50%;transform:translateY(-50%);width:32px;height:32px;border-radius:50%;border:1px solid rgba(255,255,255,.5);background:#00000038;color:#fff;font-size:16px;display:flex;align-items:center;justify-content:center;cursor:pointer;z-index:10;transition:background .15s}.slider-edit-nav:hover{background:#00000073}.slider-edit-nav--prev{left:8px}.slider-edit-nav--next{right:8px}.slider-edit-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}.slider-edit-placeholder i{font-size:22px}.slider-repeat-badge{position:absolute;top:0;left:0;z-index:10;display:flex;align-items:center;gap:.4rem;padding:4px 8px;font-size:11px;color:#cb9090;background:#cb909014;border:1px solid rgba(203,144,144,.5);border-radius:0 0 4px;opacity:0;transition:opacity .15s;-webkit-user-select:none;user-select:none;pointer-events:none}.slider-edit-shell:hover .slider-repeat-badge{opacity:1}.slider-repeat-badge-count{font-weight:600}.slider-badge-spin{animation:slider-badge-spin 1s linear infinite}@keyframes slider-badge-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.slider-preview-slide{opacity:.55;pointer-events:none}\n"] }]
|
|
@@ -12501,6 +12554,7 @@ class DialogComponentConfig extends ComponentConfig {
|
|
|
12501
12554
|
showCloseButton: 'checkbox',
|
|
12502
12555
|
consentRole: 'checkbox',
|
|
12503
12556
|
closeAbove: 'select',
|
|
12557
|
+
colorScheme: 'select',
|
|
12504
12558
|
ariaLabel: 'text',
|
|
12505
12559
|
};
|
|
12506
12560
|
this.traits = [
|
|
@@ -12513,6 +12567,8 @@ class DialogComponentConfig extends ComponentConfig {
|
|
|
12513
12567
|
new TraitConfig('consentRole', 'Consent banner role', TraitInputType.Checkbox, undefined, false),
|
|
12514
12568
|
...buildDialogCloseAboveTraits(),
|
|
12515
12569
|
...buildAccessibleNameTraits(),
|
|
12570
|
+
// CC3 (board 6): a dialog may wear a section colour scheme — the Lightbox is Inverse.
|
|
12571
|
+
buildColorSchemeTrait(),
|
|
12516
12572
|
];
|
|
12517
12573
|
this.styleTraits = buildFullStyleTraits();
|
|
12518
12574
|
this.applyStyleDefaults({
|
|
@@ -12707,6 +12763,64 @@ class GalleryConfig extends ComponentConfig {
|
|
|
12707
12763
|
}
|
|
12708
12764
|
}
|
|
12709
12765
|
|
|
12766
|
+
/**
|
|
12767
|
+
* Video (CC3 — complex-components plan §7b, board 5): a LEAF. The RENDER component is the shared `iox-video`
|
|
12768
|
+
* (`IoxVideoComponent` in @vectoriox/iox-ui) — the canvas shows its poster only; Preview and the live site run the
|
|
12769
|
+
* media-core runtime (the YouTube / Vimeo facade behind consent, the background video's pause button).
|
|
12770
|
+
*
|
|
12771
|
+
* Bindings ▸ Media · Behaviour · Accessibility · Privacy (boards 5 and 9). The address and the poster are bindable (a
|
|
12772
|
+
* project's video field) and work inside a Repeater. Background mode and autoplay act on an uploaded file; a YouTube
|
|
12773
|
+
* or Vimeo video is always the facade (D5) and plays on a click, after consent — the panel says so.
|
|
12774
|
+
*/
|
|
12775
|
+
class VideoConfig extends ComponentConfig {
|
|
12776
|
+
constructor() {
|
|
12777
|
+
super('Video', 'iox-video', 'ph-thin ph-film-strip', 'Media');
|
|
12778
|
+
const embed = { trait: VideoTrait.Source, values: [VideoSource.YouTube, VideoSource.Vimeo] };
|
|
12779
|
+
const file = { trait: VideoTrait.Source, values: VideoSource.File };
|
|
12780
|
+
this.traits = [
|
|
12781
|
+
// ── Media ─────────────────────────────────────────────────────
|
|
12782
|
+
new TraitConfig('__mediaLabel', 'Media', TraitInputType.SectionLabel),
|
|
12783
|
+
new TraitConfig(VideoTrait.Source, 'Source', TraitInputType.Select, [
|
|
12784
|
+
{ label: 'YouTube', value: VideoSource.YouTube },
|
|
12785
|
+
{ label: 'Vimeo', value: VideoSource.Vimeo },
|
|
12786
|
+
{ label: 'Uploaded file', value: VideoSource.File },
|
|
12787
|
+
], VideoSource.YouTube),
|
|
12788
|
+
new TraitConfig(VideoTrait.Src, 'Video address', TraitInputType.Media, { mode: 'compact' }, ''),
|
|
12789
|
+
new TraitConfig(VideoTrait.Poster, 'Poster', TraitInputType.Media, { mode: 'compact' }, ''),
|
|
12790
|
+
// ── Behaviour ─────────────────────────────────────────────────
|
|
12791
|
+
new TraitConfig('__behaviourLabel', 'Behaviour', TraitInputType.SectionLabel),
|
|
12792
|
+
new TraitConfig(VideoTrait.Mode, 'Mode', TraitInputType.Select, [
|
|
12793
|
+
{ label: 'Inline · with controls', value: VideoMode.Inline },
|
|
12794
|
+
{ label: 'Background · muted loop', value: VideoMode.Background },
|
|
12795
|
+
], VideoMode.Inline),
|
|
12796
|
+
new TraitConfig(VideoTrait.Autoplay, 'Autoplay (muted)', TraitInputType.Checkbox, undefined, false),
|
|
12797
|
+
// ── Accessibility ─────────────────────────────────────────────
|
|
12798
|
+
new TraitConfig('__accessibilityLabel', 'Accessibility', TraitInputType.SectionLabel),
|
|
12799
|
+
new TraitConfig(VideoTrait.Title, 'Title (names the play button)', TraitInputType.Text, undefined, ''),
|
|
12800
|
+
new TraitConfig(VideoTrait.Captions, 'Captions (.vtt)', TraitInputType.Media, { mode: 'compact' }, '', undefined, file),
|
|
12801
|
+
new TraitConfig(VideoTrait.CaptionsLang, 'Captions language', TraitInputType.Text, undefined, 'en', undefined, file),
|
|
12802
|
+
// ── Privacy ───────────────────────────────────────────────────
|
|
12803
|
+
new TraitConfig('__privacyLabel', 'Privacy', TraitInputType.SectionLabel),
|
|
12804
|
+
new TraitConfig(VideoTrait.Consent, 'Consent', TraitInputType.Select, [
|
|
12805
|
+
{ label: 'Marketing', value: ConsentCategory.Marketing },
|
|
12806
|
+
], ConsentCategory.Marketing, undefined, embed),
|
|
12807
|
+
];
|
|
12808
|
+
// A media frame: size, spacing, border (radius), effects (the `media` style's transition and hover scale).
|
|
12809
|
+
this.styleTraits = [
|
|
12810
|
+
new PositionGroupStyleConfig(),
|
|
12811
|
+
new SizeGroupStyleConfig(),
|
|
12812
|
+
new SpacingGroupStyleConfig(),
|
|
12813
|
+
new BorderGroupStyleConfig(),
|
|
12814
|
+
new EffectsGroupStyleConfig(),
|
|
12815
|
+
];
|
|
12816
|
+
// A 16 / 9 frame that fills its column — the size the poster and the player take.
|
|
12817
|
+
this.applyStyleDefaults({
|
|
12818
|
+
width: '100%',
|
|
12819
|
+
aspectRatio: '16 / 9',
|
|
12820
|
+
});
|
|
12821
|
+
}
|
|
12822
|
+
}
|
|
12823
|
+
|
|
12710
12824
|
/**
|
|
12711
12825
|
* Field's styleable sub-elements (board 7 — "the failure design"), for the Style panel's picker.
|
|
12712
12826
|
* Class names come from the SHARED `PART_CLASS_NAMES` (`@vectoriox/iox-ui`) — the same map the
|
|
@@ -13329,6 +13443,11 @@ class SliderContainerConfig extends ComponentConfig {
|
|
|
13329
13443
|
// ── Responsive ────────────────────────────────────────────────────
|
|
13330
13444
|
new TraitConfig('__responsiveLabel', 'Responsive', TraitInputType.SectionLabel),
|
|
13331
13445
|
new TraitConfig('breakpoints', 'Breakpoints (JSON)', TraitInputType.Textarea, undefined, ''),
|
|
13446
|
+
// ── Accessibility (CC3, board 6) ──────────────────────────────────
|
|
13447
|
+
// The carousel's name: a named carousel is a `region` landmark ("What clients say"). The pause control
|
|
13448
|
+
// is a part added while Autoplay is on (WCAG 2.2.2) — the panel says so under this group.
|
|
13449
|
+
new TraitConfig('__accessibilityLabel', 'Accessibility', TraitInputType.SectionLabel),
|
|
13450
|
+
new TraitConfig(A11yTrait.AccessibleName, 'Carousel name', TraitInputType.Text, undefined, ''),
|
|
13332
13451
|
];
|
|
13333
13452
|
this.styleTraits = [
|
|
13334
13453
|
new PositionGroupStyleConfig(),
|
|
@@ -13362,5 +13481,5 @@ class BuilderSpacerComponentConfig extends ComponentConfig {
|
|
|
13362
13481
|
* Generated bundle index. Do not edit.
|
|
13363
13482
|
*/
|
|
13364
13483
|
|
|
13365
|
-
export { ACTION_TYPE_OPTIONS, AuditCode, AuditPanelComponent, AuditSeverity, BODY_CRUMB_LABEL, BOUND_ICON, BREAKPOINT_PRESENTATION, BUILDER_CANVAS_CONTAINER, BUILDER_CHROME_EN, BUILDER_FONT_LINK_ATTR, BUILDER_TOKEN_SCOPE_CLASS, BackgroundGroupStyleConfig, BorderGroupStyleConfig, BreadcrumbBarComponent, BuilderButtonBlockComponent, BuilderButtonComponentConfig, BuilderClipboardService, BuilderComponent, BuilderContainerComponent, BuilderContainerComponentConfig, BuilderDataSourceService, BuilderDialogComponent, BuilderDividerComponentConfig, BuilderHeadingComponentConfig, BuilderHistoryService, BuilderIconComponentConfig, BuilderImageComponentConfig, BuilderLinkComponentConfig, BuilderLinkedContainerComponent, BuilderLinkedContainerConfig, BuilderListComponentConfig, BuilderListItemComponentConfig, BuilderMode, BuilderRepeaterComponent, BuilderSpacerComponentConfig, ButtonBlockComponentConfig, CANVAS_EMPTY_IMAGE_LABEL_EN, CANVAS_EMPTY_IMAGE_LABEL_KEY, CANVAS_ROOT_RESET_CSS, COMPOSITE_PRESETS, CanvasDesignStateService, CanvasShowState, CardComponentConfig, ChildLayoutGroupStyleConfig, ComponentConfig, ComponentRegistryService, CompositeCanvasService, CompositePaletteGroup, CompositePresetId, DEFAULT_ESSENTIAL_TRAITS, DESCRIPTOR_MAX_LENGTH, DRAG_HANDLE_ATTR, DROP_REFUSED_CLASS, DataSourceRegistryService, DataSourceType, DialogComponentConfig, DimensionsGroupStyleConfig, DragEngineService, EASING_OPTIONS$1 as EASING_OPTIONS, EDITOR_CHROME_ATTRIBUTE, ESSENTIAL_TRAITS_BY_TYPE, EffectsGroupStyleConfig, FIELD_KIND_PRESETS, FIELD_PARTS, FORM_STATE_BLOCK_TYPES, FORM_TYPE, FieldComponentConfig, FieldGroupComponentConfig, FormComponentConfig, FormErrorComponentConfig, FormStateService, FormSuccessComponentConfig, GLOBALS_AFTER_CLASS, GalleryConfig, GlobalCanvasLayer, GroupStyleConfig, HIDDEN_AT_REST_LABEL_KEY, HIDDEN_AT_REST_ROLES, HIDDEN_AT_REST_TYPES, INSERT_REFUSAL_LABEL_KEYS, INTERACTION_STATES, INVERSE_ACTION, IOX_BUILDER_CANVAS, IOX_BUILDER_LABELS, IOX_CONTENT_TYPE_LABELS, IOX_DATA_SOURCE_ENDPOINTS, InsertRefusal, InteractionEngineService, InteractionPresetRegistryService, IoxBuilderModule, IoxDraggableDirective, IoxDropzoneDirective, LAYOUT_PRESETS, LayerTreeComponent, LayoutGroupStyleConfig, ListGroupStyleConfig, NodeAction, OverlayComponent, OverlayService, PALETTE_PRESET_DEFS, PanelChildComponent, PanelComponent, PanelEventService, PanelEventTypes, PanelTypes, PositionGroupStyleConfig, PresetRegistryService, RELATIONAL_STATES, RELATIONAL_STATE_BASE, REPEATER_SOURCE_PROP, REPEATER_TYPE, ROOT_ESCAPE_PX, ROUTE_ANIMATION_OPTIONS, RenderDirective, RepeaterComponentConfig, RootZone, SCREEN_WIDTH_OPTIONS, STRUCTURAL_STATES, SUPPORTED_STATES, SectionComponent, SectionComponentConfig, SelectionReveal, SizeGroupStyleConfig, SliderContainerComponent, SliderContainerConfig, SliderSlideComponent, SliderSlideConfig, SpacingGroupStyleConfig, StructureFix, StyleCategory, StyleRegistryService, TraitConfig as StyleTraitConfig, SubmitButtonComponentConfig, SymbolRegistryService, TARGETED_STATES, TARGETED_STATE_BASE, TRIGGER_OPTIONS, TextBlockComponentConfig, ToolbarAction, ToolbarComponent, TraitConfig, TraitInputType, TypographyGroupStyleConfig, UNITS_ALL, UNITS_DEG, UNITS_FIXED, UNITS_NO_VW, VALIDATION_STATES, VALIDATION_STATE_CLASS, ViewportService, ZOOM_OPTIONS, arrayItemSchemaFields, arraySchemaFields, auditNodes, bindingLabel, bindingLabels, buildCompositePreset, buildConsentPreset, buildElementStyleSpecimen, buildFieldKindPreset, buildFlavorSpecimen, buildFormPreset, buildFullStyleTraits, buildLayoutPreset, buildPalettePreset, buildPresetStyleTraits, builderCompositeFactory, canFluidise, canvasEmptyImageLabel, collapseColumnsProps, columnCountOf, defaultBuilderLabels, defaultPageSettings, dropChildren, dropTargetLabel, escapesRoot, essentialTraitsFor, findNodeLocation, findParentOf, flattenLayerTree, flattenSchemaFields, fluidiseProps, generateNodeId, globalCanvasLayer, insertRefusal, insertRefusalLabel, isHiddenAt, isHiddenAtRest, isPinnedGlobal, isSpecimen, markSpecimen, matchesControlSearch, nearestFormNode, nodeAncestorPath, nodeAncestorPathInEither, nodeDescriptor, nodeStyleMap, overlayGlobals, pathToNode, refreshSubtree, regenerateNodeIds, removalRefusal, reorderProps, repeaterSourceAlias, repeaterSubLabel, resolveInsertTarget, resolveTraitControllerType, resolveTraitOptions, retypeNode, rootEscapeBand, rootZone, selectionRevealOf, setStyleTrait, setTrait, shortDescriptor, sourceContentType, sourceTypeLabel, stackChildrenProps, summarise, syncEmptyImagePlaceholder, syncNodeDesign, syncNodeInputs, textNode, upsertNodeStyles, visibilityProps, walkNodes, wrapNode };
|
|
13484
|
+
export { ACTION_TYPE_OPTIONS, AuditCode, AuditPanelComponent, AuditSeverity, BODY_CRUMB_LABEL, BOUND_ICON, BREAKPOINT_PRESENTATION, BUILDER_CANVAS_CONTAINER, BUILDER_CHROME_EN, BUILDER_FONT_LINK_ATTR, BUILDER_TOKEN_SCOPE_CLASS, BackgroundGroupStyleConfig, BorderGroupStyleConfig, BreadcrumbBarComponent, BuilderButtonBlockComponent, BuilderButtonComponentConfig, BuilderClipboardService, BuilderComponent, BuilderContainerComponent, BuilderContainerComponentConfig, BuilderDataSourceService, BuilderDialogComponent, BuilderDividerComponentConfig, BuilderHeadingComponentConfig, BuilderHistoryService, BuilderIconComponentConfig, BuilderImageComponentConfig, BuilderLinkComponentConfig, BuilderLinkedContainerComponent, BuilderLinkedContainerConfig, BuilderListComponentConfig, BuilderListItemComponentConfig, BuilderMode, BuilderRepeaterComponent, BuilderSpacerComponentConfig, ButtonBlockComponentConfig, CANVAS_EMPTY_IMAGE_LABEL_EN, CANVAS_EMPTY_IMAGE_LABEL_KEY, CANVAS_ROOT_RESET_CSS, COMPOSITE_PRESETS, CanvasDesignStateService, CanvasShowState, CardComponentConfig, ChildLayoutGroupStyleConfig, ComponentConfig, ComponentRegistryService, CompositeCanvasService, CompositePaletteGroup, CompositePresetId, DEFAULT_ESSENTIAL_TRAITS, DESCRIPTOR_MAX_LENGTH, DRAG_HANDLE_ATTR, DROP_REFUSED_CLASS, DataSourceRegistryService, DataSourceType, DialogComponentConfig, DimensionsGroupStyleConfig, DragEngineService, EASING_OPTIONS$1 as EASING_OPTIONS, EDITOR_CHROME_ATTRIBUTE, ESSENTIAL_TRAITS_BY_TYPE, EffectsGroupStyleConfig, FIELD_KIND_PRESETS, FIELD_PARTS, FORM_STATE_BLOCK_TYPES, FORM_TYPE, FieldComponentConfig, FieldGroupComponentConfig, FormComponentConfig, FormErrorComponentConfig, FormStateService, FormSuccessComponentConfig, GLOBALS_AFTER_CLASS, GalleryConfig, GlobalCanvasLayer, GroupStyleConfig, HIDDEN_AT_REST_LABEL_KEY, HIDDEN_AT_REST_ROLES, HIDDEN_AT_REST_TYPES, INSERT_REFUSAL_LABEL_KEYS, INTERACTION_STATES, INVERSE_ACTION, IOX_BUILDER_CANVAS, IOX_BUILDER_LABELS, IOX_CONTENT_TYPE_LABELS, IOX_DATA_SOURCE_ENDPOINTS, InsertRefusal, InteractionEngineService, InteractionPresetRegistryService, IoxBuilderModule, IoxDraggableDirective, IoxDropzoneDirective, LAYOUT_PRESETS, LayerTreeComponent, LayoutGroupStyleConfig, ListGroupStyleConfig, NodeAction, OverlayComponent, OverlayService, PALETTE_PRESET_DEFS, PanelChildComponent, PanelComponent, PanelEventService, PanelEventTypes, PanelTypes, PositionGroupStyleConfig, PresetRegistryService, RELATIONAL_STATES, RELATIONAL_STATE_BASE, REPEATER_SOURCE_PROP, REPEATER_TYPE, ROOT_ESCAPE_PX, ROUTE_ANIMATION_OPTIONS, RenderDirective, RepeaterComponentConfig, RootZone, SCREEN_WIDTH_OPTIONS, STRUCTURAL_STATES, SUPPORTED_STATES, SectionComponent, SectionComponentConfig, SelectionReveal, SizeGroupStyleConfig, SliderContainerComponent, SliderContainerConfig, SliderSlideComponent, SliderSlideConfig, SpacingGroupStyleConfig, StructureFix, StyleCategory, StyleRegistryService, TraitConfig as StyleTraitConfig, SubmitButtonComponentConfig, SymbolRegistryService, TARGETED_STATES, TARGETED_STATE_BASE, TOGGLE_PART_ROLES, TRIGGER_OPTIONS, TextBlockComponentConfig, ToolbarAction, ToolbarComponent, TraitConfig, TraitInputType, TypographyGroupStyleConfig, UNITS_ALL, UNITS_DEG, UNITS_FIXED, UNITS_NO_VW, VALIDATION_STATES, VALIDATION_STATE_CLASS, VideoConfig, ViewportService, ZOOM_OPTIONS, arrayItemSchemaFields, arraySchemaFields, auditNodes, bindingLabel, bindingLabels, buildCompositePreset, buildConsentPreset, buildElementStyleSpecimen, buildFieldKindPreset, buildFlavorSpecimen, buildFormPreset, buildFullStyleTraits, buildLayoutPreset, buildPalettePreset, buildPresetStyleTraits, builderCompositeFactory, canFluidise, canvasEmptyImageLabel, collapseColumnsProps, columnCountOf, defaultBuilderLabels, defaultPageSettings, dropChildren, dropTargetLabel, escapesRoot, essentialTraitsFor, findNodeLocation, findParentOf, flattenLayerTree, flattenSchemaFields, fluidiseProps, generateNodeId, globalCanvasLayer, insertRefusal, insertRefusalLabel, isHiddenAt, isHiddenAtRest, isPinnedGlobal, isSpecimen, markSpecimen, matchesControlSearch, nearestFormNode, nodeAncestorPath, nodeAncestorPathInEither, nodeDescriptor, nodeStyleMap, overlayGlobals, pathToNode, refreshSubtree, regenerateNodeIds, removalRefusal, reorderProps, repeaterSourceAlias, repeaterSubLabel, resolveInsertTarget, resolveTraitControllerType, resolveTraitOptions, retypeNode, rootEscapeBand, rootZone, selectionRevealOf, setStyleTrait, setTrait, shortDescriptor, sourceContentType, sourceTypeLabel, stackChildrenProps, summarise, syncEmptyImagePlaceholder, syncNodeDesign, syncNodeInputs, textNode, upsertNodeStyles, visibilityProps, walkNodes, wrapNode };
|
|
13366
13485
|
//# sourceMappingURL=vectoriox-iox-builder.mjs.map
|