@fundamental-ngx/core 0.64.2-rc.0 → 0.64.2-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/fundamental-ngx-core-button.mjs +116 -29
- package/fesm2022/fundamental-ngx-core-button.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-content-density.mjs +13 -27
- package/fesm2022/fundamental-ngx-core-content-density.mjs.map +1 -1
- package/package.json +3 -3
- package/schematics/package.json +1 -1
- package/types/fundamental-ngx-core-button.d.ts +64 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fundamental-ngx-core-button.mjs","sources":["../../../../libs/core/button/base-button.ts","../../../../libs/core/button/tokens.ts","../../../../libs/core/button/button-badge.directive.ts","../../../../libs/core/button/button.component.ts","../../../../libs/core/button/button.component.html","../../../../libs/core/button/button.module.ts","../../../../libs/core/button/fundamental-ngx-core-button.ts"],"sourcesContent":["import { BooleanInput } from '@angular/cdk/coercion';\nimport { Directive, ElementRef, booleanAttribute, inject, input, linkedSignal } from '@angular/core';\n\nimport { HasElementRef } from '@fundamental-ngx/cdk/utils';\nimport { FD_DEFAULT_ICON_FONT_FAMILY, IconFont } from '@fundamental-ngx/core/icon';\nimport { ButtonModel } from './button.model';\n\nexport type GlyphPosition = 'before' | 'after';\n\nexport type ButtonType =\n | ''\n | 'standard'\n | 'positive'\n | 'negative'\n | 'attention'\n | 'half'\n | 'ghost'\n | 'transparent'\n | 'emphasized'\n | 'menu';\n\nexport const defaultButtonType = 'standard' as ButtonType;\n\n@Directive({\n host: {\n '[class.fd-button--toggled]': 'toggledState()',\n '[attr.aria-pressed]': 'toggledState() || null',\n '[attr.aria-selected]': 'selectedState() || null'\n }\n})\nexport class BaseButton implements HasElementRef, ButtonModel {\n /**\n * Whether the button is in a toggled state.\n * Used for toggle buttons that maintain an on/off state.\n * When true, adds the toggled class and sets aria-pressed=\"true\".\n */\n readonly toggled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Whether the button is selected.\n * Used in button groups or toolbars to indicate the currently selected option.\n * When true, sets aria-selected=\"true\".\n */\n readonly selected = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Native type attribute of the button element.\n * Defaults to 'button' to prevent form submission.\n * Set to 'submit' for form submission buttons or 'reset' for form reset buttons.\n */\n readonly type = input<string | null | undefined>('button');\n\n /**\n * Position of the icon relative to the button text.\n * - 'before': Icon appears before the text (default)\n * - 'after': Icon appears after the text\n */\n readonly glyphPosition = input<GlyphPosition>('before');\n\n /**\n * The icon to display in the button.\n * See the icon documentation for the list of available icons.\n * Example values: 'add', 'edit', 'delete', 'accept', 'decline'\n */\n readonly glyph = input<string | null | undefined>();\n\n /**\n * Font family for the icon.\n * Defaults to the SAP icon font.\n * Override when using custom icon fonts.\n */\n readonly glyphFont = input<IconFont>(FD_DEFAULT_ICON_FONT_FAMILY);\n\n /**\n * Visual style of the button.\n * Available types:\n * - 'standard': Default button style (blue)\n * - 'emphasized': High emphasis action (darker blue)\n * - 'positive': Successful/positive action (green)\n * - 'negative': Destructive/negative action (red)\n * - 'attention': Warning action (orange)\n * - 'transparent': No background, minimal style\n * - 'ghost': Subtle button with border on hover\n * - 'half': Split button style\n * - 'menu': Menu trigger button\n */\n readonly fdType = input<ButtonType>(defaultButtonType);\n\n /**\n * Text label displayed inside the button.\n * Can be used alone or combined with an icon.\n */\n readonly label = input<string | undefined>();\n\n /**\n * Whether to apply menu mode styling to the button.\n * When true, adds a dropdown arrow icon and menu-specific styling.\n */\n readonly fdMenu = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Whether the button is disabled.\n * When true, the button cannot be interacted with and displays a disabled state.\n * This sets the native 'disabled' attribute on button elements.\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * ARIA disabled attribute for accessibility.\n * Use this when you want to indicate a disabled state to screen readers\n * without preventing interaction (e.g., for showing tooltips on disabled buttons).\n * Unlike the 'disabled' attribute, this does not prevent click events.\n */\n readonly ariaDisabled = input<boolean, BooleanInput>(false, {\n alias: 'aria-disabled',\n transform: booleanAttribute\n });\n\n /**\n * ARIA label for the button.\n * Provides an accessible name for screen readers.\n * If not provided, special button types will auto-generate from label or glyph.\n */\n readonly ariaLabel = input<string | null | undefined>();\n\n /**\n * ARIA description for the button.\n * Provides additional context for screen readers beyond the label.\n * Special button types (emphasized, positive, negative, attention) will\n * auto-generate a description from their type if not provided.\n */\n readonly ariaDescription = input<string | null | undefined>();\n\n /** @hidden */\n readonly elementRef = inject(ElementRef);\n\n /**\n * Internal toggled state that can be mutated programmatically.\n * Syncs with the toggled input but allows internal modification.\n * @hidden\n */\n protected readonly toggledState = linkedSignal(() => this.toggled());\n\n /**\n * Internal selected state that can be mutated programmatically.\n * Syncs with the selected input but allows internal modification.\n * @hidden\n */\n protected readonly selectedState = linkedSignal(() => this.selected());\n\n /**\n * Internal button type state that can be mutated programmatically.\n * Syncs with the fdType input but allows internal modification.\n * @hidden\n */\n protected readonly fdTypeState = linkedSignal(() => this.fdType());\n\n /**\n * Internal disabled state that can be mutated programmatically.\n * Syncs with the disabled input but allows internal modification.\n * @hidden\n */\n protected readonly _disabledState = linkedSignal(() => this.disabled());\n\n /**\n * No-op for ButtonModel interface compatibility.\n * Signals automatically notify Angular when they change.\n * @deprecated Signals eliminate the need for manual change detection.\n */\n markForCheck(): void {\n // No-op: Signals automatically trigger change detection\n }\n\n /**\n * Programmatically set the disabled state.\n * This allows parent components or directives to update the button's disabled state.\n *\n * @param value - Whether the button should be disabled\n *\n * @example\n * ```typescript\n * // In a form component that needs to disable all buttons\n * this.submitButton.setDisabled(this.form.invalid);\n * ```\n */\n setDisabled(value: boolean): void {\n this._disabledState.set(value);\n }\n\n /**\n * Get the current disabled state.\n * Returns the internal disabled state which may have been modified programmatically.\n *\n * @returns True if the button is currently disabled\n *\n * @example\n * ```typescript\n * if (!this.button.isDisabled()) {\n * this.button.setDisabled(true);\n * }\n * ```\n */\n isDisabled(): boolean {\n return this._disabledState();\n }\n\n /**\n * Programmatically set the button type.\n * This allows directives to override the button's visual style.\n *\n * @param value - The button type to apply\n *\n * @example\n * ```typescript\n * // A directive that changes button style based on validation state\n * if (this.validationFailed) {\n * this.button.setFdType('negative');\n * }\n * ```\n */\n setFdType(value: ButtonType): void {\n this.fdTypeState.set(value);\n }\n\n /**\n * Get the current button type.\n * Returns the internal button type which may have been modified programmatically.\n *\n * @returns The current button type\n */\n getFdType(): ButtonType {\n return this.fdTypeState();\n }\n\n /**\n * Programmatically set the selected state.\n * This allows parent components to update the button's selected state.\n * Used in button groups or toolbars to indicate active selection.\n *\n * @param value - Whether the button should be selected\n *\n * @example\n * ```typescript\n * // In a button group component managing selection\n * this.buttons.forEach(btn => btn.setSelected(false));\n * this.activeButton.setSelected(true);\n * ```\n */\n setSelected(value: boolean): void {\n this.selectedState.set(value);\n }\n\n /**\n * Get the current selected state.\n * Returns the internal selected state which may have been modified programmatically.\n *\n * @returns True if the button is currently selected\n */\n isSelected(): boolean {\n return this.selectedState();\n }\n\n /**\n * Programmatically set the toggled state.\n * This allows parent components to update the button's toggled state.\n * Used for toggle buttons that maintain an on/off state.\n *\n * @param value - Whether the button should be toggled on\n *\n * @example\n * ```typescript\n * // In a toolbar with toggle buttons\n * handleBoldClick(): void {\n * const isActive = !this.boldButton.isToggled();\n * this.boldButton.setToggled(isActive);\n * }\n * ```\n */\n setToggled(value: boolean): void {\n this.toggledState.set(value);\n }\n\n /**\n * Get the current toggled state.\n * Returns the internal toggled state which may have been modified programmatically.\n *\n * @returns True if the button is currently toggled\n */\n isToggled(): boolean {\n return this.toggledState();\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { BaseButton } from './base-button';\n\nexport const FD_BUTTON_COMPONENT = new InjectionToken<BaseButton>('FdButtonComponent');\n","import { Directive, ElementRef, effect, inject, input, isDevMode } from '@angular/core';\nimport { HasElementRef } from '@fundamental-ngx/cdk/utils';\nimport { BaseButton, ButtonType } from './base-button';\nimport { FD_BUTTON_COMPONENT } from './tokens';\n\nexport const badgeEnabledButtonTypes: ButtonType[] = ['emphasized', 'standard', 'ghost', 'transparent'];\n\n/**\n * Directive to display a badge on a button.\n *\n * Badges are small status indicators that can be added to buttons to show\n * notifications, counts, or other supplementary information.\n *\n * Usage:\n * ```html\n * <button fd-button>\n * Button Text\n * <fd-button-badge [content]=\"5\" />\n * </button>\n * ```\n *\n * @note Badge content should not exceed 4 characters for optimal display.\n * @note Badges are only supported on emphasized, standard, ghost, and transparent button types.\n */\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'fd-button-badge',\n host: {\n class: 'fd-button__badge'\n }\n})\nexport class ButtonBadgeDirective implements HasElementRef {\n /**\n * Content to display inside the badge.\n * Should not exceed 4 characters for optimal display.\n * Supports both string and numeric values.\n */\n readonly content = input<string | number>();\n\n /** @hidden */\n readonly elementRef: ElementRef<HTMLElement> = inject(ElementRef);\n\n /** @hidden */\n protected readonly buttonComponent = inject<BaseButton>(FD_BUTTON_COMPONENT, { host: true });\n\n /** @hidden */\n constructor() {\n // Single-purpose effect: Sync badge content to DOM\n effect(() => {\n this.elementRef.nativeElement.textContent = String(this.content() ?? '');\n });\n\n // Validation effect only in development mode (zero overhead in production)\n if (isDevMode()) {\n effect(() => {\n this._validateBadge();\n });\n }\n }\n\n /**\n * Validates badge configuration in development mode.\n * Checks content length and button type compatibility.\n * @hidden\n */\n private _validateBadge(): void {\n const contentValue = this.content();\n if (contentValue && contentValue.toString().length > 4) {\n console.warn('Badge content should not be longer than 4 characters');\n }\n\n if (!badgeEnabledButtonTypes.includes(this.buttonComponent.getFdType())) {\n console.warn(\n `Currently the ${JSON.stringify(\n badgeEnabledButtonTypes\n )} type of buttons are required for Badge enablement`\n );\n }\n }\n}\n","import {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n inject,\n input,\n signal,\n ViewEncapsulation\n} from '@angular/core';\nimport { HasElementRef } from '@fundamental-ngx/cdk/utils';\nimport { ContentDensityObserver, contentDensityObserverProviders } from '@fundamental-ngx/core/content-density';\nimport { BaseButton } from './base-button';\n\nimport { IconComponent } from '@fundamental-ngx/core/icon';\nimport { FD_BUTTON_COMPONENT } from './tokens';\n\nlet buttonId = 0;\n\nconst SPECIAL_BUTTON_TYPES = new Set(['emphasized', 'positive', 'negative', 'attention']);\n\n/**\n * Button directive, used to enhance standard HTML buttons.\n *\n * ``` selector: button[fd-button], a[fd-button] ```\n *\n * ```html\n * <button fd-button label=\"Button Text\"></button>\n * <a fd-button label=\"Button Text\"></a>\n * ```\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'button[fd-button], a[fd-button], span[fd-button]',\n exportAs: 'fd-button',\n templateUrl: './button.component.html',\n styleUrl: './button.component.scss',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.type]': 'type()',\n '[attr.disabled]': '_disabledState() || null',\n '[attr.aria-disabled]': 'ariaDisabled() || null',\n '[attr.aria-label]': 'buttonArialabel()',\n '[attr.aria-description]': 'buttonAriaDescription()',\n '[attr.id]': 'id()',\n '[class]': 'cssClass()',\n '(click)': 'clicked($event)'\n },\n providers: [\n contentDensityObserverProviders(),\n {\n provide: FD_BUTTON_COMPONENT,\n useExisting: ButtonComponent\n }\n ],\n imports: [IconComponent]\n})\nexport class ButtonComponent extends BaseButton implements HasElementRef {\n /** Button ID - default value is provided if not set */\n readonly id = input(`fd-button-${++buttonId}`);\n\n /** @hidden */\n readonly elementRef = inject(ElementRef);\n\n /** @hidden */\n protected readonly contentDensityObserver = inject(ContentDensityObserver);\n\n /**\n * Calculate aria-label attribute\n * @hidden\n */\n protected readonly buttonArialabel = computed(() => {\n if (this.ariaLabel()) {\n return this.ariaLabel(); // return the input aria-label\n }\n\n const nativeLabel = this._nativeAriaLabel();\n\n if (nativeLabel) {\n return nativeLabel; // return the native attribute aria-label\n }\n\n if (SPECIAL_BUTTON_TYPES.has(this.fdTypeState())) {\n return this.label() ?? this._glyphLabel() ?? null;\n }\n\n return null;\n });\n\n /**\n * Calculate aria-description attribute\n * @hidden\n */\n protected readonly buttonAriaDescription = computed(() => {\n if (this.ariaDescription()) {\n return this.ariaDescription();\n }\n\n if (SPECIAL_BUTTON_TYPES.has(this.fdTypeState())) {\n return this.fdTypeState();\n }\n\n return null;\n });\n\n /**\n * Computed CSS classes for the button.\n * Built as a string to avoid array allocation overhead.\n * @hidden\n */\n protected readonly cssClass = computed(() => {\n let classes = 'fd-button';\n\n const type = this.fdTypeState();\n if (type) {\n classes += ` fd-button--${type}`;\n }\n\n if (this.fdMenu()) {\n classes += ' fd-button--menu';\n }\n\n if (this._disabledState() || this.ariaDisabled()) {\n classes += ' is-disabled';\n }\n\n if (this.toggledState()) {\n classes += ' fd-button--toggled';\n }\n\n return classes;\n });\n\n /**\n * Memoized glyph label for aria-label fallback.\n * Transforms glyph name (e.g., \"slim-arrow-down\") to readable text (e.g., \"slim arrow down\").\n * @hidden\n */\n private readonly _glyphLabel = computed(() => {\n const glyph = this.glyph();\n return glyph ? glyph.replace(/-/g, ' ') : null;\n });\n\n /**\n * Native aria-label attribute read from the DOM element.\n * Captured once after render for use in aria-label computation.\n * @hidden\n */\n private readonly _nativeAriaLabel = signal<string | null>(null);\n\n /** @hidden */\n constructor() {\n super();\n\n // Read native aria-label attribute once after render\n afterNextRender(() => {\n const nativeLabel = this.elementRef.nativeElement.getAttribute('aria-label');\n if (nativeLabel) {\n this._nativeAriaLabel.set(nativeLabel);\n }\n });\n }\n\n /** Forces the focus outline around the button, which is not default behavior in Safari. */\n protected clicked(event: Event): void {\n const target = event?.target as HTMLElement;\n // Target can be empty during unit tests execution.\n if (target && document.activeElement !== target) {\n target.focus();\n }\n }\n}\n","@if (glyph() && glyphPosition() === 'before') {\n <fd-icon [glyph]=\"glyph()\" [font]=\"glyphFont()\"></fd-icon>\n}\n@if (label()) {\n <span class=\"fd-button__text\">\n {{ label() }}\n </span>\n}\n<ng-content></ng-content>\n<ng-content select=\"fd-button-badge\"></ng-content>\n@if (glyph() && glyphPosition() === 'after') {\n <fd-icon [glyph]=\"glyph()\" [font]=\"glyphFont()\"></fd-icon>\n}\n@if (fdMenu()) {\n <fd-icon glyph=\"slim-arrow-down\"></fd-icon>\n}\n","import { NgModule } from '@angular/core';\n\nimport { ButtonComponent } from './button.component';\n\n/**\n * @deprecated\n * Use `ButtonComponent` import instead\n */\n@NgModule({\n imports: [ButtonComponent],\n exports: [ButtonComponent]\n})\nexport class ButtonModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAqBO,MAAM,iBAAiB,GAAG;MASpB,UAAU,CAAA;AAPvB,IAAA,WAAA,GAAA;AAQI;;;;AAIG;QACM,IAAA,CAAA,OAAO,GAAG,KAAK,CAAwB,KAAK,+EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAEvF;;;;AAIG;QACM,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAwB,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAExF;;;;AAIG;QACM,IAAA,CAAA,IAAI,GAAG,KAAK,CAA4B,QAAQ;iFAAC;AAE1D;;;;AAIG;QACM,IAAA,CAAA,aAAa,GAAG,KAAK,CAAgB,QAAQ;0FAAC;AAEvD;;;;AAIG;AACM,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK;6FAA6B;AAEnD;;;;AAIG;QACM,IAAA,CAAA,SAAS,GAAG,KAAK,CAAW,2BAA2B;sFAAC;AAEjE;;;;;;;;;;;;AAYG;QACM,IAAA,CAAA,MAAM,GAAG,KAAK,CAAa,iBAAiB;mFAAC;AAEtD;;;AAGG;AACM,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK;6FAAsB;AAE5C;;;AAGG;QACM,IAAA,CAAA,MAAM,GAAG,KAAK,CAAwB,KAAK,8EAAI,SAAS,EAAE,gBAAgB,EAAA,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AA,YAAY,YAHX,eAAe,CAAA,EAAA,CAAA,CAAA;;2FAGhB,YAAY,EAAA,UAAA,EAAA,CAAA;kBAJxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,eAAe,CAAC;oBAC1B,OAAO,EAAE,CAAC,eAAe;AAC5B,iBAAA;;;ACXD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"fundamental-ngx-core-button.mjs","sources":["../../../../libs/core/button/base-button.ts","../../../../libs/core/button/tokens.ts","../../../../libs/core/button/button-badge.directive.ts","../../../../libs/core/button/button.component.ts","../../../../libs/core/button/button.component.html","../../../../libs/core/button/button.module.ts","../../../../libs/core/button/fundamental-ngx-core-button.ts"],"sourcesContent":["import { BooleanInput } from '@angular/cdk/coercion';\nimport { Directive, ElementRef, booleanAttribute, inject, input, linkedSignal } from '@angular/core';\n\nimport { HasElementRef } from '@fundamental-ngx/cdk/utils';\nimport { FD_DEFAULT_ICON_FONT_FAMILY, IconFont } from '@fundamental-ngx/core/icon';\nimport { ButtonModel } from './button.model';\n\nexport type GlyphPosition = 'before' | 'after';\n\nexport type ButtonType =\n | ''\n | 'standard'\n | 'positive'\n | 'negative'\n | 'attention'\n | 'half'\n | 'ghost'\n | 'transparent'\n | 'emphasized'\n | 'menu';\n\nexport const defaultButtonType = 'standard' as ButtonType;\n\n@Directive({\n host: {\n '[class.fd-button--toggled]': 'toggledState()',\n '[attr.aria-pressed]': 'toggledState() || null',\n '[attr.aria-selected]': 'selectedState() || null'\n }\n})\nexport class BaseButton implements HasElementRef, ButtonModel {\n /**\n * Whether the button is in a toggled state.\n * Used for toggle buttons that maintain an on/off state.\n * When true, adds the toggled class and sets aria-pressed=\"true\".\n */\n readonly toggled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Whether the button is selected.\n * Used in button groups or toolbars to indicate the currently selected option.\n * When true, sets aria-selected=\"true\".\n */\n readonly selected = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Native type attribute of the button element.\n * Defaults to 'button' to prevent form submission.\n * Set to 'submit' for form submission buttons or 'reset' for form reset buttons.\n */\n readonly type = input<string | null | undefined>('button');\n\n /**\n * Position of the icon relative to the button text.\n * - 'before': Icon appears before the text (default)\n * - 'after': Icon appears after the text\n */\n readonly glyphPosition = input<GlyphPosition>('before');\n\n /**\n * The icon to display in the button.\n * See the icon documentation for the list of available icons.\n * Example values: 'add', 'edit', 'delete', 'accept', 'decline'\n */\n readonly glyph = input<string | null | undefined>();\n\n /**\n * Font family for the icon.\n * Defaults to the SAP icon font.\n * Override when using custom icon fonts.\n */\n readonly glyphFont = input<IconFont>(FD_DEFAULT_ICON_FONT_FAMILY);\n\n /**\n * Visual style of the button.\n * Available types:\n * - 'standard': Default button style (blue)\n * - 'emphasized': High emphasis action (darker blue)\n * - 'positive': Successful/positive action (green)\n * - 'negative': Destructive/negative action (red)\n * - 'attention': Warning action (orange)\n * - 'transparent': No background, minimal style\n * - 'ghost': Subtle button with border on hover\n * - 'half': Split button style\n * - 'menu': Menu trigger button\n */\n readonly fdType = input<ButtonType>(defaultButtonType);\n\n /**\n * Text label displayed inside the button.\n * Can be used alone or combined with an icon.\n */\n readonly label = input<string | undefined>();\n\n /**\n * Whether to apply menu mode styling to the button.\n * When true, adds a dropdown arrow icon and menu-specific styling.\n */\n readonly fdMenu = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Whether the button is disabled.\n * When true, the button cannot be interacted with and displays a disabled state.\n * This sets the native 'disabled' attribute on button elements.\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * ARIA disabled attribute for accessibility.\n * Use this when you want to indicate a disabled state to screen readers\n * without preventing interaction (e.g., for showing tooltips on disabled buttons).\n * Unlike the 'disabled' attribute, this does not prevent click events.\n */\n readonly ariaDisabled = input<boolean, BooleanInput>(false, {\n alias: 'aria-disabled',\n transform: booleanAttribute\n });\n\n /**\n * ARIA label for the button.\n * Provides an accessible name for screen readers.\n * If not provided, special button types will auto-generate from label or glyph.\n */\n readonly ariaLabel = input<string | null | undefined>();\n\n /**\n * ARIA description for the button.\n * Provides additional context for screen readers beyond the label.\n * Special button types (emphasized, positive, negative, attention) will\n * auto-generate a description from their type if not provided.\n */\n readonly ariaDescription = input<string | null | undefined>();\n\n /**\n * Override the default type description for special button types.\n * Provides a custom description for screen readers.\n * If not provided, defaults to the i18n-translated type description.\n */\n readonly ariaTypeDescription = input<string | null | undefined>();\n\n /**\n * Custom aria-describedby value.\n * When provided, bypasses the component's auto-generated aria-describedby\n * (which references the hidden description spans) and uses this value directly.\n * Use this when you need to reference external elements as the description source.\n * Native aria-describedby attributes are captured automatically via ngOnInit.\n */\n readonly ariaDescribedBy = input<string | null | undefined>();\n\n /** @hidden */\n readonly elementRef = inject(ElementRef);\n\n /**\n * Internal toggled state that can be mutated programmatically.\n * Syncs with the toggled input but allows internal modification.\n * @hidden\n */\n protected readonly toggledState = linkedSignal(() => this.toggled());\n\n /**\n * Internal selected state that can be mutated programmatically.\n * Syncs with the selected input but allows internal modification.\n * @hidden\n */\n protected readonly selectedState = linkedSignal(() => this.selected());\n\n /**\n * Internal button type state that can be mutated programmatically.\n * Syncs with the fdType input but allows internal modification.\n * @hidden\n */\n protected readonly fdTypeState = linkedSignal(() => this.fdType());\n\n /**\n * Internal disabled state that can be mutated programmatically.\n * Syncs with the disabled input but allows internal modification.\n * @hidden\n */\n protected readonly _disabledState = linkedSignal(() => this.disabled());\n\n /**\n * No-op for ButtonModel interface compatibility.\n * Signals automatically notify Angular when they change.\n * @deprecated Signals eliminate the need for manual change detection.\n */\n markForCheck(): void {\n // No-op: Signals automatically trigger change detection\n }\n\n /**\n * Programmatically set the disabled state.\n * This allows parent components or directives to update the button's disabled state.\n *\n * @param value - Whether the button should be disabled\n *\n * @example\n * ```typescript\n * // In a form component that needs to disable all buttons\n * this.submitButton.setDisabled(this.form.invalid);\n * ```\n */\n setDisabled(value: boolean): void {\n this._disabledState.set(value);\n }\n\n /**\n * Get the current disabled state.\n * Returns the internal disabled state which may have been modified programmatically.\n *\n * @returns True if the button is currently disabled\n *\n * @example\n * ```typescript\n * if (!this.button.isDisabled()) {\n * this.button.setDisabled(true);\n * }\n * ```\n */\n isDisabled(): boolean {\n return this._disabledState();\n }\n\n /**\n * Programmatically set the button type.\n * This allows directives to override the button's visual style.\n *\n * @param value - The button type to apply\n *\n * @example\n * ```typescript\n * // A directive that changes button style based on validation state\n * if (this.validationFailed) {\n * this.button.setFdType('negative');\n * }\n * ```\n */\n setFdType(value: ButtonType): void {\n this.fdTypeState.set(value);\n }\n\n /**\n * Get the current button type.\n * Returns the internal button type which may have been modified programmatically.\n *\n * @returns The current button type\n */\n getFdType(): ButtonType {\n return this.fdTypeState();\n }\n\n /**\n * Programmatically set the selected state.\n * This allows parent components to update the button's selected state.\n * Used in button groups or toolbars to indicate active selection.\n *\n * @param value - Whether the button should be selected\n *\n * @example\n * ```typescript\n * // In a button group component managing selection\n * this.buttons.forEach(btn => btn.setSelected(false));\n * this.activeButton.setSelected(true);\n * ```\n */\n setSelected(value: boolean): void {\n this.selectedState.set(value);\n }\n\n /**\n * Get the current selected state.\n * Returns the internal selected state which may have been modified programmatically.\n *\n * @returns True if the button is currently selected\n */\n isSelected(): boolean {\n return this.selectedState();\n }\n\n /**\n * Programmatically set the toggled state.\n * This allows parent components to update the button's toggled state.\n * Used for toggle buttons that maintain an on/off state.\n *\n * @param value - Whether the button should be toggled on\n *\n * @example\n * ```typescript\n * // In a toolbar with toggle buttons\n * handleBoldClick(): void {\n * const isActive = !this.boldButton.isToggled();\n * this.boldButton.setToggled(isActive);\n * }\n * ```\n */\n setToggled(value: boolean): void {\n this.toggledState.set(value);\n }\n\n /**\n * Get the current toggled state.\n * Returns the internal toggled state which may have been modified programmatically.\n *\n * @returns True if the button is currently toggled\n */\n isToggled(): boolean {\n return this.toggledState();\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { BaseButton } from './base-button';\n\nexport const FD_BUTTON_COMPONENT = new InjectionToken<BaseButton>('FdButtonComponent');\n","import { Directive, ElementRef, effect, inject, input, isDevMode } from '@angular/core';\nimport { HasElementRef } from '@fundamental-ngx/cdk/utils';\nimport { BaseButton, ButtonType } from './base-button';\nimport { FD_BUTTON_COMPONENT } from './tokens';\n\nexport const badgeEnabledButtonTypes: ButtonType[] = ['emphasized', 'standard', 'ghost', 'transparent'];\n\n/**\n * Directive to display a badge on a button.\n *\n * Badges are small status indicators that can be added to buttons to show\n * notifications, counts, or other supplementary information.\n *\n * Usage:\n * ```html\n * <button fd-button>\n * Button Text\n * <fd-button-badge [content]=\"5\" />\n * </button>\n * ```\n *\n * @note Badge content should not exceed 4 characters for optimal display.\n * @note Badges are only supported on emphasized, standard, ghost, and transparent button types.\n */\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'fd-button-badge',\n host: {\n class: 'fd-button__badge'\n }\n})\nexport class ButtonBadgeDirective implements HasElementRef {\n /**\n * Content to display inside the badge.\n * Should not exceed 4 characters for optimal display.\n * Supports both string and numeric values.\n */\n readonly content = input<string | number>();\n\n /** @hidden */\n readonly elementRef: ElementRef<HTMLElement> = inject(ElementRef);\n\n /** @hidden */\n protected readonly buttonComponent = inject<BaseButton>(FD_BUTTON_COMPONENT, { host: true });\n\n /** @hidden */\n constructor() {\n // Single-purpose effect: Sync badge content to DOM\n effect(() => {\n this.elementRef.nativeElement.textContent = String(this.content() ?? '');\n });\n\n // Validation effect only in development mode (zero overhead in production)\n if (isDevMode()) {\n effect(() => {\n this._validateBadge();\n });\n }\n }\n\n /**\n * Validates badge configuration in development mode.\n * Checks content length and button type compatibility.\n * @hidden\n */\n private _validateBadge(): void {\n const contentValue = this.content();\n if (contentValue && contentValue.toString().length > 4) {\n console.warn('Badge content should not be longer than 4 characters');\n }\n\n if (!badgeEnabledButtonTypes.includes(this.buttonComponent.getFdType())) {\n console.warn(\n `Currently the ${JSON.stringify(\n badgeEnabledButtonTypes\n )} type of buttons are required for Badge enablement`\n );\n }\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n inject,\n input,\n OnInit,\n signal,\n ViewEncapsulation\n} from '@angular/core';\nimport { HasElementRef } from '@fundamental-ngx/cdk/utils';\nimport { ContentDensityObserver, contentDensityObserverProviders } from '@fundamental-ngx/core/content-density';\nimport { resolveTranslationSignalFn } from '@fundamental-ngx/i18n';\nimport { BaseButton } from './base-button';\n\nimport { IconComponent } from '@fundamental-ngx/core/icon';\nimport { FD_BUTTON_COMPONENT } from './tokens';\n\nlet buttonId = 0;\n\nconst SPECIAL_BUTTON_TYPES = new Set(['emphasized', 'positive', 'negative', 'attention']);\n\n/**\n * Button directive, used to enhance standard HTML buttons.\n *\n * ``` selector: button[fd-button], a[fd-button] ```\n *\n * ```html\n * <button fd-button label=\"Button Text\"></button>\n * <a fd-button label=\"Button Text\"></a>\n * ```\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'button[fd-button], a[fd-button], span[fd-button]',\n exportAs: 'fd-button',\n templateUrl: './button.component.html',\n styleUrl: './button.component.scss',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.type]': 'type()',\n '[attr.disabled]': '_disabledState() || null',\n '[attr.aria-disabled]': 'ariaDisabled() || null',\n '[attr.aria-label]': 'buttonArialabel()',\n '[attr.aria-describedby]': 'ariaDescribedby() || null',\n '[attr.id]': 'id()',\n '[class]': 'cssClass()',\n '(click)': 'clicked($event)'\n },\n providers: [\n contentDensityObserverProviders(),\n {\n provide: FD_BUTTON_COMPONENT,\n useExisting: ButtonComponent\n }\n ],\n imports: [IconComponent]\n})\nexport class ButtonComponent extends BaseButton implements HasElementRef, OnInit {\n /** Button ID - default value is provided if not set */\n readonly id = input(`fd-button-${++buttonId}`);\n\n /** @hidden */\n readonly elementRef = inject(ElementRef);\n\n /** @hidden */\n protected readonly contentDensityObserver = inject(ContentDensityObserver);\n\n /**\n * Check if button has a special type (emphasized, positive, negative, attention)\n * @hidden\n */\n protected readonly isSpecialButtonType = computed(() => SPECIAL_BUTTON_TYPES.has(this.fdTypeState()));\n\n /**\n * Calculate aria-describedby attribute value.\n * If the user explicitly provides aria-describedby (via input or native attribute),\n * that value is used as-is. Otherwise, auto-generates IDs referencing hidden description spans.\n * Returns null if no descriptions apply (attribute not set).\n * @hidden\n */\n protected readonly ariaDescribedby = computed(() => {\n // User-provided value takes full precedence — bypass the auto-generated spans\n const userProvided = this.ariaDescribedBy() ?? this.nativeAriaDescribedBy();\n if (userProvided != null) {\n return userProvided || null;\n }\n\n const ids: string[] = [];\n\n if (this.effectiveAriaDescription()) {\n ids.push(this.id() + '-description');\n }\n\n if (this.isSpecialButtonType()) {\n ids.push(this.id() + '-type-description');\n }\n\n return ids.length > 0 ? ids.join(' ') : null;\n });\n\n /**\n * Native aria-describedby attribute read from the DOM element.\n * Captured once during init; signals user intent to manage describedby manually.\n * @hidden\n */\n protected readonly nativeAriaDescribedBy = signal<string | null>(null);\n\n /**\n * Effective aria description: explicit input takes precedence over native attribute.\n * Prioritizes ariaDescription input, falls back to native attribute.\n * Empty string from ariaDescription is preserved (clears description).\n * @hidden\n */\n protected readonly effectiveAriaDescription = computed(\n () => this.ariaDescription() ?? this._nativeAriaDescription()\n );\n\n /**\n * Translated aria description for the current special button type, or null if not special.\n * @hidden\n */\n protected readonly defaultButtonTypeDescription = computed(() => {\n const type = this.fdTypeState() as keyof typeof this._typeDescriptions;\n return this._typeDescriptions[type]?.() ?? null;\n });\n\n /**\n * Calculate aria-label attribute\n * @hidden\n */\n protected readonly buttonArialabel = computed(() => {\n if (this.ariaLabel()) {\n return this.ariaLabel(); // return the input aria-label\n }\n\n const nativeLabel = this._nativeAriaLabel();\n\n if (nativeLabel) {\n return nativeLabel; // return the native attribute aria-label\n }\n\n if (this.isSpecialButtonType()) {\n return this.label() ?? this._glyphLabel() ?? null;\n }\n\n return null;\n });\n\n /**\n * Computed CSS classes for the button.\n * Built as a string to avoid array allocation overhead.\n * @hidden\n */\n protected readonly cssClass = computed(() => {\n let classes = 'fd-button';\n\n const type = this.fdTypeState();\n if (type) {\n classes += ` fd-button--${type}`;\n }\n\n if (this.fdMenu()) {\n classes += ' fd-button--menu';\n }\n\n if (this._disabledState() || this.ariaDisabled()) {\n classes += ' is-disabled';\n }\n\n if (this.toggledState()) {\n classes += ' fd-button--toggled';\n }\n\n return classes;\n });\n\n /**\n * Memoized glyph label for aria-label fallback.\n * Transforms glyph name (e.g., \"slim-arrow-down\") to readable text (e.g., \"slim arrow down\").\n * @hidden\n */\n private readonly _glyphLabel = computed(() => {\n const glyph = this.glyph();\n return glyph ? glyph.replace(/-/g, ' ') : null;\n });\n\n /**\n * Native aria-label attribute read from the DOM element.\n * Captured once after render for use in aria-label computation.\n * @hidden\n */\n private readonly _nativeAriaLabel = signal<string | null>(null);\n\n /**\n * Native aria-description attribute read from the DOM element.\n * Captured once after render for use in aria-description computation.\n * @hidden\n */\n private readonly _nativeAriaDescription = signal<string | null>(null);\n\n /** @hidden Resolves per-key translation signals */\n private readonly _translate = resolveTranslationSignalFn();\n\n /** @hidden Translated aria descriptions for each special button type */\n private readonly _typeDescriptions = {\n attention: this._translate('coreButton.attentionTypeDescription'),\n emphasized: this._translate('coreButton.emphasizedTypeDescription'),\n negative: this._translate('coreButton.negativeTypeDescription'),\n positive: this._translate('coreButton.positiveTypeDescription')\n } as const;\n\n /** @hidden */\n constructor() {\n super();\n }\n\n /**\n * Capture native aria-label and aria-description attributes during initialization.\n * Runs during ngOnInit to ensure attributes are captured before rendering the template.\n * The native aria-description is removed from the DOM after capture to prevent\n * duplicate accessibility attributes (ACC-264.1).\n */\n ngOnInit(): void {\n const nativeLabel = this.elementRef.nativeElement.getAttribute('aria-label');\n if (nativeLabel) {\n this._nativeAriaLabel.set(nativeLabel);\n }\n\n const nativeDescription = this.elementRef.nativeElement.getAttribute('aria-description');\n if (nativeDescription) {\n this._nativeAriaDescription.set(nativeDescription);\n // Remove native attribute to prevent ACC-264.1 (duplicate aria-description)\n this.elementRef.nativeElement.removeAttribute('aria-description');\n }\n\n const nativeDescribedBy = this.elementRef.nativeElement.getAttribute('aria-describedby');\n if (nativeDescribedBy) {\n this.nativeAriaDescribedBy.set(nativeDescribedBy);\n }\n }\n\n /** Forces the focus outline around the button, which is not default behavior in Safari. */\n protected clicked(event: Event): void {\n const target = event?.target as HTMLElement;\n // Target can be empty during unit tests execution.\n if (target && document.activeElement !== target) {\n target.focus();\n }\n }\n}\n","@if (glyph() && glyphPosition() === 'before') {\n <fd-icon [glyph]=\"glyph()\" [font]=\"glyphFont()\"></fd-icon>\n}\n@if (label()) {\n <span class=\"fd-button__text\">\n {{ label() }}\n </span>\n}\n<ng-content></ng-content>\n<ng-content select=\"fd-button-badge\"></ng-content>\n@if (glyph() && glyphPosition() === 'after') {\n <fd-icon [glyph]=\"glyph()\" [font]=\"glyphFont()\"></fd-icon>\n}\n@if (fdMenu()) {\n <fd-icon glyph=\"slim-arrow-down\"></fd-icon>\n}\n\n<!-- Custom description (ariaDescription input or native attribute).\n Skipped when user provides aria-describedby — they manage their own description references. -->\n@if (!ariaDescribedBy() && !nativeAriaDescribedBy() && effectiveAriaDescription()) {\n <span class=\"fd-button__sr-only\" [attr.id]=\"id() + '-description'\">{{ effectiveAriaDescription() }}</span>\n}\n\n<!-- Type description (special button types: emphasized, positive, negative, attention).\n Skipped when user provides aria-describedby — they manage their own description references. -->\n@if (!ariaDescribedBy() && !nativeAriaDescribedBy() && isSpecialButtonType()) {\n <span class=\"fd-button__sr-only\" [attr.id]=\"id() + '-type-description'\">{{\n ariaTypeDescription() || defaultButtonTypeDescription()\n }}</span>\n}\n","import { NgModule } from '@angular/core';\n\nimport { ButtonComponent } from './button.component';\n\n/**\n * @deprecated\n * Use `ButtonComponent` import instead\n */\n@NgModule({\n imports: [ButtonComponent],\n exports: [ButtonComponent]\n})\nexport class ButtonModule {}\n","/**\n * Generated bundle index. Do not edit.\n */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AAC5B,4BAAA,WAAW,EAAA;AACd;qBACJ,EAAA,OAAA,EACQ,CAAC,aAAa,CAAC,EAAA,QAAA,EAAA,uyCAAA,EAAA,MAAA,EAAA,CAAA,k3jDAAA,CAAA,EAAA;;;AEtD5B;;;AAGG;MAKU,YAAY,CAAA;8GAAZ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAZ,YAAY,EAAA,OAAA,EAAA,CAHX,eAAe,CAAA,EAAA,OAAA,EAAA,CACf,eAAe,CAAA,EAAA,CAAA,CAAA;AAEhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,YAHX,eAAe,CAAA,EAAA,CAAA,CAAA;;2FAGhB,YAAY,EAAA,UAAA,EAAA,CAAA;kBAJxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,eAAe,CAAC;oBAC1B,OAAO,EAAE,CAAC,eAAe;AAC5B,iBAAA;;;ACXD;;AAEG;;;;"}
|
|
@@ -17,7 +17,11 @@ var ContentDensityMode;
|
|
|
17
17
|
const isCompact = (density) => density === ContentDensityMode.COMPACT;
|
|
18
18
|
const isCondensed = (density) => density === ContentDensityMode.CONDENSED;
|
|
19
19
|
const isCozy = (density) => density === ContentDensityMode.COZY;
|
|
20
|
-
const isContentDensityMode = (density) => isCompact(density) ||
|
|
20
|
+
const isContentDensityMode = (density) => isCompact(density) ||
|
|
21
|
+
isCondensed(density) ||
|
|
22
|
+
isCozy(density) ||
|
|
23
|
+
density === ContentDensityGlobalKeyword ||
|
|
24
|
+
density === ContentDensityDefaultKeyword;
|
|
21
25
|
|
|
22
26
|
const CONTENT_DENSITY_DIRECTIVE = new InjectionToken('ContentDensityDirective');
|
|
23
27
|
|
|
@@ -535,16 +539,10 @@ const getDefaultContentDensity = (injector, configuration) => {
|
|
|
535
539
|
}
|
|
536
540
|
return injector.get(configuration.defaultContentDensity, undefined, undefined);
|
|
537
541
|
};
|
|
538
|
-
const initialContentDensity = (injector, configuration) => {
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
}
|
|
543
|
-
return getDefaultContentDensity(injector, {
|
|
544
|
-
...defaultContentDensityObserverConfigs,
|
|
545
|
-
...(configuration || {})
|
|
546
|
-
});
|
|
547
|
-
};
|
|
542
|
+
const initialContentDensity = (injector, configuration) => getDefaultContentDensity(injector, {
|
|
543
|
+
...defaultContentDensityObserverConfigs,
|
|
544
|
+
...(configuration || {})
|
|
545
|
+
});
|
|
548
546
|
/**
|
|
549
547
|
* Service for observing and managing content density in components.
|
|
550
548
|
*
|
|
@@ -603,7 +601,6 @@ class ContentDensityObserver {
|
|
|
603
601
|
// Set up config first (needed for validation)
|
|
604
602
|
this.config = {
|
|
605
603
|
...defaultContentDensityObserverConfigs,
|
|
606
|
-
...(this._parentContentDensityObserver?.config ?? {}),
|
|
607
604
|
...(_providedConfig || {})
|
|
608
605
|
};
|
|
609
606
|
// Resolve initial density
|
|
@@ -613,8 +610,8 @@ class ContentDensityObserver {
|
|
|
613
610
|
defaultContentDensity: resolvedInitialDensity,
|
|
614
611
|
contentDensityDirective: this._contentDensityDirective?.densityMode,
|
|
615
612
|
contentDensityService: this._globalContentDensityService ?? undefined,
|
|
616
|
-
parentContentDensityObserver: this.config
|
|
617
|
-
? this._parentContentDensityObserver
|
|
613
|
+
parentContentDensityObserver: this._parentContentDensityObserver?.config?.restrictChildContentDensity
|
|
614
|
+
? this._parentContentDensityObserver.contentDensity
|
|
618
615
|
: undefined
|
|
619
616
|
});
|
|
620
617
|
// Use linkedSignal for derived state with validation (Angular 21+ pattern)
|
|
@@ -730,17 +727,11 @@ class ContentDensityObserver {
|
|
|
730
727
|
}
|
|
731
728
|
const modifiers = this.config.modifiers;
|
|
732
729
|
const density = currentDensity ?? this._contentDensity();
|
|
733
|
-
const parentContentDensityEqual = this._parentContentDensityObserver?.value === density;
|
|
734
730
|
this._elements.forEach((element) => {
|
|
735
731
|
Object.values(modifiers).forEach((className) => {
|
|
736
732
|
this._renderer?.removeClass(element?.nativeElement, className);
|
|
737
733
|
});
|
|
738
|
-
|
|
739
|
-
this._applyUi5Marker(element?.nativeElement, density, parentContentDensityEqual);
|
|
740
|
-
// Simply remove all modifiers from current element. Content density state is covered by parent element.
|
|
741
|
-
if (parentContentDensityEqual && !this.config.alwaysAddModifiers) {
|
|
742
|
-
return;
|
|
743
|
-
}
|
|
734
|
+
this._applyUi5Marker(element?.nativeElement, density);
|
|
744
735
|
const modifierClass = modifiers[density];
|
|
745
736
|
if (modifierClass) {
|
|
746
737
|
this._renderer?.addClass(element?.nativeElement, modifierClass);
|
|
@@ -752,7 +743,7 @@ class ContentDensityObserver {
|
|
|
752
743
|
* UI5 Web Components only support cozy (default) and compact modes.
|
|
753
744
|
* Both COMPACT and CONDENSED fundamental-ngx modes map to UI5 compact.
|
|
754
745
|
*/
|
|
755
|
-
_applyUi5Marker(nativeElement, currentDensity
|
|
746
|
+
_applyUi5Marker(nativeElement, currentDensity) {
|
|
756
747
|
// Only apply to actual HTML elements, not comment/text nodes
|
|
757
748
|
if (!this.config.ui5Markers?.enabled ||
|
|
758
749
|
!nativeElement ||
|
|
@@ -761,11 +752,6 @@ class ContentDensityObserver {
|
|
|
761
752
|
return;
|
|
762
753
|
}
|
|
763
754
|
const ui5CompactAttribute = 'data-ui5-compact-size';
|
|
764
|
-
// Remove attribute if parent already has the same density (unless alwaysAddModifiers)
|
|
765
|
-
if (parentContentDensityEqual && !this.config.alwaysAddModifiers) {
|
|
766
|
-
this._renderer.removeAttribute(nativeElement, ui5CompactAttribute);
|
|
767
|
-
return;
|
|
768
|
-
}
|
|
769
755
|
// UI5 only has cozy (default) and compact modes
|
|
770
756
|
// Map: COMPACT -> compact, CONDENSED -> compact, COZY -> remove attribute
|
|
771
757
|
const isUi5Compact = currentDensity === ContentDensityMode.COMPACT || currentDensity === ContentDensityMode.CONDENSED;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fundamental-ngx-core-content-density.mjs","sources":["../../../../libs/core/content-density/content-density.types.ts","../../../../libs/core/content-density/types/content-density.mode.ts","../../../../libs/core/content-density/helpers/density-type-checkers.ts","../../../../libs/core/content-density/tokens/content-density-directive.ts","../../../../libs/core/content-density/directives/content-density.directive.ts","../../../../libs/core/content-density/classes/abstract-content-density-storage.ts","../../../../libs/core/content-density/tokens/content-density-storage-key.token.ts","../../../../libs/core/content-density/tokens/default-content-density.token.ts","../../../../libs/core/content-density/providers/local-content-density-storage.ts","../../../../libs/core/content-density/providers/memory-content-density-storage.ts","../../../../libs/core/content-density/providers/url-content-density-storage.ts","../../../../libs/core/content-density/services/global-content-density.service.ts","../../../../libs/core/content-density/provide-content-density.ts","../../../../libs/core/content-density/content-density.module.ts","../../../../libs/core/content-density/classes/content-density-observer.settings.ts","../../../../libs/core/content-density/helpers/get-changes-source.provider.ts","../../../../libs/core/content-density/variables/default-content-density-consumer-config.ts","../../../../libs/core/content-density/services/content-density-observer.service.ts","../../../../libs/core/content-density/providers/content-density-observer-providers.ts","../../../../libs/core/content-density/testing/mocked-local-content-density-directive.ts","../../../../libs/core/content-density/fundamental-ngx-core-content-density.ts"],"sourcesContent":["import { Provider } from '@angular/core';\nimport { HasElementRef } from '@fundamental-ngx/cdk/utils';\nimport { ContentDensityObserverSettings } from './classes/content-density-observer.settings';\nimport { ContentDensityMode } from './types/content-density.mode';\n\nexport const ContentDensityGlobalKeyword = 'global';\nexport const ContentDensityDefaultKeyword = 'default';\n\nexport type LocalContentDensityMode =\n | ContentDensityMode\n | typeof ContentDensityGlobalKeyword\n | typeof ContentDensityDefaultKeyword;\n\ninterface BaseContentDensityModuleConfig {\n defaultGlobalContentDensity?: ContentDensityMode;\n}\n\ninterface LocalStorageConfig {\n storage: 'localStorage';\n storageKey?: string;\n}\n\ninterface UrlStorageConfig {\n storage: 'url';\n storageKey?: string;\n}\n\ninterface CustomStorageConfig {\n storage: Provider;\n}\n\ninterface MemoryStorageConfig {\n storage: 'memory';\n}\n\nexport type ContentDensityModuleConfig = (\n | LocalStorageConfig\n | MemoryStorageConfig\n | UrlStorageConfig\n | CustomStorageConfig\n) &\n BaseContentDensityModuleConfig;\n\nexport interface ContentDensityObserverTarget extends HasElementRef {\n contentDensitySettings?: ContentDensityObserverSettings;\n}\n\nexport type ContentDensityCallbackFn = (target: ContentDensityMode) => void;\n","export enum ContentDensityMode {\n COZY = 'cozy',\n CONDENSED = 'condensed',\n COMPACT = 'compact'\n}\n","import { ContentDensityGlobalKeyword } from '../content-density.types';\nimport { ContentDensityMode } from '../types/content-density.mode';\n\nexport const isCompact = (density: any): boolean => density === ContentDensityMode.COMPACT;\nexport const isCondensed = (density: any): boolean => density === ContentDensityMode.CONDENSED;\nexport const isCozy = (density: any): boolean => density === ContentDensityMode.COZY;\nexport const isContentDensityMode = (density: any): boolean =>\n isCompact(density) || isCondensed(density) || isCozy(density) || density === ContentDensityGlobalKeyword;\n","import { InjectionToken, Signal } from '@angular/core';\nimport { LocalContentDensityMode } from '../content-density.types';\n\n/**\n * Interface for content density directive providers.\n * Uses signals for reactive content density tracking.\n */\nexport interface ContentDensityDirectiveRef {\n /** Current density mode as a signal */\n readonly densityMode: Signal<LocalContentDensityMode>;\n /** Current density mode value (deprecated) */\n readonly value: LocalContentDensityMode;\n}\n\nexport const CONTENT_DENSITY_DIRECTIVE = new InjectionToken<ContentDensityDirectiveRef>('ContentDensityDirective');\n","import {\n booleanAttribute,\n computed,\n Directive,\n effect,\n ElementRef,\n forwardRef,\n inject,\n input,\n isDevMode,\n Renderer2,\n signal\n} from '@angular/core';\nimport { ContentDensityGlobalKeyword, LocalContentDensityMode } from '../content-density.types';\nimport { isContentDensityMode } from '../helpers/density-type-checkers';\nimport { CONTENT_DENSITY_DIRECTIVE } from '../tokens/content-density-directive';\nimport { ContentDensityMode } from '../types/content-density.mode';\n\n/** UI5 attribute name for compact mode */\nconst UI5_COMPACT_ATTRIBUTE = 'data-ui5-compact-size';\n\n/**\n * Directive to control the content density of elements.\n * Used by density controllers and consumers.\n *\n * Provides signal-based state management for reactive content density tracking.\n * Also applies UI5 `data-ui5-compact-size` attribute for UI5 Web Components compatibility.\n *\n * @example\n * // Using fdContentDensity input\n * <fd-button [fdContentDensity]=\"'compact'\">Button</fd-button>\n *\n * // Using shorthand inputs\n * <fd-button fdCompact>Compact Button</fd-button>\n * <fd-button fdCozy>Cozy Button</fd-button>\n * <fd-button fdCondensed>Condensed Button</fd-button>\n */\n@Directive({\n selector: `[fdContentDensity]:not([fdCompact]):not([fdCondensed]):not([fdCozy]),\n [fdCompact]:not([fdContentDensity]):not([fdCondensed]):not([fdCozy]),\n [fdCondensed]:not([fdContentDensity]):not([fdCompact]):not([fdCozy]),\n [fdCozy]:not([fdContentDensity]):not([fdCompact]):not([fdCondensed])`,\n exportAs: 'fdContentDensity',\n providers: [\n {\n provide: CONTENT_DENSITY_DIRECTIVE,\n useExisting: forwardRef(() => ContentDensityDirective)\n }\n ]\n})\nexport class ContentDensityDirective {\n /**\n * Sets the content density of the element dynamically.\n * Accepts 'compact', 'cozy', 'condensed', or 'global'.\n *\n * @example\n * <fd-button [fdContentDensity]=\"'compact'\">Button</fd-button>\n */\n readonly fdContentDensity = input<`${ContentDensityMode}` | LocalContentDensityMode | ''>('');\n\n /**\n * Shorthand for setting compact density.\n * Equivalent to `[fdContentDensity]=\"'compact'\"`.\n *\n * @example\n * <fd-button fdCompact>Button</fd-button>\n * <fd-button [fdCompact]=\"isCompact\">Button</fd-button>\n */\n readonly fdCompact = input(false, { transform: booleanAttribute });\n\n /**\n * Shorthand for setting condensed density.\n * Equivalent to `[fdContentDensity]=\"'condensed'\"`.\n *\n * @example\n * <fd-button fdCondensed>Button</fd-button>\n * <fd-button [fdCondensed]=\"isCondensed\">Button</fd-button>\n */\n readonly fdCondensed = input(false, { transform: booleanAttribute });\n\n /**\n * Shorthand for setting cozy density.\n * Equivalent to `[fdContentDensity]=\"'cozy'\"`.\n *\n * @example\n * <fd-button fdCozy>Button</fd-button>\n * <fd-button [fdCozy]=\"isCozy\">Button</fd-button>\n */\n readonly fdCozy = input(false, { transform: booleanAttribute });\n\n /**\n * Current content density mode as a computed signal.\n * Resolves the density based on shorthand inputs or fdContentDensity value.\n *\n * @returns The resolved content density mode\n */\n readonly densityMode: ReturnType<typeof computed<LocalContentDensityMode>> = computed(() => {\n // Check programmatic override first\n const programmaticDensity = this._programmaticDensity();\n if (programmaticDensity !== null) {\n return programmaticDensity;\n }\n\n // Check shorthand inputs\n if (this.fdCompact()) {\n return ContentDensityMode.COMPACT;\n }\n if (this.fdCondensed()) {\n return ContentDensityMode.CONDENSED;\n }\n if (this.fdCozy()) {\n return ContentDensityMode.COZY;\n }\n\n // Then check fdContentDensity input\n const val = this.fdContentDensity();\n if (val === '') {\n return ContentDensityGlobalKeyword;\n }\n if (!isContentDensityMode(val)) {\n if (isDevMode()) {\n console.warn(\n `The value \"${val}\" is not a valid content density mode. Using \"${ContentDensityGlobalKeyword}\" instead.`\n );\n }\n return ContentDensityGlobalKeyword;\n }\n return val as LocalContentDensityMode;\n });\n\n /**\n * Current density mode value.\n *\n * @deprecated Use densityMode() signal instead\n * @returns The current content density mode\n */\n get value(): LocalContentDensityMode {\n return this.densityMode();\n }\n\n /** @hidden */\n private readonly _elementRef = inject(ElementRef);\n /** @hidden */\n private readonly _renderer = inject(Renderer2);\n\n /**\n * Internal signal for programmatic density updates.\n * Takes precedence over input bindings when set.\n */\n private readonly _programmaticDensity = signal<LocalContentDensityMode | null>(null);\n\n /** @hidden */\n constructor() {\n // Effect to apply UI5 attribute based on density mode\n effect(() => {\n this._applyUi5Attribute(this.densityMode());\n });\n }\n\n /**\n * Sets the content density programmatically.\n * Use this method when you need to update the density from code\n * (e.g., in host directives or dynamic scenarios).\n *\n * @param density The content density mode to set\n */\n setDensity(density: LocalContentDensityMode): void {\n this._programmaticDensity.set(density);\n }\n\n /**\n * Clears the programmatic density override.\n * After calling this, the density will be resolved from input bindings.\n */\n clearDensity(): void {\n this._programmaticDensity.set(null);\n }\n\n /**\n * Applies or removes the UI5 compact attribute based on density mode.\n * COMPACT and CONDENSED map to UI5 compact mode.\n * COZY and 'global' do not apply the attribute (UI5 defaults to cozy).\n * @hidden\n */\n private _applyUi5Attribute(density: LocalContentDensityMode): void {\n const nativeElement = this._elementRef?.nativeElement;\n // Only apply to actual HTML elements, not comment/text nodes\n if (!nativeElement || !this._renderer || !(nativeElement instanceof HTMLElement)) {\n return;\n }\n\n const isUi5Compact = density === ContentDensityMode.COMPACT || density === ContentDensityMode.CONDENSED;\n\n if (isUi5Compact) {\n this._renderer.setAttribute(nativeElement, UI5_COMPACT_ATTRIBUTE, '');\n } else {\n this._renderer.removeAttribute(nativeElement, UI5_COMPACT_ATTRIBUTE);\n }\n }\n}\n","import { Signal } from '@angular/core';\nimport { ContentDensityMode } from '../types/content-density.mode';\n\n/**\n * Abstract class for content density storage implementations.\n * The default implementation is MemoryContentDensityStorage.\n *\n * Provides a signal-based API for reactive content density tracking.\n *\n * @example\n * // Provide a custom storage implementation\n * providers: [\n * { provide: ContentDensityStorage, useClass: LocalContentDensityStorage }\n * ]\n */\nexport abstract class ContentDensityStorage {\n /**\n * Current content density as a readonly signal.\n * Read this signal to get the current density or react to changes.\n */\n abstract readonly contentDensity: Signal<ContentDensityMode>;\n\n /**\n * Updates the content density.\n * @param density The new content density mode\n */\n abstract setContentDensity(density: ContentDensityMode): void;\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const CONTENT_DENSITY_STORAGE_KEY = new InjectionToken<string>(\n 'Content density storage key for local storage or for url param',\n {\n factory: () => '__ContentDensity__'\n }\n);\n","import { InjectionToken } from '@angular/core';\nimport { ContentDensityMode } from '../types/content-density.mode';\n\nexport const DEFAULT_CONTENT_DENSITY = new InjectionToken<ContentDensityMode>('Default global content density', {\n factory: () => ContentDensityMode.COZY\n});\n","import { inject, Injectable, signal, WritableSignal } from '@angular/core';\nimport { LocalStorageService } from '@fundamental-ngx/cdk/utils';\nimport { ContentDensityStorage } from '../classes/abstract-content-density-storage';\nimport { CONTENT_DENSITY_STORAGE_KEY } from '../tokens/content-density-storage-key.token';\nimport { DEFAULT_CONTENT_DENSITY } from '../tokens/default-content-density.token';\nimport { ContentDensityMode } from '../types/content-density.mode';\n\n/**\n * Content density storage implementation using browser localStorage.\n * Persists the content density setting across browser sessions.\n */\n@Injectable()\nexport class LocalContentDensityStorage implements ContentDensityStorage {\n /** Current content density as a readonly signal. */\n readonly contentDensity: ReturnType<WritableSignal<ContentDensityMode>['asReadonly']>;\n\n private readonly _contentDensity: WritableSignal<ContentDensityMode>;\n private readonly _defaultContentDensity = inject(DEFAULT_CONTENT_DENSITY);\n private readonly _storageKey = inject(CONTENT_DENSITY_STORAGE_KEY);\n private readonly _storage = inject(LocalStorageService);\n\n constructor() {\n this._initialize();\n const storedDensity = this._storage.get(this._storageKey) || this._defaultContentDensity;\n this._contentDensity = signal<ContentDensityMode>(storedDensity);\n this.contentDensity = this._contentDensity.asReadonly();\n }\n\n /**\n * Updates the content density and persists it to localStorage.\n * @param density The new content density mode\n */\n setContentDensity(density: ContentDensityMode): void {\n this._storage.set(this._storageKey, density);\n this._contentDensity.set(density);\n }\n\n /** @hidden */\n private _initialize(): void {\n if (!this._storage.get(this._storageKey)) {\n this._storage.set(this._storageKey, this._defaultContentDensity);\n }\n }\n}\n","import { inject, Injectable, signal, WritableSignal } from '@angular/core';\nimport { ContentDensityStorage } from '../classes/abstract-content-density-storage';\nimport { DEFAULT_CONTENT_DENSITY } from '../tokens/default-content-density.token';\nimport { ContentDensityMode } from '../types/content-density.mode';\n\n/**\n * Content density storage implementation using in-memory state.\n * The setting is lost when the application is refreshed.\n * This is the default storage implementation.\n */\n@Injectable()\nexport class MemoryContentDensityStorage implements ContentDensityStorage {\n /** Current content density as a readonly signal. */\n readonly contentDensity: ReturnType<WritableSignal<ContentDensityMode>['asReadonly']>;\n\n private readonly _contentDensity: WritableSignal<ContentDensityMode>;\n\n constructor() {\n const defaultDensity = inject(DEFAULT_CONTENT_DENSITY);\n this._contentDensity = signal<ContentDensityMode>(defaultDensity);\n this.contentDensity = this._contentDensity.asReadonly();\n }\n\n /**\n * Updates the content density in memory.\n * @param density The new content density mode\n */\n setContentDensity(density: ContentDensityMode): void {\n this._contentDensity.set(density);\n }\n}\n","import { DestroyRef, inject, Injectable, signal, WritableSignal } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { ContentDensityStorage } from '../classes/abstract-content-density-storage';\nimport { CONTENT_DENSITY_STORAGE_KEY } from '../tokens/content-density-storage-key.token';\nimport { DEFAULT_CONTENT_DENSITY } from '../tokens/default-content-density.token';\nimport { ContentDensityMode } from '../types/content-density.mode';\n\n/**\n * Content density storage implementation using URL query parameters.\n * Persists the content density setting in the URL, allowing it to be\n * shared via links and bookmarked.\n */\n@Injectable()\nexport class UrlContentDensityStorage implements ContentDensityStorage {\n /** Current content density as a readonly signal. */\n readonly contentDensity: ReturnType<WritableSignal<ContentDensityMode>['asReadonly']>;\n\n private readonly _contentDensity: WritableSignal<ContentDensityMode>;\n private readonly _router = inject(Router);\n private readonly _activatedRoute = inject(ActivatedRoute);\n private readonly _defaultContentDensity = inject(DEFAULT_CONTENT_DENSITY);\n private readonly _storageKey = inject(CONTENT_DENSITY_STORAGE_KEY);\n private readonly _destroyRef = inject(DestroyRef);\n\n constructor() {\n this._contentDensity = signal<ContentDensityMode>(this._defaultContentDensity);\n this.contentDensity = this._contentDensity.asReadonly();\n this._initialize();\n }\n\n /**\n * Updates the content density and reflects it in the URL query parameters.\n * @param density The new content density mode\n */\n setContentDensity(density: ContentDensityMode): void {\n this._contentDensity.set(density);\n this._setUrlQueryParam(density);\n }\n\n /** @hidden */\n private _initialize(): void {\n // Subscribe to query param changes and update signal.\n // Automatically unsubscribes when the service is destroyed.\n this._activatedRoute.queryParams.pipe(takeUntilDestroyed(this._destroyRef)).subscribe((queryParams) => {\n const density = queryParams[this._storageKey];\n if (density && density !== this._contentDensity()) {\n this._contentDensity.set(density);\n }\n });\n }\n\n /** @hidden */\n private _setUrlQueryParam(density: ContentDensityMode): void {\n const currentUrl = this._router.url;\n const [pathname, search] = currentUrl.split('?');\n const params = new URLSearchParams(search || '');\n params.delete(this._storageKey);\n params.set(this._storageKey, density);\n\n this._router.navigateByUrl(`${pathname}?${params.toString()}`);\n }\n}\n","import { inject, Injectable, Injector, Signal } from '@angular/core';\nimport { toObservable } from '@angular/core/rxjs-interop';\nimport { Observable } from 'rxjs';\nimport { ContentDensityStorage } from '../classes/abstract-content-density-storage';\nimport { ContentDensityMode } from '../types/content-density.mode';\n\n/**\n * Service for managing global content density state.\n * Provides a signal-based API for reactive content density tracking.\n */\n@Injectable()\nexport class GlobalContentDensityService {\n /** Current content density as a readonly signal. */\n readonly currentDensitySignal: Signal<ContentDensityMode>;\n\n private readonly _storage = inject(ContentDensityStorage);\n private readonly _injector = inject(Injector);\n\n /**\n * Current content density value.\n *\n * @deprecated Use currentDensitySignal() instead\n * @returns The current content density mode\n */\n get currentContentDensity(): ContentDensityMode {\n return this.currentDensitySignal();\n }\n\n constructor() {\n this.currentDensitySignal = this._storage.contentDensity;\n }\n\n /**\n * Returns an observable that emits content density changes.\n *\n * @deprecated Use currentDensitySignal signal instead\n * @returns Observable of content density changes\n */\n contentDensityListener(): Observable<ContentDensityMode> {\n return toObservable(this._storage.contentDensity, { injector: this._injector });\n }\n\n /**\n * Updates the global content density.\n * @param density The new content density mode\n */\n updateContentDensity(density: ContentDensityMode): void {\n this._storage.setContentDensity(density);\n }\n}\n","import { DOCUMENT, Provider } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { ContentDensityStorage } from './classes/abstract-content-density-storage';\nimport { ContentDensityModuleConfig } from './content-density.types';\nimport { LocalContentDensityStorage } from './providers/local-content-density-storage';\nimport { MemoryContentDensityStorage } from './providers/memory-content-density-storage';\nimport { UrlContentDensityStorage } from './providers/url-content-density-storage';\nimport { GlobalContentDensityService } from './services/global-content-density.service';\nimport { CONTENT_DENSITY_STORAGE_KEY } from './tokens/content-density-storage-key.token';\nimport { DEFAULT_CONTENT_DENSITY } from './tokens/default-content-density.token';\nimport { ContentDensityMode } from './types/content-density.mode';\n\nfunction generateContentDensityStorage(config: ContentDensityModuleConfig): Provider {\n if (config.storage === 'localStorage') {\n return {\n provide: ContentDensityStorage,\n useClass: LocalContentDensityStorage\n };\n }\n if (config.storage === 'memory') {\n return {\n provide: ContentDensityStorage,\n useClass: MemoryContentDensityStorage\n };\n }\n if (config.storage === 'url') {\n return {\n provide: ContentDensityStorage,\n useClass: UrlContentDensityStorage,\n deps: [Router, ActivatedRoute, DEFAULT_CONTENT_DENSITY, CONTENT_DENSITY_STORAGE_KEY, DOCUMENT]\n };\n }\n return [];\n}\n\n/**\n * Provides content density services and configurations\n * @param config\n */\nexport function provideContentDensity(config?: ContentDensityModuleConfig): Provider[] {\n let storage: Provider;\n const conf: ContentDensityModuleConfig = config || { storage: 'memory' };\n\n if (typeof conf.storage === 'string') {\n storage = generateContentDensityStorage(conf);\n } else if (typeof conf.storage === 'object') {\n storage = conf.storage;\n } else {\n storage = {\n provide: ContentDensityStorage,\n useClass: MemoryContentDensityStorage\n };\n }\n return [\n {\n provide: DEFAULT_CONTENT_DENSITY,\n useValue: conf.defaultGlobalContentDensity || ContentDensityMode.COZY\n },\n {\n provide: CONTENT_DENSITY_STORAGE_KEY,\n useValue: (conf as any).storageKey || '__ContentDensity__'\n },\n GlobalContentDensityService,\n storage\n ];\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { ContentDensityModuleConfig } from './content-density.types';\nimport { ContentDensityDirective } from './directives/content-density.directive';\nimport { provideContentDensity } from './provide-content-density';\n\n/**\n * @deprecated\n * Use direct imports of components and directives.\n */\n@NgModule({\n imports: [ContentDensityDirective],\n exports: [ContentDensityDirective]\n})\nexport class ContentDensityModule {\n /** Module with providers */\n static forRoot(config?: ContentDensityModuleConfig): ModuleWithProviders<ContentDensityModule> {\n return {\n ngModule: ContentDensityModule,\n providers: [provideContentDensity(config)]\n };\n }\n}\n","import { FactorySansProvider, ProviderToken } from '@angular/core';\nimport { ContentDensityMode } from '../types/content-density.mode';\n\n/**\n * Configuration for UI5 Web Components content density markers.\n * UI5 Web Components use `data-ui5-compact-size` attribute for compact mode.\n * Cozy is the default mode (no marker needed).\n */\nexport interface Ui5ContentDensityMarkers {\n /**\n * Whether to apply UI5 content density markers.\n * When enabled, `data-ui5-compact-size` attribute will be applied\n * for COMPACT and CONDENSED modes (UI5 only supports cozy/compact).\n * @default true\n */\n enabled: boolean;\n}\n\nexport class ContentDensityObserverSettings {\n /** Classes to be added to the element. */\n modifiers?: Partial<Record<ContentDensityMode, string>>;\n /** Supported content densities. */\n supportedContentDensity?: ContentDensityMode[];\n /** Default content density. */\n defaultContentDensity?: ContentDensityMode | ProviderToken<ContentDensityMode> | FactorySansProvider;\n /** Whether in debug mode. */\n debug?: boolean;\n /** Whether to always add class modifiers. Useful for components that are detached from its parent component. */\n alwaysAddModifiers?: boolean;\n /** Whether to force child components to restrict supported content density with current component's one. */\n restrictChildContentDensity?: boolean;\n /**\n * Configuration for UI5 Web Components content density markers.\n * When enabled, applies `data-ui5-compact-size` attribute for compact/condensed modes.\n */\n ui5Markers?: Ui5ContentDensityMarkers;\n}\n","import { computed, Signal } from '@angular/core';\nimport {\n ContentDensityDefaultKeyword,\n ContentDensityGlobalKeyword,\n LocalContentDensityMode\n} from '../content-density.types';\nimport { GlobalContentDensityService } from '../services/global-content-density.service';\nimport { ContentDensityMode } from '../types/content-density.mode';\n\n/**\n * Creates a computed signal that resolves the content density from multiple sources.\n *\n * Priority order:\n * 1. Parent content density observer (if restrictChildContentDensity is enabled)\n * 2. Content density directive\n * 3. Global content density service\n * 4. Default content density\n *\n * Special keywords are resolved:\n * - 'default' -> uses defaultContentDensity\n * - 'global' -> uses global service value\n */\nexport const getChangesSource = (params: {\n defaultContentDensity: ContentDensityMode;\n contentDensityDirective?: Signal<LocalContentDensityMode>;\n contentDensityService?: GlobalContentDensityService;\n parentContentDensityObserver?: Signal<ContentDensityMode>;\n}): Signal<ContentDensityMode> =>\n computed(() => {\n // Get the raw mode from the appropriate source (priority order)\n const rawMode: LocalContentDensityMode = params.parentContentDensityObserver\n ? params.parentContentDensityObserver()\n : params.contentDensityDirective\n ? params.contentDensityDirective()\n : (params.contentDensityService?.currentDensitySignal() ?? params.defaultContentDensity);\n\n // Resolve special keywords\n if (rawMode === ContentDensityDefaultKeyword) {\n return params.defaultContentDensity;\n }\n if (rawMode === ContentDensityGlobalKeyword) {\n return params.contentDensityService?.currentDensitySignal() ?? params.defaultContentDensity;\n }\n\n return rawMode;\n });\n","import { ContentDensityObserverSettings } from '../classes/content-density-observer.settings';\nimport { ContentDensityMode } from '../types/content-density.mode';\n\nexport const defaultContentDensityObserverConfigs: Required<ContentDensityObserverSettings> = {\n modifiers: {\n [ContentDensityMode.COMPACT]: 'is-compact',\n [ContentDensityMode.COZY]: 'is-cozy',\n [ContentDensityMode.CONDENSED]: 'is-condensed'\n },\n supportedContentDensity: [ContentDensityMode.COMPACT, ContentDensityMode.COZY],\n defaultContentDensity: ContentDensityMode.COZY,\n debug: false,\n alwaysAddModifiers: false,\n restrictChildContentDensity: false,\n ui5Markers: {\n enabled: true\n }\n};\n","import {\n afterNextRender,\n computed,\n DestroyRef,\n effect,\n ElementRef,\n FactorySansProvider,\n inject,\n Injectable,\n Injector,\n linkedSignal,\n Renderer2\n} from '@angular/core';\nimport { toObservable } from '@angular/core/rxjs-interop';\nimport { Observable, Observer, Subscription } from 'rxjs';\nimport { ContentDensityObserverSettings } from '../classes/content-density-observer.settings';\nimport { ContentDensityObserverTarget } from '../content-density.types';\nimport { getChangesSource } from '../helpers/get-changes-source.provider';\nimport { GlobalContentDensityService } from '../services/global-content-density.service';\nimport { CONTENT_DENSITY_DIRECTIVE } from '../tokens/content-density-directive';\nimport { ContentDensityMode } from '../types/content-density.mode';\nimport { defaultContentDensityObserverConfigs } from '../variables/default-content-density-consumer-config';\n\nconst isFactoryProvider = (obj: any): obj is FactorySansProvider => !!(obj && (obj as FactorySansProvider).useFactory);\n\nconst getDeps = (injector: Injector, defaultContentDensity: FactorySansProvider): Array<any> =>\n (defaultContentDensity.deps || []).map((dep): any => {\n if (Array.isArray(dep)) {\n let type;\n let flags = {};\n for (let index = 0; index < dep.length; index++) {\n const flag = dep[index]['__NG_DI_FLAG__'];\n if (typeof flag === 'number') {\n flags = { ...flags, flag };\n } else {\n type = dep[index];\n }\n }\n return injector.get(type, undefined, flags);\n }\n return injector.get(dep, undefined, {});\n });\n\nconst getDefaultContentDensity = (\n injector: Injector,\n configuration: Required<ContentDensityObserverSettings>\n): ContentDensityMode => {\n if (typeof configuration.defaultContentDensity === 'string') {\n return configuration.defaultContentDensity as ContentDensityMode;\n }\n if (isFactoryProvider(configuration.defaultContentDensity)) {\n const deps = getDeps(injector, configuration.defaultContentDensity);\n return configuration.defaultContentDensity.useFactory(...deps);\n }\n return injector.get(configuration.defaultContentDensity, undefined, undefined);\n};\n\nconst initialContentDensity = (\n injector: Injector,\n configuration?: ContentDensityObserverSettings\n): ContentDensityMode => {\n const serviceValue = injector.get(GlobalContentDensityService, null, { optional: true })?.currentContentDensity;\n if (serviceValue) {\n return serviceValue;\n }\n return getDefaultContentDensity(injector, {\n ...defaultContentDensityObserverConfigs,\n ...(configuration || {})\n });\n};\n\n/**\n * Service for observing and managing content density in components.\n *\n * Provides signal-based API for reactive content density tracking.\n * Uses linkedSignal (Angular 21+) for derived state with validation.\n */\n@Injectable()\nexport class ContentDensityObserver {\n /** Configuration for this observer */\n readonly config: ContentDensityObserverSettings;\n\n /**\n * Current content density as a readonly signal.\n * Uses linkedSignal internally for reactive updates with validation.\n */\n readonly contentDensity: ReturnType<\n ReturnType<typeof linkedSignal<ContentDensityMode, ContentDensityMode>>['asReadonly']\n >;\n\n /** Whether content density is compact (signal) */\n readonly isCompactSignal: ReturnType<typeof computed<boolean>>;\n\n /** Whether content density is cozy (signal) */\n readonly isCozySignal: ReturnType<typeof computed<boolean>>;\n\n /** Whether content density is condensed (signal) */\n readonly isCondensedSignal: ReturnType<typeof computed<boolean>>;\n\n /**\n * Current content density signal\n * @deprecated Use contentDensity() instead\n */\n readonly contentDensity$: ReturnType<\n ReturnType<typeof linkedSignal<ContentDensityMode, ContentDensityMode>>['asReadonly']\n >;\n\n /**\n * Observable for compact state changes\n * @deprecated Use isCompactSignal signal instead\n */\n readonly isCompact$: Observable<boolean>;\n\n /**\n * Observable for cozy state changes\n * @deprecated Use isCozySignal signal instead\n */\n readonly isCozy$: Observable<boolean>;\n\n /**\n * Observable for condensed state changes\n * @deprecated Use isCondensedSignal signal instead\n */\n readonly isCondensed$: Observable<boolean>;\n\n /**\n * Observable of content density changes\n * @deprecated Use contentDensity signal instead\n */\n readonly contentDensity$$: Observable<ContentDensityMode>;\n\n /**\n * Internal linkedSignal for content density with validation.\n * linkedSignal (Angular 21+) automatically tracks source changes\n * and applies the computation (validation/fallback).\n */\n private readonly _contentDensity: ReturnType<typeof linkedSignal<ContentDensityMode, ContentDensityMode>>;\n\n private readonly _changesSource: ReturnType<typeof computed<ContentDensityMode>>;\n\n private readonly _destroyRef = inject(DestroyRef);\n\n private readonly _alternativeTo = {\n [ContentDensityMode.COMPACT]: (): ContentDensityMode =>\n this._isSupported(ContentDensityMode.CONDENSED) ? ContentDensityMode.CONDENSED : ContentDensityMode.COZY,\n [ContentDensityMode.CONDENSED]: (): ContentDensityMode =>\n this._isSupported(ContentDensityMode.COMPACT) ? ContentDensityMode.COMPACT : ContentDensityMode.COZY,\n [ContentDensityMode.COZY]: (): ContentDensityMode => ContentDensityMode.COZY // No alternative here, everyone should support it\n };\n\n private _globalContentDensityService = inject(GlobalContentDensityService, {\n optional: true\n });\n\n private _contentDensityDirective = inject(CONTENT_DENSITY_DIRECTIVE, {\n optional: true\n });\n\n private _parentContentDensityObserver = inject(ContentDensityObserver, {\n optional: true,\n skipSelf: true\n });\n\n private _renderer: Renderer2 | null = inject(Renderer2);\n\n private _elementRef: ElementRef<any> | null = inject(ElementRef);\n\n private _elements = [this._elementRef];\n\n /**\n * Current content density value\n * @deprecated Use contentDensity() signal instead\n */\n get value(): ContentDensityMode {\n return this._contentDensity();\n }\n\n /**\n * Whether content density is compact\n * @deprecated Use isCompactSignal() signal instead\n */\n get isCompact(): boolean {\n return this.isCompactSignal();\n }\n\n /**\n * Whether content density is cozy\n * @deprecated Use isCozySignal() signal instead\n */\n get isCozy(): boolean {\n return this.isCozySignal();\n }\n\n /**\n * Whether content density is condensed\n * @deprecated Use isCondensedSignal() signal instead\n */\n get isCondensed(): boolean {\n return this.isCondensedSignal();\n }\n\n constructor(_injector: Injector, _providedConfig?: ContentDensityObserverSettings) {\n // Set up config first (needed for validation)\n this.config = {\n ...defaultContentDensityObserverConfigs,\n ...(this._parentContentDensityObserver?.config ?? {}),\n ...(_providedConfig || {})\n };\n\n // Resolve initial density\n const resolvedInitialDensity = initialContentDensity(_injector, _providedConfig);\n\n // Get the changes source as a computed signal\n this._changesSource = getChangesSource({\n defaultContentDensity: resolvedInitialDensity,\n contentDensityDirective: this._contentDensityDirective?.densityMode,\n contentDensityService: this._globalContentDensityService ?? undefined,\n parentContentDensityObserver: this.config.restrictChildContentDensity\n ? this._parentContentDensityObserver?.contentDensity\n : undefined\n });\n\n // Use linkedSignal for derived state with validation (Angular 21+ pattern)\n // linkedSignal automatically updates when source changes, applying the computation\n this._contentDensity = linkedSignal({\n source: this._changesSource,\n computation: (source) => {\n // Guard against undefined/null source values\n if (!source || typeof source !== 'string') {\n return ContentDensityMode.COZY; // Safe fallback to default\n }\n return this._validateAndFallback(source as ContentDensityMode);\n }\n });\n\n // Public readonly signal\n this.contentDensity = this._contentDensity.asReadonly();\n\n // Computed boolean signals\n this.isCompactSignal = computed(() => this._contentDensity() === ContentDensityMode.COMPACT);\n this.isCozySignal = computed(() => this._contentDensity() === ContentDensityMode.COZY);\n this.isCondensedSignal = computed(() => this._contentDensity() === ContentDensityMode.CONDENSED);\n\n // Backward compatible signal aliases\n this.contentDensity$ = this.contentDensity;\n\n // Backward compatible observables\n this.isCompact$ = toObservable(this.isCompactSignal, { injector: _injector });\n this.isCozy$ = toObservable(this.isCozySignal, { injector: _injector });\n this.isCondensed$ = toObservable(this.isCondensedSignal, { injector: _injector });\n this.contentDensity$$ = toObservable(this._contentDensity, { injector: _injector });\n\n // Effect purely for DOM side effects (CSS classes and UI5 attribute)\n // This follows Angular 21 best practices: effects should only do side effects, not update signals\n effect(() => {\n // Read the signal to track changes\n const density = this._contentDensity();\n // Apply DOM changes (side effect)\n this._applyClass(density);\n });\n\n // Apply initial CSS class after first render (zoneless-compatible)\n afterNextRender(() => {\n this._applyClass(this._contentDensity());\n });\n\n // Register cleanup on destroy\n this._destroyRef.onDestroy(() => {\n this._cleanup();\n if (this.config.debug) {\n console.warn('ContentDensityObserver: destroyed');\n }\n });\n }\n\n /**\n * Add consumers to observe content density changes\n * @deprecated Use signal bindings instead\n */\n consume(...consumers: ContentDensityObserverTarget[]): void {\n this._elements.concat(...consumers.map((c) => c.elementRef));\n }\n\n /**\n * Completes the observer and cleans up resources\n * @deprecated Cleanup is automatic via DestroyRef\n */\n complete(): void {\n this._cleanup();\n }\n\n /**\n * Returns an observable of content density changes\n * @deprecated Use contentDensity signal instead\n */\n asObservable(): Observable<ContentDensityMode> {\n return this.contentDensity$$;\n }\n\n /**\n * Subscribe to content density changes.\n * @deprecated Use contentDensity signal with effect() instead.\n * This method exists for backward compatibility.\n */\n subscribe(observer?: Partial<Observer<ContentDensityMode>>): Subscription {\n return this.contentDensity$$.subscribe(observer);\n }\n\n /**\n * Remove a consumer from the observer\n * @deprecated Use signal bindings instead\n */\n removeConsumer(consumer: ContentDensityObserverTarget): void {\n this._elements.splice(this._elements.indexOf(consumer.elementRef), 1);\n }\n\n private _validateAndFallback(density: ContentDensityMode): ContentDensityMode {\n if (this.config.debug) {\n console.warn(`ContentDensityObserver: density changed to ${density}`);\n }\n if (!this._isSupported(density)) {\n try {\n if (this.config.debug) {\n console.warn(\n `ContentDensityObserver: ${density} is not supported. Failing back to alternative one.`\n );\n }\n return this._alternativeTo[density]();\n } catch {\n throw new Error(`ContentDensityObserver: density ${density} is not supported`);\n }\n }\n return density;\n }\n\n private _cleanup(): void {\n this._parentContentDensityObserver = null;\n this._contentDensityDirective = null;\n this._globalContentDensityService = null;\n this._elementRef = null;\n this._renderer = null;\n this._elements = [];\n }\n\n private _applyClass(currentDensity?: ContentDensityMode): void {\n if (!this.config?.modifiers) {\n return;\n }\n const modifiers = this.config.modifiers;\n const density = currentDensity ?? this._contentDensity();\n\n const parentContentDensityEqual = this._parentContentDensityObserver?.value === density;\n\n this._elements.forEach((element) => {\n Object.values(modifiers).forEach((className) => {\n this._renderer?.removeClass(element?.nativeElement, className);\n });\n\n // Apply/remove UI5 compact marker attribute\n this._applyUi5Marker(element?.nativeElement, density, parentContentDensityEqual);\n\n // Simply remove all modifiers from current element. Content density state is covered by parent element.\n if (parentContentDensityEqual && !this.config.alwaysAddModifiers) {\n return;\n }\n const modifierClass = modifiers[density];\n if (modifierClass) {\n this._renderer?.addClass(element?.nativeElement, modifierClass);\n }\n });\n }\n\n /**\n * Apply or remove UI5 Web Components compact marker.\n * UI5 Web Components only support cozy (default) and compact modes.\n * Both COMPACT and CONDENSED fundamental-ngx modes map to UI5 compact.\n */\n private _applyUi5Marker(\n nativeElement: HTMLElement | undefined,\n currentDensity: ContentDensityMode,\n parentContentDensityEqual: boolean\n ): void {\n // Only apply to actual HTML elements, not comment/text nodes\n if (\n !this.config.ui5Markers?.enabled ||\n !nativeElement ||\n !this._renderer ||\n !(nativeElement instanceof HTMLElement)\n ) {\n return;\n }\n\n const ui5CompactAttribute = 'data-ui5-compact-size';\n\n // Remove attribute if parent already has the same density (unless alwaysAddModifiers)\n if (parentContentDensityEqual && !this.config.alwaysAddModifiers) {\n this._renderer.removeAttribute(nativeElement, ui5CompactAttribute);\n return;\n }\n\n // UI5 only has cozy (default) and compact modes\n // Map: COMPACT -> compact, CONDENSED -> compact, COZY -> remove attribute\n const isUi5Compact =\n currentDensity === ContentDensityMode.COMPACT || currentDensity === ContentDensityMode.CONDENSED;\n\n if (isUi5Compact) {\n this._renderer.setAttribute(nativeElement, ui5CompactAttribute, '');\n } else {\n this._renderer.removeAttribute(nativeElement, ui5CompactAttribute);\n }\n }\n\n private _isSupported(density: ContentDensityMode): boolean {\n return this.config.supportedContentDensity?.includes(density) ?? false;\n }\n}\n","import { Provider } from '@angular/core';\nimport { consumerProviderFactory } from '@fundamental-ngx/cdk/utils';\nimport { ContentDensityObserverSettings } from '../classes/content-density-observer.settings';\nimport { ContentDensityObserver } from '../services/content-density-observer.service';\n\n/**\n * Creates provider for ContentDensityObserver\n */\nexport function contentDensityObserverProviders(params?: ContentDensityObserverSettings): Provider[] {\n return [consumerProviderFactory(ContentDensityObserver, params)];\n}\n","import { Provider, signal } from '@angular/core';\nimport { ContentDensityGlobalKeyword, LocalContentDensityMode } from '../content-density.types';\nimport { CONTENT_DENSITY_DIRECTIVE, ContentDensityDirectiveRef } from '../tokens/content-density-directive';\n\n/** @hidden */\nexport function mockedLocalContentDensityDirective(\n defaultValue: LocalContentDensityMode = ContentDensityGlobalKeyword\n): { contentDensityDirectiveProvider: Provider; setContentDensity: (cd: LocalContentDensityMode) => void } {\n const densitySignal = signal<LocalContentDensityMode>(defaultValue);\n\n const mockDirective: ContentDensityDirectiveRef = {\n densityMode: densitySignal.asReadonly(),\n get value(): LocalContentDensityMode {\n return densitySignal();\n }\n };\n\n return {\n contentDensityDirectiveProvider: {\n provide: CONTENT_DENSITY_DIRECTIVE,\n useValue: mockDirective\n },\n setContentDensity: (cd: LocalContentDensityMode) => densitySignal.set(cd)\n };\n}\n","/**\n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/content-density.types.ts","../../../../libs/core/content-density/types/content-density.mode.ts","../../../../libs/core/content-density/helpers/density-type-checkers.ts","../../../../libs/core/content-density/tokens/content-density-directive.ts","../../../../libs/core/content-density/directives/content-density.directive.ts","../../../../libs/core/content-density/classes/abstract-content-density-storage.ts","../../../../libs/core/content-density/tokens/content-density-storage-key.token.ts","../../../../libs/core/content-density/tokens/default-content-density.token.ts","../../../../libs/core/content-density/providers/local-content-density-storage.ts","../../../../libs/core/content-density/providers/memory-content-density-storage.ts","../../../../libs/core/content-density/providers/url-content-density-storage.ts","../../../../libs/core/content-density/services/global-content-density.service.ts","../../../../libs/core/content-density/provide-content-density.ts","../../../../libs/core/content-density/content-density.module.ts","../../../../libs/core/content-density/classes/content-density-observer.settings.ts","../../../../libs/core/content-density/helpers/get-changes-source.provider.ts","../../../../libs/core/content-density/variables/default-content-density-consumer-config.ts","../../../../libs/core/content-density/services/content-density-observer.service.ts","../../../../libs/core/content-density/providers/content-density-observer-providers.ts","../../../../libs/core/content-density/testing/mocked-local-content-density-directive.ts","../../../../libs/core/content-density/fundamental-ngx-core-content-density.ts"],"sourcesContent":["import { Provider } from '@angular/core';\nimport { HasElementRef } from '@fundamental-ngx/cdk/utils';\nimport { ContentDensityObserverSettings } from './classes/content-density-observer.settings';\nimport { ContentDensityMode } from './types/content-density.mode';\n\nexport const ContentDensityGlobalKeyword = 'global';\nexport const ContentDensityDefaultKeyword = 'default';\n\nexport type LocalContentDensityMode =\n | ContentDensityMode\n | typeof ContentDensityGlobalKeyword\n | typeof ContentDensityDefaultKeyword;\n\ninterface BaseContentDensityModuleConfig {\n defaultGlobalContentDensity?: ContentDensityMode;\n}\n\ninterface LocalStorageConfig {\n storage: 'localStorage';\n storageKey?: string;\n}\n\ninterface UrlStorageConfig {\n storage: 'url';\n storageKey?: string;\n}\n\ninterface CustomStorageConfig {\n storage: Provider;\n}\n\ninterface MemoryStorageConfig {\n storage: 'memory';\n}\n\nexport type ContentDensityModuleConfig = (\n | LocalStorageConfig\n | MemoryStorageConfig\n | UrlStorageConfig\n | CustomStorageConfig\n) &\n BaseContentDensityModuleConfig;\n\nexport interface ContentDensityObserverTarget extends HasElementRef {\n contentDensitySettings?: ContentDensityObserverSettings;\n}\n\nexport type ContentDensityCallbackFn = (target: ContentDensityMode) => void;\n","export enum ContentDensityMode {\n COZY = 'cozy',\n CONDENSED = 'condensed',\n COMPACT = 'compact'\n}\n","import { ContentDensityDefaultKeyword, ContentDensityGlobalKeyword } from '../content-density.types';\nimport { ContentDensityMode } from '../types/content-density.mode';\n\nexport const isCompact = (density: any): boolean => density === ContentDensityMode.COMPACT;\nexport const isCondensed = (density: any): boolean => density === ContentDensityMode.CONDENSED;\nexport const isCozy = (density: any): boolean => density === ContentDensityMode.COZY;\nexport const isContentDensityMode = (density: any): boolean =>\n isCompact(density) ||\n isCondensed(density) ||\n isCozy(density) ||\n density === ContentDensityGlobalKeyword ||\n density === ContentDensityDefaultKeyword;\n","import { InjectionToken, Signal } from '@angular/core';\nimport { LocalContentDensityMode } from '../content-density.types';\n\n/**\n * Interface for content density directive providers.\n * Uses signals for reactive content density tracking.\n */\nexport interface ContentDensityDirectiveRef {\n /** Current density mode as a signal */\n readonly densityMode: Signal<LocalContentDensityMode>;\n /** Current density mode value (deprecated) */\n readonly value: LocalContentDensityMode;\n}\n\nexport const CONTENT_DENSITY_DIRECTIVE = new InjectionToken<ContentDensityDirectiveRef>('ContentDensityDirective');\n","import {\n booleanAttribute,\n computed,\n Directive,\n effect,\n ElementRef,\n forwardRef,\n inject,\n input,\n isDevMode,\n Renderer2,\n signal\n} from '@angular/core';\nimport { ContentDensityGlobalKeyword, LocalContentDensityMode } from '../content-density.types';\nimport { isContentDensityMode } from '../helpers/density-type-checkers';\nimport { CONTENT_DENSITY_DIRECTIVE } from '../tokens/content-density-directive';\nimport { ContentDensityMode } from '../types/content-density.mode';\n\n/** UI5 attribute name for compact mode */\nconst UI5_COMPACT_ATTRIBUTE = 'data-ui5-compact-size';\n\n/**\n * Directive to control the content density of elements.\n * Used by density controllers and consumers.\n *\n * Provides signal-based state management for reactive content density tracking.\n * Also applies UI5 `data-ui5-compact-size` attribute for UI5 Web Components compatibility.\n *\n * @example\n * // Using fdContentDensity input\n * <fd-button [fdContentDensity]=\"'compact'\">Button</fd-button>\n *\n * // Using shorthand inputs\n * <fd-button fdCompact>Compact Button</fd-button>\n * <fd-button fdCozy>Cozy Button</fd-button>\n * <fd-button fdCondensed>Condensed Button</fd-button>\n */\n@Directive({\n selector: `[fdContentDensity]:not([fdCompact]):not([fdCondensed]):not([fdCozy]),\n [fdCompact]:not([fdContentDensity]):not([fdCondensed]):not([fdCozy]),\n [fdCondensed]:not([fdContentDensity]):not([fdCompact]):not([fdCozy]),\n [fdCozy]:not([fdContentDensity]):not([fdCompact]):not([fdCondensed])`,\n exportAs: 'fdContentDensity',\n providers: [\n {\n provide: CONTENT_DENSITY_DIRECTIVE,\n useExisting: forwardRef(() => ContentDensityDirective)\n }\n ]\n})\nexport class ContentDensityDirective {\n /**\n * Sets the content density of the element dynamically.\n * Accepts 'compact', 'cozy', 'condensed', or 'global'.\n *\n * @example\n * <fd-button [fdContentDensity]=\"'compact'\">Button</fd-button>\n */\n readonly fdContentDensity = input<`${ContentDensityMode}` | LocalContentDensityMode | ''>('');\n\n /**\n * Shorthand for setting compact density.\n * Equivalent to `[fdContentDensity]=\"'compact'\"`.\n *\n * @example\n * <fd-button fdCompact>Button</fd-button>\n * <fd-button [fdCompact]=\"isCompact\">Button</fd-button>\n */\n readonly fdCompact = input(false, { transform: booleanAttribute });\n\n /**\n * Shorthand for setting condensed density.\n * Equivalent to `[fdContentDensity]=\"'condensed'\"`.\n *\n * @example\n * <fd-button fdCondensed>Button</fd-button>\n * <fd-button [fdCondensed]=\"isCondensed\">Button</fd-button>\n */\n readonly fdCondensed = input(false, { transform: booleanAttribute });\n\n /**\n * Shorthand for setting cozy density.\n * Equivalent to `[fdContentDensity]=\"'cozy'\"`.\n *\n * @example\n * <fd-button fdCozy>Button</fd-button>\n * <fd-button [fdCozy]=\"isCozy\">Button</fd-button>\n */\n readonly fdCozy = input(false, { transform: booleanAttribute });\n\n /**\n * Current content density mode as a computed signal.\n * Resolves the density based on shorthand inputs or fdContentDensity value.\n *\n * @returns The resolved content density mode\n */\n readonly densityMode: ReturnType<typeof computed<LocalContentDensityMode>> = computed(() => {\n // Check programmatic override first\n const programmaticDensity = this._programmaticDensity();\n if (programmaticDensity !== null) {\n return programmaticDensity;\n }\n\n // Check shorthand inputs\n if (this.fdCompact()) {\n return ContentDensityMode.COMPACT;\n }\n if (this.fdCondensed()) {\n return ContentDensityMode.CONDENSED;\n }\n if (this.fdCozy()) {\n return ContentDensityMode.COZY;\n }\n\n // Then check fdContentDensity input\n const val = this.fdContentDensity();\n if (val === '') {\n return ContentDensityGlobalKeyword;\n }\n if (!isContentDensityMode(val)) {\n if (isDevMode()) {\n console.warn(\n `The value \"${val}\" is not a valid content density mode. Using \"${ContentDensityGlobalKeyword}\" instead.`\n );\n }\n return ContentDensityGlobalKeyword;\n }\n return val as LocalContentDensityMode;\n });\n\n /**\n * Current density mode value.\n *\n * @deprecated Use densityMode() signal instead\n * @returns The current content density mode\n */\n get value(): LocalContentDensityMode {\n return this.densityMode();\n }\n\n /** @hidden */\n private readonly _elementRef = inject(ElementRef);\n /** @hidden */\n private readonly _renderer = inject(Renderer2);\n\n /**\n * Internal signal for programmatic density updates.\n * Takes precedence over input bindings when set.\n */\n private readonly _programmaticDensity = signal<LocalContentDensityMode | null>(null);\n\n /** @hidden */\n constructor() {\n // Effect to apply UI5 attribute based on density mode\n effect(() => {\n this._applyUi5Attribute(this.densityMode());\n });\n }\n\n /**\n * Sets the content density programmatically.\n * Use this method when you need to update the density from code\n * (e.g., in host directives or dynamic scenarios).\n *\n * @param density The content density mode to set\n */\n setDensity(density: LocalContentDensityMode): void {\n this._programmaticDensity.set(density);\n }\n\n /**\n * Clears the programmatic density override.\n * After calling this, the density will be resolved from input bindings.\n */\n clearDensity(): void {\n this._programmaticDensity.set(null);\n }\n\n /**\n * Applies or removes the UI5 compact attribute based on density mode.\n * COMPACT and CONDENSED map to UI5 compact mode.\n * COZY and 'global' do not apply the attribute (UI5 defaults to cozy).\n * @hidden\n */\n private _applyUi5Attribute(density: LocalContentDensityMode): void {\n const nativeElement = this._elementRef?.nativeElement;\n // Only apply to actual HTML elements, not comment/text nodes\n if (!nativeElement || !this._renderer || !(nativeElement instanceof HTMLElement)) {\n return;\n }\n\n const isUi5Compact = density === ContentDensityMode.COMPACT || density === ContentDensityMode.CONDENSED;\n\n if (isUi5Compact) {\n this._renderer.setAttribute(nativeElement, UI5_COMPACT_ATTRIBUTE, '');\n } else {\n this._renderer.removeAttribute(nativeElement, UI5_COMPACT_ATTRIBUTE);\n }\n }\n}\n","import { Signal } from '@angular/core';\nimport { ContentDensityMode } from '../types/content-density.mode';\n\n/**\n * Abstract class for content density storage implementations.\n * The default implementation is MemoryContentDensityStorage.\n *\n * Provides a signal-based API for reactive content density tracking.\n *\n * @example\n * // Provide a custom storage implementation\n * providers: [\n * { provide: ContentDensityStorage, useClass: LocalContentDensityStorage }\n * ]\n */\nexport abstract class ContentDensityStorage {\n /**\n * Current content density as a readonly signal.\n * Read this signal to get the current density or react to changes.\n */\n abstract readonly contentDensity: Signal<ContentDensityMode>;\n\n /**\n * Updates the content density.\n * @param density The new content density mode\n */\n abstract setContentDensity(density: ContentDensityMode): void;\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const CONTENT_DENSITY_STORAGE_KEY = new InjectionToken<string>(\n 'Content density storage key for local storage or for url param',\n {\n factory: () => '__ContentDensity__'\n }\n);\n","import { InjectionToken } from '@angular/core';\nimport { ContentDensityMode } from '../types/content-density.mode';\n\nexport const DEFAULT_CONTENT_DENSITY = new InjectionToken<ContentDensityMode>('Default global content density', {\n factory: () => ContentDensityMode.COZY\n});\n","import { inject, Injectable, signal, WritableSignal } from '@angular/core';\nimport { LocalStorageService } from '@fundamental-ngx/cdk/utils';\nimport { ContentDensityStorage } from '../classes/abstract-content-density-storage';\nimport { CONTENT_DENSITY_STORAGE_KEY } from '../tokens/content-density-storage-key.token';\nimport { DEFAULT_CONTENT_DENSITY } from '../tokens/default-content-density.token';\nimport { ContentDensityMode } from '../types/content-density.mode';\n\n/**\n * Content density storage implementation using browser localStorage.\n * Persists the content density setting across browser sessions.\n */\n@Injectable()\nexport class LocalContentDensityStorage implements ContentDensityStorage {\n /** Current content density as a readonly signal. */\n readonly contentDensity: ReturnType<WritableSignal<ContentDensityMode>['asReadonly']>;\n\n private readonly _contentDensity: WritableSignal<ContentDensityMode>;\n private readonly _defaultContentDensity = inject(DEFAULT_CONTENT_DENSITY);\n private readonly _storageKey = inject(CONTENT_DENSITY_STORAGE_KEY);\n private readonly _storage = inject(LocalStorageService);\n\n constructor() {\n this._initialize();\n const storedDensity = this._storage.get(this._storageKey) || this._defaultContentDensity;\n this._contentDensity = signal<ContentDensityMode>(storedDensity);\n this.contentDensity = this._contentDensity.asReadonly();\n }\n\n /**\n * Updates the content density and persists it to localStorage.\n * @param density The new content density mode\n */\n setContentDensity(density: ContentDensityMode): void {\n this._storage.set(this._storageKey, density);\n this._contentDensity.set(density);\n }\n\n /** @hidden */\n private _initialize(): void {\n if (!this._storage.get(this._storageKey)) {\n this._storage.set(this._storageKey, this._defaultContentDensity);\n }\n }\n}\n","import { inject, Injectable, signal, WritableSignal } from '@angular/core';\nimport { ContentDensityStorage } from '../classes/abstract-content-density-storage';\nimport { DEFAULT_CONTENT_DENSITY } from '../tokens/default-content-density.token';\nimport { ContentDensityMode } from '../types/content-density.mode';\n\n/**\n * Content density storage implementation using in-memory state.\n * The setting is lost when the application is refreshed.\n * This is the default storage implementation.\n */\n@Injectable()\nexport class MemoryContentDensityStorage implements ContentDensityStorage {\n /** Current content density as a readonly signal. */\n readonly contentDensity: ReturnType<WritableSignal<ContentDensityMode>['asReadonly']>;\n\n private readonly _contentDensity: WritableSignal<ContentDensityMode>;\n\n constructor() {\n const defaultDensity = inject(DEFAULT_CONTENT_DENSITY);\n this._contentDensity = signal<ContentDensityMode>(defaultDensity);\n this.contentDensity = this._contentDensity.asReadonly();\n }\n\n /**\n * Updates the content density in memory.\n * @param density The new content density mode\n */\n setContentDensity(density: ContentDensityMode): void {\n this._contentDensity.set(density);\n }\n}\n","import { DestroyRef, inject, Injectable, signal, WritableSignal } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { ContentDensityStorage } from '../classes/abstract-content-density-storage';\nimport { CONTENT_DENSITY_STORAGE_KEY } from '../tokens/content-density-storage-key.token';\nimport { DEFAULT_CONTENT_DENSITY } from '../tokens/default-content-density.token';\nimport { ContentDensityMode } from '../types/content-density.mode';\n\n/**\n * Content density storage implementation using URL query parameters.\n * Persists the content density setting in the URL, allowing it to be\n * shared via links and bookmarked.\n */\n@Injectable()\nexport class UrlContentDensityStorage implements ContentDensityStorage {\n /** Current content density as a readonly signal. */\n readonly contentDensity: ReturnType<WritableSignal<ContentDensityMode>['asReadonly']>;\n\n private readonly _contentDensity: WritableSignal<ContentDensityMode>;\n private readonly _router = inject(Router);\n private readonly _activatedRoute = inject(ActivatedRoute);\n private readonly _defaultContentDensity = inject(DEFAULT_CONTENT_DENSITY);\n private readonly _storageKey = inject(CONTENT_DENSITY_STORAGE_KEY);\n private readonly _destroyRef = inject(DestroyRef);\n\n constructor() {\n this._contentDensity = signal<ContentDensityMode>(this._defaultContentDensity);\n this.contentDensity = this._contentDensity.asReadonly();\n this._initialize();\n }\n\n /**\n * Updates the content density and reflects it in the URL query parameters.\n * @param density The new content density mode\n */\n setContentDensity(density: ContentDensityMode): void {\n this._contentDensity.set(density);\n this._setUrlQueryParam(density);\n }\n\n /** @hidden */\n private _initialize(): void {\n // Subscribe to query param changes and update signal.\n // Automatically unsubscribes when the service is destroyed.\n this._activatedRoute.queryParams.pipe(takeUntilDestroyed(this._destroyRef)).subscribe((queryParams) => {\n const density = queryParams[this._storageKey];\n if (density && density !== this._contentDensity()) {\n this._contentDensity.set(density);\n }\n });\n }\n\n /** @hidden */\n private _setUrlQueryParam(density: ContentDensityMode): void {\n const currentUrl = this._router.url;\n const [pathname, search] = currentUrl.split('?');\n const params = new URLSearchParams(search || '');\n params.delete(this._storageKey);\n params.set(this._storageKey, density);\n\n this._router.navigateByUrl(`${pathname}?${params.toString()}`);\n }\n}\n","import { inject, Injectable, Injector, Signal } from '@angular/core';\nimport { toObservable } from '@angular/core/rxjs-interop';\nimport { Observable } from 'rxjs';\nimport { ContentDensityStorage } from '../classes/abstract-content-density-storage';\nimport { ContentDensityMode } from '../types/content-density.mode';\n\n/**\n * Service for managing global content density state.\n * Provides a signal-based API for reactive content density tracking.\n */\n@Injectable()\nexport class GlobalContentDensityService {\n /** Current content density as a readonly signal. */\n readonly currentDensitySignal: Signal<ContentDensityMode>;\n\n private readonly _storage = inject(ContentDensityStorage);\n private readonly _injector = inject(Injector);\n\n /**\n * Current content density value.\n *\n * @deprecated Use currentDensitySignal() instead\n * @returns The current content density mode\n */\n get currentContentDensity(): ContentDensityMode {\n return this.currentDensitySignal();\n }\n\n constructor() {\n this.currentDensitySignal = this._storage.contentDensity;\n }\n\n /**\n * Returns an observable that emits content density changes.\n *\n * @deprecated Use currentDensitySignal signal instead\n * @returns Observable of content density changes\n */\n contentDensityListener(): Observable<ContentDensityMode> {\n return toObservable(this._storage.contentDensity, { injector: this._injector });\n }\n\n /**\n * Updates the global content density.\n * @param density The new content density mode\n */\n updateContentDensity(density: ContentDensityMode): void {\n this._storage.setContentDensity(density);\n }\n}\n","import { DOCUMENT, Provider } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { ContentDensityStorage } from './classes/abstract-content-density-storage';\nimport { ContentDensityModuleConfig } from './content-density.types';\nimport { LocalContentDensityStorage } from './providers/local-content-density-storage';\nimport { MemoryContentDensityStorage } from './providers/memory-content-density-storage';\nimport { UrlContentDensityStorage } from './providers/url-content-density-storage';\nimport { GlobalContentDensityService } from './services/global-content-density.service';\nimport { CONTENT_DENSITY_STORAGE_KEY } from './tokens/content-density-storage-key.token';\nimport { DEFAULT_CONTENT_DENSITY } from './tokens/default-content-density.token';\nimport { ContentDensityMode } from './types/content-density.mode';\n\nfunction generateContentDensityStorage(config: ContentDensityModuleConfig): Provider {\n if (config.storage === 'localStorage') {\n return {\n provide: ContentDensityStorage,\n useClass: LocalContentDensityStorage\n };\n }\n if (config.storage === 'memory') {\n return {\n provide: ContentDensityStorage,\n useClass: MemoryContentDensityStorage\n };\n }\n if (config.storage === 'url') {\n return {\n provide: ContentDensityStorage,\n useClass: UrlContentDensityStorage,\n deps: [Router, ActivatedRoute, DEFAULT_CONTENT_DENSITY, CONTENT_DENSITY_STORAGE_KEY, DOCUMENT]\n };\n }\n return [];\n}\n\n/**\n * Provides content density services and configurations\n * @param config\n */\nexport function provideContentDensity(config?: ContentDensityModuleConfig): Provider[] {\n let storage: Provider;\n const conf: ContentDensityModuleConfig = config || { storage: 'memory' };\n\n if (typeof conf.storage === 'string') {\n storage = generateContentDensityStorage(conf);\n } else if (typeof conf.storage === 'object') {\n storage = conf.storage;\n } else {\n storage = {\n provide: ContentDensityStorage,\n useClass: MemoryContentDensityStorage\n };\n }\n return [\n {\n provide: DEFAULT_CONTENT_DENSITY,\n useValue: conf.defaultGlobalContentDensity || ContentDensityMode.COZY\n },\n {\n provide: CONTENT_DENSITY_STORAGE_KEY,\n useValue: (conf as any).storageKey || '__ContentDensity__'\n },\n GlobalContentDensityService,\n storage\n ];\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { ContentDensityModuleConfig } from './content-density.types';\nimport { ContentDensityDirective } from './directives/content-density.directive';\nimport { provideContentDensity } from './provide-content-density';\n\n/**\n * @deprecated\n * Use direct imports of components and directives.\n */\n@NgModule({\n imports: [ContentDensityDirective],\n exports: [ContentDensityDirective]\n})\nexport class ContentDensityModule {\n /** Module with providers */\n static forRoot(config?: ContentDensityModuleConfig): ModuleWithProviders<ContentDensityModule> {\n return {\n ngModule: ContentDensityModule,\n providers: [provideContentDensity(config)]\n };\n }\n}\n","import { FactorySansProvider, ProviderToken } from '@angular/core';\nimport { ContentDensityMode } from '../types/content-density.mode';\n\n/**\n * Configuration for UI5 Web Components content density markers.\n * UI5 Web Components use `data-ui5-compact-size` attribute for compact mode.\n * Cozy is the default mode (no marker needed).\n */\nexport interface Ui5ContentDensityMarkers {\n /**\n * Whether to apply UI5 content density markers.\n * When enabled, `data-ui5-compact-size` attribute will be applied\n * for COMPACT and CONDENSED modes (UI5 only supports cozy/compact).\n * @default true\n */\n enabled: boolean;\n}\n\nexport class ContentDensityObserverSettings {\n /** Classes to be added to the element. */\n modifiers?: Partial<Record<ContentDensityMode, string>>;\n /** Supported content densities. */\n supportedContentDensity?: ContentDensityMode[];\n /** Default content density. */\n defaultContentDensity?: ContentDensityMode | ProviderToken<ContentDensityMode> | FactorySansProvider;\n /** Whether in debug mode. */\n debug?: boolean;\n /** Whether to always add class modifiers. Useful for components that are detached from its parent component. */\n alwaysAddModifiers?: boolean;\n /** Whether to force child components to restrict supported content density with current component's one. */\n restrictChildContentDensity?: boolean;\n /**\n * Configuration for UI5 Web Components content density markers.\n * When enabled, applies `data-ui5-compact-size` attribute for compact/condensed modes.\n */\n ui5Markers?: Ui5ContentDensityMarkers;\n}\n","import { computed, Signal } from '@angular/core';\nimport {\n ContentDensityDefaultKeyword,\n ContentDensityGlobalKeyword,\n LocalContentDensityMode\n} from '../content-density.types';\nimport { GlobalContentDensityService } from '../services/global-content-density.service';\nimport { ContentDensityMode } from '../types/content-density.mode';\n\n/**\n * Creates a computed signal that resolves the content density from multiple sources.\n *\n * Priority order:\n * 1. Parent content density observer (if restrictChildContentDensity is enabled)\n * 2. Content density directive\n * 3. Global content density service\n * 4. Default content density\n *\n * Special keywords are resolved:\n * - 'default' -> uses defaultContentDensity\n * - 'global' -> uses global service value\n */\nexport const getChangesSource = (params: {\n defaultContentDensity: ContentDensityMode;\n contentDensityDirective?: Signal<LocalContentDensityMode>;\n contentDensityService?: GlobalContentDensityService;\n parentContentDensityObserver?: Signal<ContentDensityMode>;\n}): Signal<ContentDensityMode> =>\n computed(() => {\n // Get the raw mode from the appropriate source (priority order)\n const rawMode: LocalContentDensityMode = params.parentContentDensityObserver\n ? params.parentContentDensityObserver()\n : params.contentDensityDirective\n ? params.contentDensityDirective()\n : (params.contentDensityService?.currentDensitySignal() ?? params.defaultContentDensity);\n\n // Resolve special keywords\n if (rawMode === ContentDensityDefaultKeyword) {\n return params.defaultContentDensity;\n }\n if (rawMode === ContentDensityGlobalKeyword) {\n return params.contentDensityService?.currentDensitySignal() ?? params.defaultContentDensity;\n }\n\n return rawMode;\n });\n","import { ContentDensityObserverSettings } from '../classes/content-density-observer.settings';\nimport { ContentDensityMode } from '../types/content-density.mode';\n\nexport const defaultContentDensityObserverConfigs: Required<ContentDensityObserverSettings> = {\n modifiers: {\n [ContentDensityMode.COMPACT]: 'is-compact',\n [ContentDensityMode.COZY]: 'is-cozy',\n [ContentDensityMode.CONDENSED]: 'is-condensed'\n },\n supportedContentDensity: [ContentDensityMode.COMPACT, ContentDensityMode.COZY],\n defaultContentDensity: ContentDensityMode.COZY,\n debug: false,\n alwaysAddModifiers: false,\n restrictChildContentDensity: false,\n ui5Markers: {\n enabled: true\n }\n};\n","import {\n afterNextRender,\n computed,\n DestroyRef,\n effect,\n ElementRef,\n FactorySansProvider,\n inject,\n Injectable,\n Injector,\n linkedSignal,\n Renderer2\n} from '@angular/core';\nimport { toObservable } from '@angular/core/rxjs-interop';\nimport { Observable, Observer, Subscription } from 'rxjs';\nimport { ContentDensityObserverSettings } from '../classes/content-density-observer.settings';\nimport { ContentDensityObserverTarget } from '../content-density.types';\nimport { getChangesSource } from '../helpers/get-changes-source.provider';\nimport { GlobalContentDensityService } from '../services/global-content-density.service';\nimport { CONTENT_DENSITY_DIRECTIVE } from '../tokens/content-density-directive';\nimport { ContentDensityMode } from '../types/content-density.mode';\nimport { defaultContentDensityObserverConfigs } from '../variables/default-content-density-consumer-config';\n\nconst isFactoryProvider = (obj: any): obj is FactorySansProvider => !!(obj && (obj as FactorySansProvider).useFactory);\n\nconst getDeps = (injector: Injector, defaultContentDensity: FactorySansProvider): Array<any> =>\n (defaultContentDensity.deps || []).map((dep): any => {\n if (Array.isArray(dep)) {\n let type;\n let flags = {};\n for (let index = 0; index < dep.length; index++) {\n const flag = dep[index]['__NG_DI_FLAG__'];\n if (typeof flag === 'number') {\n flags = { ...flags, flag };\n } else {\n type = dep[index];\n }\n }\n return injector.get(type, undefined, flags);\n }\n return injector.get(dep, undefined, {});\n });\n\nconst getDefaultContentDensity = (\n injector: Injector,\n configuration: Required<ContentDensityObserverSettings>\n): ContentDensityMode => {\n if (typeof configuration.defaultContentDensity === 'string') {\n return configuration.defaultContentDensity as ContentDensityMode;\n }\n if (isFactoryProvider(configuration.defaultContentDensity)) {\n const deps = getDeps(injector, configuration.defaultContentDensity);\n return configuration.defaultContentDensity.useFactory(...deps);\n }\n return injector.get(configuration.defaultContentDensity, undefined, undefined);\n};\n\nconst initialContentDensity = (\n injector: Injector,\n configuration?: ContentDensityObserverSettings\n): ContentDensityMode =>\n getDefaultContentDensity(injector, {\n ...defaultContentDensityObserverConfigs,\n ...(configuration || {})\n });\n\n/**\n * Service for observing and managing content density in components.\n *\n * Provides signal-based API for reactive content density tracking.\n * Uses linkedSignal (Angular 21+) for derived state with validation.\n */\n@Injectable()\nexport class ContentDensityObserver {\n /** Configuration for this observer */\n readonly config: ContentDensityObserverSettings;\n\n /**\n * Current content density as a readonly signal.\n * Uses linkedSignal internally for reactive updates with validation.\n */\n readonly contentDensity: ReturnType<\n ReturnType<typeof linkedSignal<ContentDensityMode, ContentDensityMode>>['asReadonly']\n >;\n\n /** Whether content density is compact (signal) */\n readonly isCompactSignal: ReturnType<typeof computed<boolean>>;\n\n /** Whether content density is cozy (signal) */\n readonly isCozySignal: ReturnType<typeof computed<boolean>>;\n\n /** Whether content density is condensed (signal) */\n readonly isCondensedSignal: ReturnType<typeof computed<boolean>>;\n\n /**\n * Current content density signal\n * @deprecated Use contentDensity() instead\n */\n readonly contentDensity$: ReturnType<\n ReturnType<typeof linkedSignal<ContentDensityMode, ContentDensityMode>>['asReadonly']\n >;\n\n /**\n * Observable for compact state changes\n * @deprecated Use isCompactSignal signal instead\n */\n readonly isCompact$: Observable<boolean>;\n\n /**\n * Observable for cozy state changes\n * @deprecated Use isCozySignal signal instead\n */\n readonly isCozy$: Observable<boolean>;\n\n /**\n * Observable for condensed state changes\n * @deprecated Use isCondensedSignal signal instead\n */\n readonly isCondensed$: Observable<boolean>;\n\n /**\n * Observable of content density changes\n * @deprecated Use contentDensity signal instead\n */\n readonly contentDensity$$: Observable<ContentDensityMode>;\n\n /**\n * Internal linkedSignal for content density with validation.\n * linkedSignal (Angular 21+) automatically tracks source changes\n * and applies the computation (validation/fallback).\n */\n private readonly _contentDensity: ReturnType<typeof linkedSignal<ContentDensityMode, ContentDensityMode>>;\n\n private readonly _changesSource: ReturnType<typeof computed<ContentDensityMode>>;\n\n private readonly _destroyRef = inject(DestroyRef);\n\n private readonly _alternativeTo = {\n [ContentDensityMode.COMPACT]: (): ContentDensityMode =>\n this._isSupported(ContentDensityMode.CONDENSED) ? ContentDensityMode.CONDENSED : ContentDensityMode.COZY,\n [ContentDensityMode.CONDENSED]: (): ContentDensityMode =>\n this._isSupported(ContentDensityMode.COMPACT) ? ContentDensityMode.COMPACT : ContentDensityMode.COZY,\n [ContentDensityMode.COZY]: (): ContentDensityMode => ContentDensityMode.COZY // No alternative here, everyone should support it\n };\n\n private _globalContentDensityService = inject(GlobalContentDensityService, {\n optional: true\n });\n\n private _contentDensityDirective = inject(CONTENT_DENSITY_DIRECTIVE, {\n optional: true\n });\n\n private _parentContentDensityObserver = inject(ContentDensityObserver, {\n optional: true,\n skipSelf: true\n });\n\n private _renderer: Renderer2 | null = inject(Renderer2);\n\n private _elementRef: ElementRef<any> | null = inject(ElementRef);\n\n private _elements = [this._elementRef];\n\n /**\n * Current content density value\n * @deprecated Use contentDensity() signal instead\n */\n get value(): ContentDensityMode {\n return this._contentDensity();\n }\n\n /**\n * Whether content density is compact\n * @deprecated Use isCompactSignal() signal instead\n */\n get isCompact(): boolean {\n return this.isCompactSignal();\n }\n\n /**\n * Whether content density is cozy\n * @deprecated Use isCozySignal() signal instead\n */\n get isCozy(): boolean {\n return this.isCozySignal();\n }\n\n /**\n * Whether content density is condensed\n * @deprecated Use isCondensedSignal() signal instead\n */\n get isCondensed(): boolean {\n return this.isCondensedSignal();\n }\n\n constructor(_injector: Injector, _providedConfig?: ContentDensityObserverSettings) {\n // Set up config first (needed for validation)\n this.config = {\n ...defaultContentDensityObserverConfigs,\n ...(_providedConfig || {})\n };\n\n // Resolve initial density\n const resolvedInitialDensity = initialContentDensity(_injector, _providedConfig);\n\n // Get the changes source as a computed signal\n this._changesSource = getChangesSource({\n defaultContentDensity: resolvedInitialDensity,\n contentDensityDirective: this._contentDensityDirective?.densityMode,\n contentDensityService: this._globalContentDensityService ?? undefined,\n parentContentDensityObserver: this._parentContentDensityObserver?.config?.restrictChildContentDensity\n ? this._parentContentDensityObserver.contentDensity\n : undefined\n });\n\n // Use linkedSignal for derived state with validation (Angular 21+ pattern)\n // linkedSignal automatically updates when source changes, applying the computation\n this._contentDensity = linkedSignal({\n source: this._changesSource,\n computation: (source) => {\n // Guard against undefined/null source values\n if (!source || typeof source !== 'string') {\n return ContentDensityMode.COZY; // Safe fallback to default\n }\n return this._validateAndFallback(source as ContentDensityMode);\n }\n });\n\n // Public readonly signal\n this.contentDensity = this._contentDensity.asReadonly();\n\n // Computed boolean signals\n this.isCompactSignal = computed(() => this._contentDensity() === ContentDensityMode.COMPACT);\n this.isCozySignal = computed(() => this._contentDensity() === ContentDensityMode.COZY);\n this.isCondensedSignal = computed(() => this._contentDensity() === ContentDensityMode.CONDENSED);\n\n // Backward compatible signal aliases\n this.contentDensity$ = this.contentDensity;\n\n // Backward compatible observables\n this.isCompact$ = toObservable(this.isCompactSignal, { injector: _injector });\n this.isCozy$ = toObservable(this.isCozySignal, { injector: _injector });\n this.isCondensed$ = toObservable(this.isCondensedSignal, { injector: _injector });\n this.contentDensity$$ = toObservable(this._contentDensity, { injector: _injector });\n\n // Effect purely for DOM side effects (CSS classes and UI5 attribute)\n // This follows Angular 21 best practices: effects should only do side effects, not update signals\n effect(() => {\n // Read the signal to track changes\n const density = this._contentDensity();\n // Apply DOM changes (side effect)\n this._applyClass(density);\n });\n\n // Apply initial CSS class after first render (zoneless-compatible)\n afterNextRender(() => {\n this._applyClass(this._contentDensity());\n });\n\n // Register cleanup on destroy\n this._destroyRef.onDestroy(() => {\n this._cleanup();\n if (this.config.debug) {\n console.warn('ContentDensityObserver: destroyed');\n }\n });\n }\n\n /**\n * Add consumers to observe content density changes\n * @deprecated Use signal bindings instead\n */\n consume(...consumers: ContentDensityObserverTarget[]): void {\n this._elements.concat(...consumers.map((c) => c.elementRef));\n }\n\n /**\n * Completes the observer and cleans up resources\n * @deprecated Cleanup is automatic via DestroyRef\n */\n complete(): void {\n this._cleanup();\n }\n\n /**\n * Returns an observable of content density changes\n * @deprecated Use contentDensity signal instead\n */\n asObservable(): Observable<ContentDensityMode> {\n return this.contentDensity$$;\n }\n\n /**\n * Subscribe to content density changes.\n * @deprecated Use contentDensity signal with effect() instead.\n * This method exists for backward compatibility.\n */\n subscribe(observer?: Partial<Observer<ContentDensityMode>>): Subscription {\n return this.contentDensity$$.subscribe(observer);\n }\n\n /**\n * Remove a consumer from the observer\n * @deprecated Use signal bindings instead\n */\n removeConsumer(consumer: ContentDensityObserverTarget): void {\n this._elements.splice(this._elements.indexOf(consumer.elementRef), 1);\n }\n\n private _validateAndFallback(density: ContentDensityMode): ContentDensityMode {\n if (this.config.debug) {\n console.warn(`ContentDensityObserver: density changed to ${density}`);\n }\n if (!this._isSupported(density)) {\n try {\n if (this.config.debug) {\n console.warn(\n `ContentDensityObserver: ${density} is not supported. Failing back to alternative one.`\n );\n }\n return this._alternativeTo[density]();\n } catch {\n throw new Error(`ContentDensityObserver: density ${density} is not supported`);\n }\n }\n return density;\n }\n\n private _cleanup(): void {\n this._parentContentDensityObserver = null;\n this._contentDensityDirective = null;\n this._globalContentDensityService = null;\n this._elementRef = null;\n this._renderer = null;\n this._elements = [];\n }\n\n private _applyClass(currentDensity?: ContentDensityMode): void {\n if (!this.config?.modifiers) {\n return;\n }\n const modifiers = this.config.modifiers;\n const density = currentDensity ?? this._contentDensity();\n\n this._elements.forEach((element) => {\n Object.values(modifiers).forEach((className) => {\n this._renderer?.removeClass(element?.nativeElement, className);\n });\n\n this._applyUi5Marker(element?.nativeElement, density);\n\n const modifierClass = modifiers[density];\n if (modifierClass) {\n this._renderer?.addClass(element?.nativeElement, modifierClass);\n }\n });\n }\n\n /**\n * Apply or remove UI5 Web Components compact marker.\n * UI5 Web Components only support cozy (default) and compact modes.\n * Both COMPACT and CONDENSED fundamental-ngx modes map to UI5 compact.\n */\n private _applyUi5Marker(nativeElement: HTMLElement | undefined, currentDensity: ContentDensityMode): void {\n // Only apply to actual HTML elements, not comment/text nodes\n if (\n !this.config.ui5Markers?.enabled ||\n !nativeElement ||\n !this._renderer ||\n !(nativeElement instanceof HTMLElement)\n ) {\n return;\n }\n\n const ui5CompactAttribute = 'data-ui5-compact-size';\n\n // UI5 only has cozy (default) and compact modes\n // Map: COMPACT -> compact, CONDENSED -> compact, COZY -> remove attribute\n const isUi5Compact =\n currentDensity === ContentDensityMode.COMPACT || currentDensity === ContentDensityMode.CONDENSED;\n\n if (isUi5Compact) {\n this._renderer.setAttribute(nativeElement, ui5CompactAttribute, '');\n } else {\n this._renderer.removeAttribute(nativeElement, ui5CompactAttribute);\n }\n }\n\n private _isSupported(density: ContentDensityMode): boolean {\n return this.config.supportedContentDensity?.includes(density) ?? false;\n }\n}\n","import { Provider } from '@angular/core';\nimport { consumerProviderFactory } from '@fundamental-ngx/cdk/utils';\nimport { ContentDensityObserverSettings } from '../classes/content-density-observer.settings';\nimport { ContentDensityObserver } from '../services/content-density-observer.service';\n\n/**\n * Creates provider for ContentDensityObserver\n */\nexport function contentDensityObserverProviders(params?: ContentDensityObserverSettings): Provider[] {\n return [consumerProviderFactory(ContentDensityObserver, params)];\n}\n","import { Provider, signal } from '@angular/core';\nimport { ContentDensityGlobalKeyword, LocalContentDensityMode } from '../content-density.types';\nimport { CONTENT_DENSITY_DIRECTIVE, ContentDensityDirectiveRef } from '../tokens/content-density-directive';\n\n/** @hidden */\nexport function mockedLocalContentDensityDirective(\n defaultValue: LocalContentDensityMode = ContentDensityGlobalKeyword\n): { contentDensityDirectiveProvider: Provider; setContentDensity: (cd: LocalContentDensityMode) => void } {\n const densitySignal = signal<LocalContentDensityMode>(defaultValue);\n\n const mockDirective: ContentDensityDirectiveRef = {\n densityMode: densitySignal.asReadonly(),\n get value(): LocalContentDensityMode {\n return densitySignal();\n }\n };\n\n return {\n contentDensityDirectiveProvider: {\n provide: CONTENT_DENSITY_DIRECTIVE,\n useValue: mockDirective\n },\n setContentDensity: (cd: LocalContentDensityMode) => densitySignal.set(cd)\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.ContentDensityObserverSettings"],"mappings":";;;;;;AAKO,MAAM,2BAA2B,GAAG;AACpC,MAAM,4BAA4B,GAAG;;ICNhC;AAAZ,CAAA,UAAY,kBAAkB,EAAA;AAC1B,IAAA,kBAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,kBAAA,CAAA,WAAA,CAAA,GAAA,WAAuB;AACvB,IAAA,kBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACvB,CAAC,EAJW,kBAAkB,KAAlB,kBAAkB,GAAA,EAAA,CAAA,CAAA;;ACGvB,MAAM,SAAS,GAAG,CAAC,OAAY,KAAc,OAAO,KAAK,kBAAkB,CAAC;AAC5E,MAAM,WAAW,GAAG,CAAC,OAAY,KAAc,OAAO,KAAK,kBAAkB,CAAC;AAC9E,MAAM,MAAM,G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AAE;KAC3E;AACL;;ACxBA;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fundamental-ngx/core",
|
|
3
|
-
"version": "0.64.2-rc.
|
|
3
|
+
"version": "0.64.2-rc.2",
|
|
4
4
|
"schematics": "./schematics/collection.json",
|
|
5
5
|
"ng-update": {
|
|
6
6
|
"packageGroupName": "@fundamental-ngx/core",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"@angular/forms": "^22.0.0",
|
|
38
38
|
"@angular/platform-browser": "^22.0.0",
|
|
39
39
|
"@angular/router": "^22.0.0",
|
|
40
|
-
"@fundamental-ngx/cdk": "0.64.2-rc.
|
|
41
|
-
"@fundamental-ngx/i18n": "0.64.2-rc.
|
|
40
|
+
"@fundamental-ngx/cdk": "0.64.2-rc.2",
|
|
41
|
+
"@fundamental-ngx/i18n": "0.64.2-rc.2",
|
|
42
42
|
"@sap-theming/theming-base-content": "^11.36.0",
|
|
43
43
|
"fundamental-styles": "0.41.8",
|
|
44
44
|
"rxjs": "^7.8.0"
|