@rulecms/widget-angular 0.8.2 → 0.9.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/rulecms-widget-angular.mjs +16 -15
- package/fesm2022/rulecms-widget-angular.mjs.map +1 -1
- package/lib/helpers/constants.d.ts +5 -3
- package/lib/helpers/constants.d.ts.map +1 -1
- package/lib/render/breakpoint-variant-styles.d.ts.map +1 -1
- package/lib/render/display-device-type.d.ts +2 -2
- package/lib/render/display-device-type.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -578,9 +578,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
578
578
|
|
|
579
579
|
// Device display width constants
|
|
580
580
|
const defaultPageWidth = "1200px";
|
|
581
|
-
|
|
582
|
-
const
|
|
583
|
-
const
|
|
581
|
+
// Where a published widget switches layout, as a viewport width in px.
|
|
582
|
+
const tabletMinWidth = 600;
|
|
583
|
+
const desktopMinWidth = 1024;
|
|
584
|
+
// The width the composer and previews draw each device at. Not breakpoints.
|
|
585
|
+
const phonePreviewWidth = "390px";
|
|
586
|
+
const tabletPreviewWidth = "820px";
|
|
587
|
+
const desktopPreviewWidth = defaultPageWidth;
|
|
584
588
|
|
|
585
589
|
// Builds Cloudinary delivery URLs for background images.
|
|
586
590
|
//
|
|
@@ -2305,20 +2309,15 @@ function hasDeviceDivergentValues(displayItemList, widgetCollections) {
|
|
|
2305
2309
|
return false;
|
|
2306
2310
|
}
|
|
2307
2311
|
|
|
2308
|
-
// Matches useDisplayDeviceType breakpoints: phone <= 500px, tablet <= 820px, desktop > 820px
|
|
2309
|
-
const phoneMax = parseInt(phoneModeWidth, 10);
|
|
2310
|
-
const tabletMax = parseInt(tabletModeWidth, 10);
|
|
2311
|
-
const tabletMin = phoneMax + 1;
|
|
2312
|
-
const desktopMin = tabletMax + 1;
|
|
2313
2312
|
function buildBreakpointVariantStyles(scopeId) {
|
|
2314
2313
|
const phone = `.${scopeId}-phone`;
|
|
2315
2314
|
const tablet = `.${scopeId}-tablet`;
|
|
2316
2315
|
const desktop = `.${scopeId}-desktop`;
|
|
2317
2316
|
return `
|
|
2318
|
-
${phone}
|
|
2319
|
-
|
|
2320
|
-
@media (min-width: ${
|
|
2321
|
-
@media (min-width: ${
|
|
2317
|
+
${phone} { display: block; }
|
|
2318
|
+
${tablet}, ${desktop} { display: none; }
|
|
2319
|
+
@media (min-width: ${tabletMinWidth}px) { ${phone} { display: none; } ${tablet} { display: block; } }
|
|
2320
|
+
@media (min-width: ${desktopMinWidth}px) { ${tablet} { display: none; } ${desktop} { display: block; } }
|
|
2322
2321
|
`.trim();
|
|
2323
2322
|
}
|
|
2324
2323
|
|
|
@@ -3489,8 +3488,10 @@ function resolveDisplayDeviceType(isPhone, isTablet, reduxDeviceDisplayType) {
|
|
|
3489
3488
|
}
|
|
3490
3489
|
return 'Desktop';
|
|
3491
3490
|
}
|
|
3492
|
-
|
|
3493
|
-
const
|
|
3491
|
+
// below 600
|
|
3492
|
+
const PHONE_MEDIA_QUERY = `not all and (min-width: ${tabletMinWidth}px)`;
|
|
3493
|
+
// below 1024; checked after the phone query
|
|
3494
|
+
const TABLET_MEDIA_QUERY = `not all and (min-width: ${desktopMinWidth}px)`;
|
|
3494
3495
|
|
|
3495
3496
|
class RenderComponentsComponent {
|
|
3496
3497
|
constructor() {
|
|
@@ -5838,5 +5839,5 @@ async function resolveWidgetLibraries(params) {
|
|
|
5838
5839
|
* Generated bundle index. Do not edit.
|
|
5839
5840
|
*/
|
|
5840
5841
|
|
|
5841
|
-
export { AlignContentTypes, BreakpointVariantRenderComponent, COLLECTION_TYPE_PREFIX, COMPONENT_PROPS_PATH_SEPARATOR, CSS_CLASSES_ATTRIBUTE_NAME, CSS_VARIABLE_NAME_MAX_LENGTH, CSS_VARIABLE_NAME_PATTERN, DEFAULT_BASE_Z_INDEX, DEFAULT_CLOUDINARY_CLOUD_NAME, DEFAULT_LIBRARY_ID, DEFAULT_PUBLISHED_WIDGET_CACHE_MS, DEFAULT_ROW_GAP, DEV_CLIENT_TOKEN_PREFIX, DEV_WIDGET_API_PATH, DEV_WIDGET_RESOLVE_API_PATH, DeviceDisplayTypes, DisplayComponentComponent, DisplayItemTypes, DragItemIdPrefixTypes, EMBEDDED_KEY_SEPARATOR, FLEX_LAYOUT_STYLE_KEYS_THAT_DERIVE_DISPLAY, FetchRuleCMSWidgetError, HIDE_WIDGET_ATTRIBUTE_NAME, JustifyContentTypes, POINTER_EVENTS_ATTRIBUTE_NAME, PUBLISHED_KEY_SEPARATOR, PUBLISHED_WIDGET_API_PATH, PUBLISHED_WIDGET_RESOLVE_API_PATH, PageViewTypes, RULECMS_ANONYMOUS_ID_STORAGE_KEY, RULECMS_API_ORIGIN, RULECMS_PUBLISHED_KEY_ATTRIBUTE, RenderComponentsComponent, RenderComponentsForDeviceComponent, RenderComponentsInnerComponent, RuleCMSWidgetComponent, RuleCMSWidgetContextService, RuleCMSWidgetProviderComponent, WIDGET_ATTRIBUTES_IGNORED_IN_COMPOSE_MODE, WIDGET_CACHE_API_ORIGIN, WIDGET_PLACEHOLDER_VALUES_KEY, Z_INDEX_WIDGET_ATTRIBUTE_NAME, alignContentAllowlist, alignItemsAllowlist, backgroundPositionAllowlist, backgroundRepeatAllowlist, backgroundSizeAllowlist, borderStyleKeywords, boxSpacingSideKeys, boxSpacingStyleAttributeEntries, buildCloudinaryBackgroundUrl, buildOverlayLayerBoxStyles, buildOverlayStackStyles, buildWidgetFetchUrl, buildWidgetResolveUrl, clearPublishedWidgetFetchCache, collectComponentInstancePaths, collectReferencedLibraryIds, composeSourceComponentsPlugin, createComponentLibraryRegistry, cssAttrArrayKey, defaultPageWidth, deriveDisplayFlexIfNeeded,
|
|
5842
|
+
export { AlignContentTypes, BreakpointVariantRenderComponent, COLLECTION_TYPE_PREFIX, COMPONENT_PROPS_PATH_SEPARATOR, CSS_CLASSES_ATTRIBUTE_NAME, CSS_VARIABLE_NAME_MAX_LENGTH, CSS_VARIABLE_NAME_PATTERN, DEFAULT_BASE_Z_INDEX, DEFAULT_CLOUDINARY_CLOUD_NAME, DEFAULT_LIBRARY_ID, DEFAULT_PUBLISHED_WIDGET_CACHE_MS, DEFAULT_ROW_GAP, DEV_CLIENT_TOKEN_PREFIX, DEV_WIDGET_API_PATH, DEV_WIDGET_RESOLVE_API_PATH, DeviceDisplayTypes, DisplayComponentComponent, DisplayItemTypes, DragItemIdPrefixTypes, EMBEDDED_KEY_SEPARATOR, FLEX_LAYOUT_STYLE_KEYS_THAT_DERIVE_DISPLAY, FetchRuleCMSWidgetError, HIDE_WIDGET_ATTRIBUTE_NAME, JustifyContentTypes, POINTER_EVENTS_ATTRIBUTE_NAME, PUBLISHED_KEY_SEPARATOR, PUBLISHED_WIDGET_API_PATH, PUBLISHED_WIDGET_RESOLVE_API_PATH, PageViewTypes, RULECMS_ANONYMOUS_ID_STORAGE_KEY, RULECMS_API_ORIGIN, RULECMS_PUBLISHED_KEY_ATTRIBUTE, RenderComponentsComponent, RenderComponentsForDeviceComponent, RenderComponentsInnerComponent, RuleCMSWidgetComponent, RuleCMSWidgetContextService, RuleCMSWidgetProviderComponent, WIDGET_ATTRIBUTES_IGNORED_IN_COMPOSE_MODE, WIDGET_CACHE_API_ORIGIN, WIDGET_PLACEHOLDER_VALUES_KEY, Z_INDEX_WIDGET_ATTRIBUTE_NAME, alignContentAllowlist, alignItemsAllowlist, backgroundPositionAllowlist, backgroundRepeatAllowlist, backgroundSizeAllowlist, borderStyleKeywords, boxSpacingSideKeys, boxSpacingStyleAttributeEntries, buildCloudinaryBackgroundUrl, buildOverlayLayerBoxStyles, buildOverlayStackStyles, buildWidgetFetchUrl, buildWidgetResolveUrl, clearPublishedWidgetFetchCache, collectComponentInstancePaths, collectReferencedLibraryIds, composeSourceComponentsPlugin, createComponentLibraryRegistry, cssAttrArrayKey, defaultPageWidth, deriveDisplayFlexIfNeeded, desktopMinWidth, desktopPreviewWidth, fetchRuleCMSWidget, findUnmatchedComponentPropsKeys, flexDirectionAllowlist, flexWrapAllowlist, fontFamilyAllowlist, fontStyleAllowlist, fontWeightAllowlist, formatBackgroundImageStyles, formatBorderStyles, formatBoxShadowStyles, formatBoxSpacingStyles, formatCssColorStyles, formatCssColorValue, formatCssEnumStyles, formatCssLengthStyles, formatCssVariable, formatCssVariableStyles, formatLineHeightStyles, formatObjectStyleAttribute, formatOpacityStyles, formatSpacingSideValue, generatePublishedKey, generatePublishedKeyForEmbedded, getCollectionIdForCollectionType, getColumnAttributes, getComponentAttributesAndStyles, getComponentsPluginFromPlugins, getCssVariableFromLeaf, getDefaultDimensionAttributes, getDeviceTypeBasedAttributes, getDragItemId, getDragItemPrefixAndId, getIdAndPrefix, getMergedAttributes, getNameAndInstanceIdFromWidgetKey, getNameFromWidgetKey, getOrCreateAnonymousId, getOverlayLayerZIndex, getWidgetKeyForCollection, getWidgetKeyForCollectionWithPrefix, getWidgetKeyForPublishedCollection, getWidgetKeyForPublishedCollectionWithPrefix, hasBoxShadowLeaf, hasDeviceDivergentValues, hasInvalidCssVariable, hasItems, hasOverlayLayers, incrementVersion, isBackgroundImageValue, isBorderStyleValue, isBorderValue, isBoxShadowValue, isBoxSpacingValue, isCloudinaryCloudName, isCloudinaryPublicId, isCloudinaryTransformationString, isCssColorValue, isCssEnumValue, isCssVariableName, isDevClientToken, isLineHeightValue, isOpacityValue, isOverlayLayerEmptyForDevice, isRowHiddenForDevice, isSafeImageUrl, isSpacingSideValue, isWidgetHiddenForDevice, justifyContentAllowlist, normalizeCssClasses, objectStyleAttributeRegistry, overflowAllowlist, phonePreviewWidth, pointerEventsAllowlist, prepareRuleCMSWidgetData, resolveBaseZIndex, resolveKey, resolveOverlayLayerPointerEvents, resolveRowStyles, resolveWidgetApiOrigin, resolveWidgetContainerStyles, resolveWidgetInstanceProps, resolveWidgetLibraries, rowBasedPropertiesAreAssigned, spacingKeywords, spacingLengthUnits, stableJsonStringify, tabletMinWidth, tabletPreviewWidth, textAlignAllowlist, textDecorationAllowlist, textTransformAllowlist, typeHasPrefix, warnUnmatchedComponentProps, widgetBasedPropertiesAreAssigned, widgetDeclaresOwnHeight, withWidgetPlaceholderValues };
|
|
5842
5843
|
//# sourceMappingURL=rulecms-widget-angular.mjs.map
|