@vectoriox/iox-ui 4.39.0 → 4.41.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-ui.mjs +83 -1
- package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
- package/index.d.ts +71 -2
- package/package.json +1 -1
|
@@ -5162,6 +5162,88 @@ function buildTargetedStateSelector(scopeCssId, triggerCssId, styledCssId, base)
|
|
|
5162
5162
|
return `iox-node-${scopeCssId}:has(.iox-node-${triggerCssId}:${base}) .iox-node-${styledCssId}`;
|
|
5163
5163
|
}
|
|
5164
5164
|
|
|
5165
|
+
/**
|
|
5166
|
+
* parts — the failure design (forms-and-inputs-plan.md Part 2, board 7). A compound component
|
|
5167
|
+
* like Field is not one styleable surface: its label, control, help text, error message and
|
|
5168
|
+
* required mark are each their own descendant, addressed by a stable class the component itself
|
|
5169
|
+
* renders (`IoxFieldComponent`'s `iox-field__label`/`__control`/`__help`/`__error`/`__required`).
|
|
5170
|
+
*
|
|
5171
|
+
* Lives in @vectoriox/iox-ui because BOTH renderers depend on iox-ui (the engine does not depend
|
|
5172
|
+
* on iox-builder) — same reason `buildTargetedStateSelector` lives here. No new compiler: this
|
|
5173
|
+
* builds a selector STRING, then the existing `compile()`/`compileDeclarations()` path renders it
|
|
5174
|
+
* exactly like any other rule.
|
|
5175
|
+
*/
|
|
5176
|
+
/**
|
|
5177
|
+
* The selector BODY (no leading `.`, matching the builder's `compile()` convention) for a node,
|
|
5178
|
+
* optionally scoped to one of its parts, optionally further scoped to a validation state.
|
|
5179
|
+
*
|
|
5180
|
+
* buildPartSelector('abc') -> 'iox-node-abc'
|
|
5181
|
+
* buildPartSelector('abc', 'iox-field__error') -> 'iox-node-abc .iox-field__error'
|
|
5182
|
+
* buildPartSelector('abc', undefined, 'iox-invalid') -> 'iox-node-abc.iox-invalid'
|
|
5183
|
+
* buildPartSelector('abc', 'iox-field__error', 'iox-invalid')
|
|
5184
|
+
* -> 'iox-node-abc.iox-invalid .iox-field__error'
|
|
5185
|
+
*
|
|
5186
|
+
* The validation class always attaches to the NODE itself (that's where `IoxFieldComponent` sets
|
|
5187
|
+
* `.iox-invalid`/`.iox-valid`), never to the part — a part has no host class of its own to hang a
|
|
5188
|
+
* compound selector off.
|
|
5189
|
+
*/
|
|
5190
|
+
function buildPartSelector(nodeId, partClass, validationClass) {
|
|
5191
|
+
const base = validationClass ? `iox-node-${nodeId}.${validationClass}` : `iox-node-${nodeId}`;
|
|
5192
|
+
return partClass ? `${base} .${partClass}` : base;
|
|
5193
|
+
}
|
|
5194
|
+
|
|
5195
|
+
/**
|
|
5196
|
+
* page-style — the ONE compiler that turns a page's style settings into CSS.
|
|
5197
|
+
*
|
|
5198
|
+
* A page's background / typography is authored once (builder Page panel) and has to render
|
|
5199
|
+
* in BOTH renderers: the builder canvas frame and the SSR engine's `<body>`. Before this
|
|
5200
|
+
* existed the engine applied it with hand-written `body.style.x = …` assignments buried in
|
|
5201
|
+
* the FONT LOADER, and the builder applied nothing at all — so every background an author
|
|
5202
|
+
* set was invisible until the site was published. See
|
|
5203
|
+
* iox-ai-guidance `architecture/builder/render-parity.md`.
|
|
5204
|
+
*
|
|
5205
|
+
* Pure and transport-agnostic on purpose: it returns CSS declarations and nothing else.
|
|
5206
|
+
* Each consumer applies them its own way (engine → `document.body`, builder → the canvas
|
|
5207
|
+
* viewport element). Kebab-case keys so the result works with both `el.style.setProperty`
|
|
5208
|
+
* and Angular's `[ngStyle]`.
|
|
5209
|
+
*/
|
|
5210
|
+
/** Background fallback when a gradient/image type is selected but its value is empty. */
|
|
5211
|
+
const EMPTY_BACKGROUND = '#fff';
|
|
5212
|
+
/**
|
|
5213
|
+
* Compile page style settings into CSS declarations.
|
|
5214
|
+
*
|
|
5215
|
+
* Only keys the author actually set are emitted, so a consumer's own default (the builder's
|
|
5216
|
+
* white canvas, the engine's stylesheet) shows through untouched when a page says nothing.
|
|
5217
|
+
*
|
|
5218
|
+
* `backgroundType` selects which background field wins — it is derived from the author's
|
|
5219
|
+
* colour/image choice rather than picked directly (see the builder's page-background.util).
|
|
5220
|
+
*/
|
|
5221
|
+
function compilePageStyle(style) {
|
|
5222
|
+
if (!style)
|
|
5223
|
+
return {};
|
|
5224
|
+
const css = {};
|
|
5225
|
+
if (style.fontFamily)
|
|
5226
|
+
css['font-family'] = style.fontFamily;
|
|
5227
|
+
if (style.textColor)
|
|
5228
|
+
css['color'] = style.textColor;
|
|
5229
|
+
switch (style.backgroundType) {
|
|
5230
|
+
case 'gradient':
|
|
5231
|
+
css['background'] = style.backgroundGradient || EMPTY_BACKGROUND;
|
|
5232
|
+
break;
|
|
5233
|
+
case 'image':
|
|
5234
|
+
css['background'] = style.backgroundImage
|
|
5235
|
+
? `url(${style.backgroundImage}) center/cover no-repeat`
|
|
5236
|
+
: EMPTY_BACKGROUND;
|
|
5237
|
+
break;
|
|
5238
|
+
default:
|
|
5239
|
+
// 'solid' and legacy pages with no type at all.
|
|
5240
|
+
if (style.backgroundColor)
|
|
5241
|
+
css['background-color'] = style.backgroundColor;
|
|
5242
|
+
break;
|
|
5243
|
+
}
|
|
5244
|
+
return css;
|
|
5245
|
+
}
|
|
5246
|
+
|
|
5165
5247
|
/**
|
|
5166
5248
|
* Shared RELATIVE (route-context) data resolving — the SINGLE source of truth for how a detail page
|
|
5167
5249
|
* derives values FROM its current route item, consumed by BOTH the page builder (iox-cms-client) and
|
|
@@ -6947,5 +7029,5 @@ function effectiveTransitionId(anim) {
|
|
|
6947
7029
|
* Generated bundle index. Do not edit.
|
|
6948
7030
|
*/
|
|
6949
7031
|
|
|
6950
|
-
export { AOSService, AnalyticsService, BREAKPOINTS, Breakpoint, BreakpointQueryKind, BuilderButtonComponent, BuilderDividerComponent, BuilderHeadingComponent, BuilderIconComponent, BuilderImageComponent, BuilderLinkComponent, BuilderSpacerComponent, ButtonBlockComponent, CMSClientInfraModule, CONTEXT_ACTION_TYPES, CardComponent, ClientGalleryComponent, ClientListComponent, ClientListItemComponent, ClientRepeaterComponent, ClientSliderContainerComponent, ClientSliderSlideComponent, ComponentInstanceRegistryService, ConsentService, ContainerComponent, ContentService, ContextStore, DEFAULT_GALLERY_SCHEDULER, DEFAULT_PAGE_TRANSITION, DEFAULT_PAGE_TRANSITION_DURATION, DEFAULT_PAGE_TRANSITION_EASING, DEFAULT_PAGE_TRANSITION_PERSPECTIVE, DEFAULT_PHOSPHOR_WEIGHT, DEFAULT_WIDTH_BY_TYPE, DeclarationContext, ENVIRONMENT, FormRenderState, FormRuntimeService, GALLERY_EFFECTS, GALLERY_EFFECT_DESCRIPTORS, GalleryLoop, IOX_BUILDER_EVENTS, IOX_FORM_MESSAGES, IOX_FORM_NAVIGATOR, IOX_FORM_TRANSPORT, IS_PREVIEW, IoxAnimateContainer, IoxAosDirective, IoxAosModule, IoxBuilderComponentsModule, IoxComponentRegistryService, IoxFieldComponent, IoxFormComponent, IoxFormErrorComponent, IoxFormSuccessComponent, IoxPageComponent, IoxPageModule, IoxSubmitButtonComponent, IoxUiModule, LinkedContainerComponent, PAGE_TRANSITION_CATEGORIES, PAGE_TRANSITION_PRESETS, PIPE_DESCRIPTORS, PIPE_REGISTRY, PageScrollProvider, PrivacyModalComponent, PrivacyModalService, PrivacyModelEvent, RESERVED_ALIAS_PREFIX, SUPPRESSED_STYLE_PROPS_BY_TYPE, SWIPER_RESPONSIVE_TRAITS, SectionComponent, TRANSITION_FEELS, TextBlockComponent, VIRTUAL_TRAIT_GROUPS, VIRTUAL_TRAIT_KEYS, ViewPositionDirective, ViewPositionModule, WebSettingsService, activeActions, applyBindingPipes, applyFeel, breakpointDef, breakpointForWidth, breakpointQueryFor, buildDataSourceFilter, buildRelatedFilter, buildSwiperBreakpoints, buildTargetedStateSelector, buildTransitionTimeline, cascadeChain, clearInputOverride, clearOverride, collectContextSlotKeys, collectReferencedAliases, compileDeclarations, composeVirtualTraits, computeRelative, contextActionEffect, contextSlotKeys, countOverrides, dataSourcePlanToRequest, declaredInputNames, defaultMessageResolver, deriveSeoFromContent, describeSeoFields, effectiveTransitionId, excludeSelf, feelFor, getByPath, getSeoValue, initialSlotValues, isActionEnabled, isContextAction, isInputOverriddenAt, isOverriddenAt, isReservedAlias, isValidSlotKey, legacyEnterToTransition, matchRouteParams, mediaQueryFor, mergeSwiperBreakpoints, nearestCommonAncestorId, nodeCssId, nodeUsesContext, normalizeCollectionResult, normalizeGalleryImage, normalizeIconClass, parentBreakpoint, parseUrlList, planDataSource, planResponsiveRules, referencedDataSources, referencedDataSourcesDeep, renderDefaultDeclarations, resetSeoField, resolveBoundValue, resolveContextValue, resolveDerivedInto, resolveGalleryEffect, resolveGalleryUrls, resolveInputChain, resolveInputs, resolvePageTransition, resolvePath, resolveRelativeInto, resolveRepeaterItems, resolveSeo, resolveSiblings, resolveSingleItemId, resolveStateStyles, resolveStyleProps, resolveValueChain, rewriteViewportUnits, safeSetInput, setInputOverride, setOverride, setSeoAuto, setSeoBinding, setSeoOverride, setSeoValue, stateNamesIn, stripSuppressedProps, styleKeyToKebab, variableAliases, variableItemsFrom, withContextSlots, wrapInBreakpointQuery, wrapInMediaQuery };
|
|
7032
|
+
export { AOSService, AnalyticsService, BREAKPOINTS, Breakpoint, BreakpointQueryKind, BuilderButtonComponent, BuilderDividerComponent, BuilderHeadingComponent, BuilderIconComponent, BuilderImageComponent, BuilderLinkComponent, BuilderSpacerComponent, ButtonBlockComponent, CMSClientInfraModule, CONTEXT_ACTION_TYPES, CardComponent, ClientGalleryComponent, ClientListComponent, ClientListItemComponent, ClientRepeaterComponent, ClientSliderContainerComponent, ClientSliderSlideComponent, ComponentInstanceRegistryService, ConsentService, ContainerComponent, ContentService, ContextStore, DEFAULT_GALLERY_SCHEDULER, DEFAULT_PAGE_TRANSITION, DEFAULT_PAGE_TRANSITION_DURATION, DEFAULT_PAGE_TRANSITION_EASING, DEFAULT_PAGE_TRANSITION_PERSPECTIVE, DEFAULT_PHOSPHOR_WEIGHT, DEFAULT_WIDTH_BY_TYPE, DeclarationContext, ENVIRONMENT, FormRenderState, FormRuntimeService, GALLERY_EFFECTS, GALLERY_EFFECT_DESCRIPTORS, GalleryLoop, IOX_BUILDER_EVENTS, IOX_FORM_MESSAGES, IOX_FORM_NAVIGATOR, IOX_FORM_TRANSPORT, IS_PREVIEW, IoxAnimateContainer, IoxAosDirective, IoxAosModule, IoxBuilderComponentsModule, IoxComponentRegistryService, IoxFieldComponent, IoxFormComponent, IoxFormErrorComponent, IoxFormSuccessComponent, IoxPageComponent, IoxPageModule, IoxSubmitButtonComponent, IoxUiModule, LinkedContainerComponent, PAGE_TRANSITION_CATEGORIES, PAGE_TRANSITION_PRESETS, PIPE_DESCRIPTORS, PIPE_REGISTRY, PageScrollProvider, PrivacyModalComponent, PrivacyModalService, PrivacyModelEvent, RESERVED_ALIAS_PREFIX, SUPPRESSED_STYLE_PROPS_BY_TYPE, SWIPER_RESPONSIVE_TRAITS, SectionComponent, TRANSITION_FEELS, TextBlockComponent, VIRTUAL_TRAIT_GROUPS, VIRTUAL_TRAIT_KEYS, ViewPositionDirective, ViewPositionModule, WebSettingsService, activeActions, applyBindingPipes, applyFeel, breakpointDef, breakpointForWidth, breakpointQueryFor, buildDataSourceFilter, buildPartSelector, buildRelatedFilter, buildSwiperBreakpoints, buildTargetedStateSelector, buildTransitionTimeline, cascadeChain, clearInputOverride, clearOverride, collectContextSlotKeys, collectReferencedAliases, compileDeclarations, compilePageStyle, composeVirtualTraits, computeRelative, contextActionEffect, contextSlotKeys, countOverrides, dataSourcePlanToRequest, declaredInputNames, defaultMessageResolver, deriveSeoFromContent, describeSeoFields, effectiveTransitionId, excludeSelf, feelFor, getByPath, getSeoValue, initialSlotValues, isActionEnabled, isContextAction, isInputOverriddenAt, isOverriddenAt, isReservedAlias, isValidSlotKey, legacyEnterToTransition, matchRouteParams, mediaQueryFor, mergeSwiperBreakpoints, nearestCommonAncestorId, nodeCssId, nodeUsesContext, normalizeCollectionResult, normalizeGalleryImage, normalizeIconClass, parentBreakpoint, parseUrlList, planDataSource, planResponsiveRules, referencedDataSources, referencedDataSourcesDeep, renderDefaultDeclarations, resetSeoField, resolveBoundValue, resolveContextValue, resolveDerivedInto, resolveGalleryEffect, resolveGalleryUrls, resolveInputChain, resolveInputs, resolvePageTransition, resolvePath, resolveRelativeInto, resolveRepeaterItems, resolveSeo, resolveSiblings, resolveSingleItemId, resolveStateStyles, resolveStyleProps, resolveValueChain, rewriteViewportUnits, safeSetInput, setInputOverride, setOverride, setSeoAuto, setSeoBinding, setSeoOverride, setSeoValue, stateNamesIn, stripSuppressedProps, styleKeyToKebab, variableAliases, variableItemsFrom, withContextSlots, wrapInBreakpointQuery, wrapInMediaQuery };
|
|
6951
7033
|
//# sourceMappingURL=vectoriox-iox-ui.mjs.map
|