@wavemaker/angular-app 11.7.5-1.5782
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/.npmrc +1 -0
- package/angular.json +269 -0
- package/build-scripts/build.js +35 -0
- package/build-scripts/index-html-transform.js +28 -0
- package/build-scripts/optimize-css.gulpfile.js +101 -0
- package/build-scripts/post-build.js +311 -0
- package/dependencies/app.component.html +28 -0
- package/dependencies/expression-parser.cjs.js +50533 -0
- package/dependencies/pipe-provider.cjs.js +206320 -0
- package/dependencies/transpilation-mobile.cjs.js +93287 -0
- package/dependencies/transpilation-web.cjs.js +104478 -0
- package/package-lock.json +25051 -0
- package/package.json +132 -0
- package/pwa-assets/icons/icon-128x128.png +0 -0
- package/pwa-assets/icons/icon-144x144.png +0 -0
- package/pwa-assets/icons/icon-152x152.png +0 -0
- package/pwa-assets/icons/icon-192x192.png +0 -0
- package/pwa-assets/icons/icon-384x384.png +0 -0
- package/pwa-assets/icons/icon-512x512.png +0 -0
- package/pwa-assets/icons/icon-72x72.png +0 -0
- package/pwa-assets/icons/icon-96x96.png +0 -0
- package/pwa-assets/manifest.json +59 -0
- package/pwa-assets/ngsw-config.json +30 -0
- package/pwa-assets/wmsw-worker.js +24 -0
- package/src/.browserslistrc +12 -0
- package/src/app/app-codegen.module.ts +11 -0
- package/src/app/app.component.css +0 -0
- package/src/app/app.component.script.js +3 -0
- package/src/app/app.component.variables.ts +3 -0
- package/src/app/app.routes.ts +5 -0
- package/src/app/lazy-load-scripts.resolve.ts +20 -0
- package/src/app/prefabs/prefab-config.js +2 -0
- package/src/app/wm-project-properties.ts +3 -0
- package/src/assets/.gitkeep +0 -0
- package/src/assets/print.css +32 -0
- package/src/environments/environment.dev.ts +3 -0
- package/src/environments/environment.prod.ts +3 -0
- package/src/environments/environment.ts +16 -0
- package/src/framework/angular1.polyfills.ts +36 -0
- package/src/framework/services/app-extension.service.ts +20 -0
- package/src/framework/services/app-js-provider.service.ts +15 -0
- package/src/framework/services/app-variables-provider.service.ts +15 -0
- package/src/framework/services/component-ref-provider.service.ts +40 -0
- package/src/framework/services/lazy-component-ref-provider.service.ts +64 -0
- package/src/framework/services/prefab-config-provider.service.ts +13 -0
- package/src/framework/util/lazy-module-routes.ts +4 -0
- package/src/framework/util/page-util.ts +5 -0
- package/src/index.html +17 -0
- package/src/main.ts +30 -0
- package/src/polyfills.ts +53 -0
- package/src/setup-jest.js +120 -0
- package/src/styles.css +1 -0
- package/src/tsconfig.app.json +14 -0
- package/src/tslint.json +17 -0
- package/tsconfig.json +131 -0
- package/tsconfig.web-app.json +102 -0
- package/wm-custom-webpack.config.js +94 -0
package/src/main.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ApplicationRef, enableProdMode, NgModuleRef } from '@angular/core';
|
|
2
|
+
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
3
|
+
|
|
4
|
+
import { AppModule } from './app/app.module';
|
|
5
|
+
import { environment } from './environments/environment';
|
|
6
|
+
|
|
7
|
+
import initWmProjectProperties from './app/wm-project-properties';
|
|
8
|
+
|
|
9
|
+
initWmProjectProperties();
|
|
10
|
+
|
|
11
|
+
if (environment.production) {
|
|
12
|
+
enableProdMode();
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
16
|
+
new Promise<Event | void>( resolve => {
|
|
17
|
+
if (window['cordova']) {
|
|
18
|
+
document.addEventListener('deviceready', resolve);
|
|
19
|
+
} else {
|
|
20
|
+
resolve();
|
|
21
|
+
}
|
|
22
|
+
}).then(() => platformBrowserDynamic().bootstrapModule(AppModule))
|
|
23
|
+
.then((appModuleRef: NgModuleRef<AppModule>) => {
|
|
24
|
+
const applicationRef = appModuleRef.injector.get(ApplicationRef);
|
|
25
|
+
window.addEventListener('unload', () => {
|
|
26
|
+
applicationRef.components.map(c => c && c.destroy());
|
|
27
|
+
});
|
|
28
|
+
console.timeEnd('bootstrap'), err => console.log(err);
|
|
29
|
+
}, err => console.log(err));
|
|
30
|
+
});
|
package/src/polyfills.ts
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file includes polyfills needed by Angular and is loaded before the app.
|
|
3
|
+
* You can add your own extra polyfills to this file.
|
|
4
|
+
*
|
|
5
|
+
* This file is divided into 2 sections:
|
|
6
|
+
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
|
|
7
|
+
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
|
|
8
|
+
* file.
|
|
9
|
+
*
|
|
10
|
+
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
|
|
11
|
+
* automatically update themselves. This includes recent versions of Safari, Chrome (including
|
|
12
|
+
* Opera), Edge on the desktop, and iOS and Chrome on mobile.
|
|
13
|
+
*
|
|
14
|
+
* Learn more in https://angular.io/guide/browser-support
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/***************************************************************************************************
|
|
18
|
+
* BROWSER POLYFILLS
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* By default, zone.js will patch all possible macroTask and DomEvents
|
|
23
|
+
* user can disable parts of macroTask/DomEvents patch by setting following flags
|
|
24
|
+
* because those flags need to be set before `zone.js` being loaded, and webpack
|
|
25
|
+
* will put import in the top of bundle, so user need to create a separate file
|
|
26
|
+
* in this directory (for example: zone-flags.ts), and put the following flags
|
|
27
|
+
* into that file, and then add the following code before importing zone.js.
|
|
28
|
+
* import './zone-flags';
|
|
29
|
+
*
|
|
30
|
+
* The flags allowed in zone-flags.ts are listed here.
|
|
31
|
+
*
|
|
32
|
+
* The following flags will work for all browsers.
|
|
33
|
+
*
|
|
34
|
+
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
|
|
35
|
+
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
|
|
36
|
+
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
|
|
37
|
+
*
|
|
38
|
+
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
|
|
39
|
+
* with the following flag, it will bypass `zone.js` patch for IE/Edge
|
|
40
|
+
*
|
|
41
|
+
* (window as any).__Zone_enable_cross_context_check = true;
|
|
42
|
+
*
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
/***************************************************************************************************
|
|
46
|
+
* Zone JS is required by default for Angular itself.
|
|
47
|
+
*/
|
|
48
|
+
import 'zone.js'; // Included with Angular CLI.
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
/***************************************************************************************************
|
|
52
|
+
* APPLICATION IMPORTS
|
|
53
|
+
*/
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import "jest-preset-angular/setup-jest";
|
|
2
|
+
import { ToastrModule } from 'ngx-toastr';
|
|
3
|
+
import { TestBed } from '@angular/core/testing';
|
|
4
|
+
import _ from 'lodash-es';
|
|
5
|
+
import 'jest-canvas-mock';
|
|
6
|
+
|
|
7
|
+
// Mock global objects if necessary
|
|
8
|
+
global.jQuery = require("jquery");
|
|
9
|
+
global.$ = global.jQuery;
|
|
10
|
+
global._ = _;
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
global.moment = require("moment");
|
|
14
|
+
|
|
15
|
+
class IntersectionObserver {
|
|
16
|
+
constructor(callback, options) {
|
|
17
|
+
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
observe(element) {
|
|
21
|
+
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
unobserve() {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
disconnect() {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
global.IntersectionObserver = IntersectionObserver;
|
|
33
|
+
// jest.setup.js
|
|
34
|
+
|
|
35
|
+
// Mock MSCSSMatrix
|
|
36
|
+
class MockMSCSSMatrix {
|
|
37
|
+
constructor() {
|
|
38
|
+
// Initialize with default values or any necessary properties
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Add any methods that your tests might call
|
|
42
|
+
setMatrixValue(value) {
|
|
43
|
+
// Mock implementation of setMatrixValue
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
multiply(matrix) {
|
|
47
|
+
// Mock implementation of multiply
|
|
48
|
+
return this;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Add other methods as needed
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Attach the mock to the global scope
|
|
55
|
+
global.MSCSSMatrix = MockMSCSSMatrix;
|
|
56
|
+
|
|
57
|
+
import "jquery-ui/ui/disable-selection.js";
|
|
58
|
+
import "jquery-ui/ui/version.js";
|
|
59
|
+
import "jquery-ui/ui/widget.js";
|
|
60
|
+
import "jquery-ui/ui/scroll-parent.js";
|
|
61
|
+
import "jquery-ui/ui/plugin.js";
|
|
62
|
+
import "jquery-ui/ui/data.js";
|
|
63
|
+
import "jquery-ui/ui/widgets/mouse.js";
|
|
64
|
+
import "jquery-ui/ui/widgets/resizable.js";
|
|
65
|
+
import "jquery-ui/ui/widgets/sortable.js";
|
|
66
|
+
import "jquery-ui/ui/widgets/draggable.js";
|
|
67
|
+
import "jquery-ui/ui/widgets/droppable.js";
|
|
68
|
+
import "libraries/scripts/jquery.ui.touch-punch/jquery.ui.touch-punch.min.js";
|
|
69
|
+
import "moment-timezone/builds/moment-timezone.min.js";
|
|
70
|
+
import "hammerjs/hammer.min.js";
|
|
71
|
+
import "iscroll/build/iscroll.js";
|
|
72
|
+
import "tabbable/dist/index.umd.min.js";
|
|
73
|
+
import "@wavemaker/focus-trap/dist/focus-trap.umd.min.js";
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
beforeEach(() => {
|
|
78
|
+
TestBed.configureTestingModule({
|
|
79
|
+
imports : [
|
|
80
|
+
ToastrModule.forRoot(),
|
|
81
|
+
],
|
|
82
|
+
})
|
|
83
|
+
Object.defineProperties(window, {
|
|
84
|
+
location: {
|
|
85
|
+
writable: true,
|
|
86
|
+
value: {
|
|
87
|
+
reload: jest.fn(),
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
// jest.setup.js
|
|
94
|
+
Object.defineProperty(global.HTMLMediaElement.prototype, 'load', {
|
|
95
|
+
configurable: true,
|
|
96
|
+
enumerable: true,
|
|
97
|
+
writable: true,
|
|
98
|
+
value: jest.fn(),
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
Object.defineProperty(global.HTMLMediaElement.prototype, 'play', {
|
|
102
|
+
configurable: true,
|
|
103
|
+
enumerable: true,
|
|
104
|
+
writable: true,
|
|
105
|
+
value: jest.fn().mockResolvedValue(),
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
Object.defineProperty(global.HTMLMediaElement.prototype, 'pause', {
|
|
109
|
+
configurable: true,
|
|
110
|
+
enumerable: true,
|
|
111
|
+
writable: true,
|
|
112
|
+
value: jest.fn(),
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
Object.defineProperty(global.HTMLMediaElement.prototype, 'addTextTrack', {
|
|
116
|
+
configurable: true,
|
|
117
|
+
enumerable: true,
|
|
118
|
+
writable: true,
|
|
119
|
+
value: jest.fn(),
|
|
120
|
+
});
|
package/src/styles.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/* You can add global styles to this file, and also import other style files */
|
package/src/tslint.json
ADDED
package/tsconfig.json
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compileOnSave": false,
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"baseUrl": "./",
|
|
5
|
+
"outDir": "./dist/out-tsc",
|
|
6
|
+
"downlevelIteration": true,
|
|
7
|
+
"declaration": false,
|
|
8
|
+
"sourceMap": true,
|
|
9
|
+
"emitDecoratorMetadata": true,
|
|
10
|
+
"experimentalDecorators": true,
|
|
11
|
+
"esModuleInterop": true,
|
|
12
|
+
"moduleResolution": "node",
|
|
13
|
+
"target": "ES2022",
|
|
14
|
+
"module": "ES2022",
|
|
15
|
+
"typeRoots": [
|
|
16
|
+
"node_modules/@types"
|
|
17
|
+
],
|
|
18
|
+
"paths": {
|
|
19
|
+
"rxjs/observable/throw": [
|
|
20
|
+
"node_modules/rxjs-compat/_esm2015/observable/throw"
|
|
21
|
+
],
|
|
22
|
+
"rxjs/observable/*": [
|
|
23
|
+
"node_modules/rxjs-compat/_esm2015/observable/*"
|
|
24
|
+
],
|
|
25
|
+
"rxjs/Observable": [
|
|
26
|
+
"node_modules/rxjs-compat/_esm2015/Observable"
|
|
27
|
+
],
|
|
28
|
+
"@wm/build-task": [
|
|
29
|
+
"node_modules/@wavemaker/app-ng-runtime/build-task/"
|
|
30
|
+
],
|
|
31
|
+
"@wm/mobile-build-task": [
|
|
32
|
+
"node_modules/@wavemaker/app-ng-runtime/mobile-build-task"
|
|
33
|
+
],
|
|
34
|
+
"@wm/core": [
|
|
35
|
+
"node_modules/@wavemaker/app-ng-runtime/core/index.d.ts"
|
|
36
|
+
],
|
|
37
|
+
"@wavemaker/variables": [
|
|
38
|
+
"node_modules/@wavemaker/variables/"
|
|
39
|
+
],
|
|
40
|
+
"@wm/components/base": [
|
|
41
|
+
"node_modules/@wavemaker/app-ng-runtime/components/base/public_api.d.ts"
|
|
42
|
+
],
|
|
43
|
+
"@wm/components/basic": [
|
|
44
|
+
"node_modules/@wavemaker/app-ng-runtime/components/basic/default/index.d.ts"
|
|
45
|
+
],
|
|
46
|
+
"@wm/components/input": [
|
|
47
|
+
"node_modules/@wavemaker/app-ng-runtime/components/input/default/index.d.ts"
|
|
48
|
+
],
|
|
49
|
+
"@wm/components/page": [
|
|
50
|
+
"node_modules/@wavemaker/app-ng-runtime/components/page/default/index.d.ts"
|
|
51
|
+
],
|
|
52
|
+
"@wm/mobile/components/basic": [
|
|
53
|
+
"node_modules/@wavemaker/app-ng-runtime/mobile/components/basic/default/index.d.ts"
|
|
54
|
+
],
|
|
55
|
+
"@wm/mobile/components/page": [
|
|
56
|
+
"node_modules/@wavemaker/app-ng-runtime/mobile/components/page/default/index.d.ts"
|
|
57
|
+
],
|
|
58
|
+
"@wm/components/dialogs": [
|
|
59
|
+
"node_modules/@wavemaker/app-ng-runtime/components/dialogs/default/index.d.ts"
|
|
60
|
+
],
|
|
61
|
+
"@wm/mobile/components/*": [
|
|
62
|
+
"node_modules/@wavemaker/app-ng-runtime/mobile/components/*"
|
|
63
|
+
],
|
|
64
|
+
"@wm/components/*": [
|
|
65
|
+
"node_modules/@wavemaker/app-ng-runtime/components/*"
|
|
66
|
+
],
|
|
67
|
+
"@wm/transpiler": [
|
|
68
|
+
"node_modules/@wavemaker/app-ng-runtime/transpiler/index.d.ts"
|
|
69
|
+
],
|
|
70
|
+
"@wm/security": [
|
|
71
|
+
"node_modules/@wavemaker/app-ng-runtime/security/index.d.ts"
|
|
72
|
+
],
|
|
73
|
+
"@swipey": [
|
|
74
|
+
"node_modules/@wavemaker/app-ng-runtime/swipey/index.d.ts"
|
|
75
|
+
],
|
|
76
|
+
"@wm/http": [
|
|
77
|
+
"node_modules/@wavemaker/app-ng-runtime/http/index.d.ts"
|
|
78
|
+
],
|
|
79
|
+
"@wm/oAuth": [
|
|
80
|
+
"node_modules/@wavemaker/app-ng-runtime/oAuth/index.d.ts"
|
|
81
|
+
],
|
|
82
|
+
"@wm/variables": [
|
|
83
|
+
"node_modules/@wavemaker/app-ng-runtime/variables/index.d.ts"
|
|
84
|
+
],
|
|
85
|
+
"@wm/mobile/core": [
|
|
86
|
+
"node_modules/@wavemaker/app-ng-runtime/mobile/core/index.d.ts"
|
|
87
|
+
],
|
|
88
|
+
"@wm/mobile/components": [
|
|
89
|
+
"node_modules/@wavemaker/app-ng-runtime/mobile/components/index.d.ts"
|
|
90
|
+
],
|
|
91
|
+
"@wm/mobile/offline": [
|
|
92
|
+
"node_modules/@wavemaker/app-ng-runtime/mobile/offline/index.d.ts"
|
|
93
|
+
],
|
|
94
|
+
"@wm/mobile/variables": [
|
|
95
|
+
"node_modules/@wavemaker/app-ng-runtime/mobile/variables/index.d.ts"
|
|
96
|
+
],
|
|
97
|
+
"@wm/runtime/base": [
|
|
98
|
+
"node_modules/@wavemaker/app-ng-runtime/runtime/base/index.d.ts"
|
|
99
|
+
],
|
|
100
|
+
"@wm/runtime/dynamic": [
|
|
101
|
+
"node_modules/@wavemaker/app-ng-runtime/runtime/dynamic/index.d.ts"
|
|
102
|
+
],
|
|
103
|
+
"@wm/mobile/runtime": [
|
|
104
|
+
"node_modules/@wavemaker/app-ng-runtime/mobile/runtime/index.d.ts"
|
|
105
|
+
],
|
|
106
|
+
"@wm/mobile/runtime/dynamic": [
|
|
107
|
+
"node_modules/@wavemaker/app-ng-runtime/mobile/runtime-dynamic/index.d.ts"
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
"lib": [
|
|
111
|
+
"es2020",
|
|
112
|
+
"dom"
|
|
113
|
+
],
|
|
114
|
+
"useDefineForClassFields": false,
|
|
115
|
+
"resolveJsonModule": true
|
|
116
|
+
},
|
|
117
|
+
"angularCompilerOptions": {
|
|
118
|
+
"compilationMode": "full",
|
|
119
|
+
"strictMetadataEmit": false,
|
|
120
|
+
"fullTemplateTypeCheck": false,
|
|
121
|
+
"extendedDiagnostics": {
|
|
122
|
+
"checks": {
|
|
123
|
+
"optionalChainNotNullable": "suppress"
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"enableI18nLegacyMessageIdFormat": false,
|
|
127
|
+
"strictInjectionParameters": false,
|
|
128
|
+
"strictInputAccessModifiers": false,
|
|
129
|
+
"trace": true
|
|
130
|
+
}
|
|
131
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compileOnSave": false,
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"baseUrl": "./",
|
|
5
|
+
"downlevelIteration": true,
|
|
6
|
+
"outDir": "./dist/out-tsc",
|
|
7
|
+
"sourceMap": true,
|
|
8
|
+
"declaration": false,
|
|
9
|
+
"target": "es2022",
|
|
10
|
+
"module": "es2020",
|
|
11
|
+
"moduleResolution": "node",
|
|
12
|
+
"emitDecoratorMetadata": true,
|
|
13
|
+
"experimentalDecorators": true,
|
|
14
|
+
"typeRoots": [
|
|
15
|
+
"node_modules/@types"
|
|
16
|
+
],
|
|
17
|
+
"lib": [
|
|
18
|
+
"es2018",
|
|
19
|
+
"dom"
|
|
20
|
+
],
|
|
21
|
+
"paths": {
|
|
22
|
+
"rxjs/observable/throw": [
|
|
23
|
+
"node_modules/rxjs-compat/_esm2015/observable/throw"
|
|
24
|
+
],
|
|
25
|
+
"rxjs/observable/*": [
|
|
26
|
+
"node_modules/rxjs-compat/_esm2015/observable/*"
|
|
27
|
+
],
|
|
28
|
+
"rxjs/Observable": [
|
|
29
|
+
"node_modules/rxjs-compat/_esm2015/Observable"
|
|
30
|
+
],
|
|
31
|
+
"@wm/build-task": [
|
|
32
|
+
"node_modules/@wavemaker/app-ng-runtime/build-task/"
|
|
33
|
+
],
|
|
34
|
+
"@wm/mobile-build-task": [
|
|
35
|
+
"node_modules/@wavemaker/app-ng-runtime/mobile-build-task"
|
|
36
|
+
],
|
|
37
|
+
"@wm/core": [
|
|
38
|
+
"node_modules/@wavemaker/app-ng-runtime/core"
|
|
39
|
+
],
|
|
40
|
+
"@wm/components/basic": [
|
|
41
|
+
"node_modules/@wavemaker/app-ng-runtime/components/basic/default"
|
|
42
|
+
],
|
|
43
|
+
"@wm/components/input": [
|
|
44
|
+
"node_modules/@wavemaker/app-ng-runtime/components/input/default"
|
|
45
|
+
],
|
|
46
|
+
"@wm/components/page": [
|
|
47
|
+
"node_modules/@wavemaker/app-ng-runtime/components/page/default"
|
|
48
|
+
],
|
|
49
|
+
"@wm/components/dialogs": [
|
|
50
|
+
"node_modules/@wavemaker/app-ng-runtime/components/dialogs/default"
|
|
51
|
+
],
|
|
52
|
+
"@wm/components/*": [
|
|
53
|
+
"node_modules/@wavemaker/app-ng-runtime/components/*"
|
|
54
|
+
],
|
|
55
|
+
"@wm/transpiler": [
|
|
56
|
+
"node_modules/@wavemaker/app-ng-runtime/transpiler"
|
|
57
|
+
],
|
|
58
|
+
"@wm/security": [
|
|
59
|
+
"node_modules/@wavemaker/app-ng-runtime/security"
|
|
60
|
+
],
|
|
61
|
+
"@swipey": [
|
|
62
|
+
"node_modules/@wavemaker/app-ng-runtime/swipey"
|
|
63
|
+
],
|
|
64
|
+
"@wm/http": [
|
|
65
|
+
"node_modules/@wavemaker/app-ng-runtime/http"
|
|
66
|
+
],
|
|
67
|
+
"@wm/oAuth": [
|
|
68
|
+
"node_modules/@wavemaker/app-ng-runtime/oAuth"
|
|
69
|
+
],
|
|
70
|
+
"@wm/variables": [
|
|
71
|
+
"node_modules/@wavemaker/app-ng-runtime/variables"
|
|
72
|
+
],
|
|
73
|
+
"@wm/mobile/core": [
|
|
74
|
+
"node_modules/@wavemaker/app-ng-runtime/mobile/core"
|
|
75
|
+
],
|
|
76
|
+
"@wm/mobile/components": [
|
|
77
|
+
"node_modules/@wavemaker/app-ng-runtime/mobile/components"
|
|
78
|
+
],
|
|
79
|
+
"@wm/mobile/offline": [
|
|
80
|
+
"node_modules/@wavemaker/app-ng-runtime/mobile/offline"
|
|
81
|
+
],
|
|
82
|
+
"@wm/mobile/variables": [
|
|
83
|
+
"node_modules/@wavemaker/app-ng-runtime/mobile/variables"
|
|
84
|
+
],
|
|
85
|
+
"@wm/runtime/base": [
|
|
86
|
+
"node_modules/@wavemaker/app-ng-runtime/runtime/base"
|
|
87
|
+
],
|
|
88
|
+
"@wm/runtime/dynamic": [
|
|
89
|
+
"node_modules/@wavemaker/app-ng-runtime/runtime/dynamic"
|
|
90
|
+
],
|
|
91
|
+
"@wm/mobile/runtime": [
|
|
92
|
+
"node_modules/@wavemaker/app-ng-runtime/mobile/placeholder/runtime"
|
|
93
|
+
],
|
|
94
|
+
"@wm/mobile/runtime-dynamic": [
|
|
95
|
+
"node_modules/@wavemaker/app-ng-runtime/mobile/placeholder/runtime/dynamic"
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"angularCompilerOptions": {
|
|
100
|
+
"compilationMode": "full"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
const CompressionPlugin = require(`compression-webpack-plugin`);
|
|
2
|
+
const path = require(`path`);
|
|
3
|
+
const {ConcatSource} = require("webpack-sources");
|
|
4
|
+
|
|
5
|
+
class ModifyCssAssetUrlsPlugin {
|
|
6
|
+
apply(compiler) {
|
|
7
|
+
compiler.hooks.compilation.tap('ModifyCssAssetUrlsPlugin', compilation => {
|
|
8
|
+
compilation.hooks.optimizeAssets.tapAsync('ModifyCssAssetUrlsPlugin', (assets, callback) => {
|
|
9
|
+
let publicPath = compilation.options.output.publicPath;
|
|
10
|
+
let isResourceWithDeployUrl = false;
|
|
11
|
+
for (const assetName in assets) {
|
|
12
|
+
if (!assets.hasOwnProperty(assetName)) continue;
|
|
13
|
+
|
|
14
|
+
const asset = assets[assetName];
|
|
15
|
+
if (asset.sourceAndMap) {
|
|
16
|
+
const sourceAndMap = asset.sourceAndMap();
|
|
17
|
+
let updatedSource = sourceAndMap.source;
|
|
18
|
+
// Handle potential non-string source (e.g., convert to string)
|
|
19
|
+
if (typeof updatedSource !== 'string') {
|
|
20
|
+
updatedSource = updatedSource.toString('utf-8');
|
|
21
|
+
}
|
|
22
|
+
let modifiedSource = updatedSource.replace(/url\((.*?)\)/g, (match, url) => {
|
|
23
|
+
isResourceWithDeployUrl = true;
|
|
24
|
+
|
|
25
|
+
let qUrl = url.slice(1, -1);
|
|
26
|
+
|
|
27
|
+
if (!qUrl.startsWith(publicPath)) {
|
|
28
|
+
return match;
|
|
29
|
+
} else {
|
|
30
|
+
const newUrl = this.modifyUrl(publicPath, qUrl);
|
|
31
|
+
let urlString = `url('${newUrl}')`;
|
|
32
|
+
return urlString;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
});
|
|
36
|
+
if (isResourceWithDeployUrl) {
|
|
37
|
+
isResourceWithDeployUrl = false;
|
|
38
|
+
assets[assetName] = new ConcatSource(modifiedSource);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
callback(null, assets);
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
modifyUrl(publicPath, url) {
|
|
48
|
+
let qUrl = url;
|
|
49
|
+
let resourceName = qUrl;
|
|
50
|
+
try {
|
|
51
|
+
const parsedUrl = new URL(qUrl);
|
|
52
|
+
resourceName = parsedUrl.pathname.split('/').pop();
|
|
53
|
+
} catch (e) {
|
|
54
|
+
//this is relative url
|
|
55
|
+
let parts = qUrl.split('/');
|
|
56
|
+
resourceName = parts[parts.length - 1];
|
|
57
|
+
}
|
|
58
|
+
let newUrl = `ng-bundle/${resourceName}`;
|
|
59
|
+
return newUrl;
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
module.exports = {
|
|
64
|
+
resolve:{
|
|
65
|
+
alias:{
|
|
66
|
+
themes: path.resolve(__dirname,`src/assets/themes/`)
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
plugins:[
|
|
70
|
+
new ModifyCssAssetUrlsPlugin(),
|
|
71
|
+
new CompressionPlugin({
|
|
72
|
+
test: /\.(js|css|html|svg|txt|eot|otf|ttf|gif)$/,
|
|
73
|
+
filename: "[name].gzip[ext]",
|
|
74
|
+
algorithm: "gzip"
|
|
75
|
+
}),
|
|
76
|
+
new CompressionPlugin({
|
|
77
|
+
test: /\.(js|css|html|svg|txt|eot|otf|ttf|gif)$/,
|
|
78
|
+
filename: "[name].br[ext]",
|
|
79
|
+
algorithm: "brotliCompress"
|
|
80
|
+
}),
|
|
81
|
+
],
|
|
82
|
+
optimization: {
|
|
83
|
+
splitChunks: {
|
|
84
|
+
automaticNameDelimiter:'-',
|
|
85
|
+
cacheGroups: {
|
|
86
|
+
vendor: {
|
|
87
|
+
minSize: 1000000,
|
|
88
|
+
maxSize: 1000000,
|
|
89
|
+
test: /[\\/]node_modules(?![\\/]wm)[\\/]/
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|