UNPKG

ri-flex-layout

Version:

An alternative library to Angular's deprecated [angular-flex-layout](https://github.com/angular/flex-layout) library. `ri-flex-layout` helps you achieve responsive layouts in Angular applications with minimal code changes.

1 lines 65.9 kB
{"version":3,"file":"ri-flex-layout-src-lib-flex.mjs","sources":["../../../projects/ri-flex-layout/src/lib/flex/layout/layout.ts","../../../projects/ri-flex-layout/src/lib/flex/flex-align/flex-align.directive.ts","../../../projects/ri-flex-layout/src/lib/flex/flex-fill/flex-fill.directive.ts","../../../projects/ri-flex-layout/src/lib/flex/flex-order/flex-order.directive.ts","../../../projects/ri-flex-layout/src/lib/flex/flex/flex.directive.ts","../../../projects/ri-flex-layout/src/lib/flex/layout-align/layout-align.directive.ts","../../../projects/ri-flex-layout/src/lib/flex/layout-gap/layout-gap.directive.ts","../../../projects/ri-flex-layout/src/lib/flex/module.ts","../../../projects/ri-flex-layout/src/lib/flex/ri-flex-layout-src-lib-flex.ts"],"sourcesContent":["import {Directive, ElementRef, OnChanges, Injectable, Inject, SimpleChanges} from '@angular/core';\nimport {\n BaseDirective,\n StyleGenerator,\n StyleDefinition,\n StyleUtilsService,\n MediaMarshaller,\n LAYOUT_CONFIG,\n LayoutConfigOptions,\n} from 'ri-flex-layout/src/lib/core';\n\nimport {buildLayoutCSS} from 'ri-flex-layout/src/lib/_private-utils';\n\nexport interface LayoutStyleDisplay {\n readonly display: string;\n}\n\n@Injectable({providedIn: 'root'})\nexport class LayoutStyleBuilder extends StyleGenerator {\n buildStyles(input: string, {display}: LayoutStyleDisplay) {\n const css = buildLayoutCSS(input);\n return {\n ...css,\n display: display === 'none' ? display : css.display,\n };\n }\n}\n\nconst inputs = [\n 'riFxLayout', 'riFxLayout.xs', 'riFxLayout.sm', 'riFxLayout.md',\n 'riFxLayout.lg', 'riFxLayout.xl', 'riFxLayout.lt-sm', 'riFxLayout.lt-md',\n 'riFxLayout.lt-lg', 'riFxLayout.lt-xl', 'riFxLayout.gt-xs', 'riFxLayout.gt-sm',\n 'riFxLayout.gt-md', 'riFxLayout.gt-lg'\n];\nconst selector = `\n [riFxLayout], [riFxLayout.xs], [riFxLayout.sm], [riFxLayout.md],\n [riFxLayout.lg], [riFxLayout.xl], [riFxLayout.lt-sm], [riFxLayout.lt-md],\n [riFxLayout.lt-lg], [riFxLayout.lt-xl], [riFxLayout.gt-xs], [riFxLayout.gt-sm],\n [riFxLayout.gt-md], [riFxLayout.gt-lg]\n`;\n\n\n@Directive()\nexport class LayoutDirective extends BaseDirective implements OnChanges {\n\n protected override RI_DIRECTIVE_KEY = 'layout';\n\n constructor(elRef: ElementRef,\n styleUtils: StyleUtilsService,\n styleBuilder: LayoutStyleBuilder,\n marshal: MediaMarshaller,\n @Inject(LAYOUT_CONFIG) private _config: LayoutConfigOptions) {\n super(elRef, styleBuilder, styleUtils, marshal);\n this.init();\n }\n\n protected override updateWithValue(input: string) {\n const detectLayoutDisplay = this._config.detectLayoutDisplay;\n const display = detectLayoutDisplay ? this.styler.lookupStyle(this.nativeElement, 'display') : '';\n this.styleCache = cacheMap.get(display) ?? new Map();\n cacheMap.set(display, this.styleCache);\n\n if (this.currentValue !== input) {\n this.addStyles(input, {display});\n this.currentValue = input;\n }\n }\n}\n\n@Directive({selector, inputs})\nexport class RIDefaultLayoutDirective extends LayoutDirective {\n protected override inputs = inputs;\n}\n\ntype CacheMap = Map<string, StyleDefinition>;\nconst cacheMap = new Map<string, CacheMap>();\n","import { Directive, ElementRef, Injectable } from '@angular/core';\nimport { BaseDirective, MediaMarshaller, StyleDefinition, StyleGenerator, StyleUtilsService \n} from 'ri-flex-layout/src/lib/core';\n\n@Injectable({providedIn: 'root'})\nexport class FlexAlignStyleBuilder extends StyleGenerator {\n buildStyles(input: string) {\n input = input || 'stretch';\n const styles: StyleDefinition = {};\n\n switch (input) {\n case 'start':\n styles['align-self'] = 'flex-start';\n break;\n case 'end':\n styles['align-self'] = 'flex-end';\n break;\n default:\n styles['align-self'] = input;\n break;\n }\n return styles;\n }\n}\n\nconst inputs = [\n 'riFxFlexAlign', 'riFxFlexAlign.xs', 'riFxFlexAlign.sm', 'riFxFlexAlign.md',\n 'riFxFlexAlign.lg', 'riFxFlexAlign.xl', 'riFxFlexAlign.lt-sm', 'riFxFlexAlign.lt-md',\n 'riFxFlexAlign.lt-lg', 'riFxFlexAlign.lt-xl', 'riFxFlexAlign.gt-xs', 'riFxFlexAlign.gt-sm',\n 'riFxFlexAlign.gt-md', 'riFxFlexAlign.gt-lg'\n];\nconst selector = `\n [riFxFlexAlign], [riFxFlexAlign.xs], [riFxFlexAlign.sm], [riFxFlexAlign.md],\n [riFxFlexAlign.lg], [riFxFlexAlign.xl], [riFxFlexAlign.lt-sm], [riFxFlexAlign.lt-md],\n [riFxFlexAlign.lt-lg], [riFxFlexAlign.lt-xl], [riFxFlexAlign.gt-xs], [riFxFlexAlign.gt-sm],\n [riFxFlexAlign.gt-md], [riFxFlexAlign.gt-lg]\n`;\n\n\n@Directive()\nexport class FlexAlignDirective extends BaseDirective {\n\n protected override RI_DIRECTIVE_KEY = 'flex-align';\n\n constructor(elRef: ElementRef,\n styleUtils: StyleUtilsService,\n styleBuilder: FlexAlignStyleBuilder,\n marshal: MediaMarshaller) {\n super(elRef, styleBuilder, styleUtils, marshal);\n this.init();\n }\n\n protected override styleCache = flexAlignCache;\n}\n\nconst flexAlignCache: Map<string, StyleDefinition> = new Map();\n\n@Directive({selector, inputs})\nexport class RIDefaultFlexAlignDirective extends FlexAlignDirective {\n protected override inputs = inputs;\n}\n\n","import { Directive, ElementRef, Injectable } from '@angular/core';\nimport { BaseDirective, MediaMarshaller, StyleDefinition, StyleGenerator, \n StyleUtilsService } from 'ri-flex-layout/src/lib/core';\n\nconst FLEX_FILL_CSS = {\n 'margin': 0,\n 'width': '100%',\n 'height': '100%',\n 'min-width': '100%',\n 'min-height': '100%'\n};\n\n@Injectable({providedIn: 'root'})\nexport class FlexFillStyleBuilder extends StyleGenerator {\n buildStyles(_input: string) {\n return FLEX_FILL_CSS;\n }\n}\n\n@Directive({\n selector: `[riFxFill], [riFxFlexFill]`,\n standalone: true\n})\nexport class FlexFillDirective extends BaseDirective {\n constructor(elRef: ElementRef,\n styleUtils: StyleUtilsService,\n styleBuilder: FlexFillStyleBuilder,\n marshal: MediaMarshaller) {\n super(elRef, styleBuilder, styleUtils, marshal);\n this.addStyles('');\n }\n\n protected override styleCache = flexFillCache;\n}\n\nconst flexFillCache: Map<string, StyleDefinition> = new Map();","import { Directive, ElementRef, Injectable, OnChanges } from '@angular/core';\nimport { BaseDirective, MediaMarshaller, StyleDefinition, StyleGenerator, \n StyleUtilsService } from 'ri-flex-layout/src/lib/core';\n\n@Injectable({providedIn: 'root'})\nexport class FlexOrderStyleBuilder extends StyleGenerator {\n buildStyles(value: string) {\n return {order: (value && parseInt(value, 10)) || ''};\n }\n}\n\nconst inputs = [\n 'riFxFlexOrder', 'riFxFlexOrder.xs', 'riFxFlexOrder.sm', 'riFxFlexOrder.md',\n 'riFxFlexOrder.lg', 'riFxFlexOrder.xl', 'riFxFlexOrder.lt-sm', 'riFxFlexOrder.lt-md',\n 'riFxFlexOrder.lt-lg', 'riFxFlexOrder.lt-xl', 'riFxFlexOrder.gt-xs', 'riFxFlexOrder.gt-sm',\n 'riFxFlexOrder.gt-md', 'riFxFlexOrder.gt-lg'\n];\nconst selector = `\n [riFxFlexOrder], [riFxFlexOrder.xs], [riFxFlexOrder.sm], [riFxFlexOrder.md],\n [riFxFlexOrder.lg], [riFxFlexOrder.xl], [riFxFlexOrder.lt-sm], [riFxFlexOrder.lt-md],\n [riFxFlexOrder.lt-lg], [riFxFlexOrder.lt-xl], [riFxFlexOrder.gt-xs], [riFxFlexOrder.gt-sm],\n [riFxFlexOrder.gt-md], [riFxFlexOrder.gt-lg]\n`;\n\n@Directive()\nexport class FlexOrderDirective extends BaseDirective implements OnChanges {\n\n protected override RI_DIRECTIVE_KEY = 'flex-order';\n\n constructor(elRef: ElementRef,\n styleUtils: StyleUtilsService,\n styleBuilder: FlexOrderStyleBuilder,\n marshal: MediaMarshaller) {\n super(elRef, styleBuilder, styleUtils, marshal);\n this.init();\n }\n\n protected override styleCache = flexOrderCache;\n}\n\nconst flexOrderCache: Map<string, StyleDefinition> = new Map();\n\n@Directive({selector, inputs})\nexport class RIDefaultFlexOrderDirective extends FlexOrderDirective {\n protected override inputs = inputs;\n}\n","import { Directive, ElementRef, Inject, Injectable, Input, OnInit } from '@angular/core';\nimport { BaseDirective, \n ElementMatcher, \n LAYOUT_CONFIG, \n LayoutConfigOptions, \n MediaMarshaller, StyleDefinition, StyleGenerator, \n StyleUtilsService, \n validateBasis,\n} from 'ri-flex-layout/src/lib/core';\nimport { isFlowHorizontal, extendObject } from 'ri-flex-layout/src/lib/_private-utils';\nimport { takeUntil } from 'rxjs';\n\n\ninterface FlexBuilderParent {\n direction: string;\n hasWrap: boolean;\n}\n\n@Injectable({providedIn: 'root'})\nexport class FlexStyleBuilder extends StyleGenerator {\n constructor(@Inject(LAYOUT_CONFIG) protected layoutConfig: LayoutConfigOptions) {\n super();\n }\n buildStyles(input: string, parent: FlexBuilderParent) {\n let [grow, shrink, ...basisParts]: (string|number)[] = input.split(' ');\n let basis = basisParts.join(' ');\n\n // The flex-direction of this element's flex container. Defaults to 'row'.\n const direction = (parent.direction.indexOf('column') > -1) ? 'column' : 'row';\n\n const max = isFlowHorizontal(direction) ? 'max-width' : 'max-height';\n const min = isFlowHorizontal(direction) ? 'min-width' : 'min-height';\n\n const hasCalc = String(basis).indexOf('calc') > -1;\n const usingCalc = hasCalc || (basis === 'auto');\n const isPercent = String(basis).indexOf('%') > -1 && !hasCalc;\n const hasUnits = String(basis).indexOf('px') > -1 || String(basis).indexOf('rem') > -1 ||\n String(basis).indexOf('em') > -1 || String(basis).indexOf('vw') > -1 ||\n String(basis).indexOf('vh') > -1;\n\n let isValue = (hasCalc || hasUnits);\n\n grow = (grow == '0') ? 0 : grow;\n shrink = (shrink == '0') ? 0 : shrink;\n\n const isFixed = !grow && !shrink;\n\n let css: {[key: string]: string | number | null} = {};\n\n const clearStyles = {\n 'max-width': null,\n 'max-height': null,\n 'min-width': null,\n 'min-height': null\n };\n switch (basis || '') {\n case '':\n const useColumnBasisZero = this.layoutConfig.useColumnBasisZero !== false;\n basis = direction === 'row' ? '0%' : (useColumnBasisZero ? '0.000000001px' : 'auto');\n break;\n case 'initial': // default\n case 'nogrow':\n grow = 0;\n basis = 'auto';\n break;\n case 'grow':\n basis = '100%';\n break;\n case 'noshrink':\n shrink = 0;\n basis = 'auto';\n break;\n case 'auto':\n break;\n case 'none':\n grow = 0;\n shrink = 0;\n basis = 'auto';\n break;\n default:\n if (!isValue && !isPercent && !isNaN(basis as any)) {\n basis = basis + '%';\n }\n\n if (basis === '0%') {\n isValue = true;\n }\n\n if (basis === '0px') {\n basis = '0%';\n }\n\n if (hasCalc) {\n css = extendObject(clearStyles, {\n 'flex-grow': grow,\n 'flex-shrink': shrink,\n 'flex-basis': isValue ? basis : '100%'\n });\n } else {\n css = extendObject(clearStyles, {\n 'flex': `${grow} ${shrink} ${isValue ? basis : '100%'}`\n });\n }\n\n break;\n }\n\n if (!(css['flex'] || css['flex-grow'])) {\n if (hasCalc) {\n css = extendObject(clearStyles, {\n 'flex-grow': grow,\n 'flex-shrink': shrink,\n 'flex-basis': basis\n });\n } else {\n css = extendObject(clearStyles, {\n 'flex': `${grow} ${shrink} ${basis}`\n });\n }\n }\n\n if (basis !== '0%' && basis !== '0px' && basis !== '0.000000001px' && basis !== 'auto') {\n css[min] = isFixed || (isValue && grow) ? basis : null;\n css[max] = isFixed || (!usingCalc && shrink) ? basis : null;\n }\n\n if (!css[min] && !css[max]) {\n if (hasCalc) {\n css = extendObject(clearStyles, {\n 'flex-grow': grow,\n 'flex-shrink': shrink,\n 'flex-basis': basis\n });\n } else {\n css = extendObject(clearStyles, {\n 'flex': `${grow} ${shrink} ${basis}`\n });\n }\n } else {\n if (parent.hasWrap) {\n css[hasCalc ? 'flex-basis' : 'flex'] = css[max] ?\n (hasCalc ? css[max] : `${grow} ${shrink} ${css[max]}`) :\n (hasCalc ? css[min] : `${grow} ${shrink} ${css[min]}`);\n }\n }\n\n return extendObject(css, {'box-sizing': 'border-box'}) as StyleDefinition;\n }\n}\n\nconst inputs = [\n 'riFxFlex', 'riFxFlex.xs', 'riFxFlex.sm', 'riFxFlex.md',\n 'riFxFlex.lg', 'riFxFlex.xl', 'riFxFlex.lt-sm', 'riFxFlex.lt-md',\n 'riFxFlex.lt-lg', 'riFxFlex.lt-xl', 'riFxFlex.gt-xs', 'riFxFlex.gt-sm',\n 'riFxFlex.gt-md', 'riFxFlex.gt-lg'\n];\nconst selector = `\n [riFxFlex], [riFxFlex.xs], [riFxFlex.sm], [riFxFlex.md],\n [riFxFlex.lg], [riFxFlex.xl], [riFxFlex.lt-sm], [riFxFlex.lt-md],\n [riFxFlex.lt-lg], [riFxFlex.lt-xl], [riFxFlex.gt-xs], [riFxFlex.gt-sm],\n [riFxFlex.gt-md], [riFxFlex.gt-lg]\n`;\n\n\n\n@Directive()\nexport class FlexDirective extends BaseDirective implements OnInit {\n\n public override RI_DIRECTIVE_KEY = 'flex';\n protected direction?: string = undefined;\n protected wrap?: boolean = undefined;\n @Input('riFxShrink')\n get shrink(): string { return this.flexShrink; }\n set shrink(value: string) {\n this.flexShrink = value || '1';\n this.triggerReflow();\n }\n\n @Input('riFxGrow')\n get grow(): string { return this.flexGrow; }\n set grow(value: string) {\n this.flexGrow = value || '1';\n this.triggerReflow();\n }\n\n protected flexGrow = '1';\n protected flexShrink = '1';\n\n \n constructor(elRef: ElementRef,\n styleUtils: StyleUtilsService,\n @Inject(LAYOUT_CONFIG) protected layoutConfig: LayoutConfigOptions,\n styleBuilder: FlexStyleBuilder,\n protected override marshal: MediaMarshaller) {\nsuper(elRef, styleBuilder, styleUtils, marshal);\nthis.init();\n}\n\nngOnInit() {\nif (this.parentElement) {\nthis.marshal.trackValue(this.parentElement, 'layout')\n.pipe(takeUntil(this.destroySubject))\n.subscribe(this.onLayoutChange.bind(this));\nthis.marshal.trackValue(this.nativeElement, 'layout-align')\n.pipe(takeUntil(this.destroySubject))\n.subscribe(this.triggerReflow.bind(this));\n}\n}\n\n\nprotected onLayoutChange(matcher: ElementMatcher) {\nconst layout: string = matcher.value;\nconst layoutParts = layout.split(' ');\nthis.direction = layoutParts[0];\nthis.wrap = layoutParts[1] !== undefined && layoutParts[1] === 'wrap';\nthis.triggerUpdate();\n}\n\nprotected override updateWithValue(value: string) {\nconst addFlexToParent = this.layoutConfig.addFlexToParent !== false;\nif (this.direction === undefined) {\nthis.direction = this.getFlexFlowDirection(this.parentElement!, addFlexToParent);\n}\nif (this.wrap === undefined) {\nthis.wrap = this.hasWrap(this.parentElement!);\n}\nconst direction = this.direction;\nconst isHorizontal = direction.startsWith('row');\nconst hasWrap = this.wrap;\nif (isHorizontal && hasWrap) {\nthis.styleCache = flexRowWrapCache;\n} else if (isHorizontal && !hasWrap) {\nthis.styleCache = flexRowCache;\n} else if (!isHorizontal && hasWrap) {\nthis.styleCache = flexColumnWrapCache;\n} else if (!isHorizontal && !hasWrap) {\nthis.styleCache = flexColumnCache;\n}\nconst basis = String(value).replace(';', '');\nconst parts = validateBasis(basis, this.flexGrow, this.flexShrink);\nthis.addStyles(parts.join(' '), {direction, hasWrap});\n}\n\nprotected triggerReflow() {\nconst activatedValue = this.activatedValue;\nif (activatedValue !== undefined) {\nconst parts = validateBasis(activatedValue + '', this.flexGrow, this.flexShrink);\nthis.marshal.updateElement(this.nativeElement, this.RI_DIRECTIVE_KEY, parts.join(' '));\n}\n}\n}\n\n@Directive({inputs, selector, standalone: true})\nexport class RIDefaultFlexDirective extends FlexDirective {\nprotected override inputs = inputs;\n}\n\nconst flexRowCache: Map<string, StyleDefinition> = new Map();\nconst flexColumnCache: Map<string, StyleDefinition> = new Map();\nconst flexRowWrapCache: Map<string, StyleDefinition> = new Map();\nconst flexColumnWrapCache: Map<string, StyleDefinition> = new Map();","import { Directive, ElementRef, Injectable } from '@angular/core';\nimport { BaseDirective, ElementMatcher, MediaMarshaller, StyleDefinition, \n StyleGenerator, StyleUtilsService } from 'ri-flex-layout/src/lib/core';\nimport { takeUntil } from 'rxjs';\nimport { extendObject, isFlowHorizontal, LAYOUT_VALUES } from 'ri-flex-layout/src/lib/_private-utils';\n\nexport interface LayoutAlignParent {\n layout: string;\n inline: boolean;\n}\n\n@Injectable({providedIn: 'root'})\nexport class LayoutAlignStyleBuilder extends StyleGenerator {\n buildStyles(align: string, parent: LayoutAlignParent) {\n const css: StyleDefinition = {}, [mainAxis, crossAxis] = align.split(' ');\n\n // Main axis\n switch (mainAxis) {\n case 'center':\n css['justify-content'] = 'center';\n break;\n case 'space-around':\n css['justify-content'] = 'space-around';\n break;\n case 'space-between':\n css['justify-content'] = 'space-between';\n break;\n case 'space-evenly':\n css['justify-content'] = 'space-evenly';\n break;\n case 'end':\n case 'flex-end':\n css['justify-content'] = 'flex-end';\n break;\n case 'start':\n case 'flex-start':\n default :\n css['justify-content'] = 'flex-start'; // default main axis\n break;\n }\n\n // Cross-axis\n switch (crossAxis) {\n case 'start':\n case 'flex-start':\n css['align-items'] = css['align-content'] = 'flex-start';\n break;\n case 'center':\n css['align-items'] = css['align-content'] = 'center';\n break;\n case 'end':\n case 'flex-end':\n css['align-items'] = css['align-content'] = 'flex-end';\n break;\n case 'space-between':\n css['align-content'] = 'space-between';\n css['align-items'] = 'stretch';\n break;\n case 'space-around':\n css['align-content'] = 'space-around';\n css['align-items'] = 'stretch';\n break;\n case 'baseline':\n css['align-content'] = 'stretch';\n css['align-items'] = 'baseline';\n break;\n case 'stretch':\n default : // 'stretch'\n css['align-items'] = css['align-content'] = 'stretch'; // default cross axis\n break;\n }\n\n return extendObject(css, {\n 'display' : parent.inline ? 'inline-flex' : 'flex',\n 'flex-direction' : parent.layout,\n 'box-sizing' : 'border-box',\n 'max-width': crossAxis === 'stretch' ?\n !isFlowHorizontal(parent.layout) ? '100%' : null : null,\n 'max-height': crossAxis === 'stretch' ?\n isFlowHorizontal(parent.layout) ? '100%' : null : null,\n }) as StyleDefinition;\n }\n}\n\nconst inputs = [\n 'riFxLayoutAlign', 'riFxLayoutAlign.xs', 'riFxLayoutAlign.sm', 'riFxLayoutAlign.md',\n 'riFxLayoutAlign.lg', 'riFxLayoutAlign.xl', 'riFxLayoutAlign.lt-sm', 'riFxLayoutAlign.lt-md',\n 'riFxLayoutAlign.lt-lg', 'riFxLayoutAlign.lt-xl', 'riFxLayoutAlign.gt-xs', 'riFxLayoutAlign.gt-sm',\n 'riFxLayoutAlign.gt-md', 'riFxLayoutAlign.gt-lg'\n];\nconst selector = `\n [riFxLayoutAlign], [riFxLayoutAlign.xs], [riFxLayoutAlign.sm], [riFxLayoutAlign.md],\n [riFxLayoutAlign.lg], [riFxLayoutAlign.xl], [riFxLayoutAlign.lt-sm], [riFxLayoutAlign.lt-md],\n [riFxLayoutAlign.lt-lg], [riFxLayoutAlign.lt-xl], [riFxLayoutAlign.gt-xs], [riFxLayoutAlign.gt-sm],\n [riFxLayoutAlign.gt-md], [riFxLayoutAlign.gt-lg]\n`;\n\n@Directive()\nexport class LayoutAlignDirective extends BaseDirective {\n protected override RI_DIRECTIVE_KEY = 'layout-align';\n protected layout = 'row'; // default flex-direction\n protected inline = false; // default inline value\n\n constructor(elRef: ElementRef,\n styleUtils: StyleUtilsService,\n styleBuilder: LayoutAlignStyleBuilder,\n marshal: MediaMarshaller) {\n super(elRef, styleBuilder, styleUtils, marshal);\n this.init();\n this.marshal.trackValue(this.nativeElement, 'layout')\n .pipe(takeUntil(this.destroySubject))\n .subscribe(this.onLayoutChange.bind(this));\n }\n\n protected override updateWithValue(value: string) {\n const layout = this.layout || 'row';\n const inline = this.inline;\n if (layout === 'row' && inline) {\n this.styleCache = layoutAlignHorizontalInlineCache;\n } else if (layout === 'row' && !inline) {\n this.styleCache = layoutAlignHorizontalCache;\n } else if (layout === 'row-reverse' && inline) {\n this.styleCache = layoutAlignHorizontalRevInlineCache;\n } else if (layout === 'row-reverse' && !inline) {\n this.styleCache = layoutAlignHorizontalRevCache;\n } else if (layout === 'column' && inline) {\n this.styleCache = layoutAlignVerticalInlineCache;\n } else if (layout === 'column' && !inline) {\n this.styleCache = layoutAlignVerticalCache;\n } else if (layout === 'column-reverse' && inline) {\n this.styleCache = layoutAlignVerticalRevInlineCache;\n } else if (layout === 'column-reverse' && !inline) {\n this.styleCache = layoutAlignVerticalRevCache;\n }\n this.addStyles(value, {layout, inline});\n }\n\n protected onLayoutChange(matcher: ElementMatcher) {\n const layoutKeys: string[] = matcher.value.split(' ');\n this.layout = layoutKeys[0];\n this.inline = matcher.value.includes('inline');\n if (!LAYOUT_VALUES.find(x => x === this.layout)) {\n this.layout = 'row';\n }\n this.triggerUpdate();\n }\n}\n\n@Directive({selector, inputs})\nexport class RIDefaultLayoutAlignDirective extends LayoutAlignDirective {\n protected override inputs = inputs;\n}\n\nconst layoutAlignHorizontalCache: Map<string, StyleDefinition> = new Map();\nconst layoutAlignVerticalCache: Map<string, StyleDefinition> = new Map();\nconst layoutAlignHorizontalRevCache: Map<string, StyleDefinition> = new Map();\nconst layoutAlignVerticalRevCache: Map<string, StyleDefinition> = new Map();\nconst layoutAlignHorizontalInlineCache: Map<string, StyleDefinition> = new Map();\nconst layoutAlignVerticalInlineCache: Map<string, StyleDefinition> = new Map();\nconst layoutAlignHorizontalRevInlineCache: Map<string, StyleDefinition> = new Map();\nconst layoutAlignVerticalRevInlineCache: Map<string, StyleDefinition> = new Map();\n\n","import { AfterContentInit, Directive, ElementRef, Inject, Injectable, NgZone, OnDestroy } from '@angular/core';\nimport { BaseDirective, ElementMatcher, LAYOUT_CONFIG, \n LayoutConfigOptions, MediaMarshaller, StyleDefinition, StyleGenerator, StyleUtilsService,\n multiply } from 'ri-flex-layout/src/lib/core';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { Subject, takeUntil } from 'rxjs';\nimport { LAYOUT_VALUES } from 'ri-flex-layout/src/lib/_private-utils';\n\nexport interface LayoutGapParent {\n directionality: string;\n items: HTMLElement[];\n layout: string;\n}\n\nconst CLEAR_MARGIN_CSS = {\n 'margin-left': null,\n 'margin-right': null,\n 'margin-top': null,\n 'margin-bottom': null\n};\n\n@Injectable({providedIn: 'root'})\nexport class LayoutGapStyleBuilder extends StyleGenerator {\n constructor(private _styler: StyleUtilsService,\n @Inject(LAYOUT_CONFIG) private _config: LayoutConfigOptions) {\n super();\n }\n\n buildStyles(gapValue: string, parent: LayoutGapParent) {\n if (gapValue.endsWith(GRID_SPECIFIER)) {\n gapValue = gapValue.slice(0, gapValue.indexOf(GRID_SPECIFIER));\n gapValue = multiply(gapValue, this._config.multiplier);\n\n return buildGridMargin(gapValue, parent.directionality);\n } else {\n return {};\n }\n }\n\n override sideEffect(gapValue: string, _styles: StyleDefinition, parent: LayoutGapParent) {\n const items = parent.items;\n if (gapValue.endsWith(GRID_SPECIFIER)) {\n gapValue = gapValue.slice(0, gapValue.indexOf(GRID_SPECIFIER));\n gapValue = multiply(gapValue, this._config.multiplier);\n const paddingStyles = buildGridPadding(gapValue, parent.directionality);\n this._styler.applyStyleToElements(paddingStyles, parent.items);\n } else {\n gapValue = multiply(gapValue, this._config.multiplier);\n gapValue = this.addFallbackUnit(gapValue);\n\n const lastItem = items.pop()!;\n\n const gapCss = buildGapCSS(gapValue, parent);\n this._styler.applyStyleToElements(gapCss, items);\n\n this._styler.applyStyleToElements(CLEAR_MARGIN_CSS, [lastItem]);\n }\n }\n\n private addFallbackUnit(value: string) {\n return !isNaN(+value) ? `${value}${this._config.defaultUnit}` : value;\n }\n}\n\nconst inputs = [\n 'riFxLayoutGap', 'riFxLayoutGap.xs', 'riFxLayoutGap.sm', 'riFxLayoutGap.md',\n 'riFxLayoutGap.lg', 'riFxLayoutGap.xl', 'riFxLayoutGap.lt-sm', 'riFxLayoutGap.lt-md',\n 'riFxLayoutGap.lt-lg', 'riFxLayoutGap.lt-xl', 'riFxLayoutGap.gt-xs', 'riFxLayoutGap.gt-sm',\n 'riFxLayoutGap.gt-md', 'riFxLayoutGap.gt-lg'\n];\nconst selector = `\n [riFxLayoutGap], [riFxLayoutGap.xs], [riFxLayoutGap.sm], [riFxLayoutGap.md],\n [riFxLayoutGap.lg], [riFxLayoutGap.xl], [riFxLayoutGap.lt-sm], [riFxLayoutGap.lt-md],\n [riFxLayoutGap.lt-lg], [riFxLayoutGap.lt-xl], [riFxLayoutGap.gt-xs], [riFxLayoutGap.gt-sm],\n [riFxLayoutGap.gt-md], [riFxLayoutGap.gt-lg]\n`;\n\n\n@Directive()\nexport class LayoutGapDirective extends BaseDirective implements AfterContentInit, OnDestroy {\n protected layout = 'row'; // default flex-direction\n protected override RI_DIRECTIVE_KEY = 'layout-gap';\n protected observerSubject = new Subject<void>();\n\n protected get childrenNodes(): HTMLElement[] {\n const obj = this.nativeElement.children;\n const buffer: any[] = [];\n\n for (let i = obj.length; i--;) {\n buffer[i] = obj[i];\n }\n return buffer;\n }\n\n constructor(elRef: ElementRef,\n protected zone: NgZone,\n protected directionality: Directionality,\n protected styleUtils: StyleUtilsService,\n styleBuilder: LayoutGapStyleBuilder,\n marshal: MediaMarshaller) {\n super(elRef, styleBuilder, styleUtils, marshal);\n const extraTriggers = [this.directionality.change, this.observerSubject.asObservable()];\n this.init(extraTriggers);\n this.marshal\n .trackValue(this.nativeElement, 'layout')\n .pipe(takeUntil(this.destroySubject))\n .subscribe(this.onLayoutChange.bind(this));\n }\n\n ngAfterContentInit() {\n this.buildChildObservable();\n this.triggerUpdate();\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n if (this.observer) {\n this.observer.disconnect();\n }\n }\n\n protected onLayoutChange(matcher: ElementMatcher) {\n const layout: string = matcher.value;\n const direction = layout.split(' ');\n this.layout = direction[0];\n if (!LAYOUT_VALUES.find(x => x === this.layout)) {\n this.layout = 'row';\n }\n this.triggerUpdate();\n }\n\n\n protected override updateWithValue(value: string) {\n const items = this.childrenNodes\n .filter(el => el.nodeType === 1 && this.willDisplay(el))\n .sort((a, b) => {\n const orderA = +this.styler.lookupStyle(a, 'order');\n const orderB = +this.styler.lookupStyle(b, 'order');\n if (isNaN(orderA) || isNaN(orderB) || orderA === orderB) {\n return 0;\n } else {\n return orderA > orderB ? 1 : -1;\n }\n });\n\n if (items.length > 0) {\n const directionality = this.directionality.value;\n const layout = this.layout;\n if (layout === 'row' && directionality === 'rtl') {\n this.styleCache = layoutGapCacheRowRtl;\n } else if (layout === 'row' && directionality !== 'rtl') {\n this.styleCache = layoutGapCacheRowLtr;\n } else if (layout === 'column' && directionality === 'rtl') {\n this.styleCache = layoutGapCacheColumnRtl;\n } else if (layout === 'column' && directionality !== 'rtl') {\n this.styleCache = layoutGapCacheColumnLtr;\n }\n this.addStyles(value, {directionality, items, layout});\n }\n }\n\n protected override clearStyles() {\n const gridMode = Object.keys(this.mru).length > 0;\n const childrenStyle = gridMode ? 'padding' :\n getMarginType(this.directionality.value, this.layout);\n\n if (gridMode) {\n super.clearStyles();\n }\n\n this.styleUtils.applyStyleToElements({[childrenStyle]: ''}, this.childrenNodes);\n }\n\n protected willDisplay(source: HTMLElement): boolean {\n const value = this.marshal.getValue(source, 'show-hide');\n return value === true ||\n (value === undefined && this.styleUtils.lookupStyle(source, 'display') !== 'none');\n }\n\n protected buildChildObservable(): void {\n this.zone.runOutsideAngular(() => {\n if (typeof MutationObserver !== 'undefined') {\n this.observer = new MutationObserver((mutations: MutationRecord[]) => {\n const validatedChanges = (it: MutationRecord): boolean => {\n return (it.addedNodes && it.addedNodes.length > 0) ||\n (it.removedNodes && it.removedNodes.length > 0);\n };\n\n if (mutations.some(validatedChanges)) {\n this.observerSubject.next();\n }\n });\n this.observer.observe(this.nativeElement, {childList: true});\n }\n });\n }\n\n protected observer?: MutationObserver;\n}\n\n@Directive({selector, inputs})\nexport class RIDefaultLayoutGapDirective extends LayoutGapDirective {\n protected override inputs = inputs;\n}\n\nconst layoutGapCacheRowRtl: Map<string, StyleDefinition> = new Map();\nconst layoutGapCacheColumnRtl: Map<string, StyleDefinition> = new Map();\nconst layoutGapCacheRowLtr: Map<string, StyleDefinition> = new Map();\nconst layoutGapCacheColumnLtr: Map<string, StyleDefinition> = new Map();\n\nconst GRID_SPECIFIER = ' grid';\n\nfunction buildGridPadding(value: string, directionality: string): StyleDefinition {\n const [between, below] = value.split(' ');\n const bottom = below ?? between;\n let paddingRight = '0px', paddingBottom = bottom, paddingLeft = '0px';\n\n if (directionality === 'rtl') {\n paddingLeft = between;\n } else {\n paddingRight = between;\n }\n\n return {'padding': `0px ${paddingRight} ${paddingBottom} ${paddingLeft}`};\n}\n\nfunction buildGridMargin(value: string, directionality: string): StyleDefinition {\n const [between, below] = value.split(' ');\n const bottom = below ?? between;\n const minus = (str: string) => `-${str}`;\n let marginRight = '0px', marginBottom = minus(bottom), marginLeft = '0px';\n\n if (directionality === 'rtl') {\n marginLeft = minus(between);\n } else {\n marginRight = minus(between);\n }\n\n return {'margin': `0px ${marginRight} ${marginBottom} ${marginLeft}`};\n}\n\nfunction getMarginType(directionality: string, layout: string) {\n switch (layout) {\n case 'column':\n return 'margin-bottom';\n case 'column-reverse':\n return 'margin-top';\n case 'row':\n return directionality === 'rtl' ? 'margin-left' : 'margin-right';\n case 'row-reverse':\n return directionality === 'rtl' ? 'margin-right' : 'margin-left';\n default :\n return directionality === 'rtl' ? 'margin-left' : 'margin-right';\n }\n}\n\nfunction buildGapCSS(gapValue: string,\n parent: {directionality: string, layout: string}): StyleDefinition {\n const key = getMarginType(parent.directionality, parent.layout);\n const margins: {[key: string]: string | null} = {...CLEAR_MARGIN_CSS};\n margins[key] = gapValue;\n return margins;\n}\n","import { NgModule } from '@angular/core';\nimport { RIDefaultLayoutDirective } from './layout/layout';\nimport { CoreModule } from 'ri-flex-layout/src/lib/core';\nimport { BidiModule } from '@angular/cdk/bidi';\nimport { RIDefaultFlexAlignDirective } from './flex-align/flex-align.directive';\nimport { FlexFillDirective } from './flex-fill/flex-fill.directive';\nimport { RIDefaultFlexOrderDirective } from './flex-order/flex-order.directive';\nimport { RIDefaultFlexDirective } from './flex/flex.directive';\nimport { RIDefaultLayoutAlignDirective } from './layout-align/layout-align.directive';\nimport { RIDefaultLayoutGapDirective } from './layout-gap/layout-gap.directive';\n\nconst ALL_DIRECTIVES = [\n RIDefaultLayoutDirective,\n RIDefaultLayoutGapDirective,\n RIDefaultLayoutAlignDirective,\n RIDefaultFlexOrderDirective,\n FlexFillDirective,\n RIDefaultFlexAlignDirective,\n RIDefaultFlexDirective,\n];\n@NgModule({\n imports: [\n CoreModule,\n BidiModule,\n ...ALL_DIRECTIVES\n ],\n declarations: [], \n exports: [...ALL_DIRECTIVES]\n})\nexport class FlexModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["inputs","selector"],"mappings":";;;;;;;;;AAkBM,MAAO,kBAAmB,SAAQ,cAAc,CAAA;AACpD,IAAA,WAAW,CAAC,KAAa,EAAE,EAAC,OAAO,EAAqB,EAAA;AACtD,QAAA,MAAM,GAAG,GAAG,cAAc,CAAC,KAAK,CAAC;QACjC,OAAO;AACL,YAAA,GAAG,GAAG;AACN,YAAA,OAAO,EAAE,OAAO,KAAK,MAAM,GAAG,OAAO,GAAG,GAAG,CAAC,OAAO;SACpD;;+GANQ,kBAAkB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,cADN,MAAM,EAAA,CAAA,CAAA;;4FAClB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAD9B,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC;;AAWhC,MAAMA,QAAM,GAAG;AACb,IAAA,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,eAAe;AAC/D,IAAA,eAAe,EAA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