@fundamental-ngx/core 0.35.1 → 0.35.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/action-bar/package.json +1 -1
- package/action-sheet/package.json +1 -1
- package/alert/package.json +1 -1
- package/avatar/package.json +1 -1
- package/avatar-group/directives/avatar-group-overflow-button.directive.d.ts +4 -2
- package/avatar-group/esm2020/directives/avatar-group-overflow-button.directive.mjs +5 -1
- package/avatar-group/fesm2015/fundamental-ngx-core-avatar-group.mjs +4 -0
- package/avatar-group/fesm2015/fundamental-ngx-core-avatar-group.mjs.map +1 -1
- package/avatar-group/fesm2020/fundamental-ngx-core-avatar-group.mjs +4 -0
- package/avatar-group/fesm2020/fundamental-ngx-core-avatar-group.mjs.map +1 -1
- package/avatar-group/package.json +1 -1
- package/bar/package.json +1 -1
- package/breadcrumb/package.json +1 -1
- package/busy-indicator/package.json +1 -1
- package/button/package.json +1 -1
- package/calendar/package.json +1 -1
- package/card/package.json +1 -1
- package/carousel/package.json +1 -1
- package/checkbox/package.json +1 -1
- package/combobox/package.json +1 -1
- package/date-picker/package.json +1 -1
- package/datetime/package.json +1 -1
- package/datetime-picker/package.json +1 -1
- package/dialog/package.json +1 -1
- package/dynamic-page/package.json +1 -1
- package/dynamic-side-content/package.json +1 -1
- package/esm2020/avatar-group/directives/avatar-group-overflow-button.directive.mjs +5 -1
- package/esm2020/fixed-card-layout/fixed-card-layout.component.mjs +17 -26
- package/esm2020/fundamental-ngx.module.mjs +8 -4
- package/esm2020/input-group/input-group.component.mjs +3 -3
- package/esm2020/overflow-layout/directives/overflow-expand.directive.mjs +36 -0
- package/esm2020/overflow-layout/directives/overflow-item-container-ref.directive.mjs +46 -0
- package/esm2020/overflow-layout/directives/overflow-item-ref.directive.mjs +57 -0
- package/esm2020/overflow-layout/directives/overflow-layout-item-container.directive.mjs +26 -0
- package/esm2020/overflow-layout/directives/overflow-layout-item.directive.mjs +100 -0
- package/esm2020/overflow-layout/directives/overflow-layout-popover-content.directive.mjs +68 -0
- package/esm2020/overflow-layout/fundamental-ngx-core-overflow-layout.mjs +5 -0
- package/esm2020/overflow-layout/index.mjs +15 -0
- package/esm2020/overflow-layout/interfaces/overflow-container.interface.mjs +2 -0
- package/esm2020/overflow-layout/interfaces/overflow-expand.interface.mjs +2 -0
- package/esm2020/overflow-layout/interfaces/overflow-item-ref.interface.mjs +2 -0
- package/esm2020/overflow-layout/interfaces/overflow-item.interface.mjs +2 -0
- package/esm2020/overflow-layout/interfaces/overflow-popover-content.interface.mjs +2 -0
- package/esm2020/overflow-layout/overflow-layout.component.mjs +300 -0
- package/esm2020/overflow-layout/overflow-layout.module.mjs +52 -0
- package/esm2020/overflow-layout/tokens/overflow-container.token.mjs +3 -0
- package/esm2020/overflow-layout/tokens/overflow-expand.token.mjs +3 -0
- package/esm2020/overflow-layout/tokens/overflow-item-ref.token.mjs +3 -0
- package/esm2020/overflow-layout/tokens/overflow-item.token.mjs +3 -0
- package/esm2020/public_api.mjs +2 -1
- package/esm2020/select/select.component.mjs +1 -2
- package/facets/package.json +1 -1
- package/feed-input/package.json +1 -1
- package/feed-list-item/package.json +1 -1
- package/fesm2015/fundamental-ngx-core-avatar-group.mjs +4 -0
- package/fesm2015/fundamental-ngx-core-avatar-group.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-fixed-card-layout.mjs +16 -25
- package/fesm2015/fundamental-ngx-core-fixed-card-layout.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-input-group.mjs +2 -2
- package/fesm2015/fundamental-ngx-core-input-group.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-overflow-layout.mjs +672 -0
- package/fesm2015/fundamental-ngx-core-overflow-layout.mjs.map +1 -0
- package/fesm2015/fundamental-ngx-core-select.mjs +0 -1
- package/fesm2015/fundamental-ngx-core-select.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core.mjs +8 -3
- package/fesm2015/fundamental-ngx-core.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-avatar-group.mjs +4 -0
- package/fesm2020/fundamental-ngx-core-avatar-group.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-fixed-card-layout.mjs +16 -25
- package/fesm2020/fundamental-ngx-core-fixed-card-layout.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-input-group.mjs +2 -2
- package/fesm2020/fundamental-ngx-core-input-group.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-overflow-layout.mjs +660 -0
- package/fesm2020/fundamental-ngx-core-overflow-layout.mjs.map +1 -0
- package/fesm2020/fundamental-ngx-core-select.mjs +0 -1
- package/fesm2020/fundamental-ngx-core-select.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core.mjs +8 -3
- package/fesm2020/fundamental-ngx-core.mjs.map +1 -1
- package/file-uploader/package.json +1 -1
- package/fixed-card-layout/esm2020/fixed-card-layout.component.mjs +17 -26
- package/fixed-card-layout/fesm2015/fundamental-ngx-core-fixed-card-layout.mjs +16 -25
- package/fixed-card-layout/fesm2015/fundamental-ngx-core-fixed-card-layout.mjs.map +1 -1
- package/fixed-card-layout/fesm2020/fundamental-ngx-core-fixed-card-layout.mjs +16 -25
- package/fixed-card-layout/fesm2020/fundamental-ngx-core-fixed-card-layout.mjs.map +1 -1
- package/fixed-card-layout/fixed-card-layout.component.d.ts +4 -6
- package/fixed-card-layout/package.json +1 -1
- package/flexible-column-layout/package.json +1 -1
- package/form/package.json +1 -1
- package/formatted-text/package.json +1 -1
- package/fundamental-ngx.module.d.ts +2 -1
- package/grid-list/package.json +1 -1
- package/icon/package.json +1 -1
- package/illustrated-message/package.json +1 -1
- package/infinite-scroll/package.json +1 -1
- package/info-label/package.json +1 -1
- package/inline-help/package.json +1 -1
- package/input-group/esm2020/input-group.component.mjs +3 -3
- package/input-group/fesm2015/fundamental-ngx-core-input-group.mjs +2 -2
- package/input-group/fesm2015/fundamental-ngx-core-input-group.mjs.map +1 -1
- package/input-group/fesm2020/fundamental-ngx-core-input-group.mjs +2 -2
- package/input-group/fesm2020/fundamental-ngx-core-input-group.mjs.map +1 -1
- package/input-group/package.json +1 -1
- package/layout-grid/package.json +1 -1
- package/layout-panel/package.json +1 -1
- package/link/package.json +1 -1
- package/list/package.json +1 -1
- package/menu/package.json +1 -1
- package/message-box/package.json +1 -1
- package/message-strip/package.json +1 -1
- package/message-toast/package.json +1 -1
- package/micro-process-flow/package.json +1 -1
- package/mobile-mode/package.json +1 -1
- package/multi-input/package.json +1 -1
- package/nested-list/package.json +1 -1
- package/notification/package.json +1 -1
- package/object-identifier/package.json +1 -1
- package/object-marker/package.json +1 -1
- package/object-number/package.json +1 -1
- package/object-status/package.json +1 -1
- package/overflow-layout/README.md +7 -0
- package/overflow-layout/directives/overflow-expand.directive.d.ts +15 -0
- package/overflow-layout/directives/overflow-item-container-ref.directive.d.ts +25 -0
- package/overflow-layout/directives/overflow-item-ref.directive.d.ts +42 -0
- package/overflow-layout/directives/overflow-layout-item-container.directive.d.ts +16 -0
- package/overflow-layout/directives/overflow-layout-item.directive.d.ts +38 -0
- package/overflow-layout/directives/overflow-layout-popover-content.directive.d.ts +31 -0
- package/overflow-layout/esm2020/directives/overflow-expand.directive.mjs +36 -0
- package/overflow-layout/esm2020/directives/overflow-item-container-ref.directive.mjs +46 -0
- package/overflow-layout/esm2020/directives/overflow-item-ref.directive.mjs +57 -0
- package/overflow-layout/esm2020/directives/overflow-layout-item-container.directive.mjs +26 -0
- package/overflow-layout/esm2020/directives/overflow-layout-item.directive.mjs +100 -0
- package/overflow-layout/esm2020/directives/overflow-layout-popover-content.directive.mjs +68 -0
- package/overflow-layout/esm2020/fundamental-ngx-core-overflow-layout.mjs +5 -0
- package/overflow-layout/esm2020/index.mjs +15 -0
- package/overflow-layout/esm2020/interfaces/overflow-container.interface.mjs +2 -0
- package/overflow-layout/esm2020/interfaces/overflow-expand.interface.mjs +2 -0
- package/overflow-layout/esm2020/interfaces/overflow-item-ref.interface.mjs +2 -0
- package/overflow-layout/esm2020/interfaces/overflow-item.interface.mjs +2 -0
- package/overflow-layout/esm2020/interfaces/overflow-popover-content.interface.mjs +2 -0
- package/overflow-layout/esm2020/overflow-layout.component.mjs +300 -0
- package/overflow-layout/esm2020/overflow-layout.module.mjs +52 -0
- package/overflow-layout/esm2020/tokens/overflow-container.token.mjs +3 -0
- package/overflow-layout/esm2020/tokens/overflow-expand.token.mjs +3 -0
- package/overflow-layout/esm2020/tokens/overflow-item-ref.token.mjs +3 -0
- package/overflow-layout/esm2020/tokens/overflow-item.token.mjs +3 -0
- package/overflow-layout/fesm2015/fundamental-ngx-core-overflow-layout.mjs +672 -0
- package/overflow-layout/fesm2015/fundamental-ngx-core-overflow-layout.mjs.map +1 -0
- package/overflow-layout/fesm2020/fundamental-ngx-core-overflow-layout.mjs +660 -0
- package/overflow-layout/fesm2020/fundamental-ngx-core-overflow-layout.mjs.map +1 -0
- package/overflow-layout/fundamental-ngx-core-overflow-layout.d.ts +5 -0
- package/overflow-layout/index.d.ts +14 -0
- package/overflow-layout/interfaces/overflow-container.interface.d.ts +4 -0
- package/overflow-layout/interfaces/overflow-expand.interface.d.ts +11 -0
- package/overflow-layout/interfaces/overflow-item-ref.interface.d.ts +38 -0
- package/overflow-layout/interfaces/overflow-item.interface.d.ts +20 -0
- package/overflow-layout/interfaces/overflow-popover-content.interface.d.ts +11 -0
- package/overflow-layout/overflow-layout.component.d.ts +131 -0
- package/overflow-layout/overflow-layout.module.d.ts +16 -0
- package/overflow-layout/package.json +53 -0
- package/overflow-layout/tokens/overflow-container.token.d.ts +3 -0
- package/overflow-layout/tokens/overflow-expand.token.d.ts +3 -0
- package/overflow-layout/tokens/overflow-item-ref.token.d.ts +3 -0
- package/overflow-layout/tokens/overflow-item.token.d.ts +3 -0
- package/package.json +9 -1
- package/pagination/package.json +1 -1
- package/panel/package.json +1 -1
- package/popover/package.json +1 -1
- package/product-switch/package.json +1 -1
- package/progress-indicator/package.json +1 -1
- package/public_api.d.ts +1 -0
- package/quick-view/package.json +1 -1
- package/radio/package.json +1 -1
- package/rating-indicator/package.json +1 -1
- package/resizable-card-layout/package.json +1 -1
- package/scroll-spy/package.json +1 -1
- package/scrollbar/package.json +1 -1
- package/segmented-button/package.json +1 -1
- package/select/esm2020/select.component.mjs +1 -2
- package/select/fesm2015/fundamental-ngx-core-select.mjs +0 -1
- package/select/fesm2015/fundamental-ngx-core-select.mjs.map +1 -1
- package/select/fesm2020/fundamental-ngx-core-select.mjs +0 -1
- package/select/fesm2020/fundamental-ngx-core-select.mjs.map +1 -1
- package/select/package.json +1 -1
- package/shared/package.json +1 -1
- package/shellbar/package.json +1 -1
- package/side-navigation/package.json +1 -1
- package/slider/package.json +1 -1
- package/split-button/package.json +1 -1
- package/splitter/package.json +1 -1
- package/status-indicator/package.json +1 -1
- package/step-input/package.json +1 -1
- package/switch/package.json +1 -1
- package/table/package.json +1 -1
- package/tabs/package.json +1 -1
- package/text/package.json +1 -1
- package/theming/package.json +1 -1
- package/tile/package.json +1 -1
- package/time/package.json +1 -1
- package/time-picker/package.json +1 -1
- package/timeline/package.json +1 -1
- package/title/package.json +1 -1
- package/token/package.json +1 -1
- package/toolbar/package.json +1 -1
- package/tree/package.json +1 -1
- package/upload-collection/package.json +1 -1
- package/utils/package.json +1 -1
- package/vertical-navigation/package.json +1 -1
- package/wizard/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fundamental-ngx-core-fixed-card-layout.mjs","sources":["../../../../../libs/core/src/lib/fixed-card-layout/fixed-card-layout-item/fixed-card-layout-item.component.ts","../../../../../libs/core/src/lib/fixed-card-layout/fixed-card-layout.component.ts","../../../../../libs/core/src/lib/fixed-card-layout/fixed-card-layout.component.html","../../../../../libs/core/src/lib/fixed-card-layout/fixed-card-layout.module.ts","../../../../../libs/core/src/lib/fixed-card-layout/fundamental-ngx-core-fixed-card-layout.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ElementRef } from '@angular/core';\nimport { FocusableOption } from '@angular/cdk/a11y';\n\n@Component({\n selector: 'fd-fixed-card-layout-item',\n template: `<ng-content></ng-content>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n style: 'display: block'\n }\n})\nexport class FixedCardLayoutItemComponent implements FocusableOption {\n constructor(private _elementRef: ElementRef) {}\n\n /** Set focus on the element. */\n focus(): void {\n const header = this._elementRef.nativeElement.querySelector('.fd-card__header');\n if (header) {\n header.focus();\n }\n }\n}\n","import {\n AfterContentInit,\n AfterViewChecked,\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n Directive,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n QueryList,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n ViewChildren,\n ViewEncapsulation\n} from '@angular/core';\nimport { FocusKeyManager } from '@angular/cdk/a11y';\nimport { CdkDrag, CdkDragDrop, CdkDragEnter, CdkDropList } from '@angular/cdk/drag-drop';\nimport { Subject } from 'rxjs';\nimport { debounceTime, takeUntil } from 'rxjs/operators';\n\nimport { resizeObservable, RtlService } from '@fundamental-ngx/core/utils';\nimport { FixedCardLayoutItemComponent } from './fixed-card-layout-item/fixed-card-layout-item.component';\nimport { coerceNumberProperty, NumberInput } from '@angular/cdk/coercion';\n\nconst PX_IN_REM = 16;\nconst CARD_MINIMUM_WIDTH = 320; // 320px = 20rem\nconst CARD_GAP_WIDTH = 16; // 16px = 1rem\nconst DRAG_START_DELAY = 200; // in ms\nconst MAX_COLUMNS = 10;\n\nlet cardRank = 1;\n\n@Directive({ selector: '[fdCardDef]' })\nexport class CardDefinitionDirective {\n /**\n * Behaves like rank of card.\n * Useful in creating layout again after drag and drop.\n */\n @Input()\n set fdCardDef(value: NumberInput) {\n if (!value) {\n return;\n }\n\n this._fdCardDef = coerceNumberProperty(value);\n }\n get fdCardDef(): number {\n return this._fdCardDef;\n }\n\n /** @hidden */\n private _fdCardDef: number = cardRank++;\n\n /** @hidden */\n constructor(public template: TemplateRef<any>) {}\n}\n\nexport interface Layout {\n numberOfColumns?: number;\n screenSize: number;\n}\n\nexport interface CardDropped {\n previousIndex: number;\n currentIndex: number;\n layoutColumns: number;\n items: CardDefinitionDirective[];\n}\n\ntype Columns = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;\n\nexport type ColumnsWidthConfig = { [C in Columns]?: number };\n\ntype CardColumn = CardDefinitionDirective[];\n\n@Component({\n selector: 'fd-fixed-card-layout',\n templateUrl: './fixed-card-layout.component.html',\n styleUrls: ['./fixed-card-layout.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'fd-fixed-card-layout'\n }\n})\nexport class FixedCardLayoutComponent\n implements OnInit, AfterContentInit, AfterViewInit, AfterViewChecked, OnChanges, OnDestroy\n{\n /** Drag drop behavior can be disabled */\n @Input()\n disableDragDrop: boolean;\n\n /** Drag start delay in milliseconds, default to 200ms for safe scrolling on mobile with touchscreen */\n @Input()\n dragStartDelay = DRAG_START_DELAY;\n\n /** Card's minimum width in pixels. */\n @Input()\n set cardMinimumWidth(value: NumberInput) {\n const coercedValue = coerceNumberProperty(value);\n\n if (coercedValue < CARD_MINIMUM_WIDTH) {\n return;\n }\n\n this._cardMinimumWidth = coercedValue;\n\n // If component is ready, do the recalculation.\n if (this._layout) {\n this.updateLayout();\n }\n }\n get cardMinimumWidth(): number {\n return this._cardMinimumWidth;\n }\n\n /** Config with the width ratios that should take every column. Flex-grow principe. Missed values set to 0. s*/\n @Input()\n columnsWidthConfig: ColumnsWidthConfig;\n\n /** Limit the number of columns. Default is 10. */\n @Input()\n maxColumns = MAX_COLUMNS;\n\n /** Event to emit, when layout changes */\n @Output()\n layoutChange: EventEmitter<Layout> = new EventEmitter<Layout>();\n\n /** Event to emit on Card dragged and dropped */\n @Output()\n cardDraggedDropped: EventEmitter<CardDropped> = new EventEmitter<CardDropped>();\n\n /** @hidden */\n @ContentChildren(CardDefinitionDirective)\n _cards: QueryList<CardDefinitionDirective>;\n\n /** @hidden */\n @ViewChildren(FixedCardLayoutItemComponent)\n _cardContainers: QueryList<FixedCardLayoutItemComponent>;\n\n /** @hidden */\n @ViewChildren('dropList', { read: CdkDropList })\n _cardWrappers: QueryList<CdkDropList>;\n\n /** @hidden */\n @ViewChild('layout')\n _layout: ElementRef;\n\n /** @hidden */\n _cardsArray: Array<CardDefinitionDirective>;\n\n /** @hidden Number of Columns in layout */\n _numberOfColumns: number;\n\n /** @hidden */\n _cardColumns: CardColumn[];\n\n /** @hidden*/\n _containerHeight: number;\n\n /** @hidden handles rtl service */\n _dir = 'ltr';\n\n /** @hidden first number is the CardDefinition rank, i.e. id */\n _groupIndexes = new Map<number, number>();\n\n /** @hidden first number is the CardDefinition rank, i.e. id */\n _itemIndexes = new Map<number, number>();\n\n /** @hidden first number is the CardDefinition rank, i.e. id */\n _singleItemColumns = new Set<number>();\n\n /** @hidden */\n _columnsWidth = new Map<number, number>();\n\n /** @hidden Return available width for fixed card layout */\n get _availableWidth(): number {\n return this._layout.nativeElement.getBoundingClientRect().width;\n }\n\n /** @hidden */\n _placeholderMargin: { [klass: string]: string };\n\n /** @hidden */\n private _previousNumberOfColumns: number;\n\n /** @hidden FocusKeyManager instance */\n private _keyboardEventsManager: FocusKeyManager<FixedCardLayoutItemComponent>;\n\n /** @hidden */\n private _cardMinimumWidth = CARD_MINIMUM_WIDTH;\n\n /** @hidden */\n private _shouldCalculateContainerHeight = false;\n\n /** @hidden An RxJS Subject that will kill the data stream upon component’s destruction (for unsubscribing) */\n private readonly _onDestroy$: Subject<void> = new Subject<void>();\n\n /** @hidden */\n constructor(\n private readonly _changeDetector: ChangeDetectorRef,\n @Optional() private readonly _rtlService: RtlService\n ) {}\n\n /** @hidden */\n ngOnInit(): void {\n this._subscribeToRtl();\n }\n\n /** @hidden */\n ngAfterContentInit(): void {\n this._listenOnCardsChange();\n }\n\n /** @hidden */\n ngAfterViewInit(): void {\n this._processCards();\n this._listenOnResize();\n this._accessibilitySetup();\n }\n\n /** @hidden */\n ngAfterViewChecked(): void {\n /**\n * Update column layout when orientation of screen changes.\n * actual width is returned when view is stable. In AfterViewInit, correct value does not come.\n */\n this.updateLayout();\n }\n\n /** @hidden */\n ngOnChanges(changes: SimpleChanges): void {\n if (!this._cards?.length) {\n return;\n }\n\n if ('maxColumns' in changes) {\n this.updateLayout();\n } else if ('columnsWidthConfig' in changes) {\n this._setColumnsWidth();\n }\n }\n\n /** @hidden */\n ngOnDestroy(): void {\n this._onDestroy$.next();\n this._onDestroy$.complete();\n }\n\n /** @hidden */\n @HostListener('keydown', ['$event'])\n handleKeydown(event: KeyboardEvent): void {\n event.stopImmediatePropagation();\n\n if (this._keyboardEventsManager) {\n this._keyboardEventsManager.onKeydown(event);\n }\n }\n\n /** Distribute cards on window resize */\n updateLayout(): void {\n if (!this._cards.length) {\n return;\n }\n\n const possibleNumberOfColumns = getNumberOfColumns(this._availableWidth, this.cardMinimumWidth);\n\n this._numberOfColumns = Math.min(\n possibleNumberOfColumns,\n this._cards.length,\n this.maxColumns || MAX_COLUMNS,\n MAX_COLUMNS\n );\n\n this.layoutChange.emit({\n numberOfColumns: this._numberOfColumns,\n screenSize: this._availableWidth\n });\n\n if (this._previousNumberOfColumns !== this._numberOfColumns) {\n this._previousNumberOfColumns = this._numberOfColumns;\n this._updateColumns();\n return;\n }\n\n this._setColumnsWidth();\n }\n\n /** @hidden Calculate container height basing on the card wrapper columns */\n _calculateContainerHeight(additionalSpace: number = 0): void {\n this._changeDetector.detectChanges();\n\n const wrapperColumns = this._cardColumns.map((column) =>\n column\n .map((card) => this._cardWrappers.find((wrapper) => wrapper.getSortedItems()[0].data === card)?.element)\n .filter((v): v is ElementRef<HTMLElement> => !!v)\n );\n\n const columnsHeights = wrapperColumns\n .map((column) => column.map((card) => card.nativeElement.getBoundingClientRect().height))\n .map((column) => column.reduce((height, cardHeight) => (height += cardHeight), 0));\n\n // +4px because it's the top & bottom borders of card placeholder\n this._containerHeight = Math.max(...columnsHeights) + 4 + additionalSpace;\n\n this._changeDetector.detectChanges();\n }\n\n /** @hidden */\n _enterPredicate = (_: CdkDrag, drop: CdkDropList): boolean => {\n // We should update container's height & its children rects (to react when drag moves into the list) before we entered any drop list.\n // That's why it's done here instead of cdkDropListEntered. As this predicate being called many times here is the optimization.\n if (this._shouldCalculateContainerHeight) {\n this._shouldCalculateContainerHeight = false;\n\n // Placeholder doesn't have margin set yet but we need to count it\n // Margin will be set only if there are already items in container\n const additionalSpace = drop.getSortedItems().length ? PX_IN_REM : 0;\n\n this._calculateContainerHeight(additionalSpace);\n }\n\n return true;\n };\n\n /** @hidden */\n _onDropListExited(): void {\n this._shouldCalculateContainerHeight = true;\n }\n\n /** @hidden */\n _onDropListEntered(event: CdkDragEnter): void {\n const containerItemCardDef = (event.container.getSortedItems()[0].data as CardDefinitionDirective).fdCardDef;\n const dragItemCardDef = (event.item.data as CardDefinitionDirective).fdCardDef;\n\n this._setPlaceholderStyle(containerItemCardDef !== dragItemCardDef);\n }\n\n /** @hidden */\n _onDragDropped(event: CdkDragDrop<number, number>): void {\n if (event.container.data === event.previousContainer.data) {\n return;\n }\n\n const movedCard = event.previousContainer.getSortedItems()[0].data;\n const replacedCard = event.container.getSortedItems()[0].data;\n\n const movedCardColumn = this._cardColumns.find((column) =>\n column.find((card) => card.fdCardDef === movedCard.fdCardDef)\n );\n const replacedCardColumn = this._cardColumns.find((column) =>\n column.find((card) => card.fdCardDef === replacedCard.fdCardDef)\n );\n\n // If we dragged the card from the same column as the column we're dropping into\n // There may be a situation where the order shouldn't change but since there are a different drop lists it will change\n // We should prevent this\n if (movedCardColumn === replacedCardColumn && movedCardColumn?.length === 2) {\n if (movedCard.fdCardDef < replacedCard.fdCardDef && event.previousContainer.data < event.container.data) {\n return;\n }\n\n if (movedCard.fdCardDef > replacedCard.fdCardDef && event.previousContainer.data > event.container.data) {\n return;\n }\n }\n\n this._processDragDrop(event.previousContainer.data, event.container.data, movedCard, replacedCard);\n }\n\n /** @hidden For the keyboard drag&drop directive */\n _customMoveFn = (group: CardColumn, indexFrom: number, indexTo: number): void => {\n const movedCard = group[indexFrom];\n const replacedCard = group[indexTo];\n\n const indexFromArray = this._cardsArray.findIndex((card) => card.fdCardDef === movedCard.fdCardDef);\n const indexToArray = this._cardsArray.findIndex((card) => card.fdCardDef === replacedCard.fdCardDef);\n\n this._processDragDrop(indexFromArray, indexToArray, movedCard, replacedCard);\n };\n\n /** @hidden For the keyboard drag&drop directive */\n _customTransferFn = (prevGroup: CardColumn, nextGroup: CardColumn, indexFrom: number, indexTo: number): void => {\n const movedCard = prevGroup[indexFrom];\n const replacedCard = nextGroup[indexTo];\n\n const indexFromArray = this._cardsArray.findIndex((card) => card.fdCardDef === movedCard.fdCardDef);\n const indexToArray = this._cardsArray.findIndex((card) => card.fdCardDef === replacedCard.fdCardDef);\n\n this._processDragDrop(indexFromArray, indexToArray, movedCard, replacedCard);\n };\n\n /** @hidden */\n _setPlaceholderStyle(value: boolean): void {\n this._placeholderMargin = value ? { 'margin-bottom': '1rem' } : {};\n }\n\n /** @hidden Arranges cards on drop of dragged card */\n private _processDragDrop(\n prevIndex: number,\n newIndex: number,\n prevCard: CardDefinitionDirective,\n newCard: CardDefinitionDirective\n ): void {\n // moveItemInArray from CDK won't work as it changes order of other cards\n const replacedCard = this._cardsArray[newIndex];\n this._cardsArray[newIndex] = this._cardsArray[prevIndex];\n this._cardsArray[prevIndex] = replacedCard;\n\n adjustCardRank(prevCard, newCard);\n\n this.cardDraggedDropped.emit({\n previousIndex: prevIndex,\n currentIndex: newIndex,\n layoutColumns: this._numberOfColumns,\n items: this._cards.toArray()\n });\n\n this._updateColumns();\n }\n\n /** @hidden */\n private _accessibilitySetup(): void {\n this._keyboardEventsManager = new FocusKeyManager(this._cardContainers).withWrap();\n }\n\n /** @hidden Rtl change subscription */\n private _subscribeToRtl(): void {\n this._rtlService?.rtl.pipe(takeUntil(this._onDestroy$)).subscribe((isRtl) => {\n this._dir = isRtl ? 'rtl' : 'ltr';\n this._changeDetector.detectChanges();\n });\n }\n\n /** @hidden Listen window resize and distribute cards on column change */\n private _listenOnResize(): void {\n resizeObservable(this._layout.nativeElement)\n .pipe(debounceTime(60), takeUntil(this._onDestroy$))\n .subscribe(() => this.updateLayout());\n }\n\n /** @hidden Listen card change and distribute cards on column change */\n private _listenOnCardsChange(): void {\n this._cards.changes.subscribe(() => {\n this._processCards();\n this._updateColumns();\n });\n }\n\n /** @hidden Renders layout on column changes */\n private _updateColumns(): void {\n this._setCardColumns();\n this._setColumnsWidth(false);\n this._calculateContainerHeight();\n }\n\n /** @hidden */\n private _processCards(): void {\n this._cardsArray = this._cards\n .toArray()\n .sort((firstCard, secondCard) => firstCard.fdCardDef - secondCard.fdCardDef);\n\n this._changeDetector.detectChanges();\n\n this.updateLayout();\n }\n\n /** @hidden Distribute cards among columns to arrange them in \"Z\" flow */\n private _setCardColumns(): void {\n this._groupIndexes = new Map<number, number>();\n this._itemIndexes = new Map<number, number>();\n this._singleItemColumns = new Set<number>();\n\n const columns: CardColumn[] = new Array(this._numberOfColumns).fill(0).map(() => new Array(0));\n\n this._cardsArray.forEach((card, i) => {\n const currColumnIndex = i % this._numberOfColumns;\n const itemIndex = columns[currColumnIndex].length;\n\n columns[currColumnIndex].push(card);\n\n this._groupIndexes.set(card.fdCardDef, currColumnIndex);\n this._itemIndexes.set(card.fdCardDef, itemIndex);\n });\n\n this._cardColumns = columns;\n\n this._cardColumns.forEach((column) => {\n if (column.length > 0 && column.length < 2) {\n this._singleItemColumns.add(column[0].fdCardDef);\n }\n });\n }\n\n /** @hidden */\n private _setColumnsWidth(detectChanges = true): void {\n this._columnsWidth = new Map();\n\n const configPresent =\n this.columnsWidthConfig &&\n typeof this.columnsWidthConfig === 'object' &&\n Object.keys(this.columnsWidthConfig).length;\n\n if (!configPresent || !this._layout || this._numberOfColumns === 1) {\n return;\n }\n\n const fixedWidthModifiers = fixWidthModifiers(this.columnsWidthConfig, this._numberOfColumns);\n const totalWidthModifiers = fixedWidthModifiers.reduce((sum, width) => (sum += width), 0);\n const freeSpace = this._availableWidth - this.cardMinimumWidth * this._numberOfColumns;\n\n this._cardColumns.forEach((column, index) => {\n const columnWidth = Math.round(\n this.cardMinimumWidth + (freeSpace / totalWidthModifiers) * fixedWidthModifiers[index]\n );\n\n column.forEach((card) => this._columnsWidth.set(card.fdCardDef, columnWidth));\n });\n\n if (detectChanges) {\n this._changeDetector.detectChanges();\n }\n }\n}\n\n/** @hidden */\nfunction fixWidthModifiers(config: ColumnsWidthConfig, numberOfColumns: number): number[] {\n const modifiers = new Array(numberOfColumns).fill(0);\n\n return modifiers.map((_, index) => {\n const columnWidthModifier = config[index + 1];\n\n if (!columnWidthModifier || columnWidthModifier < 0) {\n return 0;\n }\n\n return columnWidthModifier;\n });\n}\n\n/** @hidden Returns number of columns that can fit in current available width for fd-card-layout */\nfunction getNumberOfColumns(containerWidth: number, cardWidth: number): number {\n containerWidth = containerWidth || 1;\n cardWidth = cardWidth || 1;\n\n const numberOfCardsWithNoGap = Math.max(Math.floor(containerWidth / cardWidth), 1); // Example: 960 / 320 = 3\n const requiredWidthWithGap = numberOfCardsWithNoGap * cardWidth + (numberOfCardsWithNoGap - 1) * CARD_GAP_WIDTH;\n const columnCount = requiredWidthWithGap > containerWidth ? numberOfCardsWithNoGap - 1 : numberOfCardsWithNoGap;\n\n return Math.max(columnCount, 1);\n}\n\n/** @hidden Method to update rank after cards are dragged */\nfunction adjustCardRank(draggedCard: CardDefinitionDirective, replacedCard: CardDefinitionDirective): void {\n const draggedCardRank = draggedCard.fdCardDef;\n draggedCard.fdCardDef = replacedCard.fdCardDef;\n replacedCard.fdCardDef = draggedCardRank;\n}\n","<div\n #layout\n cdkDropListGroup\n fdDndKeyboardGroup\n class=\"fd-fixed-card-layout__card-layout fd-fixed-card-layout__card-layout--columns-{{ this._numberOfColumns }}\"\n [style.height]=\"_containerHeight + 'px'\"\n [groups]=\"_cardColumns\"\n orientation=\"horizontal\"\n [customMoveFn]=\"_customMoveFn\"\n [customTransferFn]=\"_customTransferFn\"\n [disableKeyboardDragDrop]=\"disableDragDrop\"\n [cdkDropListGroupDisabled]=\"disableDragDrop\"\n [attr.dir]=\"_dir\"\n>\n <div\n #dropList\n *ngFor=\"let card of _cardsArray; let cardIndex = index\"\n cdkDropList\n cdkDropListSortingDisabled\n class=\"fd-fixed-card-layout__card\"\n [class.fd-fixed-card-layout__card--single]=\"_singleItemColumns.has(card.fdCardDef)\"\n [style.min-width.px]=\"_columnsWidth.get(card.fdCardDef)\"\n [style.max-width.px]=\"_columnsWidth.get(card.fdCardDef)\"\n [cdkDropListData]=\"cardIndex\"\n [cdkDropListEnterPredicate]=\"_enterPredicate\"\n (cdkDropListEntered)=\"_onDropListEntered($event)\"\n (cdkDropListExited)=\"_onDropListExited()\"\n >\n <div\n cdkDrag\n fdDndKeyboardItem\n tabindex=\"0\"\n cdkDragPreviewClass=\"fd-fixed-card-layout__card-preview\"\n [cdkDragData]=\"card\"\n [cdkDragStartDelay]=\"dragStartDelay\"\n [itemIndex]=\"_itemIndexes.get(card.fdCardDef)!\"\n [groupIndex]=\"_groupIndexes.get(card.fdCardDef)!\"\n (cdkDragDropped)=\"_onDragDropped($event)\"\n (cdkDragStarted)=\"_setPlaceholderStyle(false)\"\n >\n <fd-fixed-card-layout-item>\n <ng-container *ngTemplateOutlet=\"card?.template || null\"> </ng-container>\n </fd-fixed-card-layout-item>\n\n <div *cdkDragPlaceholder class=\"fd-fixed-card-layout__card-placeholder\" [style]=\"_placeholderMargin\">\n <ng-container *ngTemplateOutlet=\"card?.template || null\"></ng-container>\n </div>\n </div>\n </div>\n\n <ng-container *ngFor=\"let column of _cardColumns; let last = last; let index = index\">\n <div *ngIf=\"!last\" class=\"fd-fixed-card-layout__clearfix\" [style.order]=\"index + 1\"></div>\n </ng-container>\n</div>\n","import { DragDropModule } from '@angular/cdk/drag-drop';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FixedCardLayoutItemComponent } from './fixed-card-layout-item/fixed-card-layout-item.component';\nimport { DragAndDropModule } from '@fundamental-ngx/core/utils';\nimport { CardDefinitionDirective, FixedCardLayoutComponent } from './fixed-card-layout.component';\n\n@NgModule({\n declarations: [FixedCardLayoutComponent, CardDefinitionDirective, FixedCardLayoutItemComponent],\n imports: [CommonModule, DragDropModule, DragAndDropModule],\n exports: [FixedCardLayoutComponent, CardDefinitionDirective, FixedCardLayoutItemComponent]\n})\nexport class FixedCardLayoutModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAWa,4BAA4B;IACrC,YAAoB,WAAuB;QAAvB,gBAAW,GAAX,WAAW,CAAY;KAAI;;IAG/C,KAAK;QACD,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC;QAChF,IAAI,MAAM,EAAE;YACR,MAAM,CAAC,KAAK,EAAE,CAAC;SAClB;KACJ;;yHATQ,4BAA4B;6GAA5B,4BAA4B,6GAN3B,2BAA2B;2FAM5B,4BAA4B;kBARxC,SAAS;mBAAC;oBACP,QAAQ,EAAE,2BAA2B;oBACrC,QAAQ,EAAE,2BAA2B;oBACrC,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,IAAI,EAAE;wBACF,KAAK,EAAE,gBAAgB;qBAC1B;iBACJ;;;ACwBD,MAAM,SAAS,GAAG,EAAE,CAAC;AACrB,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAC/B,MAAM,cAAc,GAAG,EAAE,CAAC;AAC1B,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAC7B,MAAM,WAAW,GAAG,EAAE,CAAC;AAEvB,IAAI,QAAQ,GAAG,CAAC,CAAC;MAGJ,uBAAuB;;IAqBhC,YAAmB,QAA0B;QAA1B,aAAQ,GAAR,QAAQ,CAAkB;;QAHrC,eAAU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|
|
1
|
+
{"version":3,"file":"fundamental-ngx-core-fixed-card-layout.mjs","sources":["../../../../../libs/core/src/lib/fixed-card-layout/fixed-card-layout-item/fixed-card-layout-item.component.ts","../../../../../libs/core/src/lib/fixed-card-layout/fixed-card-layout.component.ts","../../../../../libs/core/src/lib/fixed-card-layout/fixed-card-layout.component.html","../../../../../libs/core/src/lib/fixed-card-layout/fixed-card-layout.module.ts","../../../../../libs/core/src/lib/fixed-card-layout/fundamental-ngx-core-fixed-card-layout.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ElementRef } from '@angular/core';\nimport { FocusableOption } from '@angular/cdk/a11y';\n\n@Component({\n selector: 'fd-fixed-card-layout-item',\n template: `<ng-content></ng-content>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n style: 'display: block'\n }\n})\nexport class FixedCardLayoutItemComponent implements FocusableOption {\n constructor(private _elementRef: ElementRef) {}\n\n /** Set focus on the element. */\n focus(): void {\n const header = this._elementRef.nativeElement.querySelector('.fd-card__header');\n if (header) {\n header.focus();\n }\n }\n}\n","import {\n AfterContentInit,\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n Directive,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n QueryList,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n ViewChildren,\n ViewEncapsulation\n} from '@angular/core';\nimport { FocusKeyManager } from '@angular/cdk/a11y';\nimport { CdkDrag, CdkDragDrop, CdkDragEnter, CdkDropList } from '@angular/cdk/drag-drop';\nimport { Subject } from 'rxjs';\nimport { debounceTime, delay, takeUntil } from 'rxjs/operators';\n\nimport { resizeObservable, RtlService } from '@fundamental-ngx/core/utils';\nimport { FixedCardLayoutItemComponent } from './fixed-card-layout-item/fixed-card-layout-item.component';\nimport { coerceNumberProperty, NumberInput } from '@angular/cdk/coercion';\n\nconst PX_IN_REM = 16;\nconst CARD_MINIMUM_WIDTH = 320; // 320px = 20rem\nconst CARD_GAP_WIDTH = 16; // 16px = 1rem\nconst DRAG_START_DELAY = 200; // in ms\nconst MAX_COLUMNS = 10;\n\nlet cardRank = 1;\n\n@Directive({ selector: '[fdCardDef]' })\nexport class CardDefinitionDirective {\n /**\n * Behaves like rank of card.\n * Useful in creating layout again after drag and drop.\n */\n @Input()\n set fdCardDef(value: NumberInput) {\n if (!value) {\n return;\n }\n\n this._fdCardDef = coerceNumberProperty(value);\n }\n get fdCardDef(): number {\n return this._fdCardDef;\n }\n\n /** @hidden */\n private _fdCardDef: number = cardRank++;\n\n /** @hidden */\n constructor(public template: TemplateRef<any>) {}\n}\n\nexport interface Layout {\n numberOfColumns?: number;\n screenSize: number;\n}\n\nexport interface CardDropped {\n previousIndex: number;\n currentIndex: number;\n layoutColumns: number;\n items: CardDefinitionDirective[];\n}\n\ntype Columns = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;\n\nexport type ColumnsWidthConfig = { [C in Columns]?: number };\n\ntype CardColumn = CardDefinitionDirective[];\n\n@Component({\n selector: 'fd-fixed-card-layout',\n templateUrl: './fixed-card-layout.component.html',\n styleUrls: ['./fixed-card-layout.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'fd-fixed-card-layout'\n }\n})\nexport class FixedCardLayoutComponent implements OnInit, AfterContentInit, AfterViewInit, OnChanges, OnDestroy {\n /** Drag drop behavior can be disabled */\n @Input()\n disableDragDrop: boolean;\n\n /** Drag start delay in milliseconds, default to 200ms for safe scrolling on mobile with touchscreen */\n @Input()\n dragStartDelay = DRAG_START_DELAY;\n\n /** Card's minimum width in pixels. */\n @Input()\n set cardMinimumWidth(value: NumberInput) {\n const coercedValue = coerceNumberProperty(value);\n\n if (coercedValue < CARD_MINIMUM_WIDTH) {\n return;\n }\n\n this._cardMinimumWidth = coercedValue;\n\n // If component is ready, do the recalculation.\n if (this._layout) {\n this.updateLayout();\n }\n }\n get cardMinimumWidth(): number {\n return this._cardMinimumWidth;\n }\n\n /** Config with the width ratios that should take every column. Flex-grow principe. Missed values set to 0. s*/\n @Input()\n columnsWidthConfig: ColumnsWidthConfig;\n\n /** Limit the number of columns. Default is 10. */\n @Input()\n maxColumns = MAX_COLUMNS;\n\n /** Event to emit, when layout changes */\n @Output()\n layoutChange: EventEmitter<Layout> = new EventEmitter<Layout>();\n\n /** Event to emit on Card dragged and dropped */\n @Output()\n cardDraggedDropped: EventEmitter<CardDropped> = new EventEmitter<CardDropped>();\n\n /** @hidden */\n @ContentChildren(CardDefinitionDirective)\n _cards: QueryList<CardDefinitionDirective>;\n\n /** @hidden */\n @ViewChildren(FixedCardLayoutItemComponent)\n _cardContainers: QueryList<FixedCardLayoutItemComponent>;\n\n /** @hidden */\n @ViewChildren('dropList', { read: CdkDropList })\n _cardWrappers: QueryList<CdkDropList>;\n\n /** @hidden */\n @ViewChild('layout')\n _layout: ElementRef;\n\n /** @hidden */\n _cardsArray: Array<CardDefinitionDirective>;\n\n /** @hidden Number of Columns in layout */\n _numberOfColumns: number;\n\n /** @hidden */\n _cardColumns: CardColumn[];\n\n /** @hidden*/\n _containerHeight: number;\n\n /** @hidden handles rtl service */\n _dir = 'ltr';\n\n /** @hidden first number is the CardDefinition rank, i.e. id */\n _groupIndexes = new Map<number, number>();\n\n /** @hidden first number is the CardDefinition rank, i.e. id */\n _itemIndexes = new Map<number, number>();\n\n /** @hidden first number is the CardDefinition rank, i.e. id */\n _singleItemColumns = new Set<number>();\n\n /** @hidden */\n _columnsWidth = new Map<number, number>();\n\n /** @hidden Return available width for fixed card layout */\n get _availableWidth(): number {\n return this._layout.nativeElement.getBoundingClientRect().width;\n }\n\n /** @hidden */\n _placeholderMargin: { [klass: string]: string };\n\n /** @hidden */\n private _previousNumberOfColumns: number;\n\n /** @hidden FocusKeyManager instance */\n private _keyboardEventsManager: FocusKeyManager<FixedCardLayoutItemComponent>;\n\n /** @hidden */\n private _cardMinimumWidth = CARD_MINIMUM_WIDTH;\n\n /** @hidden */\n private _shouldCalculateContainerHeight = false;\n\n /** @hidden An RxJS Subject that will kill the data stream upon component’s destruction (for unsubscribing) */\n private readonly _onDestroy$: Subject<void> = new Subject<void>();\n\n /** @hidden */\n constructor(\n private readonly _changeDetector: ChangeDetectorRef,\n @Optional() private readonly _rtlService: RtlService\n ) {}\n\n /** @hidden */\n ngOnInit(): void {\n this._subscribeToRtl();\n }\n\n /** @hidden */\n ngAfterContentInit(): void {\n this._listenOnCardsChange();\n }\n\n /** @hidden */\n ngAfterViewInit(): void {\n this._processCards();\n this._listenOnResize();\n this._accessibilitySetup();\n }\n\n /** @hidden */\n ngOnChanges(changes: SimpleChanges): void {\n if (!this._cards?.length) {\n return;\n }\n\n if ('maxColumns' in changes) {\n this.updateLayout();\n } else if ('columnsWidthConfig' in changes) {\n this._setColumnsWidth();\n }\n }\n\n /** @hidden */\n ngOnDestroy(): void {\n this._onDestroy$.next();\n this._onDestroy$.complete();\n }\n\n /** @hidden */\n @HostListener('keydown', ['$event'])\n handleKeydown(event: KeyboardEvent): void {\n event.stopImmediatePropagation();\n\n if (this._keyboardEventsManager) {\n this._keyboardEventsManager.onKeydown(event);\n }\n }\n\n /** Distribute cards on window resize */\n updateLayout(): void {\n if (!this._cards.length || !this._availableWidth) {\n return;\n }\n\n const possibleNumberOfColumns = getNumberOfColumns(this._availableWidth, this.cardMinimumWidth);\n\n this._numberOfColumns = Math.min(\n possibleNumberOfColumns,\n this._cards.length,\n this.maxColumns || MAX_COLUMNS,\n MAX_COLUMNS\n );\n\n this.layoutChange.emit({\n numberOfColumns: this._numberOfColumns,\n screenSize: this._availableWidth\n });\n\n if (this._previousNumberOfColumns !== this._numberOfColumns) {\n this._previousNumberOfColumns = this._numberOfColumns;\n this._updateColumns();\n return;\n }\n\n this._setColumnsWidth();\n }\n\n /** @hidden */\n _enterPredicate = (_: CdkDrag, drop: CdkDropList): boolean => {\n // We should update container's height & its children rects (to react when drag moves into the list) before we entered any drop list.\n // That's why it's done here instead of cdkDropListEntered. As this predicate being called many times here is the optimization.\n if (this._shouldCalculateContainerHeight) {\n this._shouldCalculateContainerHeight = false;\n\n // Placeholder doesn't have margin set yet but we need to count it\n // Margin will be set only if there are already items in container\n const additionalSpace = drop.getSortedItems().length ? PX_IN_REM : 0;\n\n this._calculateContainerHeight(additionalSpace);\n }\n\n return true;\n };\n\n /** @hidden */\n _onDropListExited(): void {\n this._shouldCalculateContainerHeight = true;\n }\n\n /** @hidden */\n _onDropListEntered(event: CdkDragEnter): void {\n const containerItemCardDef = (event.container.getSortedItems()[0].data as CardDefinitionDirective).fdCardDef;\n const dragItemCardDef = (event.item.data as CardDefinitionDirective).fdCardDef;\n\n this._setPlaceholderStyle(containerItemCardDef !== dragItemCardDef);\n }\n\n /** @hidden */\n _onDragDropped(event: CdkDragDrop<number, number>): void {\n if (event.container.data === event.previousContainer.data) {\n return;\n }\n\n const movedCard = event.previousContainer.getSortedItems()[0].data;\n const replacedCard = event.container.getSortedItems()[0].data;\n\n const movedCardColumn = this._cardColumns.find((column) =>\n column.find((card) => card.fdCardDef === movedCard.fdCardDef)\n );\n const replacedCardColumn = this._cardColumns.find((column) =>\n column.find((card) => card.fdCardDef === replacedCard.fdCardDef)\n );\n\n // If we dragged the card from the same column as the column we're dropping into\n // There may be a situation where the order shouldn't change but since there are a different drop lists it will change\n // We should prevent this\n if (movedCardColumn === replacedCardColumn && movedCardColumn?.length === 2) {\n if (movedCard.fdCardDef < replacedCard.fdCardDef && event.previousContainer.data < event.container.data) {\n return;\n }\n\n if (movedCard.fdCardDef > replacedCard.fdCardDef && event.previousContainer.data > event.container.data) {\n return;\n }\n }\n\n this._processDragDrop(event.previousContainer.data, event.container.data, movedCard, replacedCard);\n }\n\n /** @hidden For the keyboard drag&drop directive */\n _customMoveFn = (group: CardColumn, indexFrom: number, indexTo: number): void => {\n const movedCard = group[indexFrom];\n const replacedCard = group[indexTo];\n\n const indexFromArray = this._cardsArray.findIndex((card) => card.fdCardDef === movedCard.fdCardDef);\n const indexToArray = this._cardsArray.findIndex((card) => card.fdCardDef === replacedCard.fdCardDef);\n\n this._processDragDrop(indexFromArray, indexToArray, movedCard, replacedCard);\n };\n\n /** @hidden For the keyboard drag&drop directive */\n _customTransferFn = (prevGroup: CardColumn, nextGroup: CardColumn, indexFrom: number, indexTo: number): void => {\n const movedCard = prevGroup[indexFrom];\n const replacedCard = nextGroup[indexTo];\n\n const indexFromArray = this._cardsArray.findIndex((card) => card.fdCardDef === movedCard.fdCardDef);\n const indexToArray = this._cardsArray.findIndex((card) => card.fdCardDef === replacedCard.fdCardDef);\n\n this._processDragDrop(indexFromArray, indexToArray, movedCard, replacedCard);\n };\n\n /** @hidden */\n _setPlaceholderStyle(value: boolean): void {\n this._placeholderMargin = value ? { 'margin-bottom': '1rem' } : {};\n }\n\n /** @hidden Arranges cards on drop of dragged card */\n private _processDragDrop(\n prevIndex: number,\n newIndex: number,\n prevCard: CardDefinitionDirective,\n newCard: CardDefinitionDirective\n ): void {\n // moveItemInArray from CDK won't work as it changes order of other cards\n const replacedCard = this._cardsArray[newIndex];\n this._cardsArray[newIndex] = this._cardsArray[prevIndex];\n this._cardsArray[prevIndex] = replacedCard;\n\n adjustCardRank(prevCard, newCard);\n\n this.cardDraggedDropped.emit({\n previousIndex: prevIndex,\n currentIndex: newIndex,\n layoutColumns: this._numberOfColumns,\n items: this._cards.toArray()\n });\n\n this._updateColumns();\n }\n\n /** @hidden */\n private _accessibilitySetup(): void {\n this._keyboardEventsManager = new FocusKeyManager(this._cardContainers).withWrap();\n }\n\n /** @hidden Rtl change subscription */\n private _subscribeToRtl(): void {\n this._rtlService?.rtl.pipe(takeUntil(this._onDestroy$)).subscribe((isRtl) => {\n this._dir = isRtl ? 'rtl' : 'ltr';\n this._changeDetector.detectChanges();\n });\n }\n\n /** @hidden Listen window resize and distribute cards on column change */\n private _listenOnResize(): void {\n resizeObservable(this._layout.nativeElement)\n .pipe(debounceTime(60), takeUntil(this._onDestroy$))\n .subscribe(() => this.updateLayout());\n }\n\n /** @hidden Listen card change and distribute cards on column change */\n private _listenOnCardsChange(): void {\n this._cards.changes.pipe(delay(0)).subscribe(() => {\n this._processCards();\n this._updateColumns();\n });\n }\n\n /** @hidden Renders layout on column changes */\n private _updateColumns(): void {\n this._setCardColumns();\n this._setColumnsWidth(false);\n this._calculateContainerHeight();\n }\n\n /** @hidden */\n private _processCards(): void {\n this._cardsArray = this._cards\n .toArray()\n .sort((firstCard, secondCard) => firstCard.fdCardDef - secondCard.fdCardDef);\n\n this.updateLayout();\n }\n\n /** @hidden Distribute cards among columns to arrange them in \"Z\" flow */\n private _setCardColumns(): void {\n this._groupIndexes = new Map<number, number>();\n this._itemIndexes = new Map<number, number>();\n this._singleItemColumns = new Set<number>();\n\n const columns: CardColumn[] = new Array(this._numberOfColumns).fill(0).map(() => new Array(0));\n\n this._cardsArray.forEach((card, i) => {\n const currColumnIndex = i % this._numberOfColumns;\n const itemIndex = columns[currColumnIndex].length;\n\n columns[currColumnIndex].push(card);\n\n this._groupIndexes.set(card.fdCardDef, currColumnIndex);\n this._itemIndexes.set(card.fdCardDef, itemIndex);\n });\n\n this._cardColumns = columns;\n\n this._cardColumns.forEach((column) => {\n if (column.length > 0 && column.length < 2) {\n this._singleItemColumns.add(column[0].fdCardDef);\n }\n });\n }\n\n /** @hidden */\n private _setColumnsWidth(detectChanges = true): void {\n this._columnsWidth = new Map();\n\n const configPresent =\n this.columnsWidthConfig &&\n typeof this.columnsWidthConfig === 'object' &&\n Object.keys(this.columnsWidthConfig).length;\n\n if (!configPresent || !this._layout || this._numberOfColumns === 1) {\n return;\n }\n\n const fixedWidthModifiers = fixWidthModifiers(this.columnsWidthConfig, this._numberOfColumns);\n const totalWidthModifiers = fixedWidthModifiers.reduce((sum, width) => (sum += width), 0);\n const freeSpace = this._availableWidth - this.cardMinimumWidth * this._numberOfColumns;\n\n this._cardColumns.forEach((column, index) => {\n const columnWidth = Math.round(\n this.cardMinimumWidth + (freeSpace / totalWidthModifiers) * fixedWidthModifiers[index]\n );\n\n column.forEach((card) => this._columnsWidth.set(card.fdCardDef, columnWidth));\n });\n\n if (detectChanges) {\n this._changeDetector.detectChanges();\n }\n }\n\n /** @hidden Calculate container height basing on the card wrapper columns */\n private _calculateContainerHeight(additionalSpace: number = 0): void {\n this._changeDetector.detectChanges();\n\n const wrapperColumns = this._cardColumns.map((column) =>\n column\n .map((card) => this._cardWrappers.find((wrapper) => wrapper.getSortedItems()[0].data === card)?.element)\n .filter((v): v is ElementRef<HTMLElement> => !!v)\n );\n\n const columnsHeights = wrapperColumns\n .map((column) => column.map((card) => card.nativeElement.getBoundingClientRect().height))\n .map((column) => column.reduce((height, cardHeight) => (height += cardHeight), 0));\n\n // +4px because it's the top & bottom borders of card placeholder\n this._containerHeight = Math.max(...columnsHeights) + 4 + additionalSpace;\n\n this._changeDetector.detectChanges();\n }\n}\n\n/** @hidden */\nfunction fixWidthModifiers(config: ColumnsWidthConfig, numberOfColumns: number): number[] {\n const modifiers = new Array(numberOfColumns).fill(0);\n\n return modifiers.map((_, index) => {\n const columnWidthModifier = config[index + 1];\n\n if (!columnWidthModifier || columnWidthModifier < 0) {\n return 0;\n }\n\n return columnWidthModifier;\n });\n}\n\n/** @hidden Returns number of columns that can fit in current available width for fd-card-layout */\nfunction getNumberOfColumns(containerWidth: number, cardWidth: number): number {\n containerWidth = containerWidth || 1;\n cardWidth = cardWidth || 1;\n\n const numberOfCardsWithNoGap = Math.max(Math.floor(containerWidth / cardWidth), 1); // Example: 960 / 320 = 3\n const requiredWidthWithGap = numberOfCardsWithNoGap * cardWidth + (numberOfCardsWithNoGap - 1) * CARD_GAP_WIDTH;\n const columnCount = requiredWidthWithGap > containerWidth ? numberOfCardsWithNoGap - 1 : numberOfCardsWithNoGap;\n\n return Math.max(columnCount, 1);\n}\n\n/** @hidden Method to update rank after cards are dragged */\nfunction adjustCardRank(draggedCard: CardDefinitionDirective, replacedCard: CardDefinitionDirective): void {\n const draggedCardRank = draggedCard.fdCardDef;\n draggedCard.fdCardDef = replacedCard.fdCardDef;\n replacedCard.fdCardDef = draggedCardRank;\n}\n","<div\n #layout\n cdkDropListGroup\n fdDndKeyboardGroup\n class=\"fd-fixed-card-layout__card-layout fd-fixed-card-layout__card-layout--columns-{{ this._numberOfColumns }}\"\n [style.height]=\"_containerHeight + 'px'\"\n [groups]=\"_cardColumns\"\n orientation=\"horizontal\"\n [customMoveFn]=\"_customMoveFn\"\n [customTransferFn]=\"_customTransferFn\"\n [disableKeyboardDragDrop]=\"disableDragDrop\"\n [cdkDropListGroupDisabled]=\"disableDragDrop\"\n [attr.dir]=\"_dir\"\n>\n <div\n #dropList\n *ngFor=\"let card of _cardsArray; let cardIndex = index\"\n cdkDropList\n cdkDropListSortingDisabled\n class=\"fd-fixed-card-layout__card\"\n [class.fd-fixed-card-layout__card--single]=\"_singleItemColumns.has(card.fdCardDef)\"\n [style.min-width.px]=\"_columnsWidth.get(card.fdCardDef)\"\n [style.max-width.px]=\"_columnsWidth.get(card.fdCardDef)\"\n [cdkDropListData]=\"cardIndex\"\n [cdkDropListEnterPredicate]=\"_enterPredicate\"\n (cdkDropListEntered)=\"_onDropListEntered($event)\"\n (cdkDropListExited)=\"_onDropListExited()\"\n >\n <div\n cdkDrag\n fdDndKeyboardItem\n tabindex=\"0\"\n cdkDragPreviewClass=\"fd-fixed-card-layout__card-preview\"\n [cdkDragData]=\"card\"\n [cdkDragStartDelay]=\"dragStartDelay\"\n [itemIndex]=\"_itemIndexes.get(card.fdCardDef)!\"\n [groupIndex]=\"_groupIndexes.get(card.fdCardDef)!\"\n (cdkDragDropped)=\"_onDragDropped($event)\"\n (cdkDragStarted)=\"_setPlaceholderStyle(false)\"\n >\n <fd-fixed-card-layout-item>\n <ng-container *ngTemplateOutlet=\"card?.template || null\"> </ng-container>\n </fd-fixed-card-layout-item>\n\n <div *cdkDragPlaceholder class=\"fd-fixed-card-layout__card-placeholder\" [style]=\"_placeholderMargin\">\n <ng-container *ngTemplateOutlet=\"card?.template || null\"></ng-container>\n </div>\n </div>\n </div>\n\n <ng-container *ngFor=\"let column of _cardColumns; let last = last; let index = index\">\n <div *ngIf=\"!last\" class=\"fd-fixed-card-layout__clearfix\" [style.order]=\"index + 1\"></div>\n </ng-container>\n</div>\n","import { DragDropModule } from '@angular/cdk/drag-drop';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FixedCardLayoutItemComponent } from './fixed-card-layout-item/fixed-card-layout-item.component';\nimport { DragAndDropModule } from '@fundamental-ngx/core/utils';\nimport { CardDefinitionDirective, FixedCardLayoutComponent } from './fixed-card-layout.component';\n\n@NgModule({\n declarations: [FixedCardLayoutComponent, CardDefinitionDirective, FixedCardLayoutItemComponent],\n imports: [CommonModule, DragDropModule, DragAndDropModule],\n exports: [FixedCardLayoutComponent, CardDefinitionDirective, FixedCardLayoutItemComponent]\n})\nexport class FixedCardLayoutModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAWa,4BAA4B;IACrC,YAAoB,WAAuB;QAAvB,gBAAW,GAAX,WAAW,CAAY;KAAI;;IAG/C,KAAK;QACD,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC;QAChF,IAAI,MAAM,EAAE;YACR,MAAM,CAAC,KAAK,EAAE,CAAC;SAClB;KACJ;;yHATQ,4BAA4B;6GAA5B,4BAA4B,6GAN3B,2BAA2B;2FAM5B,4BAA4B;kBARxC,SAAS;mBAAC;oBACP,QAAQ,EAAE,2BAA2B;oBACrC,QAAQ,EAAE,2BAA2B;oBACrC,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,IAAI,EAAE;wBACF,KAAK,EAAE,gBAAgB;qBAC1B;iBACJ;;;ACuBD,MAAM,SAAS,GAAG,EAAE,CAAC;AACrB,MAAM,kBAAkB,GAAG,G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AY,EAAE,CAAC,wBAAwB,EAAE,uBAAuB,EAAE,4BAA4B,CAAC;oBAC/F,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,iBAAiB,CAAC;oBAC1D,OAAO,EAAE,CAAC,wBAAwB,EAAE,uBAAuB,EAAE,4BAA4B,CAAC;iBAC7F;;;ACXD;;;;;;"}
|
|
@@ -8,7 +8,7 @@ import * as i1 from '@fundamental-ngx/core/utils';
|
|
|
8
8
|
import { resizeObservable, DragAndDropModule } from '@fundamental-ngx/core/utils';
|
|
9
9
|
import { FocusKeyManager } from '@angular/cdk/a11y';
|
|
10
10
|
import { Subject } from 'rxjs';
|
|
11
|
-
import { takeUntil, debounceTime } from 'rxjs/operators';
|
|
11
|
+
import { takeUntil, debounceTime, delay } from 'rxjs/operators';
|
|
12
12
|
import { coerceNumberProperty } from '@angular/cdk/coercion';
|
|
13
13
|
|
|
14
14
|
class FixedCardLayoutItemComponent {
|
|
@@ -165,14 +165,6 @@ class FixedCardLayoutComponent {
|
|
|
165
165
|
this._accessibilitySetup();
|
|
166
166
|
}
|
|
167
167
|
/** @hidden */
|
|
168
|
-
ngAfterViewChecked() {
|
|
169
|
-
/**
|
|
170
|
-
* Update column layout when orientation of screen changes.
|
|
171
|
-
* actual width is returned when view is stable. In AfterViewInit, correct value does not come.
|
|
172
|
-
*/
|
|
173
|
-
this.updateLayout();
|
|
174
|
-
}
|
|
175
|
-
/** @hidden */
|
|
176
168
|
ngOnChanges(changes) {
|
|
177
169
|
if (!this._cards?.length) {
|
|
178
170
|
return;
|
|
@@ -198,7 +190,7 @@ class FixedCardLayoutComponent {
|
|
|
198
190
|
}
|
|
199
191
|
/** Distribute cards on window resize */
|
|
200
192
|
updateLayout() {
|
|
201
|
-
if (!this._cards.length) {
|
|
193
|
+
if (!this._cards.length || !this._availableWidth) {
|
|
202
194
|
return;
|
|
203
195
|
}
|
|
204
196
|
const possibleNumberOfColumns = getNumberOfColumns(this._availableWidth, this.cardMinimumWidth);
|
|
@@ -214,19 +206,6 @@ class FixedCardLayoutComponent {
|
|
|
214
206
|
}
|
|
215
207
|
this._setColumnsWidth();
|
|
216
208
|
}
|
|
217
|
-
/** @hidden Calculate container height basing on the card wrapper columns */
|
|
218
|
-
_calculateContainerHeight(additionalSpace = 0) {
|
|
219
|
-
this._changeDetector.detectChanges();
|
|
220
|
-
const wrapperColumns = this._cardColumns.map((column) => column
|
|
221
|
-
.map((card) => this._cardWrappers.find((wrapper) => wrapper.getSortedItems()[0].data === card)?.element)
|
|
222
|
-
.filter((v) => !!v));
|
|
223
|
-
const columnsHeights = wrapperColumns
|
|
224
|
-
.map((column) => column.map((card) => card.nativeElement.getBoundingClientRect().height))
|
|
225
|
-
.map((column) => column.reduce((height, cardHeight) => (height += cardHeight), 0));
|
|
226
|
-
// +4px because it's the top & bottom borders of card placeholder
|
|
227
|
-
this._containerHeight = Math.max(...columnsHeights) + 4 + additionalSpace;
|
|
228
|
-
this._changeDetector.detectChanges();
|
|
229
|
-
}
|
|
230
209
|
/** @hidden */
|
|
231
210
|
_onDropListExited() {
|
|
232
211
|
this._shouldCalculateContainerHeight = true;
|
|
@@ -297,7 +276,7 @@ class FixedCardLayoutComponent {
|
|
|
297
276
|
}
|
|
298
277
|
/** @hidden Listen card change and distribute cards on column change */
|
|
299
278
|
_listenOnCardsChange() {
|
|
300
|
-
this._cards.changes.subscribe(() => {
|
|
279
|
+
this._cards.changes.pipe(delay(0)).subscribe(() => {
|
|
301
280
|
this._processCards();
|
|
302
281
|
this._updateColumns();
|
|
303
282
|
});
|
|
@@ -313,7 +292,6 @@ class FixedCardLayoutComponent {
|
|
|
313
292
|
this._cardsArray = this._cards
|
|
314
293
|
.toArray()
|
|
315
294
|
.sort((firstCard, secondCard) => firstCard.fdCardDef - secondCard.fdCardDef);
|
|
316
|
-
this._changeDetector.detectChanges();
|
|
317
295
|
this.updateLayout();
|
|
318
296
|
}
|
|
319
297
|
/** @hidden Distribute cards among columns to arrange them in "Z" flow */
|
|
@@ -356,6 +334,19 @@ class FixedCardLayoutComponent {
|
|
|
356
334
|
this._changeDetector.detectChanges();
|
|
357
335
|
}
|
|
358
336
|
}
|
|
337
|
+
/** @hidden Calculate container height basing on the card wrapper columns */
|
|
338
|
+
_calculateContainerHeight(additionalSpace = 0) {
|
|
339
|
+
this._changeDetector.detectChanges();
|
|
340
|
+
const wrapperColumns = this._cardColumns.map((column) => column
|
|
341
|
+
.map((card) => this._cardWrappers.find((wrapper) => wrapper.getSortedItems()[0].data === card)?.element)
|
|
342
|
+
.filter((v) => !!v));
|
|
343
|
+
const columnsHeights = wrapperColumns
|
|
344
|
+
.map((column) => column.map((card) => card.nativeElement.getBoundingClientRect().height))
|
|
345
|
+
.map((column) => column.reduce((height, cardHeight) => (height += cardHeight), 0));
|
|
346
|
+
// +4px because it's the top & bottom borders of card placeholder
|
|
347
|
+
this._containerHeight = Math.max(...columnsHeights) + 4 + additionalSpace;
|
|
348
|
+
this._changeDetector.detectChanges();
|
|
349
|
+
}
|
|
359
350
|
}
|
|
360
351
|
FixedCardLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.4", ngImport: i0, type: FixedCardLayoutComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.RtlService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
361
352
|
FixedCardLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.4", type: FixedCardLayoutComponent, selector: "fd-fixed-card-layout", inputs: { disableDragDrop: "disableDragDrop", dragStartDelay: "dragStartDelay", cardMinimumWidth: "cardMinimumWidth", columnsWidthConfig: "columnsWidthConfig", maxColumns: "maxColumns" }, outputs: { layoutChange: "layoutChange", cardDraggedDropped: "cardDraggedDropped" }, host: { listeners: { "keydown": "handleKeydown($event)" }, classAttribute: "fd-fixed-card-layout" }, queries: [{ propertyName: "_cards", predicate: CardDefinitionDirective }], viewQueries: [{ propertyName: "_layout", first: true, predicate: ["layout"], descendants: true }, { propertyName: "_cardContainers", predicate: FixedCardLayoutItemComponent, descendants: true }, { propertyName: "_cardWrappers", predicate: ["dropList"], descendants: true, read: CdkDropList }], usesOnChanges: true, ngImport: i0, template: "<div\n #layout\n cdkDropListGroup\n fdDndKeyboardGroup\n class=\"fd-fixed-card-layout__card-layout fd-fixed-card-layout__card-layout--columns-{{ this._numberOfColumns }}\"\n [style.height]=\"_containerHeight + 'px'\"\n [groups]=\"_cardColumns\"\n orientation=\"horizontal\"\n [customMoveFn]=\"_customMoveFn\"\n [customTransferFn]=\"_customTransferFn\"\n [disableKeyboardDragDrop]=\"disableDragDrop\"\n [cdkDropListGroupDisabled]=\"disableDragDrop\"\n [attr.dir]=\"_dir\"\n>\n <div\n #dropList\n *ngFor=\"let card of _cardsArray; let cardIndex = index\"\n cdkDropList\n cdkDropListSortingDisabled\n class=\"fd-fixed-card-layout__card\"\n [class.fd-fixed-card-layout__card--single]=\"_singleItemColumns.has(card.fdCardDef)\"\n [style.min-width.px]=\"_columnsWidth.get(card.fdCardDef)\"\n [style.max-width.px]=\"_columnsWidth.get(card.fdCardDef)\"\n [cdkDropListData]=\"cardIndex\"\n [cdkDropListEnterPredicate]=\"_enterPredicate\"\n (cdkDropListEntered)=\"_onDropListEntered($event)\"\n (cdkDropListExited)=\"_onDropListExited()\"\n >\n <div\n cdkDrag\n fdDndKeyboardItem\n tabindex=\"0\"\n cdkDragPreviewClass=\"fd-fixed-card-layout__card-preview\"\n [cdkDragData]=\"card\"\n [cdkDragStartDelay]=\"dragStartDelay\"\n [itemIndex]=\"_itemIndexes.get(card.fdCardDef)!\"\n [groupIndex]=\"_groupIndexes.get(card.fdCardDef)!\"\n (cdkDragDropped)=\"_onDragDropped($event)\"\n (cdkDragStarted)=\"_setPlaceholderStyle(false)\"\n >\n <fd-fixed-card-layout-item>\n <ng-container *ngTemplateOutlet=\"card?.template || null\"> </ng-container>\n </fd-fixed-card-layout-item>\n\n <div *cdkDragPlaceholder class=\"fd-fixed-card-layout__card-placeholder\" [style]=\"_placeholderMargin\">\n <ng-container *ngTemplateOutlet=\"card?.template || null\"></ng-container>\n </div>\n </div>\n </div>\n\n <ng-container *ngFor=\"let column of _cardColumns; let last = last; let index = index\">\n <div *ngIf=\"!last\" class=\"fd-fixed-card-layout__clearfix\" [style.order]=\"index + 1\"></div>\n </ng-container>\n</div>\n", styles: ["/*!\n * Fundamental Library Styles v0.24.1-rc.1\n * Copyright (c) 2022 SAP SE or an SAP affiliate company.\n * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n */.fd-fixed-card-layout{font-size:var(--sapFontSize);line-height:var(--sapContent_LineHeight);color:var(--sapTextColor);font-family:var(--sapFontFamily);font-weight:400;box-sizing:border-box;padding:0;margin:0;border:0}.fd-fixed-card-layout:before,.fd-fixed-card-layout:after{box-sizing:inherit;font-size:inherit}.fd-fixed-card-layout__card-layout{font-size:var(--sapFontSize);line-height:var(--sapContent_LineHeight);color:var(--sapTextColor);font-family:var(--sapFontFamily);font-weight:400;box-sizing:border-box;padding:0;margin:0;border:0;margin-left:-1rem;display:flex;justify-content:flex-start;align-items:center;flex-wrap:wrap;flex-direction:column;margin-top:-1rem}.fd-fixed-card-layout__card-layout:before,.fd-fixed-card-layout__card-layout:after{box-sizing:inherit;font-size:inherit}[dir=rtl] .fd-fixed-card-layout__card-layout,.fd-fixed-card-layout__card-layout[dir=rtl]{margin-right:-1rem;margin-left:0}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-2 .fd-fixed-card-layout__card{width:50%}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-2 .fd-fixed-card-layout__card:nth-of-type(2n){order:2}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-2 .fd-fixed-card-layout__card:nth-of-type(2n + 1){order:1}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-3 .fd-fixed-card-layout__card{width:33.3333333333%}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-3 .fd-fixed-card-layout__card:nth-of-type(3n){order:3}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-3 .fd-fixed-card-layout__card:nth-of-type(3n + 1){order:1}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-3 .fd-fixed-card-layout__card:nth-of-type(3n + 2){order:2}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-4 .fd-fixed-card-layout__card{width:25%}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-4 .fd-fixed-card-layout__card:nth-of-type(4n){order:4}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-4 .fd-fixed-card-layout__card:nth-of-type(4n + 1){order:1}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-4 .fd-fixed-card-layout__card:nth-of-type(4n + 2){order:2}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-4 .fd-fixed-card-layout__card:nth-of-type(4n + 3){order:3}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-5 .fd-fixed-card-layout__card{width:20%}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-5 .fd-fixed-card-layout__card:nth-of-type(5n){order:5}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-5 .fd-fixed-card-layout__card:nth-of-type(5n + 1){order:1}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-5 .fd-fixed-card-layout__card:nth-of-type(5n + 2){order:2}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-5 .fd-fixed-card-layout__card:nth-of-type(5n + 3){order:3}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-5 .fd-fixed-card-layout__card:nth-of-type(5n + 4){order:4}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-6 .fd-fixed-card-layout__card{width:16.6666666667%}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-6 .fd-fixed-card-layout__card:nth-of-type(6n){order:6}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-6 .fd-fixed-card-layout__card:nth-of-type(6n + 1){order:1}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-6 .fd-fixed-card-layout__card:nth-of-type(6n + 2){order:2}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-6 .fd-fixed-card-layout__card:nth-of-type(6n + 3){order:3}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-6 .fd-fixed-card-layout__card:nth-of-type(6n + 4){order:4}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-6 .fd-fixed-card-layout__card:nth-of-type(6n + 5){order:5}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-7 .fd-fixed-card-layout__card{width:14.2857142857%}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-7 .fd-fixed-card-layout__card:nth-of-type(7n){order:7}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-7 .fd-fixed-card-layout__card:nth-of-type(7n + 1){order:1}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-7 .fd-fixed-card-layout__card:nth-of-type(7n + 2){order:2}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-7 .fd-fixed-card-layout__card:nth-of-type(7n + 3){order:3}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-7 .fd-fixed-card-layout__card:nth-of-type(7n + 4){order:4}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-7 .fd-fixed-card-layout__card:nth-of-type(7n + 5){order:5}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-7 .fd-fixed-card-layout__card:nth-of-type(7n + 6){order:6}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-8 .fd-fixed-card-layout__card{width:12.5%}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-8 .fd-fixed-card-layout__card:nth-of-type(8n){order:8}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-8 .fd-fixed-card-layout__card:nth-of-type(8n + 1){order:1}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-8 .fd-fixed-card-layout__card:nth-of-type(8n + 2){order:2}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-8 .fd-fixed-card-layout__card:nth-of-type(8n + 3){order:3}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-8 .fd-fixed-card-layout__card:nth-of-type(8n + 4){order:4}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-8 .fd-fixed-card-layout__card:nth-of-type(8n + 5){order:5}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-8 .fd-fixed-card-layout__card:nth-of-type(8n + 6){order:6}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-8 .fd-fixed-card-layout__card:nth-of-type(8n + 7){order:7}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-9 .fd-fixed-card-layout__card{width:11.1111111111%}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-9 .fd-fixed-card-layout__card:nth-of-type(9n){order:9}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-9 .fd-fixed-card-layout__card:nth-of-type(9n + 1){order:1}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-9 .fd-fixed-card-layout__card:nth-of-type(9n + 2){order:2}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-9 .fd-fixed-card-layout__card:nth-of-type(9n + 3){order:3}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-9 .fd-fixed-card-layout__card:nth-of-type(9n + 4){order:4}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-9 .fd-fixed-card-layout__card:nth-of-type(9n + 5){order:5}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-9 .fd-fixed-card-layout__card:nth-of-type(9n + 6){order:6}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-9 .fd-fixed-card-layout__card:nth-of-type(9n + 7){order:7}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-9 .fd-fixed-card-layout__card:nth-of-type(9n + 8){order:8}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-10 .fd-fixed-card-layout__card{width:10%}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-10 .fd-fixed-card-layout__card:nth-of-type(10n){order:10}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-10 .fd-fixed-card-layout__card:nth-of-type(10n + 1){order:1}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-10 .fd-fixed-card-layout__card:nth-of-type(10n + 2){order:2}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-10 .fd-fixed-card-layout__card:nth-of-type(10n + 3){order:3}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-10 .fd-fixed-card-layout__card:nth-of-type(10n + 4){order:4}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-10 .fd-fixed-card-layout__card:nth-of-type(10n + 5){order:5}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-10 .fd-fixed-card-layout__card:nth-of-type(10n + 6){order:6}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-10 .fd-fixed-card-layout__card:nth-of-type(10n + 7){order:7}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-10 .fd-fixed-card-layout__card:nth-of-type(10n + 8){order:8}.fd-fixed-card-layout__card-layout.fd-fixed-card-layout__card-layout--columns-10 .fd-fixed-card-layout__card:nth-of-type(10n + 9){order:9}.fd-fixed-card-layout__card,.fd-fixed-card-layout__card-placeholder{font-size:var(--sapFontSize);line-height:var(--sapContent_LineHeight);color:var(--sapTextColor);font-family:var(--sapFontFamily);font-weight:400;box-sizing:border-box;padding:0;margin:0;border:0;min-width:20rem;min-height:.0625rem}.fd-fixed-card-layout__card:before,.fd-fixed-card-layout__card:after,.fd-fixed-card-layout__card-placeholder:before,.fd-fixed-card-layout__card-placeholder:after{box-sizing:inherit;font-size:inherit}.fd-fixed-card-layout__card{padding-left:1rem;order:1;padding-top:1rem}[dir=rtl] .fd-fixed-card-layout__card,.fd-fixed-card-layout__card[dir=rtl]{padding-right:1rem;padding-left:0}.fd-fixed-card-layout__card--single{flex-basis:100%}.fd-fixed-card-layout__card:empty{padding-top:0}.fd-fixed-card-layout__card-placeholder{opacity:.3;border:.125rem dashed var(--sapContent_DragAndDropActiveColor);cursor:grabbing}.fd-fixed-card-layout__card-preview{font-size:var(--sapFontSize);line-height:var(--sapContent_LineHeight);color:var(--sapTextColor);font-family:var(--sapFontFamily);font-weight:400;padding:0;margin:0;border:0;box-sizing:border-box;border-radius:var(--sapElement_BorderCornerRadius);box-shadow:var(--sapContent_Shadow2)}.fd-fixed-card-layout__card-preview:before,.fd-fixed-card-layout__card-preview:after{box-sizing:inherit;font-size:inherit}.fd-fixed-card-layout__clearfix{font-size:var(--sapFontSize);line-height:var(--sapContent_LineHeight);color:var(--sapTextColor);font-family:var(--sapFontFamily);font-weight:400;box-sizing:border-box;padding:0;margin:0;border:0;width:0;flex-basis:100%}.fd-fixed-card-layout__clearfix:before,.fd-fixed-card-layout__clearfix:after{box-sizing:inherit;font-size:inherit}.fd-fixed-card-layout__card{width:100%}.fd-fixed-card-layout__card-placeholder{width:100%;min-width:100%;max-width:100%}\n"], components: [{ type: FixedCardLayoutItemComponent, selector: "fd-fixed-card-layout-item" }], directives: [{ type: i3.CdkDropListGroup, selector: "[cdkDropListGroup]", inputs: ["cdkDropListGroupDisabled"], exportAs: ["cdkDropListGroup"] }, { type: i1.DndKeyboardGroupDirective, selector: "[fdDndKeyboardGroup]", inputs: ["groups", "disableKeyboardDragDrop", "orientation", "customMoveFn", "customTransferFn"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { type: i3.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { type: i1.DndKeyboardItemDirective, selector: "[fdDndKeyboardItem]", inputs: ["itemIndex", "groupIndex"] }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3.CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fundamental-ngx-core-fixed-card-layout.mjs","sources":["../../../../../libs/core/src/lib/fixed-card-layout/fixed-card-layout-item/fixed-card-layout-item.component.ts","../../../../../libs/core/src/lib/fixed-card-layout/fixed-card-layout.component.ts","../../../../../libs/core/src/lib/fixed-card-layout/fixed-card-layout.component.html","../../../../../libs/core/src/lib/fixed-card-layout/fixed-card-layout.module.ts","../../../../../libs/core/src/lib/fixed-card-layout/fundamental-ngx-core-fixed-card-layout.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ElementRef } from '@angular/core';\nimport { FocusableOption } from '@angular/cdk/a11y';\n\n@Component({\n selector: 'fd-fixed-card-layout-item',\n template: `<ng-content></ng-content>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n style: 'display: block'\n }\n})\nexport class FixedCardLayoutItemComponent implements FocusableOption {\n constructor(private _elementRef: ElementRef) {}\n\n /** Set focus on the element. */\n focus(): void {\n const header = this._elementRef.nativeElement.querySelector('.fd-card__header');\n if (header) {\n header.focus();\n }\n }\n}\n","import {\n AfterContentInit,\n AfterViewChecked,\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n Directive,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n QueryList,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n ViewChildren,\n ViewEncapsulation\n} from '@angular/core';\nimport { FocusKeyManager } from '@angular/cdk/a11y';\nimport { CdkDrag, CdkDragDrop, CdkDragEnter, CdkDropList } from '@angular/cdk/drag-drop';\nimport { Subject } from 'rxjs';\nimport { debounceTime, takeUntil } from 'rxjs/operators';\n\nimport { resizeObservable, RtlService } from '@fundamental-ngx/core/utils';\nimport { FixedCardLayoutItemComponent } from './fixed-card-layout-item/fixed-card-layout-item.component';\nimport { coerceNumberProperty, NumberInput } from '@angular/cdk/coercion';\n\nconst PX_IN_REM = 16;\nconst CARD_MINIMUM_WIDTH = 320; // 320px = 20rem\nconst CARD_GAP_WIDTH = 16; // 16px = 1rem\nconst DRAG_START_DELAY = 200; // in ms\nconst MAX_COLUMNS = 10;\n\nlet cardRank = 1;\n\n@Directive({ selector: '[fdCardDef]' })\nexport class CardDefinitionDirective {\n /**\n * Behaves like rank of card.\n * Useful in creating layout again after drag and drop.\n */\n @Input()\n set fdCardDef(value: NumberInput) {\n if (!value) {\n return;\n }\n\n this._fdCardDef = coerceNumberProperty(value);\n }\n get fdCardDef(): number {\n return this._fdCardDef;\n }\n\n /** @hidden */\n private _fdCardDef: number = cardRank++;\n\n /** @hidden */\n constructor(public template: TemplateRef<any>) {}\n}\n\nexport interface Layout {\n numberOfColumns?: number;\n screenSize: number;\n}\n\nexport interface CardDropped {\n previousIndex: number;\n currentIndex: number;\n layoutColumns: number;\n items: CardDefinitionDirective[];\n}\n\ntype Columns = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;\n\nexport type ColumnsWidthConfig = { [C in Columns]?: number };\n\ntype CardColumn = CardDefinitionDirective[];\n\n@Component({\n selector: 'fd-fixed-card-layout',\n templateUrl: './fixed-card-layout.component.html',\n styleUrls: ['./fixed-card-layout.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'fd-fixed-card-layout'\n }\n})\nexport class FixedCardLayoutComponent\n implements OnInit, AfterContentInit, AfterViewInit, AfterViewChecked, OnChanges, OnDestroy\n{\n /** Drag drop behavior can be disabled */\n @Input()\n disableDragDrop: boolean;\n\n /** Drag start delay in milliseconds, default to 200ms for safe scrolling on mobile with touchscreen */\n @Input()\n dragStartDelay = DRAG_START_DELAY;\n\n /** Card's minimum width in pixels. */\n @Input()\n set cardMinimumWidth(value: NumberInput) {\n const coercedValue = coerceNumberProperty(value);\n\n if (coercedValue < CARD_MINIMUM_WIDTH) {\n return;\n }\n\n this._cardMinimumWidth = coercedValue;\n\n // If component is ready, do the recalculation.\n if (this._layout) {\n this.updateLayout();\n }\n }\n get cardMinimumWidth(): number {\n return this._cardMinimumWidth;\n }\n\n /** Config with the width ratios that should take every column. Flex-grow principe. Missed values set to 0. s*/\n @Input()\n columnsWidthConfig: ColumnsWidthConfig;\n\n /** Limit the number of columns. Default is 10. */\n @Input()\n maxColumns = MAX_COLUMNS;\n\n /** Event to emit, when layout changes */\n @Output()\n layoutChange: EventEmitter<Layout> = new EventEmitter<Layout>();\n\n /** Event to emit on Card dragged and dropped */\n @Output()\n cardDraggedDropped: EventEmitter<CardDropped> = new EventEmitter<CardDropped>();\n\n /** @hidden */\n @ContentChildren(CardDefinitionDirective)\n _cards: QueryList<CardDefinitionDirective>;\n\n /** @hidden */\n @ViewChildren(FixedCardLayoutItemComponent)\n _cardContainers: QueryList<FixedCardLayoutItemComponent>;\n\n /** @hidden */\n @ViewChildren('dropList', { read: CdkDropList })\n _cardWrappers: QueryList<CdkDropList>;\n\n /** @hidden */\n @ViewChild('layout')\n _layout: ElementRef;\n\n /** @hidden */\n _cardsArray: Array<CardDefinitionDirective>;\n\n /** @hidden Number of Columns in layout */\n _numberOfColumns: number;\n\n /** @hidden */\n _cardColumns: CardColumn[];\n\n /** @hidden*/\n _containerHeight: number;\n\n /** @hidden handles rtl service */\n _dir = 'ltr';\n\n /** @hidden first number is the CardDefinition rank, i.e. id */\n _groupIndexes = new Map<number, number>();\n\n /** @hidden first number is the CardDefinition rank, i.e. id */\n _itemIndexes = new Map<number, number>();\n\n /** @hidden first number is the CardDefinition rank, i.e. id */\n _singleItemColumns = new Set<number>();\n\n /** @hidden */\n _columnsWidth = new Map<number, number>();\n\n /** @hidden Return available width for fixed card layout */\n get _availableWidth(): number {\n return this._layout.nativeElement.getBoundingClientRect().width;\n }\n\n /** @hidden */\n _placeholderMargin: { [klass: string]: string };\n\n /** @hidden */\n private _previousNumberOfColumns: number;\n\n /** @hidden FocusKeyManager instance */\n private _keyboardEventsManager: FocusKeyManager<FixedCardLayoutItemComponent>;\n\n /** @hidden */\n private _cardMinimumWidth = CARD_MINIMUM_WIDTH;\n\n /** @hidden */\n private _shouldCalculateContainerHeight = false;\n\n /** @hidden An RxJS Subject that will kill the data stream upon component’s destruction (for unsubscribing) */\n private readonly _onDestroy$: Subject<void> = new Subject<void>();\n\n /** @hidden */\n constructor(\n private readonly _changeDetector: ChangeDetectorRef,\n @Optional() private readonly _rtlService: RtlService\n ) {}\n\n /** @hidden */\n ngOnInit(): void {\n this._subscribeToRtl();\n }\n\n /** @hidden */\n ngAfterContentInit(): void {\n this._listenOnCardsChange();\n }\n\n /** @hidden */\n ngAfterViewInit(): void {\n this._processCards();\n this._listenOnResize();\n this._accessibilitySetup();\n }\n\n /** @hidden */\n ngAfterViewChecked(): void {\n /**\n * Update column layout when orientation of screen changes.\n * actual width is returned when view is stable. In AfterViewInit, correct value does not come.\n */\n this.updateLayout();\n }\n\n /** @hidden */\n ngOnChanges(changes: SimpleChanges): void {\n if (!this._cards?.length) {\n return;\n }\n\n if ('maxColumns' in changes) {\n this.updateLayout();\n } else if ('columnsWidthConfig' in changes) {\n this._setColumnsWidth();\n }\n }\n\n /** @hidden */\n ngOnDestroy(): void {\n this._onDestroy$.next();\n this._onDestroy$.complete();\n }\n\n /** @hidden */\n @HostListener('keydown', ['$event'])\n handleKeydown(event: KeyboardEvent): void {\n event.stopImmediatePropagation();\n\n if (this._keyboardEventsManager) {\n this._keyboardEventsManager.onKeydown(event);\n }\n }\n\n /** Distribute cards on window resize */\n updateLayout(): void {\n if (!this._cards.length) {\n return;\n }\n\n const possibleNumberOfColumns = getNumberOfColumns(this._availableWidth, this.cardMinimumWidth);\n\n this._numberOfColumns = Math.min(\n possibleNumberOfColumns,\n this._cards.length,\n this.maxColumns || MAX_COLUMNS,\n MAX_COLUMNS\n );\n\n this.layoutChange.emit({\n numberOfColumns: this._numberOfColumns,\n screenSize: this._availableWidth\n });\n\n if (this._previousNumberOfColumns !== this._numberOfColumns) {\n this._previousNumberOfColumns = this._numberOfColumns;\n this._updateColumns();\n return;\n }\n\n this._setColumnsWidth();\n }\n\n /** @hidden Calculate container height basing on the card wrapper columns */\n _calculateContainerHeight(additionalSpace: number = 0): void {\n this._changeDetector.detectChanges();\n\n const wrapperColumns = this._cardColumns.map((column) =>\n column\n .map((card) => this._cardWrappers.find((wrapper) => wrapper.getSortedItems()[0].data === card)?.element)\n .filter((v): v is ElementRef<HTMLElement> => !!v)\n );\n\n const columnsHeights = wrapperColumns\n .map((column) => column.map((card) => card.nativeElement.getBoundingClientRect().height))\n .map((column) => column.reduce((height, cardHeight) => (height += cardHeight), 0));\n\n // +4px because it's the top & bottom borders of card placeholder\n this._containerHeight = Math.max(...columnsHeights) + 4 + additionalSpace;\n\n this._changeDetector.detectChanges();\n }\n\n /** @hidden */\n _enterPredicate = (_: CdkDrag, drop: CdkDropList): boolean => {\n // We should update container's height & its children rects (to react when drag moves into the list) before we entered any drop list.\n // That's why it's done here instead of cdkDropListEntered. As this predicate being called many times here is the optimization.\n if (this._shouldCalculateContainerHeight) {\n this._shouldCalculateContainerHeight = false;\n\n // Placeholder doesn't have margin set yet but we need to count it\n // Margin will be set only if there are already items in container\n const additionalSpace = drop.getSortedItems().length ? PX_IN_REM : 0;\n\n this._calculateContainerHeight(additionalSpace);\n }\n\n return true;\n };\n\n /** @hidden */\n _onDropListExited(): void {\n this._shouldCalculateContainerHeight = true;\n }\n\n /** @hidden */\n _onDropListEntered(event: CdkDragEnter): void {\n const containerItemCardDef = (event.container.getSortedItems()[0].data as CardDefinitionDirective).fdCardDef;\n const dragItemCardDef = (event.item.data as CardDefinitionDirective).fdCardDef;\n\n this._setPlaceholderStyle(containerItemCardDef !== dragItemCardDef);\n }\n\n /** @hidden */\n _onDragDropped(event: CdkDragDrop<number, number>): void {\n if (event.container.data === event.previousContainer.data) {\n return;\n }\n\n const movedCard = event.previousContainer.getSortedItems()[0].data;\n const replacedCard = event.container.getSortedItems()[0].data;\n\n const movedCardColumn = this._cardColumns.find((column) =>\n column.find((card) => card.fdCardDef === movedCard.fdCardDef)\n );\n const replacedCardColumn = this._cardColumns.find((column) =>\n column.find((card) => card.fdCardDef === replacedCard.fdCardDef)\n );\n\n // If we dragged the card from the same column as the column we're dropping into\n // There may be a situation where the order shouldn't change but since there are a different drop lists it will change\n // We should prevent this\n if (movedCardColumn === replacedCardColumn && movedCardColumn?.length === 2) {\n if (movedCard.fdCardDef < replacedCard.fdCardDef && event.previousContainer.data < event.container.data) {\n return;\n }\n\n if (movedCard.fdCardDef > replacedCard.fdCardDef && event.previousContainer.data > event.container.data) {\n return;\n }\n }\n\n this._processDragDrop(event.previousContainer.data, event.container.data, movedCard, replacedCard);\n }\n\n /** @hidden For the keyboard drag&drop directive */\n _customMoveFn = (group: CardColumn, indexFrom: number, indexTo: number): void => {\n const movedCard = group[indexFrom];\n const replacedCard = group[indexTo];\n\n const indexFromArray = this._cardsArray.findIndex((card) => card.fdCardDef === movedCard.fdCardDef);\n const indexToArray = this._cardsArray.findIndex((card) => card.fdCardDef === replacedCard.fdCardDef);\n\n this._processDragDrop(indexFromArray, indexToArray, movedCard, replacedCard);\n };\n\n /** @hidden For the keyboard drag&drop directive */\n _customTransferFn = (prevGroup: CardColumn, nextGroup: CardColumn, indexFrom: number, indexTo: number): void => {\n const movedCard = prevGroup[indexFrom];\n const replacedCard = nextGroup[indexTo];\n\n const indexFromArray = this._cardsArray.findIndex((card) => card.fdCardDef === movedCard.fdCardDef);\n const indexToArray = this._cardsArray.findIndex((card) => card.fdCardDef === replacedCard.fdCardDef);\n\n this._processDragDrop(indexFromArray, indexToArray, movedCard, replacedCard);\n };\n\n /** @hidden */\n _setPlaceholderStyle(value: boolean): void {\n this._placeholderMargin = value ? { 'margin-bottom': '1rem' } : {};\n }\n\n /** @hidden Arranges cards on drop of dragged card */\n private _processDragDrop(\n prevIndex: number,\n newIndex: number,\n prevCard: CardDefinitionDirective,\n newCard: CardDefinitionDirective\n ): void {\n // moveItemInArray from CDK won't work as it changes order of other cards\n const replacedCard = this._cardsArray[newIndex];\n this._cardsArray[newIndex] = this._cardsArray[prevIndex];\n this._cardsArray[prevIndex] = replacedCard;\n\n adjustCardRank(prevCard, newCard);\n\n this.cardDraggedDropped.emit({\n previousIndex: prevIndex,\n currentIndex: newIndex,\n layoutColumns: this._numberOfColumns,\n items: this._cards.toArray()\n });\n\n this._updateColumns();\n }\n\n /** @hidden */\n private _accessibilitySetup(): void {\n this._keyboardEventsManager = new FocusKeyManager(this._cardContainers).withWrap();\n }\n\n /** @hidden Rtl change subscription */\n private _subscribeToRtl(): void {\n this._rtlService?.rtl.pipe(takeUntil(this._onDestroy$)).subscribe((isRtl) => {\n this._dir = isRtl ? 'rtl' : 'ltr';\n this._changeDetector.detectChanges();\n });\n }\n\n /** @hidden Listen window resize and distribute cards on column change */\n private _listenOnResize(): void {\n resizeObservable(this._layout.nativeElement)\n .pipe(debounceTime(60), takeUntil(this._onDestroy$))\n .subscribe(() => this.updateLayout());\n }\n\n /** @hidden Listen card change and distribute cards on column change */\n private _listenOnCardsChange(): void {\n this._cards.changes.subscribe(() => {\n this._processCards();\n this._updateColumns();\n });\n }\n\n /** @hidden Renders layout on column changes */\n private _updateColumns(): void {\n this._setCardColumns();\n this._setColumnsWidth(false);\n this._calculateContainerHeight();\n }\n\n /** @hidden */\n private _processCards(): void {\n this._cardsArray = this._cards\n .toArray()\n .sort((firstCard, secondCard) => firstCard.fdCardDef - secondCard.fdCardDef);\n\n this._changeDetector.detectChanges();\n\n this.updateLayout();\n }\n\n /** @hidden Distribute cards among columns to arrange them in \"Z\" flow */\n private _setCardColumns(): void {\n this._groupIndexes = new Map<number, number>();\n this._itemIndexes = new Map<number, number>();\n this._singleItemColumns = new Set<number>();\n\n const columns: CardColumn[] = new Array(this._numberOfColumns).fill(0).map(() => new Array(0));\n\n this._cardsArray.forEach((card, i) => {\n const currColumnIndex = i % this._numberOfColumns;\n const itemIndex = columns[currColumnIndex].length;\n\n columns[currColumnIndex].push(card);\n\n this._groupIndexes.set(card.fdCardDef, currColumnIndex);\n this._itemIndexes.set(card.fdCardDef, itemIndex);\n });\n\n this._cardColumns = columns;\n\n this._cardColumns.forEach((column) => {\n if (column.length > 0 && column.length < 2) {\n this._singleItemColumns.add(column[0].fdCardDef);\n }\n });\n }\n\n /** @hidden */\n private _setColumnsWidth(detectChanges = true): void {\n this._columnsWidth = new Map();\n\n const configPresent =\n this.columnsWidthConfig &&\n typeof this.columnsWidthConfig === 'object' &&\n Object.keys(this.columnsWidthConfig).length;\n\n if (!configPresent || !this._layout || this._numberOfColumns === 1) {\n return;\n }\n\n const fixedWidthModifiers = fixWidthModifiers(this.columnsWidthConfig, this._numberOfColumns);\n const totalWidthModifiers = fixedWidthModifiers.reduce((sum, width) => (sum += width), 0);\n const freeSpace = this._availableWidth - this.cardMinimumWidth * this._numberOfColumns;\n\n this._cardColumns.forEach((column, index) => {\n const columnWidth = Math.round(\n this.cardMinimumWidth + (freeSpace / totalWidthModifiers) * fixedWidthModifiers[index]\n );\n\n column.forEach((card) => this._columnsWidth.set(card.fdCardDef, columnWidth));\n });\n\n if (detectChanges) {\n this._changeDetector.detectChanges();\n }\n }\n}\n\n/** @hidden */\nfunction fixWidthModifiers(config: ColumnsWidthConfig, numberOfColumns: number): number[] {\n const modifiers = new Array(numberOfColumns).fill(0);\n\n return modifiers.map((_, index) => {\n const columnWidthModifier = config[index + 1];\n\n if (!columnWidthModifier || columnWidthModifier < 0) {\n return 0;\n }\n\n return columnWidthModifier;\n });\n}\n\n/** @hidden Returns number of columns that can fit in current available width for fd-card-layout */\nfunction getNumberOfColumns(containerWidth: number, cardWidth: number): number {\n containerWidth = containerWidth || 1;\n cardWidth = cardWidth || 1;\n\n const numberOfCardsWithNoGap = Math.max(Math.floor(containerWidth / cardWidth), 1); // Example: 960 / 320 = 3\n const requiredWidthWithGap = numberOfCardsWithNoGap * cardWidth + (numberOfCardsWithNoGap - 1) * CARD_GAP_WIDTH;\n const columnCount = requiredWidthWithGap > containerWidth ? numberOfCardsWithNoGap - 1 : numberOfCardsWithNoGap;\n\n return Math.max(columnCount, 1);\n}\n\n/** @hidden Method to update rank after cards are dragged */\nfunction adjustCardRank(draggedCard: CardDefinitionDirective, replacedCard: CardDefinitionDirective): void {\n const draggedCardRank = draggedCard.fdCardDef;\n draggedCard.fdCardDef = replacedCard.fdCardDef;\n replacedCard.fdCardDef = draggedCardRank;\n}\n","<div\n #layout\n cdkDropListGroup\n fdDndKeyboardGroup\n class=\"fd-fixed-card-layout__card-layout fd-fixed-card-layout__card-layout--columns-{{ this._numberOfColumns }}\"\n [style.height]=\"_containerHeight + 'px'\"\n [groups]=\"_cardColumns\"\n orientation=\"horizontal\"\n [customMoveFn]=\"_customMoveFn\"\n [customTransferFn]=\"_customTransferFn\"\n [disableKeyboardDragDrop]=\"disableDragDrop\"\n [cdkDropListGroupDisabled]=\"disableDragDrop\"\n [attr.dir]=\"_dir\"\n>\n <div\n #dropList\n *ngFor=\"let card of _cardsArray; let cardIndex = index\"\n cdkDropList\n cdkDropListSortingDisabled\n class=\"fd-fixed-card-layout__card\"\n [class.fd-fixed-card-layout__card--single]=\"_singleItemColumns.has(card.fdCardDef)\"\n [style.min-width.px]=\"_columnsWidth.get(card.fdCardDef)\"\n [style.max-width.px]=\"_columnsWidth.get(card.fdCardDef)\"\n [cdkDropListData]=\"cardIndex\"\n [cdkDropListEnterPredicate]=\"_enterPredicate\"\n (cdkDropListEntered)=\"_onDropListEntered($event)\"\n (cdkDropListExited)=\"_onDropListExited()\"\n >\n <div\n cdkDrag\n fdDndKeyboardItem\n tabindex=\"0\"\n cdkDragPreviewClass=\"fd-fixed-card-layout__card-preview\"\n [cdkDragData]=\"card\"\n [cdkDragStartDelay]=\"dragStartDelay\"\n [itemIndex]=\"_itemIndexes.get(card.fdCardDef)!\"\n [groupIndex]=\"_groupIndexes.get(card.fdCardDef)!\"\n (cdkDragDropped)=\"_onDragDropped($event)\"\n (cdkDragStarted)=\"_setPlaceholderStyle(false)\"\n >\n <fd-fixed-card-layout-item>\n <ng-container *ngTemplateOutlet=\"card?.template || null\"> </ng-container>\n </fd-fixed-card-layout-item>\n\n <div *cdkDragPlaceholder class=\"fd-fixed-card-layout__card-placeholder\" [style]=\"_placeholderMargin\">\n <ng-container *ngTemplateOutlet=\"card?.template || null\"></ng-container>\n </div>\n </div>\n </div>\n\n <ng-container *ngFor=\"let column of _cardColumns; let last = last; let index = index\">\n <div *ngIf=\"!last\" class=\"fd-fixed-card-layout__clearfix\" [style.order]=\"index + 1\"></div>\n </ng-container>\n</div>\n","import { DragDropModule } from '@angular/cdk/drag-drop';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FixedCardLayoutItemComponent } from './fixed-card-layout-item/fixed-card-layout-item.component';\nimport { DragAndDropModule } from '@fundamental-ngx/core/utils';\nimport { CardDefinitionDirective, FixedCardLayoutComponent } from './fixed-card-layout.component';\n\n@NgModule({\n declarations: [FixedCardLayoutComponent, CardDefinitionDirective, FixedCardLayoutItemComponent],\n imports: [CommonModule, DragDropModule, DragAndDropModule],\n exports: [FixedCardLayoutComponent, CardDefinitionDirective, FixedCardLayoutItemComponent]\n})\nexport class FixedCardLayoutModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAWa,4BAA4B;IACrC,YAAoB,WAAuB;QAAvB,gBAAW,GAAX,WAAW,CAAY;KAAI;;IAG/C,KAAK;QACD,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC;QAChF,IAAI,MAAM,EAAE;YACR,MAAM,CAAC,KAAK,EAAE,CAAC;SAClB;KACJ;;yHATQ,4BAA4B;6GAA5B,4BAA4B,6GAN3B,2BAA2B;2FAM5B,4BAA4B;kBARxC,SAAS;mBAAC;oBACP,QAAQ,EAAE,2BAA2B;oBACrC,QAAQ,EAAE,2BAA2B;oBACrC,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,IAAI,EAAE;wBACF,KAAK,E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AAC;2FAGjD,qBAAqB;kBALjC,QAAQ;mBAAC;oBACN,YAAY,EAAE,CAAC,wBAAwB,EAAE,uBAAuB,EAAE,4BAA4B,CAAC;oBAC/F,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,iBAAiB,CAAC;oBAC1D,OAAO,EAAE,CAAC,wBAAwB,EAAE,uBAAuB,EAAE,4BAA4B,CAAC;iBAC7F;;;ACXD;;;;;;"}
|
|
1
|
+
{"version":3,"file":"fundamental-ngx-core-fixed-card-layout.mjs","sources":["../../../../../libs/core/src/lib/fixed-card-layout/fixed-card-layout-item/fixed-card-layout-item.component.ts","../../../../../libs/core/src/lib/fixed-card-layout/fixed-card-layout.component.ts","../../../../../libs/core/src/lib/fixed-card-layout/fixed-card-layout.component.html","../../../../../libs/core/src/lib/fixed-card-layout/fixed-card-layout.module.ts","../../../../../libs/core/src/lib/fixed-card-layout/fundamental-ngx-core-fixed-card-layout.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ElementRef } from '@angular/core';\nimport { FocusableOption } from '@angular/cdk/a11y';\n\n@Component({\n selector: 'fd-fixed-card-layout-item',\n template: `<ng-content></ng-content>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n style: 'display: block'\n }\n})\nexport class FixedCardLayoutItemComponent implements FocusableOption {\n constructor(private _elementRef: ElementRef) {}\n\n /** Set focus on the element. */\n focus(): void {\n const header = this._elementRef.nativeElement.querySelector('.fd-card__header');\n if (header) {\n header.focus();\n }\n }\n}\n","import {\n AfterContentInit,\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n Directive,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n QueryList,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n ViewChildren,\n ViewEncapsulation\n} from '@angular/core';\nimport { FocusKeyManager } from '@angular/cdk/a11y';\nimport { CdkDrag, CdkDragDrop, CdkDragEnter, CdkDropList } from '@angular/cdk/drag-drop';\nimport { Subject } from 'rxjs';\nimport { debounceTime, delay, takeUntil } from 'rxjs/operators';\n\nimport { resizeObservable, RtlService } from '@fundamental-ngx/core/utils';\nimport { FixedCardLayoutItemComponent } from './fixed-card-layout-item/fixed-card-layout-item.component';\nimport { coerceNumberProperty, NumberInput } from '@angular/cdk/coercion';\n\nconst PX_IN_REM = 16;\nconst CARD_MINIMUM_WIDTH = 320; // 320px = 20rem\nconst CARD_GAP_WIDTH = 16; // 16px = 1rem\nconst DRAG_START_DELAY = 200; // in ms\nconst MAX_COLUMNS = 10;\n\nlet cardRank = 1;\n\n@Directive({ selector: '[fdCardDef]' })\nexport class CardDefinitionDirective {\n /**\n * Behaves like rank of card.\n * Useful in creating layout again after drag and drop.\n */\n @Input()\n set fdCardDef(value: NumberInput) {\n if (!value) {\n return;\n }\n\n this._fdCardDef = coerceNumberProperty(value);\n }\n get fdCardDef(): number {\n return this._fdCardDef;\n }\n\n /** @hidden */\n private _fdCardDef: number = cardRank++;\n\n /** @hidden */\n constructor(public template: TemplateRef<any>) {}\n}\n\nexport interface Layout {\n numberOfColumns?: number;\n screenSize: number;\n}\n\nexport interface CardDropped {\n previousIndex: number;\n currentIndex: number;\n layoutColumns: number;\n items: CardDefinitionDirective[];\n}\n\ntype Columns = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;\n\nexport type ColumnsWidthConfig = { [C in Columns]?: number };\n\ntype CardColumn = CardDefinitionDirective[];\n\n@Component({\n selector: 'fd-fixed-card-layout',\n templateUrl: './fixed-card-layout.component.html',\n styleUrls: ['./fixed-card-layout.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'fd-fixed-card-layout'\n }\n})\nexport class FixedCardLayoutComponent implements OnInit, AfterContentInit, AfterViewInit, OnChanges, OnDestroy {\n /** Drag drop behavior can be disabled */\n @Input()\n disableDragDrop: boolean;\n\n /** Drag start delay in milliseconds, default to 200ms for safe scrolling on mobile with touchscreen */\n @Input()\n dragStartDelay = DRAG_START_DELAY;\n\n /** Card's minimum width in pixels. */\n @Input()\n set cardMinimumWidth(value: NumberInput) {\n const coercedValue = coerceNumberProperty(value);\n\n if (coercedValue < CARD_MINIMUM_WIDTH) {\n return;\n }\n\n this._cardMinimumWidth = coercedValue;\n\n // If component is ready, do the recalculation.\n if (this._layout) {\n this.updateLayout();\n }\n }\n get cardMinimumWidth(): number {\n return this._cardMinimumWidth;\n }\n\n /** Config with the width ratios that should take every column. Flex-grow principe. Missed values set to 0. s*/\n @Input()\n columnsWidthConfig: ColumnsWidthConfig;\n\n /** Limit the number of columns. Default is 10. */\n @Input()\n maxColumns = MAX_COLUMNS;\n\n /** Event to emit, when layout changes */\n @Output()\n layoutChange: EventEmitter<Layout> = new EventEmitter<Layout>();\n\n /** Event to emit on Card dragged and dropped */\n @Output()\n cardDraggedDropped: EventEmitter<CardDropped> = new EventEmitter<CardDropped>();\n\n /** @hidden */\n @ContentChildren(CardDefinitionDirective)\n _cards: QueryList<CardDefinitionDirective>;\n\n /** @hidden */\n @ViewChildren(FixedCardLayoutItemComponent)\n _cardContainers: QueryList<FixedCardLayoutItemComponent>;\n\n /** @hidden */\n @ViewChildren('dropList', { read: CdkDropList })\n _cardWrappers: QueryList<CdkDropList>;\n\n /** @hidden */\n @ViewChild('layout')\n _layout: ElementRef;\n\n /** @hidden */\n _cardsArray: Array<CardDefinitionDirective>;\n\n /** @hidden Number of Columns in layout */\n _numberOfColumns: number;\n\n /** @hidden */\n _cardColumns: CardColumn[];\n\n /** @hidden*/\n _containerHeight: number;\n\n /** @hidden handles rtl service */\n _dir = 'ltr';\n\n /** @hidden first number is the CardDefinition rank, i.e. id */\n _groupIndexes = new Map<number, number>();\n\n /** @hidden first number is the CardDefinition rank, i.e. id */\n _itemIndexes = new Map<number, number>();\n\n /** @hidden first number is the CardDefinition rank, i.e. id */\n _singleItemColumns = new Set<number>();\n\n /** @hidden */\n _columnsWidth = new Map<number, number>();\n\n /** @hidden Return available width for fixed card layout */\n get _availableWidth(): number {\n return this._layout.nativeElement.getBoundingClientRect().width;\n }\n\n /** @hidden */\n _placeholderMargin: { [klass: string]: string };\n\n /** @hidden */\n private _previousNumberOfColumns: number;\n\n /** @hidden FocusKeyManager instance */\n private _keyboardEventsManager: FocusKeyManager<FixedCardLayoutItemComponent>;\n\n /** @hidden */\n private _cardMinimumWidth = CARD_MINIMUM_WIDTH;\n\n /** @hidden */\n private _shouldCalculateContainerHeight = false;\n\n /** @hidden An RxJS Subject that will kill the data stream upon component’s destruction (for unsubscribing) */\n private readonly _onDestroy$: Subject<void> = new Subject<void>();\n\n /** @hidden */\n constructor(\n private readonly _changeDetector: ChangeDetectorRef,\n @Optional() private readonly _rtlService: RtlService\n ) {}\n\n /** @hidden */\n ngOnInit(): void {\n this._subscribeToRtl();\n }\n\n /** @hidden */\n ngAfterContentInit(): void {\n this._listenOnCardsChange();\n }\n\n /** @hidden */\n ngAfterViewInit(): void {\n this._processCards();\n this._listenOnResize();\n this._accessibilitySetup();\n }\n\n /** @hidden */\n ngOnChanges(changes: SimpleChanges): void {\n if (!this._cards?.length) {\n return;\n }\n\n if ('maxColumns' in changes) {\n this.updateLayout();\n } else if ('columnsWidthConfig' in changes) {\n this._setColumnsWidth();\n }\n }\n\n /** @hidden */\n ngOnDestroy(): void {\n this._onDestroy$.next();\n this._onDestroy$.complete();\n }\n\n /** @hidden */\n @HostListener('keydown', ['$event'])\n handleKeydown(event: KeyboardEvent): void {\n event.stopImmediatePropagation();\n\n if (this._keyboardEventsManager) {\n this._keyboardEventsManager.onKeydown(event);\n }\n }\n\n /** Distribute cards on window resize */\n updateLayout(): void {\n if (!this._cards.length || !this._availableWidth) {\n return;\n }\n\n const possibleNumberOfColumns = getNumberOfColumns(this._availableWidth, this.cardMinimumWidth);\n\n this._numberOfColumns = Math.min(\n possibleNumberOfColumns,\n this._cards.length,\n this.maxColumns || MAX_COLUMNS,\n MAX_COLUMNS\n );\n\n this.layoutChange.emit({\n numberOfColumns: this._numberOfColumns,\n screenSize: this._availableWidth\n });\n\n if (this._previousNumberOfColumns !== this._numberOfColumns) {\n this._previousNumberOfColumns = this._numberOfColumns;\n this._updateColumns();\n return;\n }\n\n this._setColumnsWidth();\n }\n\n /** @hidden */\n _enterPredicate = (_: CdkDrag, drop: CdkDropList): boolean => {\n // We should update container's height & its children rects (to react when drag moves into the list) before we entered any drop list.\n // That's why it's done here instead of cdkDropListEntered. As this predicate being called many times here is the optimization.\n if (this._shouldCalculateContainerHeight) {\n this._shouldCalculateContainerHeight = false;\n\n // Placeholder doesn't have margin set yet but we need to count it\n // Margin will be set only if there are already items in container\n const additionalSpace = drop.getSortedItems().length ? PX_IN_REM : 0;\n\n this._calculateContainerHeight(additionalSpace);\n }\n\n return true;\n };\n\n /** @hidden */\n _onDropListExited(): void {\n this._shouldCalculateContainerHeight = true;\n }\n\n /** @hidden */\n _onDropListEntered(event: CdkDragEnter): void {\n const containerItemCardDef = (event.container.getSortedItems()[0].data as CardDefinitionDirective).fdCardDef;\n const dragItemCardDef = (event.item.data as CardDefinitionDirective).fdCardDef;\n\n this._setPlaceholderStyle(containerItemCardDef !== dragItemCardDef);\n }\n\n /** @hidden */\n _onDragDropped(event: CdkDragDrop<number, number>): void {\n if (event.container.data === event.previousContainer.data) {\n return;\n }\n\n const movedCard = event.previousContainer.getSortedItems()[0].data;\n const replacedCard = event.container.getSortedItems()[0].data;\n\n const movedCardColumn = this._cardColumns.find((column) =>\n column.find((card) => card.fdCardDef === movedCard.fdCardDef)\n );\n const replacedCardColumn = this._cardColumns.find((column) =>\n column.find((card) => card.fdCardDef === replacedCard.fdCardDef)\n );\n\n // If we dragged the card from the same column as the column we're dropping into\n // There may be a situation where the order shouldn't change but since there are a different drop lists it will change\n // We should prevent this\n if (movedCardColumn === replacedCardColumn && movedCardColumn?.length === 2) {\n if (movedCard.fdCardDef < replacedCard.fdCardDef && event.previousContainer.data < event.container.data) {\n return;\n }\n\n if (movedCard.fdCardDef > replacedCard.fdCardDef && event.previousContainer.data > event.container.data) {\n return;\n }\n }\n\n this._processDragDrop(event.previousContainer.data, event.container.data, movedCard, replacedCard);\n }\n\n /** @hidden For the keyboard drag&drop directive */\n _customMoveFn = (group: CardColumn, indexFrom: number, indexTo: number): void => {\n const movedCard = group[indexFrom];\n const replacedCard = group[indexTo];\n\n const indexFromArray = this._cardsArray.findIndex((card) => card.fdCardDef === movedCard.fdCardDef);\n const indexToArray = this._cardsArray.findIndex((card) => card.fdCardDef === replacedCard.fdCardDef);\n\n this._processDragDrop(indexFromArray, indexToArray, movedCard, replacedCard);\n };\n\n /** @hidden For the keyboard drag&drop directive */\n _customTransferFn = (prevGroup: CardColumn, nextGroup: CardColumn, indexFrom: number, indexTo: number): void => {\n const movedCard = prevGroup[indexFrom];\n const replacedCard = nextGroup[indexTo];\n\n const indexFromArray = this._cardsArray.findIndex((card) => card.fdCardDef === movedCard.fdCardDef);\n const indexToArray = this._cardsArray.findIndex((card) => card.fdCardDef === replacedCard.fdCardDef);\n\n this._processDragDrop(indexFromArray, indexToArray, movedCard, replacedCard);\n };\n\n /** @hidden */\n _setPlaceholderStyle(value: boolean): void {\n this._placeholderMargin = value ? { 'margin-bottom': '1rem' } : {};\n }\n\n /** @hidden Arranges cards on drop of dragged card */\n private _processDragDrop(\n prevIndex: number,\n newIndex: number,\n prevCard: CardDefinitionDirective,\n newCard: CardDefinitionDirective\n ): void {\n // moveItemInArray from CDK won't work as it changes order of other cards\n const replacedCard = this._cardsArray[newIndex];\n this._cardsArray[newIndex] = this._cardsArray[prevIndex];\n this._cardsArray[prevIndex] = replacedCard;\n\n adjustCardRank(prevCard, newCard);\n\n this.cardDraggedDropped.emit({\n previousIndex: prevIndex,\n currentIndex: newIndex,\n layoutColumns: this._numberOfColumns,\n items: this._cards.toArray()\n });\n\n this._updateColumns();\n }\n\n /** @hidden */\n private _accessibilitySetup(): void {\n this._keyboardEventsManager = new FocusKeyManager(this._cardContainers).withWrap();\n }\n\n /** @hidden Rtl change subscription */\n private _subscribeToRtl(): void {\n this._rtlService?.rtl.pipe(takeUntil(this._onDestroy$)).subscribe((isRtl) => {\n this._dir = isRtl ? 'rtl' : 'ltr';\n this._changeDetector.detectChanges();\n });\n }\n\n /** @hidden Listen window resize and distribute cards on column change */\n private _listenOnResize(): void {\n resizeObservable(this._layout.nativeElement)\n .pipe(debounceTime(60), takeUntil(this._onDestroy$))\n .subscribe(() => this.updateLayout());\n }\n\n /** @hidden Listen card change and distribute cards on column change */\n private _listenOnCardsChange(): void {\n this._cards.changes.pipe(delay(0)).subscribe(() => {\n this._processCards();\n this._updateColumns();\n });\n }\n\n /** @hidden Renders layout on column changes */\n private _updateColumns(): void {\n this._setCardColumns();\n this._setColumnsWidth(false);\n this._calculateContainerHeight();\n }\n\n /** @hidden */\n private _processCards(): void {\n this._cardsArray = this._cards\n .toArray()\n .sort((firstCard, secondCard) => firstCard.fdCardDef - secondCard.fdCardDef);\n\n this.updateLayout();\n }\n\n /** @hidden Distribute cards among columns to arrange them in \"Z\" flow */\n private _setCardColumns(): void {\n this._groupIndexes = new Map<number, number>();\n this._itemIndexes = new Map<number, number>();\n this._singleItemColumns = new Set<number>();\n\n const columns: CardColumn[] = new Array(this._numberOfColumns).fill(0).map(() => new Array(0));\n\n this._cardsArray.forEach((card, i) => {\n const currColumnIndex = i % this._numberOfColumns;\n const itemIndex = columns[currColumnIndex].length;\n\n columns[currColumnIndex].push(card);\n\n this._groupIndexes.set(card.fdCardDef, currColumnIndex);\n this._itemIndexes.set(card.fdCardDef, itemIndex);\n });\n\n this._cardColumns = columns;\n\n this._cardColumns.forEach((column) => {\n if (column.length > 0 && column.length < 2) {\n this._singleItemColumns.add(column[0].fdCardDef);\n }\n });\n }\n\n /** @hidden */\n private _setColumnsWidth(detectChanges = true): void {\n this._columnsWidth = new Map();\n\n const configPresent =\n this.columnsWidthConfig &&\n typeof this.columnsWidthConfig === 'object' &&\n Object.keys(this.columnsWidthConfig).length;\n\n if (!configPresent || !this._layout || this._numberOfColumns === 1) {\n return;\n }\n\n const fixedWidthModifiers = fixWidthModifiers(this.columnsWidthConfig, this._numberOfColumns);\n const totalWidthModifiers = fixedWidthModifiers.reduce((sum, width) => (sum += width), 0);\n const freeSpace = this._availableWidth - this.cardMinimumWidth * this._numberOfColumns;\n\n this._cardColumns.forEach((column, index) => {\n const columnWidth = Math.round(\n this.cardMinimumWidth + (freeSpace / totalWidthModifiers) * fixedWidthModifiers[index]\n );\n\n column.forEach((card) => this._columnsWidth.set(card.fdCardDef, columnWidth));\n });\n\n if (detectChanges) {\n this._changeDetector.detectChanges();\n }\n }\n\n /** @hidden Calculate container height basing on the card wrapper columns */\n private _calculateContainerHeight(additionalSpace: number = 0): void {\n this._changeDetector.detectChanges();\n\n const wrapperColumns = this._cardColumns.map((column) =>\n column\n .map((card) => this._cardWrappers.find((wrapper) => wrapper.getSortedItems()[0].data === card)?.element)\n .filter((v): v is ElementRef<HTMLElement> => !!v)\n );\n\n const columnsHeights = wrapperColumns\n .map((column) => column.map((card) => card.nativeElement.getBoundingClientRect().height))\n .map((column) => column.reduce((height, cardHeight) => (height += cardHeight), 0));\n\n // +4px because it's the top & bottom borders of card placeholder\n this._containerHeight = Math.max(...columnsHeights) + 4 + additionalSpace;\n\n this._changeDetector.detectChanges();\n }\n}\n\n/** @hidden */\nfunction fixWidthModifiers(config: ColumnsWidthConfig, numberOfColumns: number): number[] {\n const modifiers = new Array(numberOfColumns).fill(0);\n\n return modifiers.map((_, index) => {\n const columnWidthModifier = config[index + 1];\n\n if (!columnWidthModifier || columnWidthModifier < 0) {\n return 0;\n }\n\n return columnWidthModifier;\n });\n}\n\n/** @hidden Returns number of columns that can fit in current available width for fd-card-layout */\nfunction getNumberOfColumns(containerWidth: number, cardWidth: number): number {\n containerWidth = containerWidth || 1;\n cardWidth = cardWidth || 1;\n\n const numberOfCardsWithNoGap = Math.max(Math.floor(containerWidth / cardWidth), 1); // Example: 960 / 320 = 3\n const requiredWidthWithGap = numberOfCardsWithNoGap * cardWidth + (numberOfCardsWithNoGap - 1) * CARD_GAP_WIDTH;\n const columnCount = requiredWidthWithGap > containerWidth ? numberOfCardsWithNoGap - 1 : numberOfCardsWithNoGap;\n\n return Math.max(columnCount, 1);\n}\n\n/** @hidden Method to update rank after cards are dragged */\nfunction adjustCardRank(draggedCard: CardDefinitionDirective, replacedCard: CardDefinitionDirective): void {\n const draggedCardRank = draggedCard.fdCardDef;\n draggedCard.fdCardDef = replacedCard.fdCardDef;\n replacedCard.fdCardDef = draggedCardRank;\n}\n","<div\n #layout\n cdkDropListGroup\n fdDndKeyboardGroup\n class=\"fd-fixed-card-layout__card-layout fd-fixed-card-layout__card-layout--columns-{{ this._numberOfColumns }}\"\n [style.height]=\"_containerHeight + 'px'\"\n [groups]=\"_cardColumns\"\n orientation=\"horizontal\"\n [customMoveFn]=\"_customMoveFn\"\n [customTransferFn]=\"_customTransferFn\"\n [disableKeyboardDragDrop]=\"disableDragDrop\"\n [cdkDropListGroupDisabled]=\"disableDragDrop\"\n [attr.dir]=\"_dir\"\n>\n <div\n #dropList\n *ngFor=\"let card of _cardsArray; let cardIndex = index\"\n cdkDropList\n cdkDropListSortingDisabled\n class=\"fd-fixed-card-layout__card\"\n [class.fd-fixed-card-layout__card--single]=\"_singleItemColumns.has(card.fdCardDef)\"\n [style.min-width.px]=\"_columnsWidth.get(card.fdCardDef)\"\n [style.max-width.px]=\"_columnsWidth.get(card.fdCardDef)\"\n [cdkDropListData]=\"cardIndex\"\n [cdkDropListEnterPredicate]=\"_enterPredicate\"\n (cdkDropListEntered)=\"_onDropListEntered($event)\"\n (cdkDropListExited)=\"_onDropListExited()\"\n >\n <div\n cdkDrag\n fdDndKeyboardItem\n tabindex=\"0\"\n cdkDragPreviewClass=\"fd-fixed-card-layout__card-preview\"\n [cdkDragData]=\"card\"\n [cdkDragStartDelay]=\"dragStartDelay\"\n [itemIndex]=\"_itemIndexes.get(card.fdCardDef)!\"\n [groupIndex]=\"_groupIndexes.get(card.fdCardDef)!\"\n (cdkDragDropped)=\"_onDragDropped($event)\"\n (cdkDragStarted)=\"_setPlaceholderStyle(false)\"\n >\n <fd-fixed-card-layout-item>\n <ng-container *ngTemplateOutlet=\"card?.template || null\"> </ng-container>\n </fd-fixed-card-layout-item>\n\n <div *cdkDragPlaceholder class=\"fd-fixed-card-layout__card-placeholder\" [style]=\"_placeholderMargin\">\n <ng-container *ngTemplateOutlet=\"card?.template || null\"></ng-container>\n </div>\n </div>\n </div>\n\n <ng-container *ngFor=\"let column of _cardColumns; let last = last; let index = index\">\n <div *ngIf=\"!last\" class=\"fd-fixed-card-layout__clearfix\" [style.order]=\"index + 1\"></div>\n </ng-container>\n</div>\n","import { DragDropModule } from '@angular/cdk/drag-drop';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FixedCardLayoutItemComponent } from './fixed-card-layout-item/fixed-card-layout-item.component';\nimport { DragAndDropModule } from '@fundamental-ngx/core/utils';\nimport { CardDefinitionDirective, FixedCardLayoutComponent } from './fixed-card-layout.component';\n\n@NgModule({\n declarations: [FixedCardLayoutComponent, CardDefinitionDirective, FixedCardLayoutItemComponent],\n imports: [CommonModule, DragDropModule, DragAndDropModule],\n exports: [FixedCardLayoutComponent, CardDefinitionDirective, FixedCardLayoutItemComponent]\n})\nexport class FixedCardLayoutModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAWa,4BAA4B;IACrC,YAAoB,WAAuB;QAAvB,gBAAW,GAAX,WAAW,CAAY;KAAI;;IAG/C,KAAK;QACD,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC;QAChF,IAAI,MAAM,EAAE;YACR,MAAM,CAAC,KAAK,EAAE,CAAC;SAClB;KACJ;;yHATQ,4BAA4B;6GAA5B,4BAA4B,6GAN3B,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pF,YAAY,EAAE,cAAc,EAAE,iBAAiB,aAC/C,wBAAwB,EAAE,uBAAuB,EAAE,4BAA4B;mHAEhF,qBAAqB,YAHrB,CAAC,YAAY,EAAE,cAAc,EAAE,iBAAiB,CAAC;2FAGjD,qBAAqB;kBALjC,QAAQ;mBAAC;oBACN,YAAY,EAAE,CAAC,wBAAwB,EAAE,uBAAuB,EAAE,4BAA4B,CAAC;oBAC/F,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,iBAAiB,CAAC;oBAC1D,OAAO,EAAE,CAAC,wBAAwB,EAAE,uBAAuB,EAAE,4BAA4B,CAAC;iBAC7F;;;ACXD;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AfterContentInit,
|
|
1
|
+
import { AfterContentInit, AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, QueryList, SimpleChanges, TemplateRef } from '@angular/core';
|
|
2
2
|
import { CdkDrag, CdkDragDrop, CdkDragEnter, CdkDropList } from '@angular/cdk/drag-drop';
|
|
3
3
|
import { RtlService } from '@fundamental-ngx/core/utils';
|
|
4
4
|
import { FixedCardLayoutItemComponent } from './fixed-card-layout-item/fixed-card-layout-item.component';
|
|
@@ -34,7 +34,7 @@ export declare type ColumnsWidthConfig = {
|
|
|
34
34
|
[C in Columns]?: number;
|
|
35
35
|
};
|
|
36
36
|
declare type CardColumn = CardDefinitionDirective[];
|
|
37
|
-
export declare class FixedCardLayoutComponent implements OnInit, AfterContentInit, AfterViewInit,
|
|
37
|
+
export declare class FixedCardLayoutComponent implements OnInit, AfterContentInit, AfterViewInit, OnChanges, OnDestroy {
|
|
38
38
|
private readonly _changeDetector;
|
|
39
39
|
private readonly _rtlService;
|
|
40
40
|
/** Drag drop behavior can be disabled */
|
|
@@ -103,8 +103,6 @@ export declare class FixedCardLayoutComponent implements OnInit, AfterContentIni
|
|
|
103
103
|
/** @hidden */
|
|
104
104
|
ngAfterViewInit(): void;
|
|
105
105
|
/** @hidden */
|
|
106
|
-
ngAfterViewChecked(): void;
|
|
107
|
-
/** @hidden */
|
|
108
106
|
ngOnChanges(changes: SimpleChanges): void;
|
|
109
107
|
/** @hidden */
|
|
110
108
|
ngOnDestroy(): void;
|
|
@@ -112,8 +110,6 @@ export declare class FixedCardLayoutComponent implements OnInit, AfterContentIni
|
|
|
112
110
|
handleKeydown(event: KeyboardEvent): void;
|
|
113
111
|
/** Distribute cards on window resize */
|
|
114
112
|
updateLayout(): void;
|
|
115
|
-
/** @hidden Calculate container height basing on the card wrapper columns */
|
|
116
|
-
_calculateContainerHeight(additionalSpace?: number): void;
|
|
117
113
|
/** @hidden */
|
|
118
114
|
_enterPredicate: (_: CdkDrag, drop: CdkDropList) => boolean;
|
|
119
115
|
/** @hidden */
|
|
@@ -146,6 +142,8 @@ export declare class FixedCardLayoutComponent implements OnInit, AfterContentIni
|
|
|
146
142
|
private _setCardColumns;
|
|
147
143
|
/** @hidden */
|
|
148
144
|
private _setColumnsWidth;
|
|
145
|
+
/** @hidden Calculate container height basing on the card wrapper columns */
|
|
146
|
+
private _calculateContainerHeight;
|
|
149
147
|
static ɵfac: i0.ɵɵFactoryDeclaration<FixedCardLayoutComponent, [null, { optional: true; }]>;
|
|
150
148
|
static ɵcmp: i0.ɵɵComponentDeclaration<FixedCardLayoutComponent, "fd-fixed-card-layout", never, { "disableDragDrop": "disableDragDrop"; "dragStartDelay": "dragStartDelay"; "cardMinimumWidth": "cardMinimumWidth"; "columnsWidthConfig": "columnsWidthConfig"; "maxColumns": "maxColumns"; }, { "layoutChange": "layoutChange"; "cardDraggedDropped": "cardDraggedDropped"; }, ["_cards"], never>;
|
|
151
149
|
}
|
package/form/package.json
CHANGED
|
@@ -89,8 +89,9 @@ import * as i87 from "@fundamental-ngx/core/timeline";
|
|
|
89
89
|
import * as i88 from "@fundamental-ngx/core/progress-indicator";
|
|
90
90
|
import * as i89 from "@fundamental-ngx/core/scrollbar";
|
|
91
91
|
import * as i90 from "@fundamental-ngx/core/theming";
|
|
92
|
+
import * as i91 from "@fundamental-ngx/core/overflow-layout";
|
|
92
93
|
export declare class FundamentalNgxCoreModule {
|
|
93
94
|
static ɵfac: i0.ɵɵFactoryDeclaration<FundamentalNgxCoreModule, never>;
|
|
94
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<FundamentalNgxCoreModule, never, [typeof i1.CommonModule, typeof i2.FormsModule], [typeof i3.ActionBarModule, typeof i4.ActionSheetModule, typeof i5.AlertModule, typeof i6.AvatarModule, typeof i7.AvatarGroupModule, typeof i8.BarModule, typeof i9.BreadcrumbModule, typeof i10.BusyIndicatorModule, typeof i11.ButtonModule, typeof i12.CalendarModule, typeof i13.CardModule, typeof i14.CarouselModule, typeof i15.ComboboxModule, typeof i16.CheckboxModule, typeof i17.DatePickerModule, typeof i18.DatetimePickerModule, typeof i19.DragAndDropModule, typeof i20.DynamicPageModule, typeof i21.DynamicSideContentModule, typeof i22.FacetModule, typeof i23.FeedListItemModule, typeof i24.FeedInputModule, typeof i25.FileUploaderModule, typeof i26.FixedCardLayoutModule, typeof i27.FlexibleColumnLayoutModule, typeof i28.FormModule, typeof i29.FormattedTextModule, typeof i30.IconModule, typeof i31.InfoLabelModule, typeof i32.InlineHelpModule, typeof i33.InfiniteScrollModule, typeof i34.InputGroupModule, typeof i35.LayoutGridModule, typeof i36.LayoutPanelModule, typeof i37.LinkModule, typeof i38.ListModule, typeof i39.MenuModule, typeof i40.DialogModule, typeof i41.MessageBoxModule, typeof i42.MessageStripModule, typeof i43.MessageToastModule, typeof i44.MultiInputModule, typeof i45.NestedListModule, typeof i46.NotificationModule, typeof i47.ObjectIdentifierModule, typeof i48.ObjectMarkerModule, typeof i49.ObjectNumberModule, typeof i50.ObjectStatusModule, typeof i51.PaginationModule, typeof i52.PanelModule, typeof i53.ProductSwitchModule, typeof i54.PopoverModule, typeof i55.QuickViewModule, typeof i56.RatingIndicatorModule, typeof i57.RadioModule, typeof i58.ScrollSpyModule, typeof i59.SegmentedButtonModule, typeof i60.SelectModule, typeof i61.ShellbarModule, typeof i62.SideNavigationModule, typeof i63.SplitButtonModule, typeof i64.SwitchModule, typeof i65.StepInputModule, typeof i66.TableModule, typeof i67.TabsModule, typeof i68.TextModule, typeof i69.TileModule, typeof i70.TimeModule, typeof i71.TimePickerModule, typeof i72.TitleModule, typeof i73.ToolbarModule, typeof i74.TokenModule, typeof i75.TreeModule, typeof i76.WizardModule, typeof i13.CardModule, typeof i41.MessageBoxModule, typeof i43.MessageToastModule, typeof i21.DynamicSideContentModule, typeof i77.SliderModule, typeof i78.SplitterModule, typeof i19.OnlyDigitsModule, typeof i79.IllustratedMessageModule, typeof i80.StatusIndicatorModule, typeof i81.GridListModule, typeof i82.ResizableCardLayoutModule, typeof i83.MessagePageModule, typeof i84.VerticalNavigationModule, typeof i85.UploadCollectionModule, typeof i86.MicroProcessFlowModule, typeof i87.TimelineModule, typeof i88.ProgressIndicatorModule, typeof i89.ScrollbarModule, typeof i90.ThemingModule]>;
|
|
95
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FundamentalNgxCoreModule, never, [typeof i1.CommonModule, typeof i2.FormsModule], [typeof i3.ActionBarModule, typeof i4.ActionSheetModule, typeof i5.AlertModule, typeof i6.AvatarModule, typeof i7.AvatarGroupModule, typeof i8.BarModule, typeof i9.BreadcrumbModule, typeof i10.BusyIndicatorModule, typeof i11.ButtonModule, typeof i12.CalendarModule, typeof i13.CardModule, typeof i14.CarouselModule, typeof i15.ComboboxModule, typeof i16.CheckboxModule, typeof i17.DatePickerModule, typeof i18.DatetimePickerModule, typeof i19.DragAndDropModule, typeof i20.DynamicPageModule, typeof i21.DynamicSideContentModule, typeof i22.FacetModule, typeof i23.FeedListItemModule, typeof i24.FeedInputModule, typeof i25.FileUploaderModule, typeof i26.FixedCardLayoutModule, typeof i27.FlexibleColumnLayoutModule, typeof i28.FormModule, typeof i29.FormattedTextModule, typeof i30.IconModule, typeof i31.InfoLabelModule, typeof i32.InlineHelpModule, typeof i33.InfiniteScrollModule, typeof i34.InputGroupModule, typeof i35.LayoutGridModule, typeof i36.LayoutPanelModule, typeof i37.LinkModule, typeof i38.ListModule, typeof i39.MenuModule, typeof i40.DialogModule, typeof i41.MessageBoxModule, typeof i42.MessageStripModule, typeof i43.MessageToastModule, typeof i44.MultiInputModule, typeof i45.NestedListModule, typeof i46.NotificationModule, typeof i47.ObjectIdentifierModule, typeof i48.ObjectMarkerModule, typeof i49.ObjectNumberModule, typeof i50.ObjectStatusModule, typeof i51.PaginationModule, typeof i52.PanelModule, typeof i53.ProductSwitchModule, typeof i54.PopoverModule, typeof i55.QuickViewModule, typeof i56.RatingIndicatorModule, typeof i57.RadioModule, typeof i58.ScrollSpyModule, typeof i59.SegmentedButtonModule, typeof i60.SelectModule, typeof i61.ShellbarModule, typeof i62.SideNavigationModule, typeof i63.SplitButtonModule, typeof i64.SwitchModule, typeof i65.StepInputModule, typeof i66.TableModule, typeof i67.TabsModule, typeof i68.TextModule, typeof i69.TileModule, typeof i70.TimeModule, typeof i71.TimePickerModule, typeof i72.TitleModule, typeof i73.ToolbarModule, typeof i74.TokenModule, typeof i75.TreeModule, typeof i76.WizardModule, typeof i13.CardModule, typeof i41.MessageBoxModule, typeof i43.MessageToastModule, typeof i21.DynamicSideContentModule, typeof i77.SliderModule, typeof i78.SplitterModule, typeof i19.OnlyDigitsModule, typeof i79.IllustratedMessageModule, typeof i80.StatusIndicatorModule, typeof i81.GridListModule, typeof i82.ResizableCardLayoutModule, typeof i83.MessagePageModule, typeof i84.VerticalNavigationModule, typeof i85.UploadCollectionModule, typeof i86.MicroProcessFlowModule, typeof i87.TimelineModule, typeof i88.ProgressIndicatorModule, typeof i89.ScrollbarModule, typeof i90.ThemingModule, typeof i91.OverflowLayoutModule]>;
|
|
95
96
|
static ɵinj: i0.ɵɵInjectorDeclaration<FundamentalNgxCoreModule>;
|
|
96
97
|
}
|
package/grid-list/package.json
CHANGED