1 | import * as i0 from '@angular/core';
|
2 | import { Version, PLATFORM_ID, NgModule, Inject } from '@angular/core';
|
3 | import { LAYOUT_CONFIG, DEFAULT_CONFIG, BREAKPOINT, SERVER_TOKEN } from '@angular/flex-layout/core';
|
4 | export * from '@angular/flex-layout/core';
|
5 | import { ExtendedModule } from '@angular/flex-layout/extended';
|
6 | export * from '@angular/flex-layout/extended';
|
7 | import { FlexModule } from '@angular/flex-layout/flex';
|
8 | export * from '@angular/flex-layout/flex';
|
9 | import { GridModule } from '@angular/flex-layout/grid';
|
10 | export * from '@angular/flex-layout/grid';
|
11 | import { isPlatformServer } from '@angular/common';
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 | const VERSION = new Version('15.0.0-beta.42');
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 | class FlexLayoutModule {
|
37 | constructor(serverModuleLoaded, platformId) {
|
38 | if (isPlatformServer(platformId) && !serverModuleLoaded) {
|
39 | console.warn('Warning: Flex Layout loaded on the server without FlexLayoutServerModule');
|
40 | }
|
41 | }
|
42 | |
43 |
|
44 |
|
45 |
|
46 | static withConfig(configOptions,
|
47 |
|
48 | breakpoints = []) {
|
49 | return {
|
50 | ngModule: FlexLayoutModule,
|
51 | providers: configOptions.serverLoaded ?
|
52 | [
|
53 | { provide: LAYOUT_CONFIG, useValue: { ...DEFAULT_CONFIG, ...configOptions } },
|
54 | { provide: BREAKPOINT, useValue: breakpoints, multi: true },
|
55 | { provide: SERVER_TOKEN, useValue: true },
|
56 | ] : [
|
57 | { provide: LAYOUT_CONFIG, useValue: { ...DEFAULT_CONFIG, ...configOptions } },
|
58 | { provide: BREAKPOINT, useValue: breakpoints, multi: true },
|
59 | ]
|
60 | };
|
61 | }
|
62 | }
|
63 | FlexLayoutModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: FlexLayoutModule, deps: [{ token: SERVER_TOKEN }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.NgModule });
|
64 | FlexLayoutModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: FlexLayoutModule, imports: [FlexModule, ExtendedModule, GridModule], exports: [FlexModule, ExtendedModule, GridModule] });
|
65 | FlexLayoutModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: FlexLayoutModule, imports: [FlexModule, ExtendedModule, GridModule, FlexModule, ExtendedModule, GridModule] });
|
66 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: FlexLayoutModule, decorators: [{
|
67 | type: NgModule,
|
68 | args: [{
|
69 | imports: [FlexModule, ExtendedModule, GridModule],
|
70 | exports: [FlexModule, ExtendedModule, GridModule]
|
71 | }]
|
72 | }], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
73 | type: Inject,
|
74 | args: [SERVER_TOKEN]
|
75 | }] }, { type: Object, decorators: [{
|
76 | type: Inject,
|
77 | args: [PLATFORM_ID]
|
78 | }] }]; } });
|
79 |
|
80 |
|
81 |
|
82 |
|
83 |
|
84 |
|
85 |
|
86 |
|
87 |
|
88 |
|
89 |
|
90 |
|
91 |
|
92 | export { FlexLayoutModule, VERSION };
|
93 |
|