@fundamental-ngx/cdk 0.43.28 → 0.43.30

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.
@@ -2761,6 +2761,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
2761
2761
  ]
2762
2762
  }]
2763
2763
  }] });
2764
+ class TruncatedTitleDirective {
2765
+ /** @hidden */
2766
+ constructor(_elRef) {
2767
+ this._elRef = _elRef;
2768
+ }
2769
+ /** @hidden */
2770
+ ngAfterContentChecked() {
2771
+ const el = this._elRef.nativeElement;
2772
+ if (el.scrollWidth > el.offsetWidth) {
2773
+ el.title = el.innerText;
2774
+ }
2775
+ }
2776
+ }
2777
+ TruncatedTitleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TruncatedTitleDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
2778
+ TruncatedTitleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: TruncatedTitleDirective, isStandalone: true, selector: "[fdkTruncatedTitle], [fdTruncatedTitle], [fd-truncate-title]", ngImport: i0 });
2779
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TruncatedTitleDirective, decorators: [{
2780
+ type: Directive,
2781
+ args: [{
2782
+ selector: '[fdkTruncatedTitle], [fdTruncatedTitle], [fd-truncate-title]',
2783
+ standalone: true
2784
+ }]
2785
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
2764
2786
  class TruncateDirective {
2765
2787
  /**
2766
2788
  * Width in pixel for truncation of an element , by default
@@ -2833,13 +2855,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
2833
2855
  class TruncateModule {
2834
2856
  }
2835
2857
  TruncateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TruncateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2836
- TruncateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: TruncateModule, imports: [TruncateDirective, DeprecatedTruncateSelectorDirective], exports: [TruncateDirective, DeprecatedTruncateSelectorDirective] });
2858
+ TruncateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: TruncateModule, imports: [TruncateDirective, TruncatedTitleDirective, DeprecatedTruncateSelectorDirective], exports: [TruncateDirective, TruncatedTitleDirective, DeprecatedTruncateSelectorDirective] });
2837
2859
  TruncateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TruncateModule });
2838
2860
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TruncateModule, decorators: [{
2839
2861
  type: NgModule,
2840
2862
  args: [{
2841
- imports: [TruncateDirective, DeprecatedTruncateSelectorDirective],
2842
- exports: [TruncateDirective, DeprecatedTruncateSelectorDirective]
2863
+ imports: [TruncateDirective, TruncatedTitleDirective, DeprecatedTruncateSelectorDirective],
2864
+ exports: [TruncateDirective, TruncatedTitleDirective, DeprecatedTruncateSelectorDirective]
2843
2865
  }]
2844
2866
  }] });
2845
2867
 
@@ -3035,7 +3057,12 @@ class FocusableItemDirective {
3035
3057
  setTabbable(state) {
3036
3058
  this._zone.runOutsideAngular(() => {
3037
3059
  this._tabbable = state;
3038
- this._renderer2.setAttribute(this.elementRef.nativeElement, 'tabindex', this._tabbable ? '0' : '-1');
3060
+ if (this._tabbable) {
3061
+ this._renderer2.setAttribute(this.elementRef.nativeElement, 'tabindex', '0');
3062
+ }
3063
+ else {
3064
+ this._renderer2.removeAttribute(this.elementRef.nativeElement, 'tabindex');
3065
+ }
3039
3066
  if (state) {
3040
3067
  this._enableTabbableElements();
3041
3068
  }
@@ -3400,12 +3427,23 @@ function dfs(collection, callback, options = {}) {
3400
3427
 
3401
3428
  /** Helper function to scroll to focusable list or its item relatively to the container. */
3402
3429
  function scrollIntoView(element, position) {
3403
- if (!position || !element) {
3430
+ if (!element) {
3404
3431
  return;
3405
3432
  }
3406
3433
  const scrollableParent = getScrollParent(element);
3407
3434
  if (scrollableParent) {
3408
3435
  const itemOffsetTop = element.offsetTop - scrollableParent.offsetTop;
3436
+ if (!position) {
3437
+ /**
3438
+ * check if top of focused element is fully visible, and if not, adjust scroll.
3439
+ * this is triggered when a sticky table header overlaps the focused cell.
3440
+ */
3441
+ const elRect = element.getBoundingClientRect();
3442
+ const topEl = document.elementFromPoint(elRect.left, elRect.top);
3443
+ if (!element.isSameNode(topEl) && topEl) {
3444
+ scrollableParent.scrollBy({ top: elRect.top - topEl.getBoundingClientRect().bottom });
3445
+ }
3446
+ }
3409
3447
  switch (position) {
3410
3448
  case 'top':
3411
3449
  scrollableParent.scrollTop = itemOffsetTop;
@@ -7637,5 +7675,5 @@ class BaseToastDurationDismissibleConfig extends BaseToastConfig {
7637
7675
  * Generated bundle index. Do not edit.
7638
7676
  */
7639
7677
 
7640
- export { ANY_LANGUAGE_LETTERS_GROUP_REGEX, ANY_LANGUAGE_LETTERS_REGEX, AbstractFdNgxClass, AsyncOrSyncPipe, AttributeObserver, AutoCompleteDirective, AutoCompleteModule, BaseAnimatedToastConfig, BaseDismissibleToastService, BaseToastActionDismissibleRef, BaseToastConfig, BaseToastContainerComponent, BaseToastDurationDismissibleConfig, BaseToastDurationDismissibleContainerComponent, BaseToastDurationDismissibleRef, BaseToastOverlayContainer, BaseToastPosition, BaseToastRef, BaseToastService, BreakpointDirective, BreakpointModule, ClickedBehaviorModule, ClickedDirective, ContentDensityService, DECIMAL_NUMBER_UNICODE_GROUP_REGEX, DECIMAL_NUMBER_UNICODE_RANGE, DECIMAL_NUMBER_UNICODE_REGEX, DEFAULT_CONTENT_DENSITY, DND_ITEM, DND_LIST, DefaultReadonlyViewModifier, DeprecatedAutoCompleteDirective, DeprecatedClickedDirective, DeprecatedDisabledBehaviorDirective, DeprecatedFocusKeyManagerItemDirective, DeprecatedFocusKeyManagerListDirective, DeprecatedFocusableItemDirective, DeprecatedFocusableListDirective, DeprecatedIgnoreClickOnSelectionDirective, DeprecatedInitialFocusDirective, DeprecatedLineClampDirective, DeprecatedLineClampTargetDirective, DeprecatedOnlyDigitsDirective, DeprecatedOverflowListDirective, DeprecatedOverflowListItemDirective, DeprecatedReadonlyBehaviorDirective, DeprecatedRepeatDirective, DeprecatedResizeDirective, DeprecatedResizeHandleDirective, DeprecatedTemplateSelectorDirective, DeprecatedTruncateSelectorDirective, DestroyedService, DisabledBehaviorDirective, DisabledBehaviorModule, DisabledObserver, DisplayFnPipe, DndItemDirective, DndKeyboardGroupDirective, DndKeyboardItemDirective, DndListDirective, DragAndDropModule, DynamicComponentContainer, DynamicComponentInjector, DynamicComponentService, DynamicPortalComponent, ELEMENT_REF_EXCEPTION, FDK_DISABLED_DIRECTIVE, FDK_FOCUSABLE_GRID_DIRECTIVE, FDK_FOCUSABLE_ITEM_DIRECTIVE, FDK_FOCUSABLE_LIST_DIRECTIVE, FDK_READONLY_DIRECTIVE, FDK_SELECTABLE_ITEM_PROVIDER, FOCUSABLE_ITEM, FdkClickedProvider, FdkDisabledProvider, FdkReadonlyProvider, FilterStringsPipe, FocusKeyManagerHelpersModule, FocusKeyManagerItemDirective, FocusKeyManagerListDirective, FocusTrapService, FocusableGridDirective, FocusableGridModule, FocusableItemDirective, FocusableItemModule, FocusableListDirective, FocusableListModule, FocusableObserver, FunctionStrategy, INVALID_DATE_ERROR, IgnoreClickOnSelectionDirective, IgnoreClickOnSelectionDirectiveToken, IgnoreClickOnSelectionModule, InitialFocusDirective, InitialFocusModule, IntersectionSpyDirective, IsCompactDensityPipe, KeyUtil, KeyboardSupportService, LETTERS_UNICODE_RANGE, LIST_ITEM_COMPONENT, LineClampDirective, LineClampModule, LineClampTargetDirective, LocalStorageService, MOBILE_CONFIG_ERROR, MakeAsyncPipe, ModuleDeprecations, OVERFLOW_PRIORITY_SCORE, ObservableStrategy, OnlyDigitsDirective, OnlyDigitsModule, OverflowListDirective, OverflowListItemDirective, OverflowListModule, PipeModule, PromiseStrategy, RTL_LANGUAGE, RangeSelector, ReadonlyBehaviorDirective, ReadonlyBehaviorModule, ReadonlyObserver, RepeatDirective, RepeatModule, ResizeDirective, ResizeHandleDirective, ResizeModule, ResizeObserverFactory, ResizeObserverService, ResponsiveBreakpoints, RtlService, SafePipe, SearchHighlightPipe, SelectComponentRootToken, SelectableItemDirective, SelectableItemToken, SelectableListDirective, SelectableListModule, SelectionService, THEME_SWITCHER_ROUTER_MISSING_ERROR, TabbableElementService, TemplateDirective, TemplateModule, ThemesService, ToastBottomCenterPosition, ToastBottomLeftPosition, ToastBottomRightPosition, ToastTopCenterPosition, ToastTopLeftPosition, ToastTopRightPosition, TruncateDirective, TruncateModule, TruncatePipe, TwoDigitsPipe, UtilsModule, ValueByPathPipe, ValueStrategy, ViewportSizeObservable, alternateSetter, applyCssClass, applyCssStyle, baseToastAnimations, coerceArraySafe, coerceBoolean, coerceCssPixel, consumerProviderFactory, dfs, getBreakpointName, getDocumentFontSize, getElementCapacity, getElementWidth, getNativeElement, getRandomColorAccent, hasElementRef, intersectionObservable, isBlank, isBoolean, isCompactDensity, isFunction, isJsObject, isNumber, isObject, isOdd, isPresent, isPromise, isString, isStringMap, isSubscribable, isType, isValidContentDensity, moduleDeprecationsFactory, moduleDeprecationsProvider, parserFileSize, pxToNum, resizeObservable, scrollIntoView, scrollTop, selectStrategy, setDisabledState, setReadonlyState, toNativeElement, toastConnectedBottomLeftPosition, toastConnectedBottomPosition, toastConnectedBottomRightPosition, toastConnectedTopLeftPosition, toastConnectedTopPosition, toastConnectedTopRightPosition, uuidv4 };
7678
+ export { ANY_LANGUAGE_LETTERS_GROUP_REGEX, ANY_LANGUAGE_LETTERS_REGEX, AbstractFdNgxClass, AsyncOrSyncPipe, AttributeObserver, AutoCompleteDirective, AutoCompleteModule, BaseAnimatedToastConfig, BaseDismissibleToastService, BaseToastActionDismissibleRef, BaseToastConfig, BaseToastContainerComponent, BaseToastDurationDismissibleConfig, BaseToastDurationDismissibleContainerComponent, BaseToastDurationDismissibleRef, BaseToastOverlayContainer, BaseToastPosition, BaseToastRef, BaseToastService, BreakpointDirective, BreakpointModule, ClickedBehaviorModule, ClickedDirective, ContentDensityService, DECIMAL_NUMBER_UNICODE_GROUP_REGEX, DECIMAL_NUMBER_UNICODE_RANGE, DECIMAL_NUMBER_UNICODE_REGEX, DEFAULT_CONTENT_DENSITY, DND_ITEM, DND_LIST, DefaultReadonlyViewModifier, DeprecatedAutoCompleteDirective, DeprecatedClickedDirective, DeprecatedDisabledBehaviorDirective, DeprecatedFocusKeyManagerItemDirective, DeprecatedFocusKeyManagerListDirective, DeprecatedFocusableItemDirective, DeprecatedFocusableListDirective, DeprecatedIgnoreClickOnSelectionDirective, DeprecatedInitialFocusDirective, DeprecatedLineClampDirective, DeprecatedLineClampTargetDirective, DeprecatedOnlyDigitsDirective, DeprecatedOverflowListDirective, DeprecatedOverflowListItemDirective, DeprecatedReadonlyBehaviorDirective, DeprecatedRepeatDirective, DeprecatedResizeDirective, DeprecatedResizeHandleDirective, DeprecatedTemplateSelectorDirective, DeprecatedTruncateSelectorDirective, DestroyedService, DisabledBehaviorDirective, DisabledBehaviorModule, DisabledObserver, DisplayFnPipe, DndItemDirective, DndKeyboardGroupDirective, DndKeyboardItemDirective, DndListDirective, DragAndDropModule, DynamicComponentContainer, DynamicComponentInjector, DynamicComponentService, DynamicPortalComponent, ELEMENT_REF_EXCEPTION, FDK_DISABLED_DIRECTIVE, FDK_FOCUSABLE_GRID_DIRECTIVE, FDK_FOCUSABLE_ITEM_DIRECTIVE, FDK_FOCUSABLE_LIST_DIRECTIVE, FDK_READONLY_DIRECTIVE, FDK_SELECTABLE_ITEM_PROVIDER, FOCUSABLE_ITEM, FdkClickedProvider, FdkDisabledProvider, FdkReadonlyProvider, FilterStringsPipe, FocusKeyManagerHelpersModule, FocusKeyManagerItemDirective, FocusKeyManagerListDirective, FocusTrapService, FocusableGridDirective, FocusableGridModule, FocusableItemDirective, FocusableItemModule, FocusableListDirective, FocusableListModule, FocusableObserver, FunctionStrategy, INVALID_DATE_ERROR, IgnoreClickOnSelectionDirective, IgnoreClickOnSelectionDirectiveToken, IgnoreClickOnSelectionModule, InitialFocusDirective, InitialFocusModule, IntersectionSpyDirective, IsCompactDensityPipe, KeyUtil, KeyboardSupportService, LETTERS_UNICODE_RANGE, LIST_ITEM_COMPONENT, LineClampDirective, LineClampModule, LineClampTargetDirective, LocalStorageService, MOBILE_CONFIG_ERROR, MakeAsyncPipe, ModuleDeprecations, OVERFLOW_PRIORITY_SCORE, ObservableStrategy, OnlyDigitsDirective, OnlyDigitsModule, OverflowListDirective, OverflowListItemDirective, OverflowListModule, PipeModule, PromiseStrategy, RTL_LANGUAGE, RangeSelector, ReadonlyBehaviorDirective, ReadonlyBehaviorModule, ReadonlyObserver, RepeatDirective, RepeatModule, ResizeDirective, ResizeHandleDirective, ResizeModule, ResizeObserverFactory, ResizeObserverService, ResponsiveBreakpoints, RtlService, SafePipe, SearchHighlightPipe, SelectComponentRootToken, SelectableItemDirective, SelectableItemToken, SelectableListDirective, SelectableListModule, SelectionService, THEME_SWITCHER_ROUTER_MISSING_ERROR, TabbableElementService, TemplateDirective, TemplateModule, ThemesService, ToastBottomCenterPosition, ToastBottomLeftPosition, ToastBottomRightPosition, ToastTopCenterPosition, ToastTopLeftPosition, ToastTopRightPosition, TruncateDirective, TruncateModule, TruncatePipe, TruncatedTitleDirective, TwoDigitsPipe, UtilsModule, ValueByPathPipe, ValueStrategy, ViewportSizeObservable, alternateSetter, applyCssClass, applyCssStyle, baseToastAnimations, coerceArraySafe, coerceBoolean, coerceCssPixel, consumerProviderFactory, dfs, getBreakpointName, getDocumentFontSize, getElementCapacity, getElementWidth, getNativeElement, getRandomColorAccent, hasElementRef, intersectionObservable, isBlank, isBoolean, isCompactDensity, isFunction, isJsObject, isNumber, isObject, isOdd, isPresent, isPromise, isString, isStringMap, isSubscribable, isType, isValidContentDensity, moduleDeprecationsFactory, moduleDeprecationsProvider, parserFileSize, pxToNum, resizeObservable, scrollIntoView, scrollTop, selectStrategy, setDisabledState, setReadonlyState, toNativeElement, toastConnectedBottomLeftPosition, toastConnectedBottomPosition, toastConnectedBottomRightPosition, toastConnectedTopLeftPosition, toastConnectedTopPosition, toastConnectedTopRightPosition, uuidv4 };
7641
7679
  //# sourceMappingURL=fundamental-ngx-cdk-utils.mjs.map