Skip to content

Commit

Permalink
painful migrate to angular 15.2.9 with work-around mariohmol/ang-json…
Browse files Browse the repository at this point in the history
  • Loading branch information
thdang1009 committed Mar 4, 2024
1 parent 3fb1347 commit a4e0de4
Show file tree
Hide file tree
Showing 14 changed files with 11,434 additions and 27,377 deletions.
38,210 changes: 11,089 additions & 27,121 deletions package-lock.json

Large diffs are not rendered by default.

22 changes: 8 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,21 @@
"private": true,
"dependencies": {
"@angular/animations": "15.2.9",
"@angular/cdk": "14.2.0",
"@angular/cdk": "15.2.9",
"@angular/common": "15.2.9",
"@angular/compiler": "15.2.9",
"@angular/core": "15.2.9",
"@angular/fire": "^7.3.0",
"@angular/fire": "7.5.0",
"@angular/forms": "15.2.9",
"@angular/material": "14.2.0",
"@angular/material": "15.2.9",
"@angular/platform-browser": "15.2.9",
"@angular/platform-browser-dynamic": "15.2.9",
"@angular/platform-server": "15.2.9",
"@angular/router": "15.2.9",
"@kolkov/angular-editor": "^3.0.0-beta.0",
"@maaxgr/ang-jsoneditor": "^12.0.0",
"@ngstack/code-editor": "^5.1.0",
"@nguniversal/express-engine": "^14.2.0",
"@sentry/angular": "^6.19.7",
"ajv": "8.6.1",
"ang-clap": "^0.0.3",
"ang-jsoneditor": "3.1.1",
"arrive": "2.4.1",
"bootstrap": "4.5.2",
"bootstrap-material-design": "4.1.3",
Expand All @@ -59,15 +56,13 @@
"jquery": "3.6.0",
"jsoneditor": "^9.5.8",
"moment": "^2.29.3",
"ng": "0.0.0",
"ng-write": "^12.0.0",
"ng2-file-upload": "^1.4.0",
"ng2-pdf-viewer": "8.0.1",
"ngx-autosize": "^1.8.7",
"ngx-chips": "^2.2.2",
"ngx-file-drop": "^12.0.0",
"ngx-google-analytics": "^13.0.1",
"ngx-markdown": "^14.0.1",
"ngx-google-analytics": "14.0.1",
"ngx-markdown": "15.1.2",
"ngx-smart-modal": "^7.4.1",
"ngx-typed-js": "^2.1.1",
"perfect-scrollbar": "1.5.0",
Expand All @@ -84,14 +79,13 @@
"@angular/cli": "15.2.9",
"@angular/compiler-cli": "15.2.9",
"@angular/language-service": "15.2.9",
"@nguniversal/builders": "14.2.0",
"@types/bootstrap": "4.5.0",
"@types/chartist": "0.11.1",
"@types/express": "^4.17.0",
"@types/googlemaps": "3.43.3",
"@types/jasmine": "3.8.1",
"@types/jquery": "3.5.6",
"@types/node": "16.3.2",
"@types/node": "^16.3.2",
"codelyzer": "6.0.2",
"jasmine-core": "3.8.0",
"jasmine-spec-reporter": "7.0.0",
Expand All @@ -110,4 +104,4 @@
"typescript": "4.9.5",
"webpack-bundle-analyzer": "^4.6.1"
}
}
}
3 changes: 0 additions & 3 deletions src/app/_layouts/guest-layout/guest-layout.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { MatTooltipModule } from '@angular/material/tooltip';
import { ComponentsModule } from '@app/components/components.module';
import { ReuseComponentModule } from '@app/_reuse/reuse.module';
import { SharedModule } from '@app/_shares/shared-module.module';
import { DocuEditorModule, DocuModule } from 'ng-write';

@NgModule({
imports: [
Expand All @@ -32,8 +31,6 @@ import { DocuEditorModule, DocuModule } from 'ng-write';
ComponentsModule,
ReuseComponentModule,
SharedModule,
DocuModule,
DocuEditorModule,
],
declarations: [
HomeComponent,
Expand Down
3 changes: 0 additions & 3 deletions src/app/_shares/shared-module.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { MatFormFieldModule } from '@angular/material/form-field';
import { MatInputModule } from '@angular/material/input';
import { MatSelectModule } from '@angular/material/select';
import { MatTooltipModule } from '@angular/material/tooltip';
import { NgJsonEditorModule } from '@maaxgr/ang-jsoneditor';
import { AutosizeModule } from 'ngx-autosize';
import { ScoreToTierPipe, SimpleTimePipe, TimeAgoPipe } from '@pipes/_index';
import { MatDialogModule } from '@angular/material/dialog';
Expand All @@ -28,7 +27,6 @@ import { MatTabsModule } from '@angular/material/tabs';
FormsModule,
ReactiveFormsModule,
// third party
NgJsonEditorModule,
AutosizeModule,
// angular material
MatButtonModule,
Expand All @@ -48,7 +46,6 @@ import { MatTabsModule } from '@angular/material/tabs';
FormsModule,
ReactiveFormsModule,
// third party
NgJsonEditorModule,
AutosizeModule,
// pipes
TimeAgoPipe,
Expand Down
2 changes: 0 additions & 2 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Component, OnDestroy, OnInit } from '@angular/core';
import { JsonEditorOptions } from '@maaxgr/ang-jsoneditor';
import { AnalyticService, AuthService, SocketioService } from './_services/_index';
import { handleSocketGuestMessage, handleSocketReadingInfo } from './_shares/common';
import { SK_GUEST_MESSAGE_RESPONSE, SK_READING_INFO_REALTIME_UPDATE } from './_shares/constant';
Expand All @@ -14,7 +13,6 @@ import { ReadingInfoService } from './_services/reading-info/reading-info.servic
styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit, OnDestroy {
public editorOptions: JsonEditorOptions;
public initialData: any;
public visibleData: any;

Expand Down
1 change: 1 addition & 0 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { AnchorModule } from './_shares/anchor/anchor.module';
import { MarkdownModule, MarkedOptions, ClipboardOptions, ClipboardButtonComponent } from 'ngx-markdown';
import { markedOptionsFactory } from './views/blog-management/blog-management.module';
import { AnchorService } from './_shares/anchor/anchor.service';

// NgModule
@NgModule({
imports: [
Expand Down
10 changes: 5 additions & 5 deletions src/app/views/blog-management/blog-management.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import { TagListComponent } from './tag/tag-list/tag-list.component';
import { AddCategoryComponent } from './category/add-category/add-category.component';
import { CategoryListComponent } from './category/category-list/category-list.component';
import { ComponentsModule } from '@app/components/components.module';
import { AngClapModule } from 'ang-clap';
import { DocuModule, DocuEditorModule } from 'ng-write';
// import { AngClapModule } from 'ang-clap';
// import { DocuModule, DocuEditorModule } from 'ng-write';
import { TagInputModule } from 'ngx-chips';
import { PostEditComponent } from './post/post-edit/post-edit.component';

Expand Down Expand Up @@ -54,10 +54,10 @@ export function markedOptionsFactory(anchorService: AnchorService): MarkedOption
BlogManagementRoutingModule,
ComponentsModule,
// third party
AngClapModule,
// AngClapModule,
TagInputModule,
DocuModule,
DocuEditorModule,
// DocuModule,
// DocuEditorModule,
MarkdownModule.forRoot({
loader: HttpClient,
markedOptions: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,48 +1,64 @@
<div class="clap-container">
<ang-clap fillColor="green" [claps]="count" [showBorder]="true" [showAnimation]="true"
<!-- <ang-clap fillColor="green" [claps]="count" [showBorder]="true" [showAnimation]="true"
(mouseClickEvent)="clapThisPost($event)" (mouseLeaveEvent)="updateClap()" (clearClapsEvent)="removeClap()">
</ang-clap>
</ang-clap> -->
</div>
<div class="container post-container">

<article class="container article-page">
<div class="div__back-to-home"><a (click)="backToHome()">← Back to the Blog Home</a></div>
<figure *ngIf="ready" class="d-flex-col-mid-center">
<img loading="lazy" class="page-image" src="{{item.postBackgroundImg}}" alt="post's image">
</figure>
<article class="container article-page">
<div class="div__back-to-home">
<a (click)="backToHome()">
← Back to the Blog Home
</a>
</div>
<figure *ngIf="ready"
class="d-flex-col-mid-center">
<img loading="lazy"
class="page-image"
src="{{item.postBackgroundImg}}"
alt="post's image">
</figure>

<div class="wrap-content" *ngIf="ready">
<header class="header-page d-flex-col-mid-center">
<h1 class="page-title">{{item?.title}}</h1>
<div class="page-date">
{{item?.author}}
<div *ngIf="ready"
class="wrap-content">
<header class="header-page d-flex-col-mid-center">
<h1 class="page-title">{{item?.title}}</h1>
<div class="page-date">
{{item?.author}}
wrote
{{item?.createdAt | timeAgo }}
({{item?.createdAt | date }})
with {{item?.viewCount | number:'1.0-0' }} <i class="fa fa-eye" aria-hidden="true"></i>
</div>
<div style="margin-top: 1rem;">
<div class="tagging" *ngFor="let tag of item.tags">
<a class="tagging__item" [routerLink]="'/home'"
[queryParams]="{ tag: tag.name }">#{{tag.name}}</a>
</div>
</div>
</header>
</div>
<div class="post-description">
<p>{{item?.description}}</p>
</div>
<div class="post-body">
<ng-container *ngIf="ready">
<docu-article *ngIf="item.type === POST_TYPE.GHOST_EDITOR; else markdownPart"
[documentation]="item.contentGhostEditor">
</docu-article>
with {{item?.viewCount | number:'1.0-0' }}
<i class="fa fa-eye"
aria-hidden="true"></i>
</div>
<div style="margin-top: 1rem;">
<div *ngFor="let tag of item.tags"
class="tagging">
<a [routerLink]="'/home'"
[queryParams]="{ tag: tag.name }"
class="tagging__item">
#{{tag.name}}
</a>
</div>
</div>
</header>
</div>
<div class="post-description">
<p>
{{item?.description}}
</p>
</div>
<div class="post-body">
<ng-container *ngIf="ready">
<docu-article *ngIf="item.type === POST_TYPE.GHOST_EDITOR; else markdownPart"
[documentation]="item.contentGhostEditor">
</docu-article>

<ng-template #markdownPart>
<markdown [data]="item.content">
</markdown>
</ng-template>
</ng-container>
</div>
</article>
</div>
<ng-template #markdownPart>
<markdown [data]="item.content"></markdown>
</ng-template>
</ng-container>
</div>
</article>
</div>
Loading

0 comments on commit a4e0de4

Please sign in to comment.