Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
470 changes: 296 additions & 174 deletions angular.json

Large diffs are not rendered by default.

1,238 changes: 305 additions & 933 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"
"test": "ng test",
"run:all": "node node_modules/@angular-architects/module-federation/src/server/mf-dev-server.js"
},
"private": true,
"dependencies": {
"@angular-architects/module-federation": "^18.0.4",
"@angular-devkit/schematics": "14.2.12",
"@angular-material-components/datetime-picker": "8.0.0",
"@angular/animations": "14.3.0",
Expand Down Expand Up @@ -39,6 +41,7 @@
"install": "^0.13.0",
"lodash": "4.17.21",
"moment": "^2.29.4",
"ngx-build-plus": "^14.0.0",
"ngx-mat-select-search": "5.0.0",
"rxjs": "~7.5.0",
"tslib": "^2.3.0",
Expand Down Expand Up @@ -79,6 +82,8 @@
"karma-jasmine": "^5.1.0",
"karma-jasmine-html-reporter": "^2.0.0",
"karma-junit-reporter": "1.2.0",
"ng-packagr": "^14.2.0",
"ngx-build-plus": "^18.0.0",
"prettier": "^3.0.1",
"protractor": "~7.0.0",
"puppeteer": "^15.3.2",
Expand All @@ -89,7 +94,6 @@
"tailwindcss": "^3.3.3",
"ts-node": "8.2.0",
"tslint": "~6.1.0",
"typescript": "4.6.4",
"ng-packagr": "^14.2.0"
"typescript": "4.6.4"
}
}
18 changes: 18 additions & 0 deletions projects/mifosx-app/src/bootstrap.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* Entry point of the application.
* Only platform bootstrapping code should be here.
* For app-specific initialization, use `app/web-app.component.ts`.
*/

import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

import { AppModule } from './app/app.module';
import { environment } from './environments/environment';

if (environment.production) {
enableProdMode();
}

platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.log(err));
20 changes: 2 additions & 18 deletions projects/mifosx-app/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,2 @@
/**
* Entry point of the application.
* Only platform bootstrapping code should be here.
* For app-specific initialization, use `app/web-app.component.ts`.
*/

import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

import { AppModule } from './app/app.module';
import { environment } from './environments/environment';

if (environment.production) {
enableProdMode();
}

platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.log(err));
import('./bootstrap')
.catch(err => console.error(err));
3 changes: 1 addition & 2 deletions projects/mifosx-app/tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "../../tsconfig.json",
"compilerOptions": {
Expand All @@ -12,4 +11,4 @@
"include": [
"src/**/*.d.ts"
]
}
}
15 changes: 15 additions & 0 deletions projects/mifosx-app/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const { shareAll, withModuleFederationPlugin } = require('@angular-architects/module-federation/webpack');

module.exports = withModuleFederationPlugin({

name: 'mfe1',

exposes: {
'./AppModule': './projects/mifosx-app/src/app/app.module.ts',
},

shared: {
...shareAll({ singleton: true, strictVersion: true, requiredVersion: 'auto' }),
},

});
1 change: 1 addition & 0 deletions projects/mifosx-app/webpack.prod.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('./webpack.config');
16 changes: 16 additions & 0 deletions projects/mifosx-shell/.browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support

# You can see what browsers were selected by your queries by running:
# npx browserslist

last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
44 changes: 44 additions & 0 deletions projects/mifosx-shell/karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html

module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
jasmine: {
// you can add configuration options for Jasmine here
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
// for example, you can disable the random execution with `random: false`
// or set a specific seed with `seed: 4321`
},
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
jasmineHtmlReporter: {
suppressAll: true // removes the duplicated traces
},
coverageReporter: {
dir: require('path').join(__dirname, '../../coverage/mifosx-shell'),
subdir: '.',
reporters: [
{ type: 'html' },
{ type: 'text-summary' }
]
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true
});
};
23 changes: 23 additions & 0 deletions projects/mifosx-shell/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { loadRemoteModule } from '@angular-architects/module-federation';
import { HomeComponent } from './home/home.component';

const routes: Routes = [
{
path: "",
component: HomeComponent,
pathMatch: 'full'
},
{
path: 'mfe1',
loadChildren: () => import('mfe1/AppModule').then(m => m.AppModule)
}

];

@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }
1 change: 1 addition & 0 deletions projects/mifosx-shell/src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<router-outlet></router-outlet>
Empty file.
35 changes: 35 additions & 0 deletions projects/mifosx-shell/src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { AppComponent } from './app.component';

describe('AppComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [
RouterTestingModule
],
declarations: [
AppComponent
],
}).compileComponents();
});

it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app).toBeTruthy();
});

it(`should have as title 'mifosx-shell'`, () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app.title).toEqual('mifosx-shell');
});

it('should render title', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement as HTMLElement;
expect(compiled.querySelector('.content span')?.textContent).toContain('mifosx-shell app is running!');
});
});
10 changes: 10 additions & 0 deletions projects/mifosx-shell/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Component } from '@angular/core';

@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent {
title = 'mifosx-shell';
}
18 changes: 18 additions & 0 deletions projects/mifosx-shell/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';

@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
AppRoutingModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
1 change: 1 addition & 0 deletions projects/mifosx-shell/src/app/home/home.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1>Host is running!</h1>
Empty file.
Empty file.
10 changes: 10 additions & 0 deletions projects/mifosx-shell/src/app/home/home.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Component } from '@angular/core';

@Component({
selector: 'mifosx-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.scss']
})
export class HomeComponent {
title = 'mifosx-home';
}
Empty file.
12 changes: 12 additions & 0 deletions projects/mifosx-shell/src/bootstrap.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

import { AppModule } from './app/app.module';
import { environment } from './environments/environment';

if (environment.production) {
enableProdMode();
}

platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));
1 change: 1 addition & 0 deletions projects/mifosx-shell/src/declare.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare module "mfe1/AppModule";
3 changes: 3 additions & 0 deletions projects/mifosx-shell/src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const environment = {
production: true
};
16 changes: 16 additions & 0 deletions projects/mifosx-shell/src/environments/environment.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// This file can be replaced during build by using the `fileReplacements` array.
// `ng build` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.

export const environment = {
production: false
};

/*
* For easier debugging in development mode, you can import the following file
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
*
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
Binary file added projects/mifosx-shell/src/favicon.ico
Binary file not shown.
13 changes: 13 additions & 0 deletions projects/mifosx-shell/src/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Mifosx Host</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<app-root></app-root>
</body>
</html>
2 changes: 2 additions & 0 deletions projects/mifosx-shell/src/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import('./bootstrap')
.catch(err => console.error(err));
53 changes: 53 additions & 0 deletions projects/mifosx-shell/src/polyfills.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/**
* This file includes polyfills needed by Angular and is loaded before the app.
* You can add your own extra polyfills to this file.
*
* This file is divided into 2 sections:
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
* file.
*
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
* automatically update themselves. This includes recent versions of Safari, Chrome (including
* Opera), Edge on the desktop, and iOS and Chrome on mobile.
*
* Learn more in https://angular.io/guide/browser-support
*/

/***************************************************************************************************
* BROWSER POLYFILLS
*/

/**
* By default, zone.js will patch all possible macroTask and DomEvents
* user can disable parts of macroTask/DomEvents patch by setting following flags
* because those flags need to be set before `zone.js` being loaded, and webpack
* will put import in the top of bundle, so user need to create a separate file
* in this directory (for example: zone-flags.ts), and put the following flags
* into that file, and then add the following code before importing zone.js.
* import './zone-flags';
*
* The flags allowed in zone-flags.ts are listed here.
*
* The following flags will work for all browsers.
*
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
*
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
* with the following flag, it will bypass `zone.js` patch for IE/Edge
*
* (window as any).__Zone_enable_cross_context_check = true;
*
*/

/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js'; // Included with Angular CLI.


/***************************************************************************************************
* APPLICATION IMPORTS
*/
1 change: 1 addition & 0 deletions projects/mifosx-shell/src/styles.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* You can add global styles to this file, and also import other style files */
Loading