Skip to content

Commit eef778b

Browse files
Merge pull request #8 from Sujitha2610/1021490-dependabot-fix
1021490: Upgrade to angular 19 to resolve dependabot issue
2 parents c211333 + 6e0bcb3 commit eef778b

9 files changed

Lines changed: 135 additions & 149 deletions

File tree

Angular/angular.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,18 @@
6565
"serve": {
6666
"builder": "@angular-devkit/build-angular:dev-server",
6767
"options": {
68-
"browserTarget": "doc-editor-app:build"
68+
"buildTarget": "doc-editor-app:build"
6969
},
7070
"configurations": {
7171
"production": {
72-
"browserTarget": "doc-editor-app:build:production"
72+
"buildTarget": "doc-editor-app:build:production"
7373
}
7474
}
7575
},
7676
"extract-i18n": {
7777
"builder": "@angular-devkit/build-angular:extract-i18n",
7878
"options": {
79-
"browserTarget": "doc-editor-app:build"
79+
"buildTarget": "doc-editor-app:build"
8080
}
8181
},
8282
"test": {
@@ -124,5 +124,8 @@
124124
}
125125
}
126126
},
127-
"defaultProject": "doc-editor-app"
127+
"defaultProject": "doc-editor-app",
128+
"cli": {
129+
"analytics": "7368351e-6dc3-4f6d-a5ba-3c0eee6e2921"
130+
}
128131
}

Angular/package.json

Lines changed: 30 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -11,39 +11,36 @@
1111
},
1212
"private": true,
1313
"dependencies": {
14-
"@angular/animations": "~11.2.14",
15-
"@angular/common": "~11.2.14",
16-
"@angular/compiler": "~11.2.14",
17-
"@angular/core": "~11.2.14",
18-
"@angular/forms": "~11.2.14",
19-
"@angular/platform-browser": "~11.2.14",
20-
"@angular/platform-browser-dynamic": "~11.2.14",
21-
"@angular/router": "~11.2.14",
22-
"@syncfusion/ej2-angular-buttons": "^19.1.63",
23-
"@syncfusion/ej2-angular-documenteditor": "^19.1.65",
24-
"@syncfusion/ej2-angular-navigations": "^19.1.63",
25-
"@syncfusion/ej2-angular-splitbuttons": "^19.1.63",
26-
"rxjs": "~6.6.0",
27-
"tslib": "^2.0.0",
28-
"zone.js": "~0.11.3"
14+
"@angular/animations": "19.2.21",
15+
"@angular/common": "19.2.21",
16+
"@angular/compiler": "19.2.21",
17+
"@angular/core": "19.2.21",
18+
"@angular/forms": "19.2.21",
19+
"@angular/platform-browser": "19.2.21",
20+
"@angular/platform-browser-dynamic": "19.2.21",
21+
"@angular/router": "19.2.21",
22+
"@syncfusion/ej2-angular-buttons": "^23.1.36",
23+
"@syncfusion/ej2-angular-documenteditor": "^23.1.41",
24+
"@syncfusion/ej2-angular-navigations": "^23.1.36",
25+
"@syncfusion/ej2-angular-splitbuttons": "^23.1.36",
26+
"rxjs": "~7.8.1",
27+
"tslib": "^2.6.0",
28+
"zone.js": "~0.15.0"
2929
},
3030
"devDependencies": {
31-
"@angular-devkit/build-angular": "~0.1102.13",
32-
"@angular/cli": "~11.2.13",
33-
"@angular/compiler-cli": "~11.2.14",
34-
"@types/jasmine": "~3.6.0",
35-
"@types/node": "^12.11.1",
36-
"codelyzer": "^6.0.0",
37-
"jasmine-core": "~3.6.0",
38-
"jasmine-spec-reporter": "~5.0.0",
39-
"karma": "~6.1.0",
40-
"karma-chrome-launcher": "~3.1.0",
41-
"karma-coverage": "~2.0.3",
42-
"karma-jasmine": "~4.0.0",
43-
"karma-jasmine-html-reporter": "~1.5.0",
44-
"protractor": "~7.0.0",
45-
"ts-node": "~8.3.0",
46-
"tslint": "~6.1.0",
47-
"typescript": "~4.1.5"
31+
"@angular-devkit/build-angular": "19.2.21",
32+
"@angular/cli": "19.2.21",
33+
"@angular/compiler-cli": "19.2.21",
34+
35+
"@types/jasmine": "~5.1.0",
36+
"@types/node": "^20.11.30",
37+
"jasmine-core": "~5.1.0",
38+
"karma": "~6.4.4",
39+
"karma-chrome-launcher": "~3.2.0",
40+
"karma-coverage": "~2.2.1",
41+
"karma-jasmine": "~5.1.0",
42+
"karma-jasmine-html-reporter": "~2.1.0",
43+
44+
"typescript": "~5.6.3"
4845
}
49-
}
46+
}

Angular/src/app/app.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { TitleBar } from './title-bar';
44
import { isNullOrUndefined } from '@syncfusion/ej2-base';
55

66
@Component({
7+
standalone: false,
78
selector: 'app-root',
89
templateUrl: './app.component.html',
910
styleUrls: ['./app.component.css'],
@@ -15,7 +16,7 @@ export class AppComponent {
1516
public serviceLink: string;
1617
titleBar: TitleBar;
1718
constructor() {
18-
this.serviceLink = 'https://ej2services.syncfusion.com/production/web-services/api/documenteditor/';
19+
this.serviceLink = 'https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/';
1920
}
2021
onCreate(): void {
2122
let titleBarElement: HTMLElement = document.getElementById('default_title_bar');

Angular/src/polyfills.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
/***************************************************************************************************
5858
* Zone JS is required by default for Angular itself.
5959
*/
60-
import 'zone.js/dist/zone'; // Included with Angular CLI.
60+
import 'zone.js'; // Included with Angular CLI.
6161

6262

6363
/***************************************************************************************************

Vue/.babelrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"presets": [
3-
["env", { "modules": false }],
4-
"stage-3"
3+
["@babel/preset-env", { "modules": false }]
54
]
65
}
6+

Vue/package.json

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,30 @@
66
"license": "MIT",
77
"private": true,
88
"scripts": {
9-
"dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot",
10-
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
9+
"dev": "cross-env NODE_ENV=development webpack serve --open --hot",
10+
"build": "cross-env NODE_ENV=production webpack --progress"
1111
},
1212
"dependencies": {
13-
"@syncfusion/ej2-vue-documenteditor": "^19.3.44",
14-
"vue": "^2.5.11"
13+
"@syncfusion/ej2-vue-documenteditor": "^23.1.41",
14+
"vue": "^3.4.21"
1515
},
1616
"browserslist": [
1717
"> 1%",
1818
"last 2 versions",
19-
"not ie <= 8"
19+
"not ie <= 11"
2020
],
2121
"devDependencies": {
22-
"babel-core": "^6.26.0",
23-
"babel-loader": "^7.1.2",
24-
"babel-preset-env": "^1.6.0",
25-
"babel-preset-stage-3": "^6.24.1",
26-
"cross-env": "^5.0.5",
27-
"css-loader": "^0.28.7",
28-
"file-loader": "^1.1.4",
29-
"vue-loader": "^13.0.5",
30-
"vue-template-compiler": "^2.4.4",
31-
"webpack": "^3.6.0",
32-
"webpack-dev-server": "^2.9.1"
22+
"@babel/core": "^7.24.4",
23+
"@babel/preset-env": "^7.24.4",
24+
"@vue/compiler-sfc": "^3.4.21",
25+
"babel-loader": "^9.1.3",
26+
"cross-env": "^7.0.3",
27+
"css-loader": "^6.10.0",
28+
"file-loader": "^6.2.0",
29+
"style-loader": "^4.0.0",
30+
"vue-loader": "^17.4.2",
31+
"webpack": "^5.91.0",
32+
"webpack-cli": "^5.1.4",
33+
"webpack-dev-server": "^5.2.1"
3334
}
3435
}

Vue/src/App.vue

Lines changed: 39 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,50 @@
11
<template>
2-
<div id="app">
3-
<ejs-documenteditorcontainer ref="container" height="590px" :serviceUrl='serviceUrl' :enableToolbar='true' :documentChange='onDocumentChange'> </ejs-documenteditorcontainer>
4-
</div>
2+
<div id="app">
3+
<ejs-documenteditorcontainer
4+
ref="container"
5+
height="590px"
6+
:serviceUrl="serviceUrl"
7+
:enableToolbar="true"
8+
:documentChange="onDocumentChange">
9+
</ejs-documenteditorcontainer>
10+
</div>
511
</template>
612

713
<script>
8-
import Vue from 'vue';
9-
import { DocumentEditorContainerPlugin, DocumentEditorContainerComponent,Toolbar } from '@syncfusion/ej2-vue-documenteditor';
14+
import {
15+
DocumentEditorContainerPlugin,
16+
DocumentEditorContainerComponent,
17+
Toolbar
18+
} from '@syncfusion/ej2-vue-documenteditor';
1019
11-
Vue.use(DocumentEditorContainerPlugin);
12-
export default {
13-
data(){
14-
return { serviceUrl:'https://ej2services.syncfusion.com/production/web-services/api/documenteditor/' }
15-
},
16-
provide: {
17-
//Inject require modules.
18-
DocumentEditorContainer: [Toolbar]
19-
},
20-
methods:{
21-
onDocumentChange: function (args) {
22-
//To detect the device
23-
let isMobileDevice = /Android|Windows Phone|webOS/i.test(navigator.userAgent);
20+
export default {
21+
data() {
22+
return {
23+
serviceUrl: 'https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/'
24+
};
25+
},
26+
provide: {
27+
// Inject required modules
28+
DocumentEditorContainer: [Toolbar]
29+
},
30+
methods: {
31+
onDocumentChange: function () {
32+
// To detect the device
33+
let isMobileDevice = /Android|Windows Phone|webOS/i.test(navigator.userAgent);
2434
25-
if (isMobileDevice) {
26-
this.$refs.container.ej2Instances.restrictEditing = true;
27-
setTimeout(() => {
28-
this.$refs.container.ej2Instances.documentEditor.fitPage("FitPageWidth");
29-
}, 50);
35+
if (isMobileDevice) {
36+
this.$refs.container.ej2Instances.restrictEditing = true;
37+
setTimeout(() => {
38+
this.$refs.container.ej2Instances.documentEditor.fitPage('FitPageWidth');
39+
}, 50);
40+
} else {
41+
this.$refs.container.ej2Instances.restrictEditing = false;
42+
}
3043
}
31-
else {
32-
this.$refs.container.ej2Instances.restrictEditing = false;
33-
}
34-
}
35-
}
3644
}
45+
};
3746
</script>
47+
3848
<style>
3949
@import '../node_modules/@syncfusion/ej2-base/styles/material.css';
4050
@import '../node_modules/@syncfusion/ej2-buttons/styles/material.css';
@@ -44,5 +54,5 @@ methods:{
4454
@import '../node_modules/@syncfusion/ej2-navigations/styles/material.css';
4555
@import '../node_modules/@syncfusion/ej2-splitbuttons/styles/material.css';
4656
@import '../node_modules/@syncfusion/ej2-dropdowns/styles/material.css';
47-
@import "../node_modules/@syncfusion/ej2-vue-documenteditor/styles/material.css";
57+
@import '../node_modules/@syncfusion/ej2-vue-documenteditor/styles/material.css';
4858
</style>

Vue/src/main.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import Vue from 'vue'
2-
import App from './App.vue'
1+
import { createApp } from 'vue';
2+
import App from './App.vue';
33

4-
new Vue({
5-
el: '#app',
6-
render: h => h(App)
7-
})
4+
createApp(App).mount('#app');

Vue/webpack.config.js

Lines changed: 34 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,55 @@
1-
var path = require('path')
2-
var webpack = require('webpack')
1+
const { VueLoaderPlugin } = require('vue-loader');
2+
const path = require('path');
33

44
module.exports = {
5+
mode: process.env.NODE_ENV || 'development',
6+
57
entry: './src/main.js',
8+
69
output: {
7-
path: path.resolve(__dirname, './dist'),
8-
publicPath: '/dist/',
9-
filename: 'build.js'
10+
path: path.resolve(__dirname, 'dist'),
11+
filename: 'bundle.js',
12+
publicPath: '/'
1013
},
14+
15+
// ✅ Webpack 5–compatible devtool value
16+
devtool: 'eval-cheap-module-source-map',
17+
1118
module: {
1219
rules: [
1320
{
14-
test: /\.css$/,
15-
use: [
16-
'vue-style-loader',
17-
'css-loader'
18-
],
19-
}, {
2021
test: /\.vue$/,
21-
loader: 'vue-loader',
22-
options: {
23-
loaders: {
24-
}
25-
// other vue-loader options go here
26-
}
22+
loader: 'vue-loader'
2723
},
2824
{
2925
test: /\.js$/,
30-
loader: 'babel-loader',
26+
use: {
27+
loader: 'babel-loader'
28+
},
3129
exclude: /node_modules/
3230
},
3331
{
34-
test: /\.(png|jpg|gif|svg)$/,
35-
loader: 'file-loader',
36-
options: {
37-
name: '[name].[ext]?[hash]'
38-
}
32+
test: /\.css$/,
33+
use: ['style-loader', 'css-loader']
3934
}
4035
]
4136
},
42-
resolve: {
43-
alias: {
44-
'vue$': 'vue/dist/vue.esm.js'
45-
},
46-
extensions: ['*', '.js', '.vue', '.json']
47-
},
37+
38+
plugins: [
39+
new VueLoaderPlugin()
40+
],
41+
4842
devServer: {
49-
historyApiFallback: true,
50-
noInfo: true,
51-
overlay: true
52-
},
53-
performance: {
54-
hints: false
43+
hot: true,
44+
open: true,
45+
port: 8080,
46+
historyApiFallback: true
5547
},
56-
devtool: '#eval-source-map'
57-
}
5848

59-
if (process.env.NODE_ENV === 'production') {
60-
module.exports.devtool = '#source-map'
61-
// http://vue-loader.vuejs.org/en/workflow/production.html
62-
module.exports.plugins = (module.exports.plugins || []).concat([
63-
new webpack.DefinePlugin({
64-
'process.env': {
65-
NODE_ENV: '"production"'
66-
}
67-
}),
68-
new webpack.optimize.UglifyJsPlugin({
69-
sourceMap: true,
70-
compress: {
71-
warnings: false
72-
}
73-
}),
74-
new webpack.LoaderOptionsPlugin({
75-
minimize: true
76-
})
77-
])
78-
}
49+
resolve: {
50+
extensions: ['.js', '.vue'],
51+
alias: {
52+
vue$: '@vue/runtime-dom'
53+
}
54+
}
55+
};

0 commit comments

Comments
 (0)