UNPKG

ng-flex-layout

Version:
1 lines 18.9 kB
{"version":3,"file":"ng-flex-layout-server.mjs","sources":["../../../../projects/libs/flex-layout/server/server-match-media.ts","../../../../projects/libs/flex-layout/server/server-provider.ts","../../../../projects/libs/flex-layout/server/module.ts","../../../../projects/libs/flex-layout/server/public-api.ts","../../../../projects/libs/flex-layout/server/ng-flex-layout-server.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Inject, Injectable, NgZone, PLATFORM_ID, DOCUMENT} from '@angular/core';\nimport {\n BreakPoint,\n ɵMatchMedia as MatchMedia,\n BREAKPOINTS,\n LAYOUT_CONFIG,\n LayoutConfigOptions\n} from 'ng-flex-layout/core';\n\n/**\n * Special server-only class to simulate a MediaQueryList and\n * - supports manual activation to simulate mediaQuery matching\n * - manages listeners\n */\nexport class ServerMediaQueryList extends EventTarget implements MediaQueryList {\n private _listeners: MediaQueryListListener[] = [];\n\n get matches(): boolean {\n return this._isActive;\n }\n\n get media(): string {\n return this._mediaQuery;\n }\n\n constructor(private _mediaQuery: string, private _isActive = false) {\n super();\n }\n\n /**\n * Destroy the current list by deactivating the\n * listeners and clearing the internal list\n */\n destroy() {\n this.deactivate();\n this._listeners = [];\n }\n\n /** Notify all listeners that 'matches === TRUE' */\n activate(): ServerMediaQueryList {\n if (!this._isActive) {\n this._isActive = true;\n this._listeners.forEach((callback) => {\n const cb: ((this: MediaQueryList, ev: MediaQueryListEvent) => any) = callback!;\n cb.call(this, {matches: this.matches, media: this.media} as MediaQueryListEvent);\n });\n }\n return this;\n }\n\n /** Notify all listeners that 'matches === false' */\n deactivate(): ServerMediaQueryList {\n if (this._isActive) {\n this._isActive = false;\n this._listeners.forEach((callback) => {\n const cb: ((this: MediaQueryList, ev: MediaQueryListEvent) => any) = callback!;\n cb.call(this, {matches: this.matches, media: this.media} as MediaQueryListEvent);\n });\n }\n return this;\n }\n\n /** Add a listener to our internal list to activate later */\n addListener(listener: MediaQueryListListener) {\n if (this._listeners.indexOf(listener) === -1) {\n this._listeners.push(listener);\n }\n if (this._isActive) {\n const cb: ((this: MediaQueryList, ev: MediaQueryListEvent) => any) = listener!;\n cb.call(this, {matches: this.matches, media: this.media} as MediaQueryListEvent);\n }\n }\n\n /** Don't need to remove listeners in the server environment */\n removeListener() {\n }\n\n override addEventListener() {\n }\n\n override removeEventListener() {\n }\n\n override dispatchEvent(_: Event): boolean {\n return false;\n }\n\n onchange: MediaQueryListListener = null;\n}\n\n/**\n * Special server-only implementation of MatchMedia that uses the above\n * ServerMediaQueryList as its internal representation\n *\n * Also contains methods to activate and deactivate breakpoints\n */\n@Injectable()\nexport class ServerMatchMedia extends MatchMedia {\n private _activeBreakpoints: BreakPoint[] = [];\n\n constructor(protected override _zone: NgZone,\n @Inject(PLATFORM_ID) protected override _platformId: Object,\n @Inject(DOCUMENT) protected override _document: any,\n @Inject(BREAKPOINTS) protected breakpoints: BreakPoint[],\n @Inject(LAYOUT_CONFIG) protected layoutConfig: LayoutConfigOptions) {\n super(_zone, _platformId, _document);\n\n const serverBps = layoutConfig.ssrObserveBreakpoints;\n if (serverBps) {\n this._activeBreakpoints = serverBps\n .reduce((acc: BreakPoint[], serverBp: string) => {\n const foundBp = breakpoints.find(bp => serverBp === bp.alias);\n if (!foundBp) {\n console.warn(`FlexLayoutServerModule: unknown breakpoint alias \"${serverBp}\"`);\n } else {\n acc.push(foundBp);\n }\n return acc;\n }, []);\n }\n }\n\n /** Activate the specified breakpoint if we're on the server, no-op otherwise */\n activateBreakpoint(bp: BreakPoint) {\n const lookupBreakpoint = this.registry.get(bp.mediaQuery) as ServerMediaQueryList;\n if (lookupBreakpoint) {\n lookupBreakpoint.activate();\n }\n }\n\n /** Deactivate the specified breakpoint if we're on the server, no-op otherwise */\n deactivateBreakpoint(bp: BreakPoint) {\n const lookupBreakpoint = this.registry.get(bp.mediaQuery) as ServerMediaQueryList;\n if (lookupBreakpoint) {\n lookupBreakpoint.deactivate();\n }\n }\n\n /**\n * Call window.matchMedia() to build a MediaQueryList; which\n * supports 0..n listeners for activation/deactivation\n */\n protected override buildMQL(query: string): ServerMediaQueryList {\n const isActive = this._activeBreakpoints.some(ab => ab.mediaQuery === query);\n\n return new ServerMediaQueryList(query, isActive);\n }\n}\n\ntype MediaQueryListListener = ((this: MediaQueryList, ev: MediaQueryListEvent) => any) | null;\n","import { DOCUMENT } from '@angular/core';\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BEFORE_APP_SERIALIZED} from '@angular/platform-server';\nimport {\n BREAKPOINTS,\n CLASS_NAME,\n SERVER_TOKEN,\n BreakPoint,\n ɵMatchMedia as MatchMedia,\n StylesheetMap,\n sortAscendingPriority,\n MediaMarshaller,\n} from 'ng-flex-layout/core';\n\nimport {ServerMatchMedia} from './server-match-media';\n\n/**\n * Activate all the registered breakpoints in sequence, and then\n * retrieve the associated stylings from the virtual stylesheet\n * @param serverSheet the virtual stylesheet that stores styles for each\n * element\n * @param mediaController the MatchMedia service to activate/deactivate breakpoints\n * @param breakpoints the registered breakpoints to activate/deactivate\n * @param mediaMarshaller the MediaMarshaller service to disable fallback styles dynamically\n */\nexport function generateStaticFlexLayoutStyles(serverSheet: StylesheetMap,\n mediaController: ServerMatchMedia,\n breakpoints: BreakPoint[],\n mediaMarshaller: MediaMarshaller) {\n // Store the custom classes in the following map, that way only\n // one class gets allocated per HTMLElement, and each class can\n // be referenced in the static media queries\n const classMap = new Map<HTMLElement, string>();\n\n // Get the initial stylings for all the directives,\n // and initialize the fallback block of stylings.\n const defaultStyles = new Map(serverSheet.stylesheet);\n // Reset the class counter, otherwise class numbers will\n // increase with each server render.\n nextId = 0;\n let styleText = generateCss(defaultStyles, 'all', classMap);\n mediaMarshaller.useFallbacks = false;\n\n [...breakpoints].sort(sortAscendingPriority).forEach((bp) => {\n serverSheet.clearStyles();\n mediaController.activateBreakpoint(bp);\n const stylesheet = new Map(serverSheet.stylesheet);\n if (stylesheet.size > 0) {\n styleText += generateCss(stylesheet, bp.mediaQuery, classMap);\n }\n mediaController.deactivateBreakpoint(bp);\n });\n\n return styleText;\n}\n\n/**\n * Create a style tag populated with the dynamic stylings from Flex\n * components and attach it to the head of the DOM\n */\nexport function FLEX_SSR_SERIALIZER_FACTORY(serverSheet: StylesheetMap,\n mediaController: ServerMatchMedia,\n _document: Document,\n breakpoints: BreakPoint[],\n mediaMarshaller: MediaMarshaller) {\n return () => {\n // This is the style tag that gets inserted into the head of the DOM,\n // populated with the manual media queries\n const styleTag = _document.createElement('style');\n const styleText = generateStaticFlexLayoutStyles(\n serverSheet, mediaController, breakpoints, mediaMarshaller);\n styleTag.classList.add(`${CLASS_NAME}ssr`);\n styleTag.textContent = styleText;\n _document.head!.appendChild(styleTag);\n };\n}\n\n/**\n * Provider to set static styles on the server\n */\nexport const SERVER_PROVIDERS = [\n {\n provide: BEFORE_APP_SERIALIZED,\n useFactory: FLEX_SSR_SERIALIZER_FACTORY,\n deps: [\n StylesheetMap,\n MatchMedia,\n DOCUMENT,\n BREAKPOINTS,\n MediaMarshaller,\n ],\n multi: true,\n },\n {\n provide: SERVER_TOKEN,\n useValue: true\n },\n {\n provide: MatchMedia,\n useClass: ServerMatchMedia\n }\n];\n\n\nlet nextId = 0;\nconst IS_DEBUG_MODE = false;\n\nexport type StyleSheet = Map<HTMLElement, Map<string, string|number>>;\nexport type ClassMap = Map<HTMLElement, string>;\n\n/**\n * create @media queries based on a virtual stylesheet\n * * Adds a unique class to each element and stores it\n * in a shared classMap for later reuse\n * @param stylesheet the virtual stylesheet that stores styles for each\n * element\n * @param mediaQuery the given @media CSS selector for the current breakpoint\n * @param classMap the map of HTML elements to class names to avoid duplications\n */\nfunction generateCss(stylesheet: StyleSheet, mediaQuery: string, classMap: ClassMap) {\n let css = '';\n stylesheet.forEach((styles, el) => {\n let keyVals = '';\n let className = getClassName(el, classMap);\n\n styles.forEach((v, k) => {\n keyVals += v ? format(`${k}:${v};`) : '';\n });\n\n if (keyVals) {\n // Build list of CSS styles; each with a className\n css += format(`.${className} {`, keyVals, '}');\n }\n });\n\n // Group 1 or more styles (each with className) in a specific mediaQuery\n return format(`@media ${mediaQuery} {`, css, '}');\n}\n\n/**\n * For debugging purposes, prefix css segment with linefeed(s) for easy\n * debugging purposes.\n */\nfunction format(...list: string[]): string {\n let result = '';\n list.forEach((css, i) => {\n result += IS_DEBUG_MODE ? formatSegment(css, i !== 0) : css;\n });\n return result;\n}\n\nfunction formatSegment(css: string, asPrefix: boolean = true): string {\n return asPrefix ? `\\n${css}` : `${css}\\n`;\n}\n\n/**\n * Get className associated with CSS styling\n * If not found, generate global className and set\n * association.\n */\nfunction getClassName(element: HTMLElement, classMap: Map<HTMLElement, string>) {\n let className = classMap.get(element);\n if (!className) {\n className = `${CLASS_NAME}${nextId++}`;\n classMap.set(element, className);\n }\n element.classList.add(className);\n\n return className;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {NgModule} from '@angular/core';\n\nimport {SERVER_PROVIDERS} from './server-provider';\n\n@NgModule({\n providers: [SERVER_PROVIDERS]\n})\nexport class FlexLayoutServerModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './module';\nexport * from './server-provider';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["MatchMedia"],"mappings":";;;;;AAAA;;;;;;AAMG;AAWH;;;;AAIG;AACG,MAAO,oBAAqB,SAAQ,WAAW,CAAA;AAGjD,IAAA,IAAI,OAAO,GAAA;QACP,OAAO,IAAI,CAAC,SAAS;;AAGzB,IAAA,IAAI,KAAK,GAAA;QACL,OAAO,IAAI,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