@c8y/application 1021.80.1 → 1022.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cumulocity.config.ts +3 -2
- package/package.json +13 -12
- package/src/app/app.config.ts +11 -0
- package/src/bootstrap.ts +8 -6
- package/src/main.ts +7 -10
- package/src/app/app.module.ts +0 -9
package/cumulocity.config.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { ConfigurationOptions } from '@c8y/devkit';
|
|
2
|
-
import { version, name } from './package.json';
|
|
2
|
+
import { version, name, license } from './package.json';
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
runTime: {
|
|
6
6
|
version,
|
|
7
7
|
name,
|
|
8
|
-
dynamicOptionsUrl: true
|
|
8
|
+
dynamicOptionsUrl: true,
|
|
9
|
+
license
|
|
9
10
|
},
|
|
10
11
|
buildTime: {
|
|
11
12
|
federation: [
|
package/package.json
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c8y/application",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1022.3.2",
|
|
4
4
|
"description": "This package is used to scaffold a default application for Cumulocity IoT.",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@c8y/style": "
|
|
7
|
-
"@c8y/ngx-components": "
|
|
8
|
-
"@c8y/client": "
|
|
9
|
-
"@c8y/bootstrap": "
|
|
10
|
-
"@angular/cdk": "^
|
|
11
|
-
"ngx-bootstrap": "
|
|
12
|
-
"rxjs": "
|
|
6
|
+
"@c8y/style": "1022.3.2",
|
|
7
|
+
"@c8y/ngx-components": "1022.3.2",
|
|
8
|
+
"@c8y/client": "1022.3.2",
|
|
9
|
+
"@c8y/bootstrap": "1022.3.2",
|
|
10
|
+
"@angular/cdk": "^19.2.18",
|
|
11
|
+
"ngx-bootstrap": "19.0.2",
|
|
12
|
+
"rxjs": "7.8.1"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@c8y/options": "
|
|
16
|
-
"@c8y/devkit": "
|
|
15
|
+
"@c8y/options": "1022.3.2",
|
|
16
|
+
"@c8y/devkit": "1022.3.2"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
"@angular/common": ">=
|
|
19
|
+
"@angular/common": ">=19 <20"
|
|
20
20
|
},
|
|
21
|
-
"author": "Cumulocity GmbH"
|
|
21
|
+
"author": "Cumulocity GmbH",
|
|
22
|
+
"license": "Apache-2.0"
|
|
22
23
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ApplicationConfig, importProvidersFrom } from '@angular/core';
|
|
2
|
+
import { provideAnimations } from '@angular/platform-browser/animations';
|
|
3
|
+
import { CoreModule, RouterModule } from '@c8y/ngx-components';
|
|
4
|
+
|
|
5
|
+
export const appConfig: ApplicationConfig = {
|
|
6
|
+
providers: [
|
|
7
|
+
provideAnimations(),
|
|
8
|
+
importProvidersFrom(RouterModule.forRoot()),
|
|
9
|
+
importProvidersFrom(CoreModule.forRoot())
|
|
10
|
+
]
|
|
11
|
+
};
|
package/src/bootstrap.ts
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import './polyfills';
|
|
2
|
+
import '@angular/compiler';
|
|
2
3
|
|
|
3
4
|
import { enableProdMode } from '@angular/core';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
5
|
+
import { bootstrapApplication } from '@angular/platform-browser';
|
|
6
|
+
import { BootstrapMetaData } from '@c8y/bootstrap';
|
|
7
|
+
import { BootstrapComponent, provideBootstrapMetadata } from '@c8y/ngx-components';
|
|
8
|
+
import { appConfig } from './app/app.config';
|
|
6
9
|
|
|
7
10
|
declare const __MODE__: string;
|
|
8
11
|
if (__MODE__ === 'production') {
|
|
9
12
|
enableProdMode();
|
|
10
13
|
}
|
|
11
14
|
|
|
12
|
-
export function bootstrap() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
.catch(err => console.log(err));
|
|
15
|
+
export function bootstrap(metadata: BootstrapMetaData) {
|
|
16
|
+
appConfig.providers.push(...provideBootstrapMetadata(metadata));
|
|
17
|
+
return bootstrapApplication(BootstrapComponent, appConfig).catch(err => console.log(err));
|
|
16
18
|
}
|
package/src/main.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import './i18n';
|
|
2
|
-
import { applyOptions, loadOptions } from '@c8y/bootstrap';
|
|
3
2
|
|
|
4
3
|
const barHolder: HTMLElement | null = document.querySelector('body > .init-load');
|
|
5
4
|
export const removeProgress = () => barHolder?.parentNode?.removeChild(barHolder);
|
|
@@ -7,14 +6,12 @@ export const removeProgress = () => barHolder?.parentNode?.removeChild(barHolder
|
|
|
7
6
|
applicationSetup();
|
|
8
7
|
|
|
9
8
|
async function applicationSetup() {
|
|
10
|
-
await
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
const { loadMetaDataAndPerformBootstrap } = await import('@c8y/bootstrap');
|
|
10
|
+
const loadBootstrapModule = () =>
|
|
11
|
+
import(
|
|
12
|
+
/* webpackPreload: true */
|
|
13
|
+
'./bootstrap'
|
|
14
|
+
);
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
/* webpackPreload: true */
|
|
16
|
-
'./bootstrap'
|
|
17
|
-
);
|
|
18
|
-
const bootstrapApp = mod.bootstrap;
|
|
19
|
-
return bootstrapApp().then(removeProgress);
|
|
16
|
+
loadMetaDataAndPerformBootstrap(loadBootstrapModule).then(removeProgress);
|
|
20
17
|
}
|
package/src/app/app.module.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
3
|
-
import { CoreModule, BootstrapComponent, RouterModule } from '@c8y/ngx-components';
|
|
4
|
-
|
|
5
|
-
@NgModule({
|
|
6
|
-
imports: [BrowserAnimationsModule, RouterModule.forRoot([]), CoreModule.forRoot()],
|
|
7
|
-
bootstrap: [BootstrapComponent]
|
|
8
|
-
})
|
|
9
|
-
export class AppModule {}
|