ngx-flexible-layout
Version:
The Angular team has decided to depricate the @angular/flex-layout library after v15. It seems that this is going to cause issues for some people. In order to try and alleviate these problems, this clone repo/lib was created.
99 lines (93 loc) • 4.24 kB
JavaScript
import { DEFAULT_CONFIG, LAYOUT_CONFIG, BREAKPOINT, SERVER_TOKEN } from 'ngx-flexible-layout/core';
export * from 'ngx-flexible-layout/core';
import { ExtendedModule } from 'ngx-flexible-layout/extended';
export * from 'ngx-flexible-layout/extended';
import { FlexModule } from 'ngx-flexible-layout/flex';
export * from 'ngx-flexible-layout/flex';
import { GridModule } from 'ngx-flexible-layout/grid';
export * from 'ngx-flexible-layout/grid';
import { isPlatformServer } from '@angular/common';
import * as i0 from '@angular/core';
import { PLATFORM_ID, Inject, NgModule, Version } from '@angular/core';
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* FlexLayoutModule -- the main import for all utilities in the Angular Layout library
* * Will automatically provide Flex, Grid, and Extended modules for use in the application
* * Can be configured using the static withConfig method, options viewable on the Wiki's
* Configuration page
*/
class FlexLayoutModule {
/**
* Initialize the FlexLayoutModule with a set of config options,
* which sets the corresponding tokens accordingly
*/
static withConfig(configOptions,
// tslint:disable-next-line:max-line-length
breakpoints = []) {
return {
ngModule: FlexLayoutModule,
providers: configOptions.serverLoaded ?
[
{ provide: LAYOUT_CONFIG, useValue: { ...DEFAULT_CONFIG, ...configOptions } },
{ provide: BREAKPOINT, useValue: breakpoints, multi: true },
{ provide: SERVER_TOKEN, useValue: true },
] : [
{ provide: LAYOUT_CONFIG, useValue: { ...DEFAULT_CONFIG, ...configOptions } },
{ provide: BREAKPOINT, useValue: breakpoints, multi: true },
]
};
}
constructor(serverModuleLoaded, platformId) {
if (isPlatformServer(platformId) && !serverModuleLoaded) {
console.warn('Warning: Flex Layout loaded on the server without FlexLayoutServerModule');
}
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: FlexLayoutModule, deps: [{ token: SERVER_TOKEN }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.NgModule });
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: FlexLayoutModule, imports: [FlexModule, ExtendedModule, GridModule], exports: [FlexModule, ExtendedModule, GridModule] });
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: FlexLayoutModule, imports: [FlexModule, ExtendedModule, GridModule, FlexModule, ExtendedModule, GridModule] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: FlexLayoutModule, decorators: [{
type: NgModule,
args: [{
imports: [FlexModule, ExtendedModule, GridModule],
exports: [FlexModule, ExtendedModule, GridModule]
}]
}], ctorParameters: () => [{ type: undefined, decorators: [{
type: Inject,
args: [SERVER_TOKEN]
}] }, { type: Object, decorators: [{
type: Inject,
args: [PLATFORM_ID]
}] }] });
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/** Current version of Angular Flex-Layout. */
const VERSION = new Version('21.0.1');
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @module
* @description
* Entry point for all public APIs of Angular Flex-Layout.
*/
/**
* Generated bundle index. Do not edit.
*/
export { FlexLayoutModule, VERSION };
//# sourceMappingURL=ngx-flexible-layout.mjs.map